need help with cinch and ReflectionTypeLoadException

Mar 11, 2011 at 8:04 PM

Hi,

I am trying to use Cinch V2 in my project and was hoping I would not need to understand all the clever implementation details of MEFedMVVM used in Cinch V2.

I marked my ViewModel class derived from Cinch.ViewModelBase and marked it with the Attribute

[ExportViewModel("MainVM")]

[PartCreationPolicy(CreationPolicy.NonShared)]

public class MainVM : ViewModelBase{

....

}

In my xaml I use the Locator to get this vm:

meffed:ViewModelLocator.ViewModel="MainVM"

And I hoped that this would be all that I need to understand. But now when I run the Project I get a ReflectionTypeLoadException in my output window:

 Error while resolving ViewModel. System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.

Can anybody tell me what I have done wrong or at least where I have to look for these "LoaderExceptions"??

Thanks

Joachim

Coordinator
Mar 11, 2011 at 8:24 PM
expand the LoaderExceptions there should be the exception that is cause the error. Probably some missing dependencies or something of that sort

Regards
Marlon
WPF Blog - http://marlongrech.wordpress.com/
Microsoft MVP for Client App



On Sat, Mar 12, 2011 at 12:04 AM, joachimb <notifications@codeplex.com> wrote:

From: joachimb

Hi,

I am trying to use Cinch V2 in my project and was hoping I would not need to understand all the clever implementation details of MEFedMVVM used in Cinch V2.

I marked my ViewModel class derived from Cinch.ViewModelBase and marked it with the Attribute

[ExportViewModel("MainVM")]

[PartCreationPolicy(CreationPolicy.NonShared)]

public class MainVM : ViewModelBase{

....

}

In my xaml I use the Locator to get this vm:

meffed:ViewModelLocator.ViewModel="MainVM"

And I hoped that this would be all that I need to understand. But now when I run the Project I get a ReflectionTypeLoadException in my output window:

Error while resolving ViewModel. System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.

Can anybody tell me what I have done wrong or at least where I have to look for these "LoaderExceptions"??

Thanks

Joachim

Read the full discussion online.

To add a post to this discussion, reply to this email (MEFedMVVM@discussions.codeplex.com)

To start a new discussion for this project, email MEFedMVVM@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com