TypeLoadException looking for Microsoft.Practices.ServiceLocation

May 5, 2011 at 2:42 PM
Edited May 5, 2011 at 4:00 PM

I'm using MEFedMVVM with BL16 build of MvvmLight and RIA Services SP2 (SL4 + VS2010).

After making some changes to my viewmodel, I started getting a type load exception. It looks for Microsoft.Practices.ServiceLocation dll. I tried to add this to my Silverlight project, but I guess it's an incompatible DLL, because it is removed after adding it.

Any ideas in how to resolve this issue?

Update: I've narrowed down the cause to GalaSoft.MvvmLight.Extras.SL4 reference being present in the project. It doesn't matter if it's used or not.

Update 2: Curiously, in MvvmLight BL15 it works. So it must be something that BL16 does differently. Here's the cross post: http://mvvmlight.codeplex.com/discussions/256510