Partilhar via


Erro do 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

O pacote NuGet.exe não deve ser usado para gerar pacotes para projetos no estilo SDK.

Solução

Em vez disso, use dotnet pack ou msbuild -t:pack. É recomendado que você não use a experiência de pacote csproj herdado, pois isso gera pacotes incompletos.