Visual Studio 2013 hanging on getting latest from TFS - visual-studio

In my Visual Studio 2013 I'm trying to get the latest version of a project from TFS but this hangs on until the timeout error occurs.
I've tried deleting the Team Explorer cache a couple of times, undo all the changes, restart, rebuild but still the same issue.
What's even more interesting is that there someone else in my team with a similar version of Visual Studio that hangs when getting the latest on the same project.
We're using VSO so I was expecting this will not have issues.
Any ideas?
Thanks,
Andrei

Please make sure if you are running antivirus that your work space is excluded from the rules. Otherwise it has to check each and every file which is a major slow down. Also check your local work space to see if the files are getting copied. Check the event log on the TFS server it may have a reason. Also try using the VS command line to make the same request.

Related

TFS Error - Unexpected End of File

When I open Visual Studio and attempt to connect to TFS, I get the following error message:
Error
Unexpected end of file.
I've found a handful of places online (like here and here) where people have run into similar situations but clearing the Team Foundation cache as recommended doesn't solve the issue.
I even completely uninstalled Visual Studio Enterprise 2015 and installed Visual Studio Enterprise 2017 and still get the same error.
I recently created a new TFS instance on another server for testing out some automated build features without messing with our current setup and can connect to the new TFS instance just fine.
What would cause this error?
First you could use another machine with VS installed to connect the same TFS under your account. This will narrow down if the issue only occurs on your local machine or not.
You could try to clear both TFS and VS cache issue.(You may not uninstalled the previous VS clearly).
For TFS cache:
close all instances of Visual Studio on the client machine,
manually delete the corresponding Tfs client cache folder, and then
start Visual Studio
The corresponding Tfs folders to manually delete are as follows:
Tfs 2017: "%localappdata%\Microsoft\Team Foundation\7.0\Cache\"
Tfs 2015: "%localappdata%\Microsoft\Team Foundation\6.0\Cache\"
For VS cache:
Delete the contents from the following folders
C:\Users\<<Your Alias>>\AppData\Local\Microsoft\VisualStudio
C:\Users\<<Your Alias>>\AppData\Local\Microsoft\VSCommon
Moreover, also give a try with removing the tfs related credentials from Credential Manager, close all Visual Studio instances, deleting %LOCALAPPDATA%\.IdentityService, use another user account connect to the TFS server.
Update: Op ended up doing an OS reload and haven't had any issues since.
I ended up doing a full OS reload
It was likely overkill as I'm convinced there was a cached file somewhere I couldn't locate that was holding those settings but I didn't have the extra time to fiddle with it and I needed to move to Windows 10 at some point anyway.
I'd venture to guess #PatrickLu-MSFT's answer will work for most people but for whatever reason it didn't for me.
In my case I closed Visual Studio 2017, went to the solution's directory and deleted the .vssscc file.
The file was then regenerated and the problem was solved.

Visual Studio 2015 Extensions Manager Index was out of range error

Env: Visual Studio 2015 Community Edition on Windows 8
Trying to open Tools --> Extensions and Updates results in the following error in a message box:
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
Tried running as Admin, same result.
I've tried looking at the log but nothing mentions that error.
In the log there are 3 error entries related to extensions which could be related, they say the following:
Error loading extension: Could not find a part of the path 'C:\path\to\APPDATA\LOCAL\MICROSOFT\VISUALSTUDIO\14.0\EXTENSIONS\ZW2UF5JV.JVN\extension.vsixmanifest'.
The other 2 are identical except the odd string at the end is HQ1Y5EQD.TMG and 3KWE1LJF.Z1W.
Interestingly, just before those errors in the log appear, there is a line for each saying the extension was loaded successfully but if I try to go to the path it's got listed, it doesn't exist.
I can't find any reference to those strings on my machine. I've also searched the registry but can't find any reference in there either.
I can get into the Extensions manager if I click on one of the update notifications but the original error message just displays in the main pane and I can't do anything else. I can get to the online window but as soon as I click an extension, I am prompted with the original message.
I haven't installed any extensions or VS updates for a while but my Web Compiler extension extension has stopped auto compiling JSX files which is why I started trying to look at the Extension manager. I'm guessing the issues are related.
I can still work, compiling can be done manually which is inconvenient but not the end of the world. My worry is some other extensions are also misbehaving and I just haven't noticed yet.
Don't really want to re-install VS as a) it took ages last time and b) it might not fix the issue. Is there any good advice on troubleshooting the error or anything else I can try before I re-install?
I refreshed the GitHub extension on VS 2015 and got this error. Deleting the two cache files:
extensions.en-US.cache
extensionSdks.en-US.cache
from the AppData\Local\Microsoft\VisualStudio\14.0\Extensions causes them to be rebuilt and eliminates the error.
No reinstall needed.
Problem got worse, I started getting the error message when starting Visual Studio and things like the package manager wouldn't load. Each restart seemed to yield a different combination of windows not loading, sometimes Solution Explorer, sometimes Team Explorer etc. Not good.
A repair to VS 2015 via the Control Panel took a while but didn't help, same problems.
I ended up completely uninstalling and trying to re-install. However the installer threw an index was out of range error but weirdly VS 2015 was now listed as an installed application again.
So I'm guessing the original uninstall left some problematic files lying around which messed up the next install. So I uninstalled again, renamed Microsoft Visual Studio 14.0 folder, cleared all files from AppData\Local\Microsoft\VisualStudio\14.0\Extensions and re-installed.
It installed and ran fine.
The problem I now had was that I couldn't find the SQL Server Object Explorer window anywhere. I tried repairing SQL Server Data Tools but still no luck. So I uninstalled SSDT and then re-installed. This seemed to fix it.
Now I realised I also couldn't connect to Azure through the Server Explorer window, the option was simply not appearing in the list like it used to. This time a repair to Azure Tools for Microsoft Visual Studio 2015 - v2.9 and a repair to Azure App Service Tools v2.9 - Visual Studio 2015 fixed that problem.
I confronted same issue and found this thread. I tried the above suggestions, but unfortunately, it went all unsuccessful. I even tried to uninstall/install with even worse result as Visual Studio became unable to start due to new "missing components" issue. Reinstallation was nothing better.
I finally came by a piece of magic. It was Visual Studio Uninstaller which although would remove all your installed extensions, it would perform a complete cleanup. It would save you from installing new Windows (at least it was my case.
Just go to releases and download the first zip file
This way you will be able to perform clean install of Visual Studio.

Why can't Visual Studio 2013 determine the workspace for my solution?

Earlier today the TFS server where I work went down. As a result, when I tried going into visual studio 2013 to work on a project that managed though TFS Visual Studio detected that TFS was inaccessible and accessed the solution in offline mode. Later on in the morning the server was rebooted and was online and operational. However, when I try to go online with the solution I get the error message stating "Unable to determine the workspace for this solution". So I went ahead and verified that the workspace is correct with all the bindings from the associated source control folder to that of my local folders. So to try and fix the issue I did the following steps:
I completely disassociated the solution from source control even though its offline.
Rebinded the solution to source control. At this point all locks were visible on the solution and the files that were checked out.
I got the latest version for the project and and updated my local solution.
Rebinding the solution worked to fix my initial issue. However, every time I exit visual studio 2013 and go back into the solution it loses all the bindings and it's unable to determine the workspace for the solution. Has anyone ran into this before? Is there something that I am overlooking? Any help will be greatly appreciated.
Please Note, I have read though some of the posts already on stack-overflow and I have not found one that addresses the issue with Visual Studio losing the bindings on each start-up.
Quit Visual Studio.
There is a Registry-Entry
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0\TeamFoundation\Instances\\[[NameYourOfTFSServerHere]]\Collections\\[[NameOfYourProjectCollectionHere]]
Change Reg_Dword Offline from 1 to 0
Delete the .suo file of the Solution
Reopen your Solution should fix it.
Make sure "show hidden files" is enabled, then delete the .suo file in the solution's folder (while VS is closed, of course)
Quit all Visual Studio instances and delete TFS cache at "c:\Users\\AppData\Local\Microsoft\Team Foundation\5.0\Cache"

Visual Studio 2013 Search Solution Explorer fails to find files

So, I was using Visual Studio 2013, it crashed, and when I restarted it the Search Solution Explorer had stopped functioning correctly:
It fails to find any file if you type in the exact file name
It fails to find any static files e.g. HTML, CSS, JavaScript, etc.
It fails to find any configuration files e.g. Web.config
It seems to still find some files on a partial match, but not all files that you'd expect it to match e.g. if I search for Account I'd expect it to find AccountController.cs and AccountControllerTest.cs but it only finds the latter.
Some further info:
If I start VS 2013 in safe mode Search Solution Explorer works fine without any problems
If I manually disable or uninstall the extensions I'm using and start VS normally, the problem with Search Solution Explorer reappears
Has anyone come across anything similar to this, or got any suggestions of what to try to get Search Solution Explorer working again?
Update
I've had some joy running devenv /ResetSkipPkgs and devenv /ResetSettings. After a I ran those command Search Solution Explorer started working again, and works most of the time now. It still fails occasionally. Sometimes restarting Visual Studio will get it working again, but sometimes it just plain refuses to find certain files that are there.
Update 2
I installed Visual Studio 2013 Update 2, and Search Solution Explorer ran without any problems for just over a week before this problem reappeared. Restarting Visual Studio got Search Solution Explorer working again.
I was able to narrow this down to the extensions I was using, "Productivity Power Tools 2013" seems to break the search feature for me in IIS, so I've disabled it for now. I'm getting a full set of results when searching now.
I came to this conclusion by uninstalling all of my extensions and reinstalling them one by one until the problem reappeared.
A coworker also had some success with this solution, launching DevEnv.exe with /ResetSkipPkgs
http://msdn.microsoft.com/en-us/library/ms241276.aspx
Update
The problem returned for me after about 30 minutes, no specific cause noted. It was nice while it lasted. Removing all extensions gets me the same behavior as OP, only running in safe mode appears to work.
Deleting the .suo file also seems to fix the problem for a while, and then it comes back. I'm about to resort to a reinstall of vs2012 just to get this search feature back.
Please try to install VS2013 update 2 CTP before reinstalling everything and see if it fix the bug:
Weird that it works in Safe Mode, or that you manage to fix by removing extensiosn and it then re-appears...
but if some of your projects are in solution folders, then there is a known bug, fixed but not released yet apparently:
http://connect.microsoft.com/VisualStudio/feedback/details/801836/solution-explorer-doesnt-search-files-projects-inside-solution-folders
I have the same issue and confirmed it related to VS2013 Update 2 RC. Uninstall it will fixed this issue.
Wait for GM version of VS 2013 update 2.
I still had this issue both prior to and after installing VS update 3. I should note that it went away after I installed that for a while, and then came back. I suspect (but cannot confirm) that the broken behavior's return coincided with a lockup of my system which necessitated a reboot...
Anyway, I had the Productivity Power Tools installed, and after reading the answers here wondered if it might be complicit, and so I went to disable it and noticed it had a pending update. I went ahead and updated the add-on, and that resolved the issue for me (again). We'll see if it stays fixed.
This may caused by other extensions you have installed in your visual studio. I have some issue, found out Telerik JustTrace caused this issue.
Running devenv /ResetSkipPkgs will fix the problem but, as noted, it will return. For a permanent solution, add this parameter to the target in the exe's properties:
"C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe" -ResetSkipPkgs

What's the reason for error message? I am using VS 2010 professional edition

What's the reason for error message "The snapshot is out of date and cannot be used anymore because type tree has been updated, A new snapshow needs to be acquired"?
This error appeared right after I launched VS2010 and added username/pwd to connect to TFS repository.
I am using VS 2010 professional edition.
It happened to me with VS2012 as well after loading the project without source control binding, a local simple WinForms project. All I needed to do was Clean & Rebuild. After that the problem was solved.
This is a bug in Visual Studio. According to http://connect.microsoft.com/VisualStudio/feedback/details/742959/the-snapshot-is-out-of-date "We've taken a closer look at this problem and it isn't one that we'll be able to solve in the next release of Visual Studio."
They recommend waiting around until the background language parser service is done (or, in other words, don't try to be too productive there partner.) My experience is that closing all documents, cleaning the solution, rebuilding it and then closing and re-opening with a pause after does remove the error.
Until you do something silly, like edit code. Then all bets are off again as to when it reoccurs.
I had a similar issue with VS2012 and after rebuilding the solution twice, I still saw the same error message.
Following an advice from a post from this site, I closed the Designer tab, reopened it from the Solution Explorer, and the problem was resolved.
I got this error too, but after I unload project and reload project, the problem was resolved.
Simply restarting Visual Studio 2012 was a workaround for me, but it kept happening about every hour and having to restart visual studio that often was very annoying.
I also found this post which suggests that the Productivity Power Tools are the problem and to simply turn off the Automatic Brace Completion in Tools->Options->Productivity Power Tools. Since making this change I haven't seen the error message again :)
I'll note though that I am using Visual Studio 2012 and the OP is using Visual Studio 2010, but the Productivity Power Tools are available for VS 2010 too, so this may still fix the problem in VS 2010.
The same issue persists in VS2013, but no amount of Clean/Rebuild or restarting VS will help. The only way I can do a successful publish, is to disable the AutoT4MVC extension.
I got this error too. I closed Visual Studio 2012 and opened it again and the error was gone.
I got this error when I had conflicting class names / namespaces. I was referencing a UserControl from a different DLL in my XAML file which had the same name as my XAML file (class name). Maybe this helps.
I used Visual Studio 2012, and just faced this error on my Windows 8. It seems like Turning off the VM and restarting Visual Studio fixed the issue.
I just got this with VS2010.
I had a form with a user control (UCa) with a user control (UCa) from a different project on it. Made a change to the UCb then flicked to the designer for the form and boom! Snapshot error.
Resolved by a full clean and then rebuilding just the UCb project before building the rest of the project.
I'm using Visual Studio 2012, and I got this error when starting Visual Studio, letting TFS connect to the server, and THEN opening my solution. The fix was simply closing VS and launching the solution directly.
I'll throw my two cents in here as well.
I've tried every combination of Clean, Rebuild, Restart, etc. What I've found is that restarting Visual Studio usually makes the problem go away for at least one Publish. Here's the weird part, though. You can also fix the problem by doing absolutely nothing. If you just let Visual Studio sit for about a minute or two, and then publish, it will usually work just fine. There's some background voodoo going on here, and waiting for it to finish seems to do the trick.
I have a solution with two parts that need published. One is a WCF service application, and the other is the ASP.NET MVC5 website itself. Anytime I publish the services, and then try to publish the site I'll see this error. I can publish the services, restart VS, and then publish the site, OR I can publish the services, go get a drink, and then publish the site. As long as I give VS a chance to "settle" between any kind of rebuild and the publishing of the site, everything seems to work as expected.
Take a walk, come back, problem solved. OR if you don't have the time. Clean, Rebuild, Restart, Publish (lather, rinse, repeat).

Resources