Open RobSiklos opened 9 years ago
Hello Aleksey!
I have observed the same exception. It happens every time once the editor window opens. I assume VS then disables the addin.
I'm also using VS2015 Enterprise. Among others, I'm using ReSharper 9 and the Productivity Power Tools. But the issue persists even when these extensions are disabled.
Is there any further information we can provide which would help you to repro and fix this problem?
Best regards, Manuel
I did some further investigation and was able to track down the issue to line https://github.com/nagits/TfsPendingChangesMargin/blob/master/Source/MarginCore.cs#L211 The Exception is caused by the assignment of the result of the GetObject call to the _tfExt field. This Exception is hidden though, because the DLR (dynamic) is used here.
The actual Exception message is: [A]Microsoft.VisualStudio.TeamFoundation.TeamFoundationServerExt cannot be cast to [B]Microsoft.VisualStudio.TeamFoundation.TeamFoundationServerExt. Type A originates from 'Microsoft.VisualStudio.TeamFoundation, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' in the context 'LoadFrom' at location 'C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 14.0\COMMON7\IDE\EXTENSIONS\1ZIKKAN4.LBI\Microsoft.VisualStudio.TeamFoundation.dll'. Type B originates from 'Microsoft.VisualStudio.TeamFoundation, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' in the context 'Default' at location 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.VisualStudio.TeamFoundation\v4.0_12.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.TeamFoundation.dll'.
This unveiled the root cause that incompatible TFS client / extension assemblies are references here - version 12.0 and version 14.0.
I think it will be necessary to create a separate extension which targets Visual Studio with Team Explorer 2015 to resolve this problem.
On my machine, the newer Microsoft.VisualStudio.TeamFoundationServer assembly version 14.0 is accessible at "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer".
Here is a better version thanks to @mika76
I just installed the extension, and when I open my solution (for the first time after opening VS), I get the following exception:
Also log contains an exception with
ScrollbarMarginFactory
rather thanEditorMarginFactory
.The extension does not seem to work as a result of these exceptions.
Using VS2015 Enterprise, and I'm opening just a regular C# console application solution/project.