1

I'm using a docker container to build a nuget package using

dotnet pack ...

The csproj is multi-targeted for netstandard2.1 and net48.

Obviously I get an error that the targeting pack for net48 is missing.

Given that a nuget is just a packge of the dll's is it possible somehow to pack a nuget targeted for net 48 from a Linux docker ? Or do I have to use windows for this ?

Mortalus
  • 10,574
  • 11
  • 67
  • 117
  • You can create a nuget package, provided you had the net48.dll already compiled. You can not compile net48 binaries on linux. `dotnet pack` will compile your project and _then_ package it into a nuget package, so this will not work. https://stackoverflow.com/questions/50232375/how-to-dotnet-pack-an-already-compiled-project – caesay Mar 25 '22 at 13:23

0 Answers0