title: Is there a way to fix the imported project error for Microsoft.CSharp.targets, other than changing the reserved property to $(MSBuildBinPath)?
body: <p>So I am getting the error:</p>
  
  <blockquote>
    <p>The imported project
    "C:\Microsoft.CSharp.targets" was not
    found. Confirm that the path in the
     declaration is correct, and
    that the file exists on disk.</p>
  </blockquote>
  
  <p>When I run this command:</p>
  
  <pre><code>%WINDIR%\Microsoft.NET\Framework\v2.0.50727\msbuild.exe MyProject.csproj /target:publish
  </code></pre>
  
  <p>I found others stating that I should change the following in my project file:</p>
  
  <pre><code>&lt;Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /&gt;
  </code></pre>
  
  <p>To this:</p>
  
  <pre><code>&lt;Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /&gt;
  </code></pre>
  
  <p>I have already tried this and am still getting the same error. It seems as if both reserved properties are empty or set to "C:" does any one have any suggestions?</p>