NuGet 1.6 and downloading packages

I just setup a NuGet Server feed and am trying to get it working with octopus. The NuGet.Server version I setup is version 1.6 and it seems octopus is using version 1.5 from NuGet.Core.dll.

I’m not sure if it has to do with versions of nuget, but thats what I’m assuming at this point. Here’s the exception I’m getting on some packages:

2012-02-29 18:20:49 DEBUG Package … is a web package. Downloading from http://…/api/v2/package/…/0.0.0.154
2012-02-29 18:20:50 ERROR Unable to download package
System.IO.InvalidDataException: Failed to download package correctly. The contents of the package could not be verified.
at NuGet.PackageDownloader.DownloadPackage(IHttpClient downloadClient, Byte[] packageHash, IPackageMetadata package)
at Octopus.Server.Tasks.Deploy.PackageFetcher.AttemptFetchWebPackage(IPackageRepository repository, DataServicePackage package)
at Octopus.Server.Tasks.Deploy.PackageFetcher.AttemptFetch(IPackageRepository repository, IPackage package)
at Octopus.Server.Tasks.Deploy.PackageFetcher.Fetch(String feed, String packageId, String version)
2012-02-29 18:20:51 ERROR The package could not be fetched. Please see above errors for details. If you are getting a package verification error, try switching to a Windows File Share package repository to see if that helps.
2012-02-29 18:20:51 ERROR System.NullReferenceException: Object reference not set to an instance of an object.
at NuGet.DefaultPackagePathResolver.GetPackageDirectory(IPackage package)
at Octopus.Server.Tasks.Deploy.PackageFetcher.Fetch(String feed, String packageId, String version)
at Octopus.Server.Tasks.Deploy.DownloadPackageActivity.Execute()
at Octopus.Shared.Activities.Activity.Octopus.Shared.Activities.IActivity.Execute() in c:\BuildAgent\work\93ea602cb1d1c3f2\source\Octopus.Shared\Activities\Activity.cs:line 31
at Octopus.Shared.Activities.ActivityRuntime.RunTaskOnBackgroundThread(Object arguments) in c:\BuildAgent\work\93ea602cb1d1c3f2\source\Octopus.Shared\Activities\ActivityRuntime.cs:line 115 [FAILED]

The version of octopus I am using is Octopus 0.9.568.2630 (beta)

Any ideas?

Hi Sean,

Are you still running that older Octopus release, and if so, is the same issue still happening? (Sorry for the late reply).

There was a bug in NuGet’s hash verification code, I submitted a patch to them last year which I believe they incorporated in the latest NuGet.Server.

Paul

Paul,

I upgraded to the latest octopus server and nuget 1.6 and it fixed all the problems. I have it working with the teamcity nuget server that is baked into teamcity 7.0

Thanks!

Sean