4
votes

Get the following exception after update Visual Studio 2015 with Update 2 today. Now I can't connect to TFS.

Method not found: 'System.Collections.Generic.IEnumerable1<Microsoft.TeamFoundation.Framework.Common.EnumeratedSparseTreeNode1> Microsoft.TeamFoundation.Framework.Common.SparseTree`1.EnumParents(System.String, Microsoft.TeamFoundation.Framework.Common.EnumParentsOptions)'.

Tried to register Microsoft.TeamFoundation.Common.dll to GAC from path 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\lfiy4m2k.1dh'. Still not work. (I checked that Microsoft.TeamFoundation.Common.dll with telerik JustDecompile, and it already has the method EnumParents.)

Thank you for your help.

Update: Attach the image: enter image description here

Update: In short, in the end I've restored the system to an old one. That one has Visual studio 2015 with Update 1 installed. I may not update Visual studio 2015 with Update 2 currently.


Things I've tried:

  1. Register Microsoft.TeamFoundation.Common.dll(14.95.25118.0) to GAC. Not working. This used to save my life before. gacutil -u Microsoft.TeamFoundation.Common.dll first. gacutil -i Microsoft.TeamFoundation.Common.dll later.

  2. Run devenv /log. ActivityLog.xml shows nothing help. Just tells that TeamFoundation.vsix is duplicate with something other.

    One extension is from a path like C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\sgafzsci.zbq. The other one is from C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer.

  3. Try devenv /resetuserdata.

  4. Clear contents in folder Component Model Cache.

  5. Repair Visual Studio 2015

  6. Reinstall Visual Studio 2015 Update 2.

    *Tried 5 & 6 several times.

  7. Uninstall VS 2015 from control panel -> Program Features.

  8. Run vs_enterprise.exe /uninstall /force from the programdata/package/{guid}/

    Delete all data in C:\Program Files (x86)\Microsoft Visual Studio 14.0, C:\Users\UserName\AppData\Roaming\Microsoft\VisualStudio\14.0, C:\Users\UserName\AppData\Roaming\Microsoft\VisualStudio\14.0Exp, C:\Users\UserName\AppData\Local\Microsoft\VisualStudio ( all data in this folder except the 10.0), C:\Users\UserName\AppData\Local\Microsoft\Team Foundation,

  9. Install an Visual Studio 2015 with Update 2 in offline mode. Still not working at this time.

  10. Uninstall the vs 2015 with update 2 with command line /uninstall /force

    This time, I can't uninstall the updates from Windows Update now.... I assume that the environment is totally messed up. To tell the truth, I didn't check the windows update before this step. I checked this time, cause when trying to install visual studio 2015 without updates in offline mode, it tells me that the update 2 is already installed in the computer.

  11. restore the system to an old version.

    I've experienced another April fool's day.

    PS: I've to mention that I use ProcessExplorer and search Microsoft.TeamFoundation.Common.dll, vshub.exe and denenv.exe both are having the latest Common.dll loaded. Also, after step 9, I search in C: driver list all the Microsoft.TeamFoundation.Common.dll files. Only the one from TestAgent is the old version. All else are the latest.

    PS: 1. run tf get still gives me the same issue.

    1. Install VS 2015 TFS PowerTools and use get from that gives me the same issue.
    2. Try C# code by calling the function Workspace.Get() gives me the same issue. Reference to old version of TFS related dlls still gives me the same issue. I don't understand why and didn't look into it deep.

Updated:

Reinstall the OS at end. This time, I installed Visual Studio 2015 enterprise version with Update 2. It works good.

4
if you do not want to spend time and investigate the issue, one suggestion would be repair the installation. - Angshuman
Thanks. Already try to repair the Visual Studio 2015 Update 2. Still not work. I assume that the Visual Studio keeps use the old Microsoft.TeamFoundation.Common.dll somewhere. But I don't know where it is. A global search in C driver shows all the Microsoft.TeamFoundation.Common.dll with the same version: 14.95.25118.0. Now I don't know where to continue. - Emma
post a comment here: blogs.msdn.microsoft.com/bharry/2016/03/31/… Microsoft monitors the comments for issues - magicandre1981
@magicandre, Thank you for your direction. - Emma
Did you try to clean the cache folder: C:\Users\username\AppData\Local\Microsoft\Team Foundation\x.0\Cache? - Cece Dong - MSFT

4 Answers

1
votes

I had VS 2015 and TFS Power Tools 2013

I uninstalled 2013 power tools and the error went away.

1
votes

Not a full answer, but I have the same issue only when using the Diff All Files VS 2015 plugin. Resetting its settings from tools/options solved it for me.

0
votes

Just upgrade to VS 2015 update2 and connect to TFS 2015.2, no issue occurs. You need to re-install your VS.

0
votes

I had the same/similar issue in VS2015 after installing "Shelveset Comparer" extension. "Clear MEF Component Cache" extension solved my problem. Just install this extension and Click "Clear MEF Component Cache.." button under Tools menu.