title: Unable to load Visual Studio 2015 project after adding dependency on Microsoft.Net.Compilers
body: <p>My project has a dependency on the NuGet package <code>Microsoft.Net.Compilers</code>:</p>
  
  <pre><code>&lt;package id="Microsoft.Net.Compilers" version="1.3.2" 
           targetFramework="net461" developmentDependency="true" /&gt;
  </code></pre>
  
  <p>However, if I'm loading Visual Studio after having cleared my packages folder my projects won't load with the following error:</p>
  
  <blockquote>
    <p>The imported project "C:\MyService\packages\Microsoft.Net.Compilers.1.3.2\tools\Microsoft.CSharp.Core.targets" was not found. Confirm that the path in the  declaration is correct, and that the file exists on disk.<br>
    C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.CSharp.CurrentVersion.targets</p>
  </blockquote>
  
  <p>So it won't load the project because it's missing a file which is restored on build using Nuget, which only works if I can load the project.</p>