dotnet
dotnet copied to clipboard
CS8032 An instance of analyzer CommunityToolkit.Mvvm.SourceGenerators.AutoPropertyWithFieldTargetedObservablePropertyAttributeAnalyzer cannot be created
Describe the bug
I have a UWP app with CommunityToolkit.Mvvm 8.2.2 and getting this warning. Where do I start addressing it?
Severity Code Description Project File Line Suppression State Detail Description
Warning CS8032 An instance of analyzer CommunityToolkit.Mvvm.SourceGenerators.AutoPropertyWithFieldTargetedObservablePropertyAttributeAnalyzer cannot be created from C:\Users\User\.nuget\packages\communitytoolkit.mvvm\8.2.2\analyzers\dotnet\roslyn4.3\cs\CommunityToolkit.Mvvm.SourceGenerators.dll: Could not load type 'CommunityToolkit.Mvvm.SourceGenerators.AutoPropertyWithFieldTargetedObservablePropertyAttributeAnalyzer' from assembly 'CommunityToolkit.Mvvm.SourceGenerators, Version=8.2.0.0, Culture=neutral, PublicKeyToken=4aff67a105548ee2'.. IPAPP8WTS C:\Users\Carlo\.nuget\packages\communitytoolkit.mvvm\8.2.2\analyzers\dotnet\roslyn4.3\cs\CommunityToolkit.Mvvm.SourceGenerators.dll 1 Active System.TypeLoadException: Could not load type 'CommunityToolkit.Mvvm.SourceGenerators.AutoPropertyWithFieldTargetedObservablePropertyAttributeAnalyzer' from assembly 'CommunityToolkit.Mvvm.SourceGenerators, Version=8.2.0.0, Culture=neutral, PublicKeyToken=4aff67a105548ee2'.
at System.Reflection.RuntimeAssembly.GetType(RuntimeAssembly assembly, String name, Boolean throwOnError, Boolean ignoreCase, ObjectHandleOnStack type)
at System.Reflection.RuntimeAssembly.GetType(String name, Boolean throwOnError, Boolean ignoreCase)
at Microsoft.CodeAnalysis.Diagnostics.AnalyzerFileReference.Extensions`1.GetAnalyzersForTypeNames(Assembly analyzerAssembly, IEnumerable`1 analyzerTypeNames, Boolean& reportedError)
Regression
Not sure
Steps to reproduce
I don't have any steps to reproduce. This is a warning that VS is showing.
Expected behavior
Clearer warning or description that is actionable.
Screenshots
No response
IDE and version
VS 2022
IDE version
17.7.6
Nuget packages
- [ ] CommunityToolkit.Common
- [ ] CommunityToolkit.Diagnostics
- [ ] CommunityToolkit.HighPerformance
- [X] CommunityToolkit.Mvvm (aka MVVM Toolkit)
Nuget package version(s)
8.2.2
Additional context
No response
Help us help you
No, just wanted to report this
Same issue here
@Sergio0694, any insight?
I have the same issue just upgrading the nuget package through the "Manage nuget packages" interface in vs2022 and no other change.
Forgot to mention that I have upgraded from 8.2.1 to 8.2.2.
Same here.
same here