TFS: Compare with Workspace Version shows blank screen - visual-studio

When I click on "Compare with Workspace Version" in Visual Studio 2015 Enterprise, using TFS, I get a blank screen with a message at the bottom saying "Running a compare operation in the background. Once the operation has completed, the results will be displayed in the compare tool."
I restarted my machine and also went into the following cache folders and cleared out the contents:
C:\Users\xxx\AppData\Local\Temp\TFSTemp
C:\Users\xxx\AppData\Local\Microsoft\Team Foundation\6.0\Cache
Strangely, when I do a solution-wide search for a term, some of the cached items in that first path still appear in the search results, and the files open even though I deleted them.
I suspect that a slow internet connection is related to the issue, but I can't compare any files now, even with the internet being at tolerable speeds. Is there more cache I can clear to get the compare feature working again?

I used the option to reset all settings as per the following thread, and compare started working again:
What is this 'Waiting for Background operation' in Visual Studio 2012?

Related

Get Latest will give an error if file is Not downloaded

When Source Control Explorer shows that a file is Not Downloaded, selecting Get Latest Version will result in the following:
I don't remember this happening in the past. Is there a way to prevent this?
This kind of error or situation may occur when using "Get Latest Version" after someone else has just added a new item to source control.
For example, it seems to be triggered by multiple people working on the same solution at the same time. So if you check stuff in, then the other user gets this message when doing a "Get Latest". It appears Visual studio is detecting the files that were checked in by the other user and then pulling them in the background but not updating the local workspace data, so when you do a Get Latest, the files already exist, but it gets confused as to the source control status and throw this because it's confused.
One solution for this issue is closing your Visual Studio and clear TFS cache. Then open the Visual Studio and get latest for this file again.
Another way is directly removing the work space and create a new one then tfs will prompt you to download everything again. https://msdn.microsoft.com/en-us/library/ms181386(v=vs.100).aspx This should do the trick.

Visual Studio - Reconcile TFS gated build closes all open documents, including other build statuses

Often when I check-in my changes they go into numerous branches simultaneously through a gated build which take a few minutes (check-ins are separated by branch, which I have in different local workspace mappings). I wish to monitor them because we've had issues of random build failures (unrelated to the code being checked-in) and need to update status in our internal tracking tool once they complete.
But when I reconcile any of them (when they succeed), every open file is closed on me, including all other Build Request tabs:
A couple questions: Why must VS assume I want to close everything (and how to stop it), and how can I reopen this kind of check-in status tab manually? Opening from the Builds page of team Explorer opens a different version that horribly lags each time it refreshes.
(lag is presumably from the copious number of warning messages)
P.S. I am not checking-in solution files that would cause a reload (and opening a different solution file doesn't close open documents anyway), but this only seems to occur when I reconcile changes in the currently-opened solution.
Update
I could not reproduce your issue in my test environment, all tabs such as other opened build status, source control explorer, opened .cs file tab, even with the preview window which not be pinned keep opened. As below screenshot:
After build succeed, then click reconcile workspace button, a pop-up window need to choose, simply select yes or yes to all. No tabs been closed neither.
I have also done multiple tests, under what circumstances these build status tabs will be closed in Visual Studio.
Found that even if you switch workspace/ switch project in team explorer during the process, all tabs will still keep opened.
Unless you switch a connected user, those tabs will be closed (also make sense)
Back to your issues, suggest you to give a try with Visual Studio in other computers to check if your issue still exist. This will narrow down if it related to your personal setting.
As a workaround, you could track all of your gated build status in web portal instead of Visual Studio.
As for there are different pages. You could check the detail info for your screenshot shared here. One for build status page, one for build request page.
If you want to re-open the build request summary. You could click the corresponding build request in your build status page such as below:

Pending Changes dialog shows files outside solution that shouldn't be there

If I open VS without opening a project/solution, I get a list of files in Pending Changes. The folders marked in red are solutions in my workspace, and those marked in green are branches of the solution.
However, when I open the respective solutions directly, none of those files are there. Somehow there is some overlap of what VS/TFS thinks needs to be checked in, even though in this case it is wrong.
I opened each solution from Pending Changes in turn, and there are no files to be checked in. I don't understand what (or why) it's showing me this list, and am concerned that if I accidentally check-in while showing "All" pending changes instead of solution-specific ones, that I will lose work.
Can anyone please explain why its showing these "phantom" pending check-ins? Even more bizarelly, the same of the solution in the title bar of pending changes is not even remotely related to some of the files shown.
If I delete my workspace, then create a fresh one, and then get recent, the problem goes away for a few weeks, but then randomly files start to appear back here.
This could be a source control binding error or some TFS cache issue.
Try to unbind/ bind this files in source control. File > Source Control > Advanced > Change Source Control
File > Source Control > Add to Source Control
Detail ways please refer: Project not showing as checked-in to TFS in Visual Studio 2013
Also give a try with clear VS and TFS cache

Visual Studio hangs on startup after I cancelled getting latest

I tried to map a workspace and started getting latest from it, the number of files to download were quite large, talking gigabytes.
Anyway I cancelled it halfway through as I needed to do a restart. Now when I launch VS (with or without a solution) it just hangs saying "Preparing solution" and a balloon pops up on the left saying its doing an internal operation.
I think its still trying to get latest in the background or connect to the workspace, how can I cancel this?
I would try the following (from fastest to the most thorough one).
in windows explorer/dos prompt search for suo files and delete them (they are marked as hidden). Download all files from commandline or source control explorer. Open solution
redo your steps, creating new workspace just don't cancel this time
Do note, if vs is hanged on something, make sure that no modal window is displayed, waiting for your input.

Visual Studio loses bindings to TFS suddenly

Why would my VS solution lose its TFS bindings suddenly? I have been working on a project for six months and this never happened. As soon as I opened a VS project/solution, I could check in/out, view history by right clicking on any given file. But suddenly, I dont see those options to checkin checkout etc any more when I right click on a file in VS studio solution explorer.
The team explorer window still brings up the source folder structure and I can get latest or get specific from there but did any one see this kind of behavior? Please let me know what I can do to avoid these situations in future.
Did you lose connection to the TFS server any time recently? I've had this happen in the past on unreliable network connections when working via TFS remotely. The solution and all projects therein would "go offline" and would appear to lose their bindings. This made it particularly unintuitive when the connection was re-established because changes made while "offline" weren't always found.
If you right-click on the solution or the projects, is there an option to "go online"? You might check the various menus for such an option as well.
Did you move the source files to a different location on your harddrive, or change your workspace mappings?
Try opening the solution/project by double-clicking the .sln file in Source Control Explorer instead of opening it from windows explorer.
You can also try bringing up the Bindings dialog by going File -> Source Control -> Change Source Control
I recently had a very similar experience. I had made several changes which I thought may have influenced my connection resilience. After reversing out of 2 of them and the problem persisted, I finally clocked what it was.
One of the new extensions I am using is NuGet (http://nuget.codeplex.com/). Every time I attempt to add a library my TFS connection fails and is unrecoverable till a restart of VS 2010.
See: http://nuget.codeplex.com/workitem/725
There is a work around that has been reported and working which may help you even if this is not your problem.
see http://blog.rthand.com/post/2011/08/26/Fixing-combination-of-NuGet-and-Team-Foundation-in-workgroup-configuration-401-Unauthorized.aspx
Happened to me also. I was removing a whole bunch of mappings for old releases under the local workspace. It was taking over 40 minutes so I killed it. The mapping has been removed to the older branches but the branch left behind had been disconnected from TFS.

Resources