使用FileFormatException

时间:2015-07-08 16:27:15

标签: mono nuget nuget-package nuget-package-restore

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

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

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

大约50%的时间,构建工作,以及其他50%的时间,它似乎挂起或超时,并给我以下输出到控制台。

[91mSystem.IO.FileFormatException: The specified archive is invalid. at System.IO.Packaging.Package.OpenCore (System.IO.Stream stream, FileMode packageMode, FileAccess packageAccess, Boolean ownsStream) [0x00000] in <filename unknown>:0 at System.IO.Packaging.Package.Open (System.IO.Stream stream, FileMode packageMode, FileAccess packageAccess, Boolean ownsStream) [0x00000] in <filename unknown>:0 at System.IO.Packaging.Package.Open (System.IO.Stream stream, FileMode packageMode, FileAccess packageAccess) [0x00000] in <filename unknown>:0 at System.IO.Packaging.Package.Open (System.IO.Stream stream, FileMode packageMode) [0x00000] in <filename unknown>:0 at System.IO.Packaging.Package.Open (System.IO.Stream stream) [0x00000] in <filename unknown>:0 at NuGet.OptimizedZipPackage.EnsureManifest () [0x00000] in <filename unknown>:0 at NuGet.OptimizedZipPackage..ctor (IFileSystem fileSystem, System.String packagePath) [0x00000] in <filename unknown>:0 at NuGet.LocalPackageRepository.OpenPackage [0m[91m(System.String path) [0x00000] in <filename unknown>:0 [0m[91m

这是在VM内部运行,因此我认为可能会出现网络可用性不一致的情况。

有什么想法吗?

0 个答案:

没有答案