Design-time errors in HelloWindowManagerWP71 sample

Topics: Bugs
Dec 10, 2011 at 12:10 AM
Edited Dec 10, 2011 at 12:30 AM


Has anyone encountered the

Cannot create an instance of "AppBootstrapper"

error in the Caliburn.Micro.HelloWindowManagerWP71 sample?  Builds and runs fine, but keeps crashing my VS.

Also, seeing another exception that keeps the designer from loading MainPage.xaml.  I can load in Blend if I remove the app buttons at the bottom of the page.

Exception details:

Object reference not set to an instance of an object.   at Caliburn.Micro.PhoneApplicationServiceAdapter..ctor(Frame rootFrame) in C:\caliburnmicro_98ca1ccb4374\src\Caliburn.Micro.WP71\IPhoneService.cs:line 89   at Caliburn.Micro.PhoneContainer.RegisterPhoneServices(Boolean treatViewAsLoaded) in C:\caliburnmicro_98ca1ccb4374\src\Caliburn.Micro.WP71.Extensions\PhoneContainer.cs:line 67   at Caliburn.Micro.HelloWP71.AppBootstrapper.Configure() in C:\caliburnmicro_98ca1ccb4374\samples\Caliburn.Micro.HelloWP71\Caliburn.Micro.HelloWP71\AppBootstrapper.cs:line 13   at Caliburn.Micro.Bootstrapper.StartDesignTime() in C:\caliburnmicro_98ca1ccb4374\src\Caliburn.Micro.Silverlight\Bootstrapper.cs:line 48   at Caliburn.Micro.Bootstrapper..ctor(Boolean useApplication) in C:\caliburnmicro_98ca1ccb4374\src\Caliburn.Micro.Silverlight\Bootstrapper.cs:line 35   at Caliburn.Micro.PhoneBootstrapper..ctor()   at Caliburn.Micro.HelloWP71.AppBootstrapper..ctor()


Jan 25, 2012 at 9:44 PM
Edited Jan 25, 2012 at 9:44 PM

Had a similar problem with a Silverlight project. Resolved it by adding the following line as the first line of the Configure() override in AppBootstrapper

if (DesignerProperties.IsInDesignTool) return;

Hope this helps.

Jan 25, 2012 at 10:14 PM

I've confirmed this problem. It looks like it only happens at design-time for WP7 only and not for the other platforms....In the mean time, you can use kaarels solution.