问题
I'm migrating my own TFS logging extension to VS 2015 and run into many dependency issues. Most of them I was able to get rid off by installing Microsoft.TeamFoundationServer.ExtendedClient nuget package.
However there's still one missing reference, the VersionControlExt
class
versionControlExt =
_applicationObject.GetObject("Microsoft.VisualStudio.TeamFoundation.VersionControl.VersionControlExt")
as VersionControlExt;
According to documentation, it is located in Microsoft.VisualStudio.TeamFoundation.VersionControl.dll
, but I can't find this file at all. Does anyone know where to get it from or how to change the above code to get it working with VS 2015?
I'm using Visual Studio 2015 Professional, 14.0.23107.0 D14REL version.
回答1:
Ok, I've finally found the issue.
The one that is in GAC (c:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.VisualStudio.TeamFoundation.VersionControl\
) is the old version (11.0.50727.1) of the library. It gets there with VS 2015 installation, but it isn't the right one.
The one that is used by Visual Studio Team Explorer extension is located in c:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\oglzibax.qr0\
. It's version is 14.0.23102.0.
While I was trying to use the old one, I was constantly getting MissingMethodException
.
回答2:
For VS 2015, you can find its location by navigating to C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer. If you go there and then go up one directory you will see that Team Explorer is a symbolic link to C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\ftq4t4pd.guv (in my case). So it’s like instead of shipping the DLLs with the product they ship them in an extension and whenever the extension updates they update that symbolic link to point at it. Very odd.
For VS 2017, you can find it by navigating to C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer, replacing "Professional" with whatever version you have installed. It doesn't appear VS 2017 has the symbolic link thing going on.
来源:https://stackoverflow.com/questions/32438852/where-is-microsoft-visualstudio-teamfoundation-versioncontrol-dll-in-visual-stud