Blend 5 Beta on Windows 8 Consumer Preview UPDATE

Here's a little update about the Blend 5 issue I had on Windows 8 Consumer Preview. See this post for all the details.

The problem is that installing VS11, Blend 5 Beta, VS2010 and Expression Blend 4 side by side, Blend 5 can't create/open any Metro style project templates.

Investigating on the problem, I found that when opening/creating projects in Blend 5, the environment variable "VisualStudioVersion" is set to 10.0, instead of 11.0. This way the MSBuild import defined in a VS11 project fails (because the path where it looks for build targets doesn't exist).

<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' ">
    <VisualStudioVersion>11.0</VisualStudioVersion>
</PropertyGroup>

<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\ Microsoft.Windows.UI.Xaml.CSharp.targets" />
 

The workaround is simple:

  • create/edit Metro style solutions using VS11 Beta
  • manually edit each project in the solution and remove the condition clause in the VisualStudioVersion PropertyGroup.

<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' ">
    <VisualStudioVersion>11.0</VisualStudioVersion>
</PropertyGroup>

Now you can open any projects in Blend 5 without errors.

I don't know if the workaround I found is the best way to solve the issue, but at the moment it works. If anybody has a better solution, let me know!

Interesting links

Archive