Visual Studio Project MSBuild Import Error Fix

by Donn Felker 20. October 2008 05:54

If you get this error:

Unable to read the project File <path.to.project>.csproj.

C:\<path>\<to>\<projecct>\Project.csproj 77, 11): The imported project “C:\Microsoft.CSharp.targets’ was not Found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.

As shown in this screen shot ...

image

 

Take a look at your project file. Open it in a text editor (such as NotePad++) and look for the import statement.

Mine looked like this:

clip_image001

 

How to fix

Change the MSBuild Property $(MSBuildToolsPath) to $(MSBuildBinPath) and the project should load.

Like so:

clip_image001[7]

Currently rated 4.0 by 1 people

  • Currently 4/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Visual Studio | MSBuild

Powered by BlogEngine.NET 1.4.5.0
Theme by Mads Kristensen

About the author

Donn Felker

Senior Consultant
MCTS
ScrumMaster
Agile Practitioner

About Me | Books I Recommend

Gotta Pay The Bills


Tag cloud

    Popular Posts

    RecentComments

    Comment RSS

    Calendar

    <<  October 2008  >>
    MoTuWeThFrSaSu
    293012345
    6789101112
    13141516171819
    20212223242526
    272829303112
    3456789

    View posts in large calendar