loop8ack / ExtensionPackTools

Import and export lists of Visual Studio extensions.
Other
78 stars 15 forks source link

On trying to use Tools | Import/Export Extensions | Export Extensions... Get Error #4

Closed richardcox13 closed 6 years ago

richardcox13 commented 6 years ago

Just installed from Tools | Extensions and Updates

Having allowed the VSIX installer to run and restarted tried to export my extensions.

ActivityLog.xml contains:

SetSite failed for package [VsPackage]Source: 'ExtensionManager' Description: Could not load file or assembly 'Microsoft.VisualStudio.Threading, Version=15.7.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.Threading, Version=15.7.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. File name: 'Microsoft.VisualStudio.Threading, Version=15.7.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' at ExtensionManager.VsPackage.InitializeAsync(CancellationToken cancellationToken, IProgress`1 progress) at Microsoft.VisualStudio.Shell.AsyncPackage.<>c__DisplayClass17_0.<b__1>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at Microsoft.VisualStudio.Services.VsTask.RethrowException(AggregateException e) at Microsoft.VisualStudio.Services.VsTask.InternalGetResult(Boolean ignoreUIThreadCheck) at Microsoft.VisualStudio.Services.VsTask.GetResult() WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

I'm running 15.7.4 on 64bit Windows 10 (Spring 2018 update)

Using Process Explorer I can see that Microsoft.VisualStudio.Threading is loaded from C:\VS2017\Enterprise\Common7\IDE\PrivateAssemblies\Microsoft.VisualStudio.Threading.dll.

luedi commented 6 years ago

Have the same issue on VS 2017.4 Community.

richardcox13 commented 6 years ago

And confirmed on a second machine (also latest VS2017 on W10x64).

mkrausG commented 6 years ago

Having the same issue on VS 2017 (Version 15.7.4) Professional Win 10 64Bit...

gpshonik commented 6 years ago

+1 VS 2017 (Version 15.7.4) Professional Win 10 64Bit

madskristensen commented 6 years ago

This is very strange, but I think I have fixed it now. Can you please try the latest CI build http://vsixgallery.com/extension/e83d71b8-8bfc-4e06-b145-b0388910c016/ and let me know if it works?

mkrausG commented 6 years ago

Same error after applying Version 0.5.25....

gpshonik commented 6 years ago

No luck with the latest CI build.

SetSite failed for package [VsPackage]Source: ExtensionManager Description: Could not load file or assembly Microsoft.VisualStudio.Threading, Version=15.7.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a or one of its dependencies.
madskristensen commented 6 years ago

I'm starting to think it is due to me using VS 2017 Update 8 Preview and not Update 7 that messes with the assembly versions

madskristensen commented 6 years ago

I used the dll files from VS2017.8 but downgraded them to VS2017.3 versions in build 0.5.26. That will hopefully do the trick

mkrausG commented 6 years ago

Same error after applying Version 0.5.26....

gpshonik commented 6 years ago

Same error with 0.5.26

Could not load file or assembly 'Microsoft.VisualStudio.Threading, Version=15.7.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3'
madskristensen commented 6 years ago

It's starting to smell like a bug with binding redirects in VS. In latest CI build I've downgraded the Microsoft.VisualStudio.Threading dll to version 15.6 instead of 15.7

mkrausG commented 6 years ago

;-) Working now.. Great !!!

gpshonik commented 6 years ago

Works with v 0.5.27. Thank you!

madskristensen commented 6 years ago

Awesome. It turns out that it is a binding redirect issue. VS2017.7 only does binding redirects for Microsoft.VisualStudio.Threading 15.6 but not 15.7 which is rather weird. Glad it works now and thank you for testing

richardcox13 commented 6 years ago

And I have now successfully exported my extension list...

Thanks for the fix