0

I have a VSIX extension (https://github.com/eduelias/AssociateRecentWorkItems) that worked really well on my VS2015 but, as I built/run it on VS2017 (yeah, I've put the prerequisites on the .csproj properties), it is not appearing at 2017's TFS Pending Changes tab.

I've tried updating MIcrosoft.TeamfoundationServer.Controls to the 2017 version but still no success.

As I try to debug it, it seems that VS2017 isn't loading the extension at all. (Breakpoints aren't not been loaded)

Any help is welcome. Thanks!

Eduardo Elias Saléh
  • 806
  • 1
  • 11
  • 23
  • Which version of VS are you using and what's the detail error you got? – PatrickLu-MSFT Jul 12 '17 at 01:46
  • VS2017 (15.2 / 26430.15) and I get no error at all. The custom session at Pending Changes tab of TFS panel that I've created and is working fine on VS2015 simply is not showing on VS2017. I've built it on VS2017, updated the prerequisites on project properties and put VS2017 [14.0, 15.0) as installation target of the vsix. – Eduardo Elias Saléh Jul 12 '17 at 16:43
  • 1
    In the debug settings on the VSIX project, change the startup arguments to `rootsuffix Exp /log`. And then check the log at `C:\Users\%username%\AppData\Roaming\Microsoft\VisualStudio\15.0_XXXX\ActivityLog.xml`. Another workaround is do a copy-paste of your existing VS2015 project and then rename the .csproj and other files to 2017 instead of 2015. Then opened that project in VS 2017 and there should be a upgrade migration, then updated the vsixmanifest file to support VS 2017. Try do build and debug again. – PatrickLu-MSFT Jul 12 '17 at 18:16
  • That showed me the error, my dear fellow: Could not load file or assembly 'Microsoft.TeamFoundation.Controls, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. That I know how to handle! Thanks a lot! – Eduardo Elias Saléh Jul 12 '17 at 18:58

2 Answers2

1

Give a try with another new extension on VS2017(from marketplace) in your side. If this could also not installed successfully and you are using VS2017 RC.

You may encountered this issue--Unable to install extensions after updating VS2017 RC

Either update to latest VS version or use Stefan Z Camilleri 's workaround in above link.

If only your old extension could not be installed, since

Huge changes have been made by Microsoft on the installation, so previous approaches of detecting VS won't work any more. For example, to detect VS installation folder, now a few extra tools or scripts are required, https://github.com/Microsoft/vswhere

So guides such as How to: Migrate Extensibility Projects to Visual Studio 2017 are critical and you can follow the tips.

You could also refer more details in this similar question Visual Studio 2017 is not detected by extensions for installation

PatrickLu-MSFT
  • 49,478
  • 5
  • 35
  • 62
1

Looking through the log, I was able to find that some of my references were asking for Microsoft.TeamFoundation.Client Version=14.0.0, in fact, It was the Microsoft.TeamFoundation.VersionControl version=12.0 that were looking for it.

To solve it, I've made a 'binding redirect' like this:

[assembly: ProvideBindingRedirection(AssemblyName = "Microsoft.TeamFoundation.Client", NewVersion = "15.0.0.0", OldVersionLowerBound = "12.0.0.0", OldVersionUpperBound = "14.0.0.0")]

It started appearing at the Exp instance and I was able to debug it.

Note that I strongly advise against doing such kind of workaround but, in my case, it was the only way I could make it load my extension so I could debug it.

Eduardo Elias Saléh
  • 806
  • 1
  • 11
  • 23