Blend fails to open a Visual Studio 11 Beta project

I was needed to open a Visual Studio 11 Beta Metro project in Blend and got the error:

The project ‘MyProject.csproj’ could not be opened. The imported project ‘C:Program Files (x86)MSBuildMicrosoftWindowsXamlv10.0Microsoft.Windows.UI.Xaml/CSharp.targets’ was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.

First thought was to edit the line that contains: v$(VisualStudioVersion)Microsoft.Windows.UI.Xaml.CSharp.targets" in my csproj file, changing v$(VisualStudioVersion) to 11, but that’s not a nice solution. To fix this properly, just use the setx command to set the value and restart Blend.

setx VisualStudioVersion 11.0