简体   繁体   中英

Targeting .Net Core Framework and Full .Net 4.5/4.6 Framework in one Nuget Package

Is it possible at all? I am trying to figure out the best way to go about this. We have a project, say the project is named "DoFunkyStuff".

We want to have two versions of this project, one that is build on .Net Core, and one that is built on the Full .net 4.5 or 4.6 Framework that has more features.

Firstly, how would I go about structuring these projects in my solution, so that I could have both of these built into one Nuget package, that is structured targeting the different frameworks. Is this possible? Is it possible to have the same project name, but targeting a completely separate framework with different functionality, built into one Nuget package?

Any guidance would be amazing. Thanks in advance.

Ok I found this reference which describes how to target both core and full framework. It also describes how to go about using each one in code. This seems like I would end up with some seriously ugly code. For now I think I am better off having separate projects.

https://docs.microsoft.com/en-us/dotnet/articles/core/tutorials/libraries#how-to-multitarget

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM