TFS build definition freezes when connecting remote machines - tfs

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

Related

how to fix Error TF30063: You are not authorized to access VS2017

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.

Visual Studio 2015 constantly locking up using TFS through VPN

Like the title says, I connect to our TFS repo through a VPN, and I'm guessing that's what causes my VS to constantly lock up and get the "Not responding" for a few seconds, usually lasts 5-10 seconds and happens every 30 sec-1 min, depending on what I'm doing.
It's almost unusable at this point. Is there anything I can do to work offline or something, so it stops trying to sync with TFS (assuming this is even the issue)?
I am using resharper, but disabling it doesn't seem to improve things at all.
Thanks!
Assuming you are using TFVC source control system, you can use a local workspace so that you can work offline easily.
You can quickly begin editing a file when your network connection is unavailable or unreliable. From Solution Explorer you can add, edit, delete, rename, undo, and compare items in your workspace even when you're not connected to your Team Foundation Server.

visual studio 2013 hangs on right click

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.

TFS Power Tools: Shell Extension : Context Menu Quirky and TFS Icons on Files/Folders missing

I've used TFS Power Tools on a daily basis for several months. I particularly depend on Windows Shell Extension.
For about a week now, two issues have come up:
Issue 1
Every time I enter a directory under TFS control, I have to right-click twice to see the TFS context menu
Issue 2
My pretty TFS Green indicators on files/folders are gone:
I've downloaded and reinstalled the Power Tools, but I still have these two issues.
Any thoughts on how to fix this?
**UPDATE**
Dave gave me the answer via link. Just in case that link goes bad, here is the answer:
Open the registry
Go to : HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\explorer \ShellIconOverlayIdentifiers
Prefix any "Tfs" folder with numbers (“1TfsOverlayAdd” , “2TfsOverlayEdit” etc.). This allows them to take priority over other icon overlays.
Restart the machine or kill explorer.exe and restart it
As far as the delay issue is concerned, I'm not experiencing that this morning; which is odd. I question that the solution for the overlay was also the solution for the right-clicking.
Everything's back to normal now so I am good to go.
The missing green icons can be explained here. It is because Windows has a limit of overlay icons it supports. The details on how to fix it are in that blog post.
How long are you waiting after entering a folder before you perform the first Right Click? It sometimes takes a while for the TfsComProviderSvr.exe to check if the local folder is a workspace and register the shell extension.

Tips and tricks to increase productivity / efficiency with Team Foundation Server

I have to use Team Foundation Server 2010 at my company and I'm not very happy with it.
There are so many features or just default behavior I'd expect from a CVS that TFS seems to lack (compared to svn, git or perforce, which I have experience with), so my question is: which tricks do you know, which hidden features are out there to make TFS easier to use / more convenient?
Perhaps I should elaborate a bit and list what I think could be better:
The default check-in action when associated with a task is "resolve", though in 99% of all check-ins, I only want to "associate" my commit with the task. There's only 1 commit (the last) that "resolves" the task, so why is that the default? Can I change that?
In the check-in dialog, when double-clicking a file, Notepad is launched and shows the contents of the file. Notepad. Seriously? What about the Visual Studio editor? Anyway, I'd like to see the differences to review the changes I've made, not the contents of the file. The diff tool is hidden in a submenu. This might seem trivial, but when I have to check 10+ files it's just annoying to always right-click, open submenu, click to diff.
The diff tool. Merging with it isn't really straightforward, also the conflict detection mechanism is somewhat lacking. The (Tortoise-)SVN / Git merge tools or that of Perforce are way better here.
Speed. Creating a new file, opening a file for the first time, comparing a file with a previous version etc takes forever (that is, 3-10+ seconds). Our TFS server is in-house and has absolutely no load - also why does Visual Studio have to contact the TFS server when I just create a new file (which I might not even check in)? Is there perhaps an option to turn that off?
Readonly files. All files are read-only when checked-in and become writeable when edited for the first time. This is really annyoing when the application crashes because of that. Windows Azure for example modifies a web.config file and fails whenever I check out because the file is read-only then.
These are just the most prominent things that I think are really annoying and unnecessary.
I didn't have the pleasure to branch and merge yet, but from what I've heard so far it won't be very enjoyable as well...
So again: If you know some tricks, settings, featuers that make working with TFS less inconvenient, please share them.
1) is customizable if you reconfigure the work items. (You can also change any combination of fields/states/available values/etc.)
2) is a pain, but if you use the dockable "Pending Changes" window instead then it'll open the file in the editor. I suspect this is a drawback of the Checkin dialogue being modal.
3) you can customize - the option's a little tucked away, but it's on Tools/Options dialogue under Source Control/Visual Studio Team Foundation Server/Configure User Tools. Some third party tools (like BeyondCompare) have pages on their website with details of how to configure them with VS.
4) I've not seen the speed problems, although I do agree about the overhead on creating a file. Not sure if that's configurable.
For the #1
The solution in TFS 2010 is not the greatest one but it works. You need to modify the registry key on your machine as follows:
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0\TeamFoundation\SourceControl\Behavior
Change ResolveAsDefaultCheckinAction to False
TFS Power Tools might be a useful extension for you.
http://visualstudiogallery.msdn.microsoft.com/en-us/c255a1e4-04ba-4f68-8f4e-cd473d6b971f
For #2, are you using the "pending changes" window in Visual Studio to keep track of files that are modified? Double clicking on a file there keeps you in the Visual Studio editor.
For #5, make sure Tools->Options->Environment->Documents "Allow Editing of read-only files; warn when attempt to save" is checked.
TFS is hella frustrating. Good luck!
For #2 there is a registry edit you can make so double clicking launches a diff, vote for the answer here - Compare files on double click in Pending Changes view
1, Bash head against wall
2, Say outloud - it's better than SourceSafe
3, Repeat
4, Install git, or mercurial, or just about anything else.

Resources