Octo Pack is creating a corrupted nupkg

I’m using the command with a Hosted macOS agent on VSTS:

octo pack --id pct --overwrite --version $(Build.BuildNumber) --basePath published_app --outFolder packages

When i try to push the nupkg that gets created to my nuget feed, it throws a 400 bad request with the following error:

The nuget command failed with exit code(1) and error(400 (Bad Request - The package is invalid: Number of entries expected in End Of Central Directory does not correspond to number of entries in Central Directory. (VSTS Activity ID: FD47483B-A6FF-4690-BFE9-BCC89FF6E9FC)))

The file seems to open up as a zip file without issue locally, but fails on the nuget feed, any idea what would cause this? I do not have a default nuspec file, so i am using what is being generated by this command. This is also an asp.net core web application.

Hi Alex,

Thanks for reaching out! Could you try passing the parameter --format=zip to create a zip file instead of a nupkg?.

If that doesn’t solve the issue, then this might be related to how mac handles its FileSystem, which might make this issue a lot harder to solve.

Let me know how that goes,
Dalmiro

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.