NuGet Error NU5049
The `pack` command for SDK-style projects is not supported, use `dotnet pack` or `msbuild -t:pack` to pack this project instead. You can override this behavior by setting the 'NUGET_ENABLE_LEGACY_CSPROJ_PACK' environment variable to 'true'.
Issue
NuGet.exe pack should not be used to generate packages for SDK-style projects.
Solution
Use dotnet pack
or msbuild -t:pack
instead.
It recommended that you do not use the legacy csproj pack experience as it generates incomplete packages.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for