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:
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.
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.