Have been seeing this error a lot lately, where the NuGet package can’t be downloaded from the NuGet server to the machine I’m deploying to.
It claims the contents of the package can’t be verified, but I can browse through the package no problem with the Package Explorer, so I know the package is valid.
It seems to be looking for something in C:\Teamcity, which I don’t have on any of my machines, but that may be a red herring…?
2011-09-30 14:07:57 INFO Deploying release ‘2011.9.30.5’ of project ‘Test Service’ into environment 'Development’
2011-09-30 14:07:57 INFO Downloading NuGet package Mnetics.TestService 2011.9.30.5 from feed: 'http://nugetserver:10418/nuget’
2011-09-30 14:07:57 DEBUG Found package Mnetics.TestService 2011.9.30.5
2011-09-30 14:07:58 ERROR 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 NuGet.DataServicePackage.DownloadAndVerifyPackage(IPackageRepository repository)
at NuGet.DataServicePackage.GetStream()
at NuGet.FileSystemExtensions.AddFileWithCheck(IFileSystem fileSystem, String path, Func1 streamFactory) at Octopus.Server.Deploy.PackageFetcher.Fetch(String feed, String packageId, String version) in c:\TeamCity\buildAgent\work\93ea602cb1d1c3f2\source\Octopus.Server\Deploy\PackageFetcher.cs:line 37 at Octopus.Server.Deploy.DeployTaskExecutor.DownloadPackagesInThisRelease(IEnumerable
1 packages, IList`1 steps) in c:\TeamCity\buildAgent\work\93ea602cb1d1c3f2\source\Octopus.Server\Deploy\DeployTaskExecutor.cs:line 73
at Octopus.Server.Deploy.DeployTaskExecutor.Execute(String arguments) in c:\TeamCity\buildAgent\work\93ea602cb1d1c3f2\source\Octopus.Server\Deploy\DeployTaskExecutor.cs:line 60
at Octopus.Server.Tasks.TaskQueue.<>c__DisplayClass3.b__0(Object ) in c:\TeamCity\buildAgent\work\93ea602cb1d1c3f2\source\Octopus.Server\Tasks\TaskQueue.cs:line 89