Mono Nuget还原失败,出现FileFormatException

Mono Nuget还原失败,出现FileFormatException,mono,nuget,nuget-package,nuget-package-restore,Mono,Nuget,Nuget Package,Nuget Package Restore,我让Jenkins CI运行构建docker容器的命令 构建容器的步骤之一要求我运行以下NuGet restore 运行mono/usr/bin/NuGet.exe restore/src/MyApp.sln-NoCache-Verbosity detailed 大约50%的时间,构建工作正常,另外50%的时间,它似乎挂起或超时,并向控制台提供以下输出 [91MSSystem.IO.FileFormatException:指定的存档无效。 在System.IO.Packaging.Packag

我让Jenkins CI运行构建docker容器的命令

构建容器的步骤之一要求我运行以下NuGet restore

运行mono/usr/bin/NuGet.exe restore/src/MyApp.sln-NoCache-Verbosity detailed

大约50%的时间,构建工作正常,另外50%的时间,它似乎挂起或超时,并向控制台提供以下输出


[91MSSystem.IO.FileFormatException:指定的存档无效。
在System.IO.Packaging.Package.OpenCore(System.IO.Stream、FileMode packageMode、FileAccess packageAccess、Boolean OwnssStream)[0x00000]中:0
在System.IO.Packaging.Package.Open(System.IO.Stream、FileMode packageMode、FileAccess packageAccess、Boolean OwnssStream)[0x00000]中:0
在System.IO.Packaging.Package.Open(System.IO.Stream、FileMode packageMode、FileAccess packageAccess)[0x00000]中:0
在System.IO.Packaging.Package.Open(System.IO.Stream,FileMode packageMode)[0x00000]中:0
在:0中的System.IO.Packaging.Package.Open(System.IO.Stream Stream)[0x00000]处
在:0中的numget.OptimizedZipPackage.ensuremainfest()[0x00000]处
在NuGet.OptimizedZipPackage..ctor(IFileSystem文件系统,System.String packagePath)[0x00000]中:0
在NuGet.LocalPackageRepository.OpenPackage[0m[91m(System.String路径)[0x00000]中:0[0m[91m

这是在虚拟机中运行的,因此我认为可能存在不一致的网络可用性

有什么想法吗?

我也有同样的问题(主要是斑点状DNS和数据包丢失),最后通过检查nuget退出代码并重试还原来编写脚本。希望看到真正的解决方案我也有同样的问题(主要是斑点状DNS和数据包丢失)并通过检查nuget退出代码并重试还原来编写脚本。希望看到真正的解决方案