title: TeamCity NuGet Installer step issue
body: <p>I'm building a project in TeamCity with NuGet package restore enabled. </p>
  
  <p>I have two build steps:</p>
  
  <ul>
  <li>NuGet installer</li>
  <li>MSBuild</li>
  </ul>
  
  <p>One of the projects has the log4net-package from the official feed installed. (But don't get to hung up on which package)
  
    
  </p>
  
  <p>My problem is when TeamCity runs the first step, it fails in the nuget-installer step with the message:
  Unable to find version '2.0.3' of package 'log4net'.</p>
  
  <p>So after doing my best to find any errors in the solution, I try to:</p>
  
  <ol>
  <li>Disable the NuGet Installer step</li>
  <li>Run my build - <strike>which obviously fails because it has no packages</strike> (see below)</li>
  <li>Enable the NuGet Installer step</li>
  <li>ReRun build</li>
  </ol>
  
  <p>[Edit] Concerning the 3. step, MSBuild should ideally, as John H. points out, be able to rebuild the packages, so I shouldn`t need a NuGet Installer step. The error when I try to build the solution without the nuget installer step has something to do with the OctoPack-package I have installed:</p>
  
  <p><em>OctoPack cannot be run because NuGet packages were restored prior to the build running, and the targets file was unavailable when the build started. Please build the project again to include these packages in the build. You may also need to make sure that your build server does not delete packages prior to each build</em></p>
  
  <p>Then it succeeds.. Why?</p>
  
  <p>Does anyone have some insight on my issue?</p>
  
  <p>Some more background:</p>
  
  <p>I assume this has something to do with the octopus deploy package. I have the octopus deploy plugin installed on the teamcity server and I´ve ticked the Run OctoPack checkbox in the MSBuild step.</p>
  
  <p>I have tried to uninstall the octopack package and reinstall without any success.</p>
  
  <p><strong>Can it be that NuGet-package restore on the MSBuild-step combined with the octopus plugin is causing my problems?</strong></p>
  
  <p>[Partial resolution] I'm still uncertain why I got the error on the log4net-package. I was running NuGet installer as the first step in my automatic build, which in the end proved to be the correct thing to do due to the nature of the build. </p>
  
  <p>I admit I don't (always) read the "what's new" when a package is updated. When upgrading Octopack from 2.0.26 to 3.0.19 one of the changes is that you no longer need to check in the .octopack folder. So I could really understand why the build could not find the targets-file, when it was checked in. </p>
  
  <p>Now I've:</p>
  
  <ul>
  <li>upgraded to Octopack 3</li>
  <li>removed the .octopack folder from version control</li>
  <li>(again) enabled the nuget install step in teamcity</li>
  </ul>
  
  <p>and the build is running fine.</p>
  
  <p>Thanks for all help! I'm a better educated man now :)</p>
  
  <p>[Removed] irrelevant information</p>