I have a WPF application which works correctly when run as the startup project but which fails to locate the views for my viewmodels when it is hosted in a winforms application. The views and viewmodels are located in the same project under the namespaces:
RopeAccess.WPF.Manifest.Views and RopeAccess.WPF.Manifest.ViewModels.
I have tried overriding the SelectAssemblies method with:
protected override IEnumerable<Assembly> SelectAssemblies()
yield return Assembly.GetExecutingAssembly();
yield return typeof (ManifestBootstrapper).Assembly;
and the constructor for my bootstrapper is as follows:
public ManifestBootstrapper(ElementHost host)
var shellViewModel = _kernel.Get<ManifestShellViewModel>();
var shellView = _kernel.Get<ManifestShellView>();
ViewModelBinder.Bind(shellViewModel, shellView, null);
host.Child = shellView;
This correctly loads the Shell into the ElementsHost but all child views inside the shell display as "Could not find view for RopeAccess.WPF.Manifest.Viewmodels.X"
I have also tried adjusting the namespace mappings for the ViewLocator such as:
Is there something I am missing to allow Caliburn Micro to locate the views?