简体   繁体   中英

Nuget.exe pack times out

As part of the build process, it packages with NuGet and pushes to NuGet server. All was OK, but after updating the NuGet version to the latest it just hangs there on the pack command. I'm using F#Fake for the build process, and after quite a long period the nuget.exe pack command just times out:

Running build failed.
Error:
System.Exception: Process E:\Builds\projectName\build\tools\nuget\nuget.exe pack -Symbols -Version 1.0.0.0-pre -OutputDirectory "E:\Builds\projectName\build\package\out" "E:\Builds\projectName\build\package\tmp\template.nuspec" -NoPackageAnalysis    timed out.
   at Fake.NuGetHelper.NuGet(FSharpFunc`2 setParams, String nuspecOrProjectFile) in D:\code\FAKE\src\app\FakeLib\NuGet\NugetHelper.fs:line 423
   at FSI_0005.Build.clo@163-25.Invoke(Unit _arg10)
   at Fake.TargetHelper.runSingleTarget(TargetTemplate`1 target) in D:\code\FAKE\src\app\FakeLib\TargetHelper.fs:line 626

Update: The same command directly without Fake 's wrapping, hangs there for around 20 mins on the below lines:

NuGet Version: 4.4.1.4656
Attempting to build package from 'template.nuspec'.

Finally it does create the package, but never used to be that long. I've tested with NuGet v2.8.6 and same operation takes seconds.

After some trial and error, I've discovered that any of the 4+ versions of a NuGet have the problem with taking ages to create a package.

I've stopped on v3.5.0, where packaging timings are OK.

However it had another unexpected/frustrating change , where it forces the version normalization, ie if requested to pack with 1.0.123.0, the nuspec is generated with 1.0.123 skipping the last 0. Update : apparently the version normalization is a documented breaking change from version 3.4 and above.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM