For the past week or so I've been having an issue with the Source Control Explorer in Visual Studio 2017. It now takes a minute or more to expand a folder, and when I right-click -> Get Latest Version it completely freezes and I have to manually close the program with the Task Manager.
I have already tried removing and re-adding the connection to our TFS server. Others on my team are using the same version of VS2017 and the same TFS server without issue. I've uninstalled all extensions and that didn't help either. Short of a complete reinstall, what can I do to fix this issue?
After uninstalling and reinstalling Visual Studio, I finally figured it out.
I deleted all of the files I had downloaded from TFS locally. After I did that TFS started working without any problems again.
I was having the same issue and tried clearing the cache as per below link but didn't work.
https://blogs.msdn.microsoft.com/vsalm/2013/12/17/how-to-clear-the-tfs-cache-on-client-machines/
Deleting workspace did the trick.
Open Team Explorer
Click Source Control Explorer
In the nav bar of the tool window there is a drop down labeled "Workspaces".
Extend it and click on the "Workspaces..." option (yeah, a bit un-intuitive)
The "Manage Workspaces" window comes up. Click edit and you can add / remove / edit your workspace
Related
My objective is to get the files in the TFS into my local computer.
The computer I am using has previously been used by someone else, which I assume is the root of my problem.
I connect to the server, and in Source Control Explorer I find the folder that I want to download. I right click it, and a popup with the following pops up:
Source Control Explorer
All files are up to date.
No files were updated because the requested file versions were previously downloaded.
To force an update, use the "Get Specific Version" command with the "Overwrite all..." option checked.
Ok, so I do this, as is also suggested in this question on StackOverflow. It gives exactly the same result. I tried all different combinations of checking and unchecking the boxes.
I also tried to delete the workspace, and cleared the caches for Visual Studio and Team Foundation.
What should I do?
Problem solved.
I was not yet added to my team on the Team Foundation site.
Wierd that I could still see all the code.
I have a team project that I was working on, but today I opened Visual Studio 2013 (update 2) and my solution, just to see that TFS options (check in, get latest menu options, along with the lock and + signs next to files) are gone. The solution is just like a local solution. I haven't done anything. When I go to team options, I can see that it is mapped to the correct path and I'm on the correct workspace. I've removed the mapping, deleted the solution locally (I didn't have any pending changes) and remapped the solution from TFS. Got the latest version but still no mapping in solution explorer. Restarted Visual Studio many times (obviously), but no avail. I can get the latest from team explorer though. What could be the cause and how can I solve this problem?
You need to open "File | Source Control | Change Bindings". If the files are in the correct folder you should see a bunch of red squiggles under the mappings.
Unbind all of the projects and the solution
Rebind all of the projects and the solution
That should solve the issue.
You might have lost the solution bindings
Try to re bind to source control. Also check you are in the correct workspace in both places and that you are correctly mapped.
Your top source location is mapped into your local folder, check that and remove if that is mapped to the local folder.
Right Click -> Advanced -> Remove Mapping
I ended up going to Control Panel -> User Accounts -> Credential Manager and removing several references to a service account that some how became associated with my work space over the weekend. No idea why that happened but removing those associations and restarting visual studio resolved the issue.
The issues I experienced because of this issue are:
"Out of memory" alert when launching an existing solution that has always worked just fine.
When "getting latest" on a solution, I would receive an error about our service account not having sufficient permissions to perform the action on my own work space.
I have TFS Power Tools 2012 installed on my PC.
I recently uncloaked a project in TFS and performed a get operation to bring the project folder into my private workspace (using server-side for backwards compatability with VS2010).
Whilst in Visual Studio, there is no problem - I can check it out and check back in.
However, Power Tools does not recognise the new folder in windows explorer. In other words, all other projects have the green-arrow icon overlay, but this one doesn't. Right-clicking on the folder also does not bring up the TFS context menu.
Does anyone know what I may have neglected to do? I have tried deleting the folder and doing a "Get specific..." to bring it back in. Hell, I've even done a repair on TFS Power Tools and restarted; the behaviour remains unchanged.
This is not my problem (the rest of my projects do show the icon overlay)...
Possible duplicate here maybe...
I have noticed Power Tools sometimes has conflicts with icon overlays, particularly when they compete with others (like SVN).
It can also conflict when you have multiple workspaces on your PC. As you mentioned, make sure the project is uncloaked in both workspaces.
After I install Visual Studio 2013 update 2, I notice that right click on any kind of project file (aspx, cshtml) causes about 45 seconds of hang in Visual Studio. It eventually opens context menu, but every single time this happens.
If I right click on Solution Explorer, Class View etc.. there is no issue at all, just in files editor.
I am using intel i7 processor and 16gb ram (hardware is not an issue) and Windows 8.1 Pro.
I also cannot connect tfs online for last 2 days so I am using my solution with disconnect from tfs. This causes hangs on start up because it tries to connect remote server. But I am not sure it will cause issue on right click of the files.
What I did up to this moment;
1- Installed last update again
2- Restarted Visual Studio several times
3- Restarted PC
4- Cleared TFS cache files
Is there any idea what is causing this issue?
Update: I created an empty MVC project without TFS binding and there is not issue. Looks like it is totally related to TFS dis-connectivity, I will investigate more and will post answer if find out.
ReSharper can cause this problem. You can suspend it (temporarily) to see if the problem is solved. If it is indeed solved, you should clear ReSharper's cache before you enable it again. Go to %LOCALAPPDATA%\JetBrains\ReSharper and delete the SolutionCaches folder for whatever version of ReSharper you are using.
I just had the same issue and in my case wasn't Resharper the culprit. What worked for me was, inside VS, right clicking the SOLUTION, open Nuget Package Manager and at the top was a message telling "There are missing packages". I clicked to restore them and immediately after that the problem was solved.
Just sharing as I had a different cause, so this may help some one else. My visual studio (2015) was locking up for 10-20 seconds on the right click context menu on the solution.
It turned out to be a faulty extension. Go to 'tools' > 'Extensions and updates', and try disabling all your extensions. If that solves it, try enabling a few at a time, until you narrow it down to a particular extension.
In my case, it happened to be the 'ImageOptimizer' extension, that comes part of Madz 'web extention pack': Github issue on 'ImageOptimizer'
Recently had this issue in Visual Studio 2015
For me it was because I had silently been disconnected from the TFS server
When you right click in a source-controlled file, part of the context menu consists of TFS commands (check out for edit, history, annotate). I presume that VS was spinning waiting for a TFS connection that would never come.
Getting reconnected to TFS solved the issue.
When I open a solution for the first time after it has been downloaded from TFS, it (Vs2010) is unable to find the NuGet.targets file.
I've checked TFS and it's marked as downloaded, and it exists on the file system.
If I try to open the solution directly from TFS again, it suddenly works.
I feel this is the reason why my automated builds are also failing.
Has anyone come across this issue before?
Ran into this Friday and on another machine today.
For the machine on Friday I copied the .nuget directory, since I didn't have one.
For the machine today it had the .nuget directory and copying it from another machine didn't resolve the issue. Opening it from TFS's Source Control Explorer didn't work either.
We then followed the steps on Opening project in Visual Studio fails due to nuget.targets not found error (enable Package Restore on the solution) and it worked without issue.
Hadn't run into this before last week, and it's just one project of many, with none of the others having this problem.
When Visual Studio downloads solutions from TFS (double click sln file in solution explorer) it appears to download files one by one and load them up. Unfortunately it seems to try opening project files before it downloads the .nuget directory, which is why it can't find the file. The last thing it appears to do is download that file, which explains why it is on disk but gave the error. If you reopen the solution it's already there and works fine.
When TFS Build server downloads a solution to build, it does so on the solution directory instead. Which means it will get the .nuget directory before it tries to build so it shouldn't cause issues on the build server.
I believe this is a bug in Visual Studio, it really should download all the solution items first. Although it would be nice if it had the same behaviour as TFS Builds.
A work around for this issue is to get latest on the solution folder before you open the solution for the first time. Not ideal but it works.
I'd also suggest logging a bug with either the nuget or visual studio team, however I suspect they're probably already aware of it.
I had this problem trying to run through the tutorial at http://www.windowsazure.com/en-us/develop/net/tutorials/multi-tier-web-site/2-download-and-run/
Turns out the zip file the source code was in extracts into a folder containing commas, which I don't think msbuild liked. Moving it into a more safely named directory helped.
Try these steps
Install Nuget.
Right click on the solution and select "Enable NuGet Package
Restore".
Click Ok on the warning.
Close and re-open the solution.