CommunityToolkit / dotnet

.NET Community Toolkit is a collection of helpers and APIs that work for all .NET developers and are agnostic of any specific UI platform. The toolkit is maintained and published by Microsoft, and part of the .NET Foundation.
https://docs.microsoft.com/dotnet/communitytoolkit/?WT.mc_id=dotnet-0000-bramin
Other
2.98k stars 293 forks source link

Packaging from VS extension #662

Open josesimoes opened 1 year ago

josesimoes commented 1 year ago

Describe the bug

When referencing the CommunityToolkit.Mvvm package from a Visual Studio 2022 extension, the extension fails to load due to missing files.

Here's the log from VS activity log: System.IO.FileNotFoundException: Could not load file or assembly 'CommunityToolkit.Mvvm, Version=8.1.0.0, Culture=neutral, PublicKeyToken=4aff67a105548ee2' or one of its dependencies

When trying to debug this, it seems that System.Buffers aren't packaged in VSIX (nor deployed to the experimental instance).

Any thoughts on this? Thanks!

Regression

No response

Steps to reproduce

Reference CommunityToolkit.Mvvm from VS extension project

Expected behavior

A VS 2022 extension referencing CommunityToolkit.Mvvm should load just fine.

Screenshots

No response

IDE and version

VS 2022

IDE version

17.5.3

Nuget packages

Nuget package version(s)

8.1.0

Additional context

No response

Help us help you

Yes, I'd like to be assigned to work on this item

josesimoes commented 1 year ago

Update on this: after a several attempts to find the root cause, it turns out that the culprit is Microsoft.Bcl.AsyncInterfaces v7.0.0. Downgrading MVVM community to v8.0 along all the other refs to Microsoft.Bcl.AsyncInterfaces in the project so v6.0 is referenced fixes the issue. Extension is loading again and fully operational.