title: Deploy a specific version of a NuGet package with Octopus
body: <p>We have an automated build on TFS that creates a release in Octopus, which is autonomously deployed to a test environment.</p>
  
  <p>As part of this build we provide a <code>--defaultpackageversion</code> value that lines up with our release roadmap, e.g. <code>4.1.1.1</code> - this version is assigned in the build template and all projects go into Octopus with that version correctly.</p>
  
  <p>As part of this release though, there is one package that comes from our NuGet remote feed that doesn't reflect the release roadmap version, e.g. <code>1.1.0.0</code>.</p>
  
  <p>So, for every package Octopus deploys <code>4.1.1.1</code>, but attempts to resolve <code>4.1.1.1</code> for this specific package, where only <code>1.1.0.0</code> exists.</p>
  
  <p>There is an argument for octo.exe that allows us to provide a version for a given step, <code>--package=StepName</code>.</p>
  
  <p>To provide the version for this step name, I would need to:</p>
  
  <blockquote>
    <ol>
    <li>Get the NuGet package ID</li>
    <li>Use NuGet to get the latest version for this package</li>
    <li>Pipe this version with the step name into <code>octo.exe</code></li>
    </ol>
  </blockquote>
  
  <p>This means having to specify (as part of the TFS build template) both the NuGet package ID <em>and</em> the Octopus Step that deploys said package. So if the step changed to deploy a different NuGet package, I'd have to reflect that change in each build template that provides this argument.</p>
  
  <p>It seems to me, I should be able to:</p>
  
  <blockquote>
    <ol>
    <li>Tell Octopus to deploy a specific version of a NuGet package, without providing a particular step.</li>
    <li>Tell Octopus to automatically get the latest version of a NuGet package given a step name.</li>
    </ol>
  </blockquote>
  
  <p>I can't see any arguments that would allow me to achieve either of the options above.</p>
  
  <p>Does anyone know how to achieve either option above (or something similar)? Otherwise I will probably have to go down the route of specifying both step name and NuGet package ID in the build template (not ideal).</p>