View locator problem

Topics: Bootstrappers & IoC, Conventions
Jul 8, 2011 at 1: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 ?



 

Coordinator
Jul 8, 2011 at 1: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 9: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 ?

Coordinator
Jul 9, 2011 at 7:23 PM

It's in the article on the bootstrapper ;)

Jul 10, 2011 at 4:32 PM

hmm, how could I have mist it...