我最近创建了一个巨大的NuGet包(超过2000个文件,其中大部分只是内容,15Mb)。创建一个NuSpec并将其打包工作正常。
然后我进入下一步:测试它。
首先我尝试在本地安装它,但安装所有依赖项后安装失败,无法安装软件包本身。回滚发生了。
然后我上传到本地服务器,只是为了确保问题不是Visual Studio试图找到包,它失败了。我搜索了如何获取有关错误的更多详细信息并使用了此命令行:
nuget push MyPackage.1.0.0.nupkg -Source "http://localhost/myserver/api/v2/package" "API-KEY" -Verbosity detailed -ForceEnglishOutput
回报如下:
Pushing MyPackage.1.0.0.nupkg to 'http://localhost/myserver/api/v2/package'...
PUT http://localhost/myserver/api/v2/package/
InternalServerError http://localhost/myserver/api/v2/package/ 645ms
PUT http://localhost/myserver/api/v2/package/
InternalServerError http://localhost/myserver/api/v2/package/ 315ms
PUT http://localhost/myserver/api/v2/package/
InternalServerError http://localhost/myserver/api/v2/package/ 277ms
System.AggregateException: One or more errors occurred. ---> System.Net.Http.HttpRequestException: Response status code does not indicate success: 500 (Internal Server Error).
at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
at NuGet.Protocol.Core.Types.PackageUpdateResource.<>c.<PushPackageToServer>b__21_3(HttpResponseMessage response)
at NuGet.Protocol.HttpSource.<ProcessResponseAsync>d__14`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NuGet.Protocol.Core.Types.PackageUpdateResource.<PushPackageToServer>d__21.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NuGet.Protocol.Core.Types.PackageUpdateResource.<PushPackageCore>d__15.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NuGet.Protocol.Core.Types.PackageUpdateResource.<PushPackage>d__14.MoveNext()
你能帮我弄明白问题是什么吗?可悲的是,我不能发布隐私问题的包裹(我正在为我工作的公司开发)。
答案 0 :(得分:0)
遇到类似的错误,再次是相同的500 并且错误消息没有帮助。
2019-08-20T09:29:15.4059254Z System.AggregateException:
One or more errors occurred. ---> System.Net.Http.HttpRequestException:
Response status code does not indicate success: 500 (Internal Server Error).
在这种情况下,罪魁祸首是Outopus Deploy服务器, 磁盘空间已用完。
从删除旧软件包中释放了磁盘空间,并能够顺利解决它。
或者,您可以增加卷大小(如果它是像AWS EBS这样的云存储)。