VsixCommunity / Community.VisualStudio.Toolkit

Making it easier to write Visual Studio extensions
Other
249 stars 44 forks source link

Error when trying to use toolkit.Themes.UseVsTheme #433

Open SiriusED opened 1 year ago

SiriusED commented 1 year ago

Hi. I'm trying to use VS theme for my custom tool window and getting an error. The code I tried to use is from this example: https://github.com/VsixCommunity/Community.VisualStudio.Toolkit/blob/master/demo/VSSDK.TestExtension/ToolWindows/RunnerWindowControl.xaml

And this is the error I get after.

Could not load file or assembly 'Microsoft.VisualStudio.Imaging, Version=17.0.0.0, Culture=neutral,
 PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

After that when I try to add this assembly it says it is already referenced to this assembly in my project. After that I tried to add it trough the NuGet, it added. Then it asked for one more assembly not found: Microsoft.VisualStudio.Shell.15.0 Then I added this one trough NuGet also. After that I got no errors, and built my project successfully. But when I tried to run the project, my experimental visual studio just crashed and after that I can't build my project anymore because it VS says Extension '0000-0000...' could not be found. Please make sure the extension has been installed.

Is there anything I miss or what?

KBM-Kevin-Kessler commented 1 year ago

I got the exact same problem. Version: 17.0.503

dorianmk commented 12 months ago

The same problem has gone for me after I updated Visual Studio to 17.6.4

This should work without any modifications: https://github.com/VsixCommunity/Community.VisualStudio.Toolkit/tree/master/demo/VSSDK.TestExtension