View locator problem

Topics: Bootstrappers & IoC, Conventions
Jul 8, 2011 at 2:27 PM

I have a viewmodel in a class library Caliburn.Micro.OurCompany.ProgressBarViewModel (inherits from Screen)

I have a view Caliburn.Micro.OurCompany.ProgressBarView.xaml

I 'm using this class library Caliburn.Micro.OurCompany.dll in a SilverLightApplication1 project.

When I try to show contentcontrol with ProgressBarViewModel, Caliburn shows an error on screen, 

Caliburn can not find view for Caliburn.Micro.OurCompany.ProgressBarViewModel

Do I need to do something extra? attribute on viewmodel of view? something in bootstrapper ?


Jul 8, 2011 at 2:49 PM

You need to override SelectAssemblies in the bootstrapper and supply a list of all the assemblies where views can be found. By default, the only assembly in the list is the assembly in which the Application object lives.

Jul 9, 2011 at 10:11 AM

Ok, thx, it works now, I would never have found that... maybe it should be made more obvious in one of your articles ?

Jul 9, 2011 at 8:23 PM

It's in the article on the bootstrapper ;)

Jul 10, 2011 at 5:32 PM

hmm, how could I have mist it...