3

Using a fresh install of VS 2015, I am having a bunch of issues with TFS. Checkin Policies are broken, and TF command line is broken.

For example, going to Developer Command Prompt for VS2015 and typing tf causes a crash. It complains about not being able to access the Microsoft.TeamFoundation.Client.

Unhandled Exception: System.IO.FileNotFoundException: Could not load file or   assembly 'Microsoft.TeamFoundation.Client, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. 

I believe that I understand that some of the needed dll's are not a part of the VS install, and are a nuget package.

[1] Where can I find Microsoft.TeamFoundation.VersionControl.Client.dll in Visual Studio 2015 installation?

[2]Where can I find Microsoft.TeamFoundation.Build.Client in Visual Studio 2015?

However installing the package via the command below does not fix access to tf.exe in the command line.

Install-Package Microsoft.TeamFoundationServer.ExtendedClient 

This all works no problem if you upgrade from VS 2012/2013 because the dll's are in the correct/old location. Does anyone know how to fix this?

Community
  • 1
  • 1
kosmos
  • 365
  • 7
  • 21
  • Are you running the commandline with Admin rights? – chief7 Mar 02 '16 at 21:56
  • 1
    Yes, have been doing that. – kosmos Mar 03 '16 at 13:04
  • Have you installed the Power Tools 2015? – xcodr Mar 04 '16 at 02:01
  • 1
    Yup. If I tried it without and with installing Power Tools 2015, it doesn't help. Power Tools works fine, but would hope I don't have to install a plugin to gain access to built in feature / fix crashes. – kosmos Mar 04 '16 at 16:01
  • @kosmos Ever find a real fix? – Scott Stafford Mar 30 '17 at 15:16
  • @ScottStafford Nope, likely a company computer configuration issue/limitation. – kosmos Mar 30 '17 at 17:59
  • In the end, I found those dlls in this directory `C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\epa1eftr.e5t`. I moved `tf.exe` into that directory and added that to my path, and things are working now. For some reason, I never got the `Team Explorer` path. – Scott Stafford Mar 30 '17 at 19:13

6 Answers6

0
  1. Run the Developer Command Prompt with admin
  2. Try to delete TFS cache by going into default C:\ {User Profile Folder}\AppData\Local\Microsoft\Team Foundation\x.0\Cache and VS cache in appdata folder. And restart VS and your computer
  3. Try to run sn -Vr *,* in the command prompt to disable strong signing according to this blog
PatrickLu-MSFT
  • 49,478
  • 5
  • 35
  • 62
  • Not sure I would be able to turn off strong signing for all. Might be able to do that for just the one dll, will find out if thats allowable for me. – kosmos Mar 04 '16 at 16:02
0

You should try a repair of Visual Studio first, if that does not work then a reinstall.

I have found that as Visual Studio installed a bunch of OS related bits that I sometimes have to reset windows. This is easy in Win10 (and 8) as there is a button for it. However you would need to reinstall your dev tools. I use a Chocolatey script to make that easy.

  • This is occurring on multiple machine, all running the same W7 image, but multiple people have tried restores and uninstalls and installs of different version of VS2015 including pro/enterprise. – kosmos Mar 07 '16 at 13:15
0

I had to fix this myself by first installing the Team Foundation Power Tools and then manually registering the Team Foundation binaries from there. I kept running tf.exe and seeing what errors came up and registered each missing binary manually by running

gacutil.exe /if "C:\Program Files (x86)\Microsoft Team Foundation Server 2015 Power Tools\[missing binary]"

Even when tf.exe stopped complaining I had further issues running tf add and had to add more missing binaries. Not the greatest solution but it worked for me.

Steztric
  • 2,832
  • 2
  • 24
  • 43
0

I fixed this problem by un-installing and re-installing VS 2015.

J Z
  • 119
  • 2
  • 2
0

my suggestion is that you first delete the Visual Studio and all files associated with it and reinstall it again

  • Please explain the difference between your proposal and the "Using a fresh install" mentioned by OP. – Yunnosch May 04 '17 at 19:39
  • I do not really know what he means by "fresh install". but completely reinstalling VS would probably help or at least it would tell the user that the problem might be with the installation process or the VS itself –  May 04 '17 at 20:13
  • This was on a team project, and we have multiple new people, with new computers. So by fresh install I actually mean fresh computers and first time installs. I myself uninstalled and installed trying to fix the issue so I tested with a "fresh install". But since posting this I have done many updates and computer changes and am no longer able to reproduce the error as of today. – kosmos May 05 '17 at 14:03
0

Following worked for me:

1) Install TFS Power Tools 2015 (skip if Power Tools were already installed)

2) Open an elevated command prompt (cmd.exe)

3) Copy Dlls of power tools to the CommonExtensions\Microsoft\TeamFoundation\Team Explorer\ folder of VS2015

Example:

cd "C:\Program Files (x86)\Microsoft Team Foundation Server 2015 Power Tools"
copy *.dll "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\"

Inside the "Microsoft Team Foundation Server 2015 Power Tools" folder you should see those missing dlls like Microsoft.TeamFoundation.Build.Client.dll, Microsoft.TeamFoundation.Build.Common.dll etc.

user797717
  • 758
  • 1
  • 6
  • 18