Friday, October 31, 2008

"Microsoft.CSharp.targets" was not found

While working with a manually merged project file and attempting to complete the upgrade from Visual Studio 2005 to 2008 the conversion process failed.

After the conversion failure, Visual Studio became unresponsive, and the build for the solution failed. To resolve the problem, I attempted to unload and reload the solution.

When loading the message appeared: "C:\Windows\Microsoft.NET\Framework\v3.5\Microsoft.CSharp.targets" was not found."

A quick check found that the target build file for C# had been removed from the framework folder, without the build definition file for C#, projects cannot seem to reload (let alone build correctly).

To resolve the problem, I copied the file from another machine into the folder, and reloaded the solution.

Problem solved.

Resources:
MSBuild .Targets Files
TFS Build Problem - Custom Property not getting passed to recursive imports.

1 comment:

Andrew Jackson said...

Thank you for this entry, it helped me.

Your post is mentioned in my question at StackOverflow.