[英]Should I include in NuGet package dlls for multiple target frameworks
Let's consider a library project which should run on three .NET runtimes: net20, net35 and net46. 让我们考虑一个应该在三个.NET运行时上运行的库项目:net20,net35和net46。 The source code remains the same for all versions.
所有版本的源代码均相同。
When releasing should i build the project 3 times with different TargetFrameworkVersion
property values in order to generate 3 dlls, one for each .NET version, and than include all three in the nupkg file in lib/<target framework>/
directories? 发布时,我应该使用不同的
TargetFrameworkVersion
属性值来构建该项目3次,以便生成3个dll,每个.NET版本一个,然后在lib/<target framework>/
目录的nupkg文件中包括所有三个。 Or is it just fine to include only .net 2.0 dll and it will work just fine on newer runtimes. 或者只包含.net 2.0 dll也可以,并且在较新的运行时中也可以正常运行。
如果仅使用在2.0版上编译的代码,则无需包括其他框架版本。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.