.net - 'dotnet nuget push .. .' doesn' t 似乎在插入符号

标签 .net nuget package push symbols

dotnet clean --configuration Debug
dotnet build --configuration Debug --version-suffix beta.12
dotnet pack --include-symbols --include-source --configuration Debug --version-suffix beta.12

到目前为止一切顺利 - 上述三个命令产生了两个不错的包:xyz.2.1.2-beta.12.nupkg 和 xyz.2.1.2-beta.12.symbols.nupkg。但是当我运行最后一个命令时:
dotnet nuget push bin\Debug\ --source https://www.nuget.org

失败并显示以下消息:

info : Pushing xyz.2.1.2-beta.12.nupkg to the NuGet gallery (https://www.nuget.org)...

info : PUT https://www.nuget.org/api/v2/package/

warn : This package will only be available to download with SemVer 2.0.0 compatible NuGet clients,such as Visual Studio 2017 (version 15.3) and above or NuGet client 4.3 and above. For more information,see https://go.microsoft.com/fwlink/?linkid=852248.

info : Created https://www.nuget.org/api/v2/package/ 1573ms

info : Your package was pushed.

info : Pushing xyz.2.1.2-beta.12.symbols.nupkg to the NuGet gallery (https://www.nuget.org)...

info : PUT https://www.nuget.org/api/v2/package/

info : Conflict https://www.nuget.org/api/v2/package/ 1006ms error: Response status code does not indicate success: 409 (A package with ID 'xyz' and version '2.1.2-beta.12' already exists and cannot be modified.).



所以,很明显,符号包的推送失败了。这发生在 dotnet nuget push...nuget push...似乎是什么问题?

最佳答案

我刚刚遇到这个问题并在几分钟前修复了它。

Symbols 包有一种新格式,即 .snupkg延期。

如果您使用的是 dotnet clinuget cli您可以执行以下操作:

包装:

DOTNET 命令行界面

dotnet pack MyAwesomeLib.csproj --include-symbols -p:SymbolPackageFormat=snupkg -c release

NUGET CLI

nuget pack MyAwesomeLib.nuspec -Symbols -SymbolPackageFormat snupkg

发布:

DOTNET 命令行界面

 dotnet nuget push MyAwesomeLib.1.0.0.nupkg -s https://api.nuget.org/v3/index.json -k ~~your API key here~~

NUGET CLI

nuget push MyAwesomeLib.1.0.1.nupkg -Source https://api.nuget.org/v3/index.json -apikey ~~your API key here~~

您可以从 here 阅读更多相关信息。 .

关于.net - 'dotnet nuget push .. .' doesn' t 似乎在插入符号,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52142074/

相关文章:

java - 使用java反射获取包名

function - 需要 Ada 包函数标识符

c# - 将事件解决方案平台从任何 CPU 更改为 x86 时,WPF 应用程序未启动

.net - 如何最好地实现 IoC 注入(inject)组件的按 View 生命周期

c# - 使用语法编写测试数据生成器

nuget - 排除从 .NET Standard 中的 nuget 包构建的库

Nuget 与 Artifactory。 key 在指定状态下无效

.net-core - Azure Devops 发布到自己的 feed 突然导致 403 禁止

android - 查找 androidx 库版本的最佳方法是什么,例如 NavigationComponent、ViewModel 等?

.net - 单个DLL V多个DLL