dotnet / machinelearning-modelbuilder

Simple UI tool to build custom machine learning models.
Creative Commons Attribution 4.0 International
269 stars 59 forks source link

Extension fails to load: SetSite failed for package [ModelBuilderPackage] #2394

Open dlidstrom opened 2 years ago

dlidstrom commented 2 years ago

System Information (please complete the following information):

Describe the bug

This happens when I try to open a previously created model using Open With...

To Reproduce

Use Open With...

Expected behavior A clear and concise description of what you expected to happen.

Screenshots

The 'ModelBuilderPackage' package did not load correctly. ```txt --------------------------- Microsoft Visual Studio --------------------------- The 'ModelBuilderPackage' package did not load correctly. The problem may have been caused by a configuration change or by the installation of another extension. You can get more information by examining the file 'C:\Users\DanielL\AppData\Roaming\Microsoft\VisualStudio\17.0_b47e353d\ActivityLog.xml'. Restarting Visual Studio could help resolve this issue. Continue to show this error message? --------------------------- Yes No --------------------------- ```

Additional context Add any other context about the problem here.

ActivityLog.xml ```xml 2562 Information VisualStudio Begin package load [ModelBuilderPackage] {A1473B8C-F40E-4509-8A84-66BBA12B3E7F} 2563 Error VisualStudio SetSite failed for package [ModelBuilderPackage]Source: 'Microsoft.ML.ModelBuilder' Description: Could not load file or assembly 'Microsoft.VisualStudio.Threading, Version=17.2.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=17.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. File name: 'Microsoft.VisualStudio.Threading, Version=17.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' at Microsoft.ML.ModelBuilder.ModelBuilderPackage.InitializeAsync(CancellationToken cancellationToken, IProgress`1 progress) at Microsoft.VisualStudio.Shell.AsyncPackage.<>c__DisplayClass20_0.<<Microsoft-VisualStudio-Shell-Interop-IAsyncLoadablePackageInitialize-Initialize>b__1>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at Microsoft.VisualStudio.Services.VsTask.RethrowException(AggregateException e) at Microsoft.VisualStudio.Services.VsTask.InternalGetResult(Boolean ignoreUIThreadCheck) 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]. {A1473B8C-F40E-4509-8A84-66BBA12B3E7F}
80070002
2564 Error VisualStudio End package load [ModelBuilderPackage] {A1473B8C-F40E-4509-8A84-66BBA12B3E7F}
80070002
```
beccamc commented 2 years ago

@dlidstrom Is this Open With.. from Visual Studio Solution Explorer? Or from Windows File Explorer?

dlidstrom commented 2 years ago

@beccamc This is inside Visual Studio. I get the same error when trying to add a Machine Learning Model to the project.

beccamc commented 2 years ago

I'm going to dig into the versioning a bit more, but we've seen this before when the VSSDK used with the VS version is older than the VSSDK used by our extension. Are you able to update your VS to a newer major version (17.4.2)?

@v-Hailishi Can you test Model Builder extension on VS 2022 version 17.0.16

v-Hailishi commented 2 years ago

@beccamc The bug is repro on the VS 2022 version 17.0.16 when open Moder builder (16.14.0.2260101) image

beccamc commented 2 years ago

@JakeRadMSFT Thoughts on this?