Error de NuGet 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'.

Problema

El paquete NuGet.exe no debe usarse para generar paquetes para proyectos de estilo SDK.

Solución

Use dotnet pack o msbuild -t:pack en su lugar. Se recomienda no usar la experiencia heredada del paquete csproj, ya que genera paquetes incompletos.