在Nuget软件包中使用特定的SDK DLL
我正在用net6.0
编译代码。
我的一个依赖项目之一,用netStandArd2.0
编译,正在使用带有dlls的nuget软件包,用于netStandard2.0
和net5.0
(and Code>) NetStandard1.1
和net45
)。
在输出文件夹中,我看到它采用net5.0
dll。
我该如何选择netStandard2.0
dll?
该要求是 dotfuscator ,因为它寻找net5.0
运行时,根据net5.0
dll。应该问有关 dotfuscator 的问题,但是我正在一项研究中,以更好地了解 dotfuscator ,因此,同时我询问了Nuget。
I'm compiling my code with net6.0
.
One of my depends projects, compiled with netstandard2.0
, is using a Nuget package with DLLs for netstandard2.0
and net5.0
(and also netstandard1.1
and net45
).
In the output folder, I see it takes the net5.0
DLL.
How can I choose to take the netstandard2.0
DLL?
The requirement is for Dotfuscator, because it looking for the net5.0
Runtime, according to that net5.0
DLL. The question should be asked about Dotfuscator, but I'm in the middle of a research to understand the Dotfuscator better, so in meanwhile I'm asking about the Nuget.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
基本上,
netStandard2.0
或任何netStandard
目标实际上是汇编为NetStandstand
。NetStandard
不是运行时,它是API的规范在不同的运行时使用相同的代码库。根据您编译的运行时间,NetStandard
库将编译到其中。基本上,由于您将应用程序编译为
net6
,因此您的netStandard2.0
库也以net6
库来编译。然后,它将使用正确的依赖项(net5
一个)进行编译。Basically,
netstandard2.0
or any of thenetstandard
targets are actually compiled tonetstandard
.netstandard
isn't a runtime, it's a specification of the API's that are shared between runtimes such asnet5
,net45
, etc, allowing you to use the same codebase over different runtimes. Depending on which runtime you compile for, thenetstandard
library will be compiled to that.Basically, since you are compiling your application in
net6
, yournetstandard2.0
library is also compiling as anet6
library. It then will use the correct dependencies (thenet5
one) to compile.