title: Build Visual Studio 2015 Solution with MSBuild 12
body: <p>I'm trying to build a solution on a Jenkins with the MSBuild extension. I've migrated the solution from VS 2013 to VS 2015. To be able to restore the NuGet Packages in Visual Studio 2015 I had to remove the .nuget folder as recommended here: <a href="http://docs.nuget.org/consume/package-restore/migrating-to-automatic-package-restore" rel="nofollow noreferrer">http://docs.nuget.org/consume/package-restore/migrating-to-automatic-package-restore</a>.</p>
  
  <p>Now the issue is that MSBuild needs the .nuget folder to be able to restore the nuget packages. </p>
  
  <pre><code>Build FAILED.
  
  "E:\_JENKINS\workspace\Project1 - Deploy DEVELOP to BuildServer\Solution1\Build\Build.proj" (DeployTarget target) (1) -&gt;
  E:\_JENKINS\workspace\Project1 - Deploy DEVELOP to BuildServer\Solution1\Build\Build.proj(50,5): 
  error MSB4019: The imported project "E:\_JENKINS\workspace\Project1 - Deploy DEVELOP to BuildServer\Solution1\.nuget\NuGet.targets" was not found. Confirm that the path in the &lt;Import&gt; declaration is correct, and that the file exists on disk.
  
  0 Warning(s)
  1 Error(s)
  </code></pre>
  
  <p>Have I mixed up things? Do I do something completely wrong?<br>
  Because only one works: either MSBuild or Studio Package Restore.</p>
  
  <p>So either I'm adding the packages folder to git or replace the automatic restore in the solution by a command line restore or MSBuild restore. But anyway both solutions seem to be wrong.</p>