Visual Studio 11 Beta throwing error ‘The imported project "C:\Program Files (x86)\MSBuild\Microsoft\WindowsXaml\v1.0\ Microsoft.Windows.UI.Xaml.CSharp.targets" was not found.’

Problem

As many people did, I just installed the Visual Studio 11 Beta and found myself not being able to open up a C# Metro project that I started on the Visual Studio 11 Developer Preview.

Upon examining the output window, here's the error message

The imported project "C:\Program Files (x86)\MSBuild\Microsoft\WindowsXaml\v1.0\Microsoft.Windows.UI.Xaml.CSharp.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.

Reasoning

The culprit seem to be on the fact that the path ‘C:\Program Files (x86)\MSBuild\Microsoft\WindowsXaml\v1.0\’ have been changed (or I guess corrected) to ‘C:\Program Files (x86)\MSBuild\Microsoft\WindowsXaml\v11.0\’.

Quite a big leap from v1 to v11 in the space of a dot release ;)

Solution

Open up the csproj file with a notepad find the reference to ‘C:\Program Files (x86)\MSBuild\Microsoft\WindowsXaml\v1.0\’ and replace it with ‘C:\Program Files (x86)\MSBuild\Microsoft\WindowsXaml\v11.0\’. Voila!

  1. Sheila says:

    Thank you so much, this was the solution to my problem with loading Eyes sample!

  2. Vinelect7 says:

    Thank you...happy VS 2011 beta

  3. Jowen says:

    Tnx for posting this!