Visual Studio 2015 Failing to Connect to Team Foundation Server 2017: TF31002 - visual-studio

We have setup a trial version of TFS 2017 in order to see if we would like to purchase a full version for our development shop. Only one developer can connect to TFS 2017 with Visual Studio and at no point was he involved with the initial setup of TFS.
I am running Visual Studio 2015 Enterprise and I have tried the following items with no fruition on fixing the attached image.
Check that I can connect through a browser to TFS from my box. Works.
Check to see if I can telnet to the server on port 8080. Works.
White list Visual Studio and port 8080 in my firewall. Done.
Reinstall Visual Studio from scratch. Done.
Try to log into TFS from a different box using same credentials. Done and Works.
Clear cache for Visual Studio and TFS. Done.
Try running Visual Studio as Admin. Done.
I have tried all of the above (and quite a few other things) and at no point can I connect to TFS through Visual Studio. As it stands now I don't see my shop going down the road of using TFS.
If anyone has an idea for what to do, I'm all ears I would really like our shop to migrate to TFS based on what I have heard about it.

TF31002 is a very wide range of error messages, you might receive this error when you try to from Visual Studio or Team Explorer connect to VSTS or an on-premises Team Foundation Server (TFS).
Since the problem occurs on more than one computer, you could ask administrator, the event logs for the application-tier server to try to pinpoint the problem.
I will suggest you to disable your firewall first, White list sometimes not so thoroughly and try the connection again. If it's still not work, give a try with accessing your TFS with IP address (e.g. http://[ip]:8080/tfs) which may did the trick.
Also, you can use the table in Several users receive this error when they try to connect to an on-premises TFS to determine whether the server is misconfigured.

I too suffered with this myself. This is a Bug and has been patched by Visual Studio Team. Installing the patch helped me fix this error.
patch : VS14-KB3165756.exe
Download Patch here: https://go.microsoft.com/fwlink/?LinkID=816878

Related

Visual Studio 2017 Community installation on TFS vanishes

I have installed TFS 2018 Update 2 on a Windows Server 2016 that joined my domain. In order to get the build system working I have also installed VS 2017 Community on the TFS.
After installing VS all seems to be fine. The Build Agent does its work.
But after a day or so, including a server restart, the Build Agent stops working complaining that VS is not installed.
Checking that turns out that all the files are present in their designated directory and also IDE starts, but also the VS installer only shows the install button. Trying to modify or uninstall VS via Control Panel fails with a message, that the product is not installed.
This behaviour is reproduceable as I, for now, have installed VS more than 4 times also on a new TFS setup using different accounts (Domain Admin, Local Admin).
Have someone encountered the same behaviour or can someone suggest a resolution?
Thanks and reagrds,
Andy
I have re-setup TFS machine and installed Visual Studio first even before adding to the domain with the latest vs web-installer. Now it seems to work.

Unable to connect to TFS from VS 2013 but can connect from VS 2015

I have a free version of Vs 2015 on my machine and I am able to connect to TFS from it.
But recently my IT team installed the licensed version of VS 2013 from which I am unable to connect to TFS. All the projects are developed in Vs2013 hence I need to connect to TFS from VS2013
I can connect to the TFS server via the web browser(both chrome and IE) and through VS2015.
The TFS version is 2013 (Version 12.0.21106.0)
None of the below steps I did had solved the issue:
Cleared the TFS cache on my system.
Disconnected TFS from VS2015,rebooted system and tried to connect from VS2013 but no success.
Cleared my browser history
It throws the below error:
I could fix this , the issue was the firewall was blocking the Port 443 via VS 2013 but was open for VS2015. I am not sure why it did that but when I added the port it worked.
If you could connect to VS2015 and fail with VS2013. This issue may related to your account cache.
Try to remove your office account info which stored in Credential Manager (Control Panel-All Control Panel Items-Credential Manager-Windows Manager)
Also clear TFS and VS cache. Then reconnect to TFS in Visual Studio 2013 and enter your account. If the issue still exists after above, you could give a try with reinstalling VS.

Visual Studio 2013 Crashing When Opening Team Explorer

After opening Visual Studio 2013 successfully, I switch to the Team Explorer tab and consistently get a popup error dialog saying that, "Microsoft Visual Studio 2013 has stopped working" and "Windows is checking for a solution to the problem".
This seems to be directly related to TFS (2013 Update 4) since other tools that access TFS (like Source Control Explorer > Workspaces...) also cause the crash.
Edit: I have already tried a VS 2013 Repair. This took all morning with no different results.
This is frustrating because I cannot use TFS outside of the command-line tools. Any help would be greatly appreciated. Thank you.
Credit to Tuğrul Emre Atalay for the post: Visual Studio Crashing When Checking In.
His issue was checking in changes and having Visual Studio crash. In my case, just using the TFS tools was consistently causing a crash.
The fix for me was to only clear out the local cache and not both the server and local caches.
Clean the Cache folder on client computer. The folder path is: C:\Users\username\AppData\Local\Microsoft\Team Foundation\5.0\Cache.
I cleared this folder and I was able to use all of the TFS tools without any further issues.
I then realized that this happened since migrating to a new user name. I had copied many of my settings over from my old account folder and it must have corrupted the cache area.
I had the same issue with Visual Studio 2015 Enterprises. When i open it, VS wasn't able to connect to TFS and it crashed when i clicked on "manage connections"
The issue was not about the cache (I cleared the cache, made a repair of VS and nothing changed) but about the fact that we are currently migrating our projects from perforce to Git with Team Foundation Server.
When Visual Studio starts, it seems VS is trying to connect to TFS with linked Git repositories, but since the plugin currently used is perforce, it causes an exception somehow.
The solution is to set your source control plugin to Microsoft Git Provider (or Visual Studio Team Foundation Server if you are using it)
Here's two screen shots I took. Right after I selected the Microsoft Git Provider, the Team Explorer tab automatically refreshed and I am now able to connect to my projects.
Go to Tools -> Extensions and Updates Look for Github Extension for Visual Studio and Uninstall it
Never Mind as you can still work with Github
Now Restart Visual Studio.
Enjoy working on Team Explorer.

Can Visual Studio Online synchronize with TFS on a given project

We have a project source-controlled by local TFS installation (both are 2013 version).
The scenario that we want to accomplish is:
Developers located in the company use the local TFS as usual.
When they finish they check-in the code to the local TFs and Visual Studio Online.
Developers working from outside the company, get latest from the Visual studio Online.
When they finish, they check-in the changes back to Visual Studio Online.
The target is to have local and online code repositories that can be synchronized either manually or automatically. Is this possible using Visual Studio Online? If not, are there any workaround to achieve this scenario?
You can synchronise the work using the TFS Integration Tools. They are complicated to setup and will be painfull to run. There are commercial options that are ridiculously expensive, like OpsHub, and I would suggest you just pick a server.
Either have your local server with remote users on VPN, or have a VSO server that everyone accesses. I would recommend VSO with local Build servers.
You can check here. How to access VS 2010 TFS over the internet from remote office
It is about vs2010 but i guess the second answer is for you.

Error when trying to deploy SharePoint 2010 solution package - SharePoint 2010 - Visual Studio 2010

After several deployments, I receive the following error when trying to re-deploy a solution:
Error occurred in deployment step
‘Recycle IIS Application Pool’: The
communication object,
System.ServiceModel.InstanceContext,
cannot be used for communication
because it has been Aborted.
The only solution I have found (not ideal) is to restart Visual Studio.
Anyone know a better way?
I have seen this a couple of times as well and the only resolution I found was to restart Visual Studio as well.
How come restarting Visual Studio will fix anything :)
You need to run Visual Studio as Administrator (by right clicking on its icon)
If still persists, restart the server.
If still persists, add the administrator account under which you are running Visual Studio to Sharepoint Central Administration for that sharepoint web portal.

Resources