title: How to make Octopus deploy choose package version in multiple environment?
body: <p>We are building packages for multiple deployment environments using TeamCity server and OctoPack. The problem is that tentacle agent chooses the latest by number version of the package, so it's the same (latest) package that is deployed on all environments. Here's the summary of our setup:</p>
  
  <ul>
  <li>Environments DEV and STAGE;</li>
  <li>Deployment to DEV is triggered from Git "dev" branch;</li>
  <li>Deployment to STAGE is triggered from Git "stage" branch;</li>
  <li>OctoPack is configured to generate packages MyProduct.1.0.0.dev-%build_counter% for DEV build configuration;</li>
  <li>OctoPack is configured to generated packages MyProduct.1.0.0.%build_counter% for STAGE build configuration;</li>
  <li>TeamCity is configured to expose OctoPack artefacts (NuGet packages) via its NuGet feed;</li>
  <li>Octopus project is configured to deploy packages with NuGet Id MyProduct from TeamCity NuGet feed.</li>
  </ul>
  
  <p>So what happens is that since DEV builds are run more frequently, they have larger %build_counter%, and STAGE doesn't get a chance to get a deployment of its own packages - Octopus tentacle preferes packages with 1.0.0.dev-* suffix.</p>
  
  <p>This must be fairly common scenario, but I haven't found a simple way to solve it.</p>