Open a command window and CD to the folder containing the CSProj.
Run the following build command: dotnet build PROJECTNAME.csproj -c Release -o .
Note that the DLL was build twice but in the exact same location
Change the extension of the resulting nupkg file to .zip and unzip the package
Compare the DLLs in the framework specific subfolders of lib
Result:
The package will looks correct.
It will have framework specific lib subfolders.
But, if you look at the individual DLLs you will find that the the DLLs are in fact all identical.
What is happening is that framework specific DLLs are all being built, but each build overwrites the previous. Then once all the builds are done the NuGet package build pulls the one remaining (last built) DLL for all frameworks.
Desired Behavior
It would expect the build to fail when creating the NuGet package.
*Would at least be nice to get some kind of warning
Steps To Reproduce
Example:
dotnet build PROJECTNAME.csproj -c Release -o .
Result: The package will looks correct. It will have framework specific lib subfolders. But, if you look at the individual DLLs you will find that the the DLLs are in fact all identical. What is happening is that framework specific DLLs are all being built, but each build overwrites the previous. Then once all the builds are done the NuGet package build pulls the one remaining (last built) DLL for all frameworks.
Desired Behavior It would expect the build to fail when creating the NuGet package. *Would at least be nice to get some kind of warning