豆豆友情提示:这是一个非官方 GitHub 代理镜像,主要用于网络测试或访问加速。请勿在此进行登录、注册或处理任何敏感信息。进行这些操作请务必访问官方网站 github.com。 Raw 内容也通过此代理提供。
Skip to content

Latest commit

 

History

History
23 lines (17 loc) · 726 Bytes

File metadata and controls

23 lines (17 loc) · 726 Bytes
title NuGet Error NU5049
description NU5049 error code
author nkolev92
ms.author nikolev
ms.date 11/07/2022
ms.topic reference
f1_keywords
NU5049

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.