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.
Related
I changed my password for my TFS. But when I try to reconnect I receive the TF30063 unauthorized error.
There are many issues like this and I tried everything I could find from this solution and other forums
Solve this issue by using the VS browser
The right click on the connection
The windows 10 manage user accounts edit and even the remove
Deleted every VS cache file from appdata
Deleted the whole connection in VS & tried to readd a new one
Deleted all my Internet explorer cookies, passwords cache etc.
None of them work... Can't figure out what the issue is.
PS: it works within the browser.
It should be a Visual Studio 2017 credential cached token issue. You could try below ways to clear cache:
Close all Visual Studio instances.
Delete %LOCALAPPDATA%.IdentityService.
There are some identity related caching going on in there, deleting the folder will force the identity system to rebuild its cache.
Also Clear TFS related caches %LOCALAPPDATA%\Microsoft\Team Foundation\x.0\Cache
Run Visual Studio as another user:
cd C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE
runas /netonly /user:<account> devenv.exe
Enter the user password, then Team Explorer > Manage Connections
If the issue still exists, also take a look at this blog for more ways.
Based on developer community there is a timing issue during visual studio start up that can cause the Source Control Explorer window to grab and then hang on to an invalid version of the connection to your team project. Details visit developer community.
https://developercommunity.visualstudio.com/content/problem/93366/tf30063-you-are-not-authorized-to-access-visualstu.html
Following work around steps help me to resolve the issue
Close all visual studio 2017
Start Visual studio 2017
If you see source control explorer at start up, then close source control explorer and Team explore and close visual studio 2017
Open visual studio 2017, ensure no source control explorer opened at start up
Go to View menu and click on team explorer
Then connect to TFS server.
I've gotten the above error (TF30063: You are not...) numerous times and the following three resolutions worked for me at different times:
Simplest: I've seen "Source Control Explorer" referenced numerous times, but I never leave that open. I resolved the above error by closing Team Explorer and reopening. I then loaded my solution, and then reopened Team Explorer. It opened without issues and I could contact the server (ie, I ran a code comparison in the Solution Explorer on a file I'd edited) -VS Pro 2017 v 15.8.0
Middle complexity:
I was able to reconnect with the following steps:
-Open Team Explorer (View menu => Team Explorer)
-Click "Manage Connections" which is the plug shaped button at top
-Click the text "Manage Connections" which is actually a drop down menu
-Select "Connect to a Project"
This brings up a new window that shows hosted repositories for your account. After several seconds the window displayed the desired projects. I just had to click the desired one and click the "Connect" button at the bottom. Once I did this, I was able to access all TFS features (ie I checked in some work) -VS Enterprise 2017 v15.9.3
Last resort:
I loaded VS2017 Community onto another machine and logged in on that machine using my regular login. I'm not sure why, but as soon as I logged in on this new installation my other two computers had no problem connecting. No additional steps were needed, though I may have restarted VS on those machines.
I will be facing this issue every six times a year. Because domain account password gets expired every 2 months 0 days or 8 weeks 5 days or 61 calendar days interval due to business security policy.
Follow these steps to change/set Password of TFS from IDE
Delete TeamExplorer.config from
%AppData%\Microsoft\VisualStudio\15.0_xxxxxxxx\Team Explorer.
(So after establishing a successful connection, it'll try to recreate
again with the same data)
Add or change the TFS account Credential from Windows Credential Manager. So it won't prompt to enter a password again whenever when a connecting is established from IDE to TFS
If the above doesn't work close the Visual Studio IDE. Delete all the files inside %LocalAppData%\.IdentityService and %LocalAppData%\Microsoft\Team Foundation\7.0\Cache and on elevated prompt execute runas /netonly /user:<user domain account> devenv.exe navigating from "C:\Program Files (x86)\Microsoft Visual Studio\2017\<Professional>\Common7\IDE\"
I had this same problem, and the solution I finally found was when VS asked if this was a "Work or school account" or a "Personal account" I chose "Personal account", and that fixed it even though it is a work account. This used to work fine, but it seems with some recent updates it causes an issue if you select "Work or school account"
I also had this problem with VS2017, version 15.9.4.
Common fixes are detailed here and here. And the majority of pages talking about this problem reference those solutions or sub-sets in some combination or another. (And often to fix login bugs introduced in one of the 15.5.* versions of VS2017)
None of those solutions worked for me either and after researching for 2 days, I found a couple of fringe-reasons why VS 2017 will not refresh/store credentials.
The 2 main "fringe" problems/fixes I've found are:
Connecting through certain proxy setups
Cryptography store not allowing for local storage, see also here
For myself it was the second problem, a good indicator of the issue is a log entry in %TEMP%\servicehub\logs with the error: "The requested operation cannot be completed. The computer must be trusted for delegation and the current user account must be configured to allow delegation."
It might also be a Windows 7/8.1 known issue carried over to Windows 10 upgraded machines. The problem only happened on a machine that joined the domain after doing the Windows 10 upgrade.
The fix is to add the following registry entry:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography\Protect\Providers\df9d8cd0-1501-11d1-8c7a-00c04fc297eb]
"ProtectionPolicy"=dword:00000001
Setting that immediately fixed the issue with VS2017 connecting to the Microsoft Account. (And some other applications that would not persist credentials between launches)
After you have tried making changes to default browser and installing new browser like firefox or chrome, if still doent work, then you might have to check with network team of your organization on proxy settings that should be allowed in internet options. We have tried the above and it worked.
Maybe this only happened to me but I always used the wrong credentials (wrong username or wrong password). On Windows 11 I was only using my PIN, so it took automatically a user and password. I had to use different credentials to change my name and password.
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
I'm getting this error in the output window every time I open Visual Studio 2017 (v. 15.3.2):
And then when I click on Team Explorer I get this popup error:
After closing that pop-up, I can still connect normally to the TFS server and my projects through "Manage Connections" and then continue my work normally, but the next time I open up Visual Studio I'll get these errors again.
Things I've noticed:
In the TF205020 error message, "Could not connect to server '{url}'",
the URL is incorrect. It has an additional directory after the
domain e.g. mycompany.visualstudio.com\mycompany. I think it should just be mycompany.visualstudio.com. I haven't been able to find where this is coming from.
If I hit Ctrl+Alt+R to open up a browser inside of VS, it tries to
connect to https: //msdn.microsoft.com/vstudio/ which is an invalid
link and navigation to the page fails. Not sure if this is related.
Things I've tried:
Googling and searching Stack Overflow for similar issues.
Re-entering my VS account credentials, removing my account entirely
and re-adding it. No luck.
Using Visual Studio 2015. These errors do not occur when using
2015, they only occur in 2017.
Deleting \Users{User}\AppData\Local\Microsoft\Team
Foundation\7.0\Cache and this actually stops the errors coming up,
but only once. Once the cache is reloaded, the errors come back.
If anyone has any ideas or suggestions that would be greatly appreciated.
There is an issue in VS 2017 15.3, please see the feedback here.
According to Abraham's comment "The bugfix hasn't been prepared for release yet."
When I originally installed VS Ultimate 2013 everything was fine but for the last month or so it's been a dog.
The source control explore in my Visual Studio 2013 install is very slow. Just clicking on a node and the act of displaying the node contents takes 20+ seconds.
Everyone else on the team is ok so it's not the TFS server it's just my install.
I assumed it was some addin I'd installed into VS so disabled them but no luck.
Any ideas?
Having tried all suggestions, unloaded all add ons, tried to reinstall VS, removed all extra workspaces etc. the answer to my problem was to unmap my workspace and then remap it.
Problem solved. Not got a clue what the underlying fault was.
In my case, the only way to get rid of the lag was to change my workspace location from "local" to server. You can do this under the advanced options for your workspace.
The 'full blast' solution that worked for me was;
remove workspace
delete all source code
rebuild the workspace
rebuild solution
Only takes a few minutes more than just rebuilding the workspace (see #DaveF's answer) but gave me a bit more confidence that everything hangs together.
Had this happen to me a few times now, so there are some things I'd like to add to the accepted answer.
I work in a place where we have a lot of VS solutions with a lot of files in them. Microsoft's guidelines suggest that you shouldn't be using a local workspace if its going to have more than 100,000 items in it. So you could prevent this problem entirely by:
Not using local workspaces
Making sure never to map enough folders into a single workspace that it gets over 100,000 files associated with it.
Periodically declaring "TFS bankruptcy" and unmapping everything.
For me, the drawback of having to use strict locking and not having offline access makes #1 unacceptable. I'm going to try harder to do #2, but honestly #3 is what I've been living by.
Its kind of like early Windows, where every year or so you had to just reinstall the OS to remove all the accumulated cruft.
Cleaning local folders helped: See 'Team Explorer - Pending Changes', under 'Excluded Changes' it said: 'Detected: 50000 add(s)'. Click it to see path to folders.
This make me crazy too for over six months until I found this instruction. Now, my VSO is fling. Note: this information I copy from somebody. Would like to give them credit but I cannot remember how did I find this.
You can fix this problem of TFS by editing registry.
Navigate to key
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0\TeamFoundation\SourceControl\Proxy
and then change value of URL to any dummy website like 'www.abcdummy.com'
Restart VS after editing registry key value.
I had the same problem, it kept me busy for a week or so, but after investigating my complete setup i found the following:
Within my ASP.NET application, i had an image directory and an image cache directory, with lots of images in them. (+200.000). Both were not included in my VS project, but still Visual Studio / TFS tripped over this.
First i found, that when checking in some files (which took over 10 minutes when the problem existed), in 'Team Explorer - Pending Changes', under 'Excluded Changes' it said: 'Detected: 50000 add(s)'.
Trying to get rid of this the 'normal way', by opening that 'Promote Candidate Changes' window and setting these files to be ignored, still didn't do much.
But after moving those image directories to some other location, outside my project, all problems disappeared.
Of course i had to add those moved directories as virtual directories to still see my images.
I cleaned my workspace of unnecessary projects and it ran better. I think vh_click is on to something with the 50,000 ads thing. TFS keeps track of all your edits and over time with tons of projects, undos, and craziness you could amasse a large set of which TFS has to chug. Get out the Clorox, the Comet or whatever else you clean with and dump some junk or move it to some archive folder or backup drive.
Cleaning up the Workspace was the solution for me, when opening visual studio 2015 the Source Control Window will remain in a Loading phase, I had 2 workspaces name and name_1 and I removed both.
No need to delete the entire folder, though , keep in mind that if you do delete the workspace and have the files, you will need to force the get latest to be on the safe side
Getting Latest was soooooo slow. I was using a Colleagues PC and had deleted his Workspace.
After an hour waiting to get latest I got an error and realised my User Account didn't have Full Control on the folder, giving Write Access made Get Latest run x1000 faster:
Just to throw another solution in the mix! I had the same problem which seemed to be caused by several layers of working folders configured in my workspace (some overlapping ones too).
The issue was resolved by going to Manage Workspaces, then Edit and then removing the additional folder bindings.
in short "Run it as an administrator".
No one of those solution does work at all, I even search on this link:
Why is Visual Studio 2013 very slow?
In vain, just do this ONE simple step:
Go to your visual studio path, usually installed on this path:
C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE namely the file "devenv.exe" , then right click on it, click "Run an administrator" ===> then open your visual studio project.
So, you can just send a shortcut of "devenv.exe" to the desktop to easily run it as an administrator each time.
Have ^_^ Fun
You can keep workspace on local and change your workspace to this. I did that and my TFS speed was great :
1- Remove all mapped folders in workspace "Edit":
2- Change workspace folder to parent all of mapped folders:
I hope it is useful for you.
When connecting to a remote TFS 2010 installation via my Visual Studio 2010, Process tab of Build Definition freezes. Everything seems to be disabled. Is there any work-around?
UPDATE 1:
By freezing I mean:
I can navigate to all tabs: General, Trigger, Workspace, Build Defaults, Process and Retention Policy. Except for Process tab, they all are working as excpected. When I click Process tab, it is showed, but none of parameters are shown, and the tab itself is in gray. Actually nothing could be clicked. It is like that Visual Studio is waiting for something to be completed or loaded.
UPDATE 2:
I have explored that when I leave Visual Studio alone for a long time about 20 or 30 minutes, the Process tab goes normal. That means all parameters appears and can be edited. That seems downloading or getting something from server causes this very very long delay.
You might want to check out exactly what rights you have on that server with regards to administrating builds.
http://intovsts.net/2009/09/03/more-fine-grained-permissions-in-tfs2010/ and
http://msdn.microsoft.com/en-us/library/ms252587.aspx
I think one of the main ones is "edit build definition"
If you don't have rights, then there won't be a workaround.
UPDATE:
The only things I can really think of at this point is to put a sql monitor on the TFS Database and possibly, watch the network traffic to see how the network interface is being used.
It's possible that something is wrong on the database server causing a huge amount of load. The other possibility is that the network is badly configured and running at 1Mb instead of 100Mb+.
Beyond those, I'd say call MS Support and open a trouble ticket. This is by no means normal and is likely indicative of some underlying hardware or installation issue.
Afsharm,
Happend with me too. This happened when i had the build defination open on one VS instance in edit mode and i opened it for editing on another pc. After a while it errored saying "TFS 20391: Locked for blah blah..." I had to close my visual studio instance on both the machines and restart, it worked there after. These are very occassional cases and very hard to replicate. I would suggest restarting your visual studio session and trying again.
PS - Worth checking if some one else have the process template open for edit as well?
HTH.
Cheers, Tarun