Cinch V2 vs Microsoft.Practices.Unity

Nov 9, 2011 at 6:49 PM

I am trying to use CinchV2 on a new project of an existing solution. I have created 3 views and 3 viewmodels and everything went well but. When I add a reference to another project that has a reference to Microsoft.Practices.EnterpriseLibrary.Common, I am getting the following build error:

 - The assembly with display name 'Microsoft.Practices.Unity' failed to load in the 'Load' binding context of the AppDomain with ID 1...

If CinchV2 does not use Unity, why am I getting this error?

Any idea of how to resolve this? (other then removing the reference Microsoft.Practices.EnterpriseLibrary.Common that was set by someone else)

Nov 9, 2011 at 9:42 PM

I should add the the error happends at the following line of the ResolvePopupLookups:

               IUIVisualizerService uiVisualizerService  =

Nov 10, 2011 at 2:00 PM
Edited Nov 10, 2011 at 2:02 PM

What happens if you remove the bootstrapper code (where bootstrapper code should be like that shown in the App.Xaml.cs in my demo examples).


What does your bootstrapper code look like?


There was one other post that had something like this which was :


The only time I do anything that examines other projects is


1. If you told CInch to examine those Assemblies in the bootstrapper logic

2. That project has a reference to MeffedMVVM


I would like to see your bootstrapper logic or a small demo project that has this issue. If its possible for you to email me, I can be emailed at sacha[DOT]barber[AT]gmail[DOT]com

Nov 10, 2011 at 9:55 PM

Thanks for the quick reply. I removed the bootstraper call. I am not getting the Unity error anymore but, and it is probably not related, I am getting the following error 3 times, one for each ViewModel:

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

Loading the ViewModel use to work. I am a bit lost (did I say I am new to wpf and c#). Anyway, now I am looking for the LoaderException property.

Nov 11, 2011 at 10:33 AM
RealMercure wrote:

I am a bit lost (did I say I am new to wpf and c#). 

Ha now that's funny, as much as I would love to offer everyone personal assistance, there just is not enough time in the world. Cinch is a pretty complex beast, if you don't know any WPF, it may not actually be the framework that would be best for you, there are quite a few things you need to understand such as MEF/IOC/DI/Behaviours/Threading. These are not small areas, perhaps you may want to pick a slightly smaller framework, say MVVMLight.


If you still want to use Cinch, it really will be a case of reading all the articles/and debugging for your particular problem. Sorry I cant spend more time on it, but if I did that with every person that emailed by I would be a very very tired man.


Hope you understand my view on this

Nov 16, 2011 at 6:24 PM

For the record, upgrading to the latest version of Microsoft.Practices.EnterpriseLibrary resolved the problem we had (still under testing).

Sacha: you created a great framework and with the title you gave it, no wonder it attracts newbies. That said, I do understand your point of view.

Salut, Réal.

Nov 18, 2011 at 2:46 PM

Touche Real

I like how you put that, good point. Really glad you found an answer man, for the record any Cinch specific query I will ALWAYS try and answer