App Closes Before Opening... Invalidate Issue?

Feb 17, 2014 at 9:34 PM
Let me preface this with a bit of a warning. I'm an individual developer, not a team. I don't have much real experience coding; I rely pretty heavily on design view and only venture into the terrifying abyss that is code view when I absolutely have to. So when I resort to asking Forums about coding, I ask that you have patience with me, as I'll likely have return questions to help me understand the initial answers you (hopefully) provide me.

I think I have everything set correctly within my app. I've added AdRotator and the other References into the app and this is in my MainPage codebehind:
  public MainPage()
        {
            InitializeComponent();
            Loaded += new System.Windows.RoutedEventHandler(MainPage_Loaded);
        }

        void MainPage_Loaded(object sender, System.Windows.RoutedEventArgs e)
        {
            AdRotatorSilverlight.DefaultHouseAdBody = new MyDefaultAd();
            AdRotatorSilverlight.Invalidate();
        }
But when I run the app, the Splash Screen appears, but before the app itself even opens, it crashes back to the AppList (or Start Screen). When I remove or comment out the Invalidate line, the app opens fully, but no ads are served on the AdRotator control.

Any help would be great!
Coordinator
Feb 21, 2014 at 7:15 AM
Sorry for the late reply.

Try commenting out the default Ad Line and see if that helps.

Also when you run the app in debug does it stop at the Application_UnhandledException method in App.XAML.cs class, if so what the the exception generated there?
(Just hover your mouse over the ApplicationUnhandledExceptionEventArgs e parameter and it should tell you)
Feb 21, 2014 at 8:30 PM
I think the issue is in the DefaultHouseAdBody it should be a String not an Object

It's a mistake in the blogs (maybe previous versions were requesting an object)
Coordinator
Feb 21, 2014 at 8:49 PM
You are right that we changed the implementation a while ago, so some of the older blog posts won't have been updated.

However if you are installing from NuGet (the best way) then full instructions are included with the readme that comes with it. Granted it shouldn't crash when you pass it an object. So we'll make sure that is covered in V2 or if we do any future updates to V1