5
votes

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.

3

3 Answers

9
votes

I can't quite tell if you're having the same problem I had or not, but I was getting that type universe error all the time with the Ninject .dll. I solved it by "Unblocking" the zip file before extracting it. I think this only affects Vista and Win 7 dev machines but it's worth a try. I posted a blog entry last week with details on the error and the solution. Scroll down to the "Foiled by a Blockhead" section.

4
votes

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

0
votes

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!