【问题标题】:Nuget package failing on Install and on pushNuget 包在安装和推送时失败
【发布时间】:2017-11-20 14:00:32
【问题描述】:

我最近创建了一个巨大的 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()

你能帮我找出问题所在吗?遗憾的是,由于隐私问题,我无法发布包(我正在为我工​​作的公司开发)。

【问题讨论】:

    标签: nuget nuget-package nuget-server


    【解决方案1】:

    遇到过类似的错误,还是一样的 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 等云存储)。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-02-03
      相关资源
      最近更新 更多