'Could not load file or assembly 'System.ComponentModel.Annotations, Version=4.2.0.0' in plugin environment (.NET Framework) #1050
Labels
bug 🐛
An unexpected issue that highlights incorrect behavior
Describe the bug
Using
ObservableValidator
in a .NET Framework application plugin leads toSystem.IO.FileNotFoundException
: Could not load file or assembly 'System.ComponentModel.Annotations, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.The referenced System.ComponentModel.Annotations 5.0.0 package brings System.ComponentModel.Annotations 4.6.26515.6 dll.
But CommunityToolkit.Mvvm 8.4.0 dll references System.ComponentModel.Annotations 4.2 dll.
Regression
No response
Steps to reproduce
Please see attached minimal repro. Build solution and run AppWithPlugin.
AppWithPlugin.zip
Expected behavior
System.ComponentModel.Annotations should be resolved.
Screenshots
No response
IDE and version
VS 2022
IDE version
17.12.5
Nuget packages
Nuget package version(s)
8.4.0
Additional context
Why don't you add target framework net472 and reference only the framework provided System.ComponentModel.DataAnnotations and not the annotations nuget package?
Help us help you
Yes, I'd like to be assigned to work on this item
The text was updated successfully, but these errors were encountered: