According to this and this discussions, NuGet.exe is not supported for packing SDK projects. The current experience is confusing as it seems like NuGet.exe pack "works" but ignores properties set in the project. Instead, NuGet.exe should show a helpful error message that guides users to use dotnet.exe instead.
This is the only logical solution, since the NuGet team apparently isn't interested in adding critical functionality to their app - merely making it look like it works when it actually doesn't, then ignoring the fact that it doesn't actually work for the next two-and-a-half years.
@rrelyea @anangaur Thoughts? This is a "breaking" change but would greatly help newcomers. For example: https://github.com/NuGet/docs.microsoft.com-nuget/pull/1700
The problem with "nuget pack" is known since 2017.
One could do the trick with "msbuild -t:pack".
One could use "dotnet pack".
But the others that rely on "nuget pack" loose many hours till they figure out what is going on.
@Microsoft: Will you please do something about it?
@zkat - https://github.com/NuGet/Home/issues/4491, which points to this issue, has 47 upvotes. Might want to consider for Sprint 179.
Most helpful comment
This is the only logical solution, since the NuGet team apparently isn't interested in adding critical functionality to their app - merely making it look like it works when it actually doesn't, then ignoring the fact that it doesn't actually work for the next two-and-a-half years.