Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The package 'StylerPackage' did not load correctly #466

Closed
YannChv opened this issue Feb 8, 2024 · 4 comments
Closed

The package 'StylerPackage' did not load correctly #466

YannChv opened this issue Feb 8, 2024 · 4 comments

Comments

@YannChv
Copy link

YannChv commented Feb 8, 2024

Hello,

Description of the issue

I'm working on a WPF/c# project on Visual Studio 2022 and I was using this extension, it worked perfectly. But, since I have updated my version of Visual Studio, I'm no more able to use the extension. This update have been made since a long time, at least more than 4 months now.
At the beginning, I was thinking about an incompatibility between the versions. But, I start to think that the issue is elsewhere.
Everytime I open a xaml file or the extension options, I get this error message :

image
The package 'StylerPackage' 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 ...

Here is the error message I have in the ActivityLog file:
SetSite failed for package [StylerPackage]Source: 'XamlStyler.Extension.Windows.VS2022' Description: Impossible de charger le fichier ou l'assembly 'Microsoft.VisualStudio.Threading, Version=17.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' ou une de ses dépendances. Le fichier spécifié est introuvable. System.IO.FileNotFoundException: Impossible de charger le fichier ou l'assembly 'Microsoft.VisualStudio.Threading, Version=17.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' ou une de ses dépendances. Le fichier spécifié est introuvable. Nom de fichier : 'Microsoft.VisualStudio.Threading, Version=17.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' à Xavalon.XamlStyler.Extension.Windows.StylerPackage.InitializeAsync(CancellationToken cancellationToken, IProgress`1 progress) à Microsoft.VisualStudio.Shell.AsyncPackage.<>c__DisplayClass20_0.<b__1>d.MoveNext() --- Fin de la trace de la pile à partir de l'emplacement précédent au niveau duquel l'exception a été levée --- à System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() à Microsoft.VisualStudio.Services.VsTask.RethrowException(AggregateException e) à Microsoft.VisualStudio.Services.VsTask.InternalGetResult(Boolean ignoreUIThreadCheck) === Informations d'état de liaison préalable === JRN : DisplayName = Microsoft.VisualStudio.Threading, Version=17.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a (Fully-specified) JRN : Appbase = file:///C:/Program Files/Microsoft Visual Studio/2022/Professional/Common7/IDE/ JRN : PrivatePath initial = NULL Assembly appelant : XamlStyler.Extension.Windows.VS2022, Version=3.2311.2.0, Culture=neutral, PublicKeyToken=null. === JRN : cette liaison démarre dans le contexte de chargement de LoadFrom. AVT : l'image native ne sera pas détectée dans le contexte LoadFrom. Elle sera détectée uniquement dans le contexte de chargement par défaut, comme pour Assembly.Load(). JRN : utilisation du fichier de configuration de l'application : C:\Users\YCU\AppData\Local\Microsoft\VisualStudio\17.0_4094c831\devenv.exe.config JRN : utilisation du fichier de configuration d'hôte : JRN : utilisation du fichier de configuration de l'ordinateur à partir de C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config. JRN : référence post-stratégie : Microsoft.VisualStudio.Threading, Version=17.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a JRN : la même liaison a été vue avant et a échoué avec hr = 0x80070002.

I have already tried to uninstall and reinstall the extension and my Visual Studio version. But the problem remains the same.

Version Info:

  • OS: Windows 11 professional 22H2
  • Visual Studio: Microsoft Visual Studio Professional 2022 (64 bits) - LTSC 17.2 Version 17.2.23
  • XAML Styler: XAML Styler for Visual Studio 2022 3.2311.2

Thank you,

@Chris-zixuan
Copy link

I installed the same version of VS2022 on both my laptop and desktop, and both had the plugin installed. However, it can be used normally on a laptop, but not on a desktop. If you need me to provide information about the comparison of two computers, please let me know. I hope I can help fix this problem.

@mrlacey
Copy link
Contributor

mrlacey commented Apr 3, 2024

From the log above, it looks like you're using VS 17.2 but the extension is trying to load a version of a VS library from version 17.5

I'm not surprised that this causes an exception.

@YannChv
Copy link
Author

YannChv commented Apr 4, 2024

Yes, it seems to be the root cause of the issue. I've seen that you have opened a PR.
Thank you for the time you took on it !

I hope there will be a fix in the coming days :)

@grochocki
Copy link
Contributor

Should be fixed with 3.2404.2 update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants