Blend for Visual Studio 2012 Platform Errors

With the recent release of Visual Studio 2012 Update 2 there is finally a real release version of Blend that can support WPF projects on .NET 4.5 in the form of Blend for Visual Studio 2012 (installed with the VS update package). Unfortunately there is a nasty and obscure error that can come up unexpectedly in applications that work fine in Visual Studio and at runtime.

The issue manifests as the dreaded Invalid Markup screen:


and a series of errors in XAML of the form “X is not supported in a Windows Presentation Foundation (WPF) project.” for every element in your project’s XAML:

List of Blend design surface errors from incorrectly unsupported elements.

The cause of the issue is a problem with how Blend loads solution configurations. Since Blend has no way to change or edit solution configurations on its own it is dependent on whatever is set as the current configuration in Visual Studio. Normally this isn’t a problem but when the WPF project you’re opening has a project configuration of “x86” and is referencing any WPF project (like a control library) which has only an “Any CPU” configuration (which is the default for new ones in 2012) Blend loses its mind and can’t even resolve the built in WPF types.

The Visual Studio Configuration Manager showing the mixed Any CPU/x86 project configurations that cause the Blend error.

Fortunately, the fix is easy once you know where the problem is. In Visual Studio’s Configuration Manager (under the Build menu), either adding a new “x86” project platform to your library projects or changing your main application to “Any CPU” will allow Blend to load properly.

Option 1 for fixing the error: adding x86 configuration to referenced projects.

Option 2 for fixing the error: changing main project to Any CPU configuration.

2 thoughts on “Blend for Visual Studio 2012 Platform Errors

  1. Thank you!! I was having this exact problem and just couldn’t figure out what was happening. This did not happen with Blend4, btw. Life saver.

Leave a Reply

Your email address will not be published. Required fields are marked *