lomaxx lomaxx - 1 year ago 158
C# Question

The imported project "C:\Microsoft.CSharp.targets" was not found

I got this error today when trying to open a Visual Studio 2008 project in Visual Studio 2005:

The imported project "C:\Microsoft.CSharp.targets" was not found.

Answer Source

Open your csproj file in notepad (or notepad++) Find the line:

<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

and change it to

<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download