Easiest way to set up multiple frames in nuget?

I created a library that uses: generics, extension methods, and the Func delegate. Func Delegate is the newest .NET feature (version 3.5) in the library. When I published it on nuget, the project was targeting .NET 4.5.2, but when I tried to install it on a project with the target version 4.5, it failed.

How to make sure that the package will be installed in any project that is designed for .NET 3.5 and later, whether the target structure in the library should be changed to 3.5 or should I use the directory agreement and create a separate dll for each structure, explained here:

Support for multiple versions of the .NET Framework

+5
source share
1 answer

Direct the package to 3.5, which means the lib folder should be like this.

Lib \ net35

If the package targets net35, it can be installed in any project that is designed for .NET 3.5 or higher.

+3
source

Source: https://habr.com/ru/post/1264057/


All Articles