1
我想使用cpack
命令從「app.nuspec」文件構建一個自包含的「app.nupkg」包。這裏是我的應用程序的目錄樹:爲什麼Chocolatey不能包裝一個〜2GB的獨立包裝?
C:\CHOCO_REPO\APP
│ app.nuspec
│
├───bin
│ dist
│ Setup.exe
│
└───tools
chocolateyinstall.ps1
chocolateyuninstall.ps1
dist文件(大小〜2G)實際上是程序。當我嘗試運行:
cpack app.nupgk
我得到:
bin\dist
Cannot access a closed stream
與調試選項:
cpack app.nuspec -d
我得到:
Attempting to build package from 'app.nuspec'.
bin\dist
Attempting to delete file "C:\choco_repo\APP\app.nupkg".
Chocolatey had an error occur:
System.ObjectDisposedException: Can not access a closed Stream.
at System.IO.Compression.DeflateStream.EnsureNotDisposed()
at MS.Internal.IO.Packaging.CompressStream.Flush()
at MS.Internal.IO.Zip.ZipIOLocalFileBlock.FlushExposedStreams()
at MS.Internal.IO.Zip.ZipIOLocalFileBlock.UpdateReferences(Boolean closingFlag)
at MS.Internal.IO.Zip.ZipIOBlockManager.SaveContainer(Boolean closingFlag)
at MS.Internal.IO.Zip.ZipIOBlockManager.SaveStream(ZipIOLocalFileBlock blockRequestingFlush, Boolean closingFlag)
at MS.Internal.IO.Zip.ZipIOModeEnforcingStream.Dispose(Boolean disposing)
at System.IO.Stream.Close()
at System.IO.Packaging.PackagePart.Close()
at System.IO.Packaging.Package.DoClose(PackagePart p)
at System.IO.Packaging.Package.DoOperationOnEachPart(PartOperation operation)
at System.IO.Packaging.Package.System.IDisposable.Dispose()
at NuGet.PackageBuilder.Save(Stream stream)
at chocolatey.infrastructure.app.nuget.NugetPack.BuildPackage(PackageBuilder builder, IFileSystem fileSystem, String outputPath)
at chocolatey.infrastructure.app.services.NugetService.pack_run(ChocolateyConfiguration config)
at chocolatey.infrastructure.app.runners.GenericRunner.run(ChocolateyConfiguration config, Container container, Boolean isConsole, Action`1 parseArgs)
at chocolatey.infrastructure.app.runners.ConsoleApplication.run(String[] args, ChocolateyConfiguration config, Container container)
at chocolatey.console.Program.Main(String[] args)
Exiting with 1
任何幫助嗎?謝謝
其實「dist」文件有2.7GB大小。有沒有參考/鏈接意識到可以指向正確的方向來嘗試解決這個問題? – diegus