Wrong Package getting deployed when multiple packages with the same build number are present

When I am testing my deployment scripts on my dev machine, the nuget package is always version 1.0.0.0. However, when deploying a new version of the nuget package, sometimes an older version that has previously been deployed gets deployed again.

For example, the download step looks like this in the build log

Download package Bluewire.Epro.Web 1.0.0.0 from NuGet feed: Local Epro
2012-09-20 16:18:05 INFO Downloading NuGet package Bluewire.Epro.Web 1.0.0.0 from feed: 'C:\dev\epronew\Web\bin’
2012-09-20 16:18:05 DEBUG Downloaded packages will be stored in: D:\Octopus\Data\PackageCache
2012-09-20 16:18:05 DEBUG Finding package (attempt 1 of 5)
2012-09-20 16:18:06 DEBUG Found package Bluewire.Epro.Web version 1.0.0.0
2012-09-20 16:18:06 DEBUG Downloading to: D:\Octopus\Data\PackageCache\Bluewire.Epro.Web.1.0.0.0_59D186652E7ACA4C9CD674A355F312B1.nupkg
2012-09-20 16:18:07 DEBUG SHA1 hash is: d58a901b0b7b52756c167ae1f9a54ddc8935c66f
2012-09-20 16:18:07 INFO Download complete.

but then when it comes to the deployment I get

2012-09-20 16:18:29 DEBUG Found installed package with matching hash: D:\Octopus\Applications.Tentacle\Packages\Bluewire.Epro.Web.1.0.0.0_0877F2B5D1D2D54ABD7E03C58351F68A.nupkg

which is a different package with different deployment scripts

Hi Kit,

It sounds like you might be changing the contents of the NuGet package without actually changing the version number, is this correct? In general this isn’t recommended - Octopus uses hashing to ensure file consistency but it still expects package contents to not change between version numbers.

Paul