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.
Basically,
netstandard2.0or any of thenetstandardtargets are actually compiled tonetstandard.netstandardisn'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, thenetstandardlibrary will be compiled to that.Basically, since you are compiling your application in
net6, yournetstandard2.0library is also compiling as anet6library. It then will use the correct dependencies (thenet5one) to compile.