Startup Window won't start without StartupUri

Topics: Bootstrappers & IoC, Getting Started, UI Architecture
Mar 3, 2013 at 4:00 AM
I'm 99.99% sure I have everything setup correctly. For some reason my main view in the "Views" folder (ShellView.xaml) will not load without putting the StartupUri attribute inside app.xaml. I'm using ReactiveUI along with CM, if that makes a difference. If I keep the StartupUri inside app.xaml, WPF is still using CM / MVVM, correct? Again I have the appropriate folder structure setup, it just seems CM can't find my main view for some reason.

My App.xaml:
<Application x:Class="MyApp.App" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:local="clr-namespace:MyApp.Helpers" 
             StartupUri="Views\ShellView.xaml"
             >
    <Application.Resources>
        <ResourceDictionary>
            <local:AppBootstrapper x:Key="bootstrapper"/>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="Assets/styles.xaml" />
                <ResourceDictionary Source="Assets/buttons.xaml" />
                <ResourceDictionary Source="Assets/controls.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Application.Resources>
</Application>
Declaration of AppBootstrapper.cs:
public sealed class AppBootstrapper : Bootstrapper<IShellViewModel>, IDisposable
{ 
}
Mar 3, 2013 at 5:43 PM
Edited Mar 3, 2013 at 5:45 PM
Does your ShellViewModel have an inheritance of IShellViewModel, also do you have an [Export(typeof(IShellViewModel)] on ShellViewModel ?

Other than you shouldn't need StartupUri...