Quantcast
Channel: Active questions tagged nuget-package - Stack Overflow
Viewing all articles
Browse latest Browse all 3067

Multi-targeting in NuGet package - wrong version referenced

$
0
0

This is my nuget package structure, following the guide here:

nuget package structure

When this package is installed in a project targeting .Net8.0, I get the warning that it was restored for .Net Frameworks 4.6.1 to 4.8.2, and that it may not be fully compatible with my project. How to troubleshoot this? I tried this with a new project targeting .Net8.0 and was able to reproduce the issue. Why would nuget not pick up the correct target framework when installing?

This is a legacy assembly that needs to be compatible with .Net8, but some of its code has to remain in v4.5.2. That is the reason for having the "base" assembly for both versions, with an assembly that interfaces with the actual project that references it. I am not sure if this structure is a problem, and if it is then how to solve this.


Viewing all articles
Browse latest Browse all 3067

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>