Reputation: 507
I'm getting this warning when indirectly referencing the Nuget package System.ComponentModel.Composition.Registration
in my .NET Core 3.1 project. I'm not sure what's causing this or what do do about it.
Package 'System.ComponentModel.Composition.Registration 4.7.0' was restored using
'.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7,
.NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8'
instead of the project target framework '.NETCoreApp,Version=v3.1'. This package may not
be fully compatible with your project.
Upvotes: 0
Views: 402
Reputation:
I had this same issue with System.Windows.Forms. Make sure the assembly reference is correct or try to install with dotnet add package [yourpackagehere]
.
If this doesn't work, the answer to this question solved my issue: Unable to resolve System.Windows.Forms.dll in .Net Core 3.1
Just put <FrameworkReference Include="Microsoft.WindowsDesktop.App" />
into your .csproj ItemGroup section.
I'm not entirely sure whether this would work or not but it's worth a try.
Hope that works!
Upvotes: 1
Reputation: 1741
Uninstall this Composition.Registration if you don't need it. It's just not compatible with your new 3.1 project.
Upvotes: 0