views:

209

answers:

2

I've loaded a WPF project initially created in Visual Studio 2008 into Visual Studio 2010. The conversion process goes smoothly, but on certain XAML files the VS2010 designer throws several errors related to project references, including this one:

System.Reflection.Adds.UnresolvedAssemblyException

Type universe cannot resolve assembly: GalaSoft.MvvmLight, Version=3.0.0.31869, Culture=neutral, PublicKeyToken=3e875cdb3903c512.

This assembly reference works just fine in the Expression Blend 4 designer, but not in VS2010.

I can build and run the solution successfully.

My solution targets the .Net Framework 3.5 SP1.

A: 

I found a workaround, but I'm not happy with it. If I change the target framework setting for the project from ".NET Framework 3.5" to ".NET Framework 4 Client Profile" the designer works just fine. But I'd rather not change my target framework just to get designer support!

dthrasher
+2  A: 

Check which version of the MVVM Light assemblies you are referencing.

When you install the MVVM Light Toolkit binaries, you get separate WPF 3.5 and WPF 4 versions. You can find the WPF 4 assemblies (assuming default install location) in

c:\Program Files\Laurent Bugnion (GalaSoft)\Mvvm Light Toolkit\Binaries\WPF4

Matt Casto
I just noticed that your project target .NET 3.5 so this probably isn't the correct solution for you.
Matt Casto
It's a good troubleshooting tip, but it doesn't resolve my problem. +1 for trying, though!
dthrasher