Source control could not start the manual merge tool, why? - visual-studio-2010

I used to execute tf merge $/Alpha/Dev $/Alpha/Main /recursive from Command Prompt to merge changes from Dev branch to Main branch. On conflicts it shows up Resolve Conflicts window and we could resolve conflicts manually by choosing option Merge changes in Merge Tool
It was working fine till yesterday, all of a sudden it started throwing below error, and not showing the manual merge window.
TF10201 Source control could not start the manual merge tool.
One strange behavior, it is working fine if we open the Command Prompt as administrator.
Please anyone shed some light on this?

HOW TO RESTORE THE MICROSOFT DEFAULT MERGE TOOL
If you are having any problems with a diff/merge tool in Visual Studio and you are using TFS you can delete your existing tool in the menu here:
TOOLS - OPTIONS - SOURCE CONTROL - VISUAL STUDIO TEAM FOUNDATION SERVER
Then click the button entitled "Configure User Tools"
Select the Tool(s) and hit the REMOVE button. This will restore the Microsoft default tool.

I got the same error because my local file in target branch was missing.
VS shows error details in "output window"

I was running tf get and I had a conflict so the GUI displayed choices of take server, merge, take local.
When I clicked manual merge, VS2012 (our default merge tool) came up blank, and the conflict GUI had that same TF10201 Source control could not start the manual merge tool.
I found a blog post by somebody who had the same problem a few weeks ago, where they got a warning that the file was open.
I didn't get that warning, but I had the file open in PowerShell ISE. I closed the file, and then the manual tool worked perfectly.
I don't know why the merge tool cares that the file was open, or why the merge GUI displayed the error without displaying the reason, but at least it worked eventually?
EDIT: I hit the same issue today, without the file open in another merge tool. This time, I fixed the problem by first clicking the "Server edits" button, which opened the diff view in VS. While that was open I went back to the GUI and chose "manual tool" and VS said it had to close my file first. I said yes, and then manual merge worked!

The error happens when there is a merge conflict in a file that Visual Studio cannot automatically resolve and the file doesn't exist locally on the target branch. Fix is to do a forced get latest of the file on the target branch and this would be resolved.

In my case the problem was an application called CodeCompare.
Removing that from the compare tool of visual studio TFS solved my problem (as MarkInEugene said)
If you are having any problems with a diff/merge tool in Visual Studio
and you are using TFS you can delete your existing tool in the menu
here:
TOOLS - OPTIONS - SOURCE CONTROL - VISUAL STUDIO TEAM FOUNDATION
SERVER
Then click the button entitled "Configure User Tools" Select the
Tool(s) and hit the REMOVE button. This will restore the Microsoft
default tool.

Related

VS2017 15.7.5 doesn't automatically check out files

I've recently noticed that when I go to make a change which needs a file to be changed, VS2017 (Professional) has started to produce a popup saying:
The file <filename>, which you attempted to edit, is read-only on disk.
Would you like to make the file writeable or edit it anyway?
If I cancel this, I get a message:
The file '<filename>' needs to be checked out before it can be edited.
The file was not checked out automatically because you have disabled automatic checkout
when files are edited in the Source Control options page.
The Source_Control->Plug-in_Selection is set to Visual Studio Team Foundation Server; I haven't changed the Options under Source_Control->Environment; both Saving and Editing are set to Check out automatically.
As far as I know, apart from recently updating from 15.7.4 to 15.7.5, I haven't changed any settings. Is there some setting elsewhere which affects this?
Note, my installation of VS2017 Pro Preview, 15.8.0 preview 5.0, does the same thing and running VS2017 as Administrator does not fix it.
Update:
Visual Studio 2015 has no problem checking out the same files in the same local workspace. That is, if I open a solution in VS2017, edit a file and go to save it, I get the above messages. If I then cancel the edits and try the same thing on the same file in VS2015, the file gets checked out. Hence the problem is with VS2017 and not the files themselves.
OK. After further searching I found a pointer to the answer in this answer. Somehow, my VS2017 instances have gone offline from the TFS server. The menu option File->Source_Control->Advanced->Go_Online sorted things out.
My solution had become unbound from the source control server.
To resolve I used menu options File->Source Control->Advanced->Change source control... Select project or solution without Server Name or Server Binding. Click Bind.

'Microsoft.VisualStudio.Data.Tools.SqlLan......did not load correctly

I have installed the visual studio 2013.after installation and exactly at preparing for first use the following window appeared!!!this window just appeared at first time of use and from then on I did not see this window.is it a serious problem?if yes how can i solve it?
the message of window is:
The 'Microsoft.VisualStudio.Data.Tools.SqlLanguageServices.Package,Microsoft.VisualStudio.Data.Tools.SqlLanguageServices,Version=12.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a' package did not load correctly.
the problem may have been.....(it is too long..)
This error was happening to me any time I opened VS2013 - Right about when the 'Announcements' filled in the Start Page tab.
Tried installing VS2013 Update 2 - Took forever. Didn't fix. (TF;DF?)
Did the following based on this answer:
The 'ProviderPackage' package did not load correctly
Opened Programs and Features (run: appwiz.cpl)
Right click on 'Microsoft SQL Server Data Tools' and choose 'Repair'
That seemed to do it for me. Then for good measure, did this as instructed by MS site:
If you'd like to check for updates manually, open Visual Studio 2013
and choose the Tools > Extensions and Updates menu. SQL Server tooling
updates will appear in the Updates list.

VS2013 Build "Does not support previewing"

Every time I try to build my solution in VS2013, nothing builds, no errors - But in the status bar it says: "This item does not support previewing"
I googled around a bit but have come up empty.
But if I right click on each project and select build it works fine.
Any ideas?
Perhaps this message is totally unrelated... Post hoc ergo propter hoc
Steps to reproduce on my machine:
Right Click any project in solution: select build
Status bar displays Build successful
Right click solution select build
Status bar displays : "This item does not support previewing"
Perhaps it isnt related, but it sure does appear to be.
I was able to fix this... Somehow nothing was selected to build in the solution configuration. I right clicked on the solution, went to properties and then selected COnfiguration Properties and clicked the Build box for all the projects...
I have no idea how they became unchecked, only thing I can think of is a co-worker was trolling me.....
I've had this problem (i.e. debug not starting, and no error message) with Visual Studio 2015 in the following two cases:
after loading a solution that had previously been built with Visual Studio 2010
and also after using the "save as" function in Visual Studio 2015 to update a solution that had been started with Visual Studio 2010 (using Save as updates the solution file and sets the active Visual Studio version to 14 - i.e. VS 2015).
In both cases, deleting the bin and obj directories under the startup project fixed the problem. It's also worth closing visual studio and making sure that there are no {yourprojectname}.vshost.exe processes still running - if there are then kill them before running visual studio again. On that note, if you have multiple versions of visual studio on your machine, you should also check that you don't have the same solution open in the other version of visual studio at the same time (I've done that one myself).
One of the comments here suggests disabling the "enable visual studio hosted process" option. Don't do that if you can at all avoid it: you'll lose lots of debugging functionality (particularly in the area of being able to edit code while your solution is running).
Hope that helps someone out there.
Solution for VS2015
"this item does not support previewing" vs2015 (Visual Studio 2015/2016)
Step 1. Go to Control Panel -> Programs and Features
Step 2. Uninstall all: Windows Software Development Kit - Windows 10.0.10586.15 (maybe you have diff ver)
Step 3. Download new latest Windows Software Development Kit
https://go.microsoft.com/fwlink/p/?LinkId=619296
Install & Create new project, Done!
Dclick on MainPage.xaml and you will see Loading designer...
1: Add below lines in App.conf
<specFlow>
<unitTestProvider name="MSTest"></unitTestProvider>
</specFlow>
2: add a reference to Microsoft.VisualStudio.QualityTestTools.UnitTestFramework.dll
right click on your project and select: Add Reference
3: add using Microsoft.VisualStudio.TestTools.UnitTesting; in Step Defination
4: goto feature file and run it. This is what solve my problem on vs2013
I faced same issue with .aspx file. I just right click on the .aspx file and select open with (HTML Editor). You can choose any form the list.
I have come across the same issue for me, I have opened a project in VS 2010 and then when I open the same in VS 2015 then his error has occurred.
Solution:
By Closing the VS2010 project solution fixed the issue.

Visual Studio TFS shows unchanged files in the list of pending changes

I see a file in pending changes window. I try to compare it with latest version and I get an a message 'The files are identical' If the files are identical why is this file showing up in pending changes window? What changed about this file? Can I configure TFS not to list files that are identical?
This is normal if a file becomes automatically checked out due to a change, and if ultimately the contents of the file are changed back to it's original state. At that point you would see the message about identical contents upon comparison.
This blog entry describes a not-so intuitive way of dealing with this; and in the comments there is an even better suggestion on dealing with it through the command line via TFS power tools.
TFS pending changes ignoring identical files...
Recently I just updated VS2010 to VS 2013, and this issue even worse.
When you use compare, files that are identical don't pop up at all. I hate this because you could not figure out which files are truly changed until you check the compare files carefully.
Finally I figure out a workaround for this:
Add "Undo unchanged checkouts" in the external tools:
Command: tfpt.exe
Arguments: uu . /noget /recursive
Initial directory: $(SolutionDir)
After running this command, TFS will automatically undo all the redundant changes in the files.
But these files still keep check out status, actually they are already undo and same as the latest version. I think It is a bug in TFS. You just need click Refresh icon in the toolbar under solution explorer, these files will be refreshed and show the correct status!
To make the above explanation clearer:
Install TFS Power Tools using the NuGet package manager in VS.
Open the Visual Studio Command Prompt (also called Developer Command Prompt for VS 2013/2015) from Windows Start.
Navigate to the root location of your local workspace through the command prompt.
Execute this command: tfpt uu . /recursive /noget
Choose to discard redundant changes if prompted.
Worked for me.
Further:
Sometimes I have found I need to run the command on the opening prompt of the Developer Command Prompt (and getting a workspace not found error), before navigating to the workspace folder and executing there. If I go straight to the correct folder, the command is not found. (I wouldn't mind a solution to that issue in itself.)
I solved this by clicking the Stage All button in Changes then unstaging them with Unstage All.
It resolved the unchanged file I had in my Changes section. Nice and simple.
Visual Studio 2012 introduced a new concept called Local Workspace.
When the Workspace Location is configured to be Local, then it will place a local copy of the original file (Just like SVN / CVS).
It will then automatically hide unchanged files from pending changes.
Use the TFS Source Control Explorer to "Edit..." the TFS Workspace, and change the "Advanced..."-setting Location from Server to Local.
For me, reconciling the workspace resolves these invalid pending changes:
Team Explorer -> Builds
Right click on latest build with you changes -> "Reconcile Workspace..."

How to work offline with TFS

Our TFS server has some temporary connectivity issues right now, and as such VS has gone unresponsive, leaving 50+ developers unable to work!
Is it possible to switch TFS into an offline mode in the event of such an issue?
See this reference for information on how to bind/unbind your solution or project from source control. NOTE: this doesn't apply if you are using GIT and may not apply to versions later than VS2008.
Quoting from the reference:
To disconnect a solution or project
from source control
In Visual Studio, open Solution
Explorer and select the item(s) to
disconnect.
On the File menu, click Source
Control, then Change Source Control.
In the Change Source Control dialog
box, click Disconnect.
Click OK.
The 'Go Offline' extension adds a button to the Source Control menu.
https://visualstudiogallery.msdn.microsoft.com/6e54271c-2c4e-4911-a1b4-a65a588ae138
plundberg: The "disconnect" button is only available for the TFS provider starting in VS 2008. Even then, I'm not sure if it's officially supported. The recommended way to use the Go Offline feature is to [re]open the solution.
Martin Pritchard: if you get stuck mid-operation, you can force VS to timeout by pulling the network plug (literally) or running ipconfig /release.
Once you're marked offline, here's a step by step guide to working in that mode: http://teamfoundation.blogspot.com/2007/12/offline-and-back-again-in-vs2008.html
More detailed info on tweaking the behind-the-scenes behavior:
http://blogs.msdn.com/benryan/archive/2007/12/12/when-and-how-does-my-solution-go-offline.aspx
http://blogs.msdn.com/benryan/archive/2007/12/12/how-to-make-tfs-offline-strictly-solution-based.aspx
There are couple of little visual studio extensions for this purpose:
For VS2010 & TFS 2010, try this
For VS2012 & TFS 2010, use this
In case of TFS 2012, looks like there is no need for 'Go offline' extensions. I read something about a new feature called local workspace for the similar purpose.
Alternatively I had good success with Git-TF. All the goodness of git and when you are ready, you can push it to TFS.
Depending on which tool windows you have open, VS may or may not try to hit the team server automatically when it starts up.
For best results try this:
Close all instances of visual studio
Open an empty visual studio (no project/solution)
See which windows are opened by default, if source control explorer or team explorer or any other windows that use team are opened (and activated) by default, close them or switch them to a background tab.
Close visual studio
You should notice now that you can start visual studio without it trying to hit the TFS server.
I know its just an aside to your problem, but I hope you find this helpful!
If you have a solution open, and TFS is down, you might have trouble going into offline mode. If you close and reopen your solution, a nice little dialog will appear asking you if you want to Go Offline.
Alternatively if you don't want to close/reopen the solution, (as suggested by Bernie) you can install the TFS Go-Offline plugin, then click:
TEAM -> Go Offline
Simply, change the root folder name for your solution in your local machine, it will disconnect automatically.
I just wanted to include a link to a resolution to an issue I was having with VS2008 and TFS08.
I accidently opened my solution without being connected to my network and was not able to get it "back the way it was" and had to rebind every time I openned.
I found the solution here;
http://www.fkollmann.de/v2/post/Visual-Studio-2008-refuses-to-bind-to-TFS-or-to-open-solution-source-controlled.aspx
Basically, you need to open the "Connect to Team Foundation Server" and then "Servers..." once there, Delete/Remove your server and re-add it. This fixed my issue.
If the code has already been checked out by the user that if offline and they have the latest version on their local hd, then they just need to browse to the solution location and open the solution by double clicking sln file. The solution will open in disconnected mode.

Resources