Search code examples
xamlreferenceexpression-blendblendmahapps.metro

Visual Studio project not working in Blend (reference errors)


When I open my project that uses a MahApps.Metro window in "Blend for Visual Studio" I get tons of errors. One of them is (this one probably causes all the other errors):

The name "MetroWindow" does not exist in the namespace "clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"

This same project works fine in Visual Studio 2012. Additionally, all resources in Blend have a warning icon. How could I fix this?

Any help would be appreciated.


Solution

  • I fixed it. I changed the debug platform on all the projects in my solution to Any CPU like this:

    1. Opened the project in both Visual Studio and Blend
    2. Opened the Configuration Manager (drop down menu beside debug/release "Start" button)
    3. One of the projects' debug platform was set to x86 so I clicked on <new...>
    4. Set New Platform to Any CPU
    5. Set Copy Settings From to <Empty>
    6. Clicked Ok
    7. Blend then asked me to reload the project and I clicked on Yes To All