Question

I'm having issues with Silverlight 4 Out-Of-Browser, as specified in the title.

What I did:
Update project settings to enable Out-Of-Browser. This enabled OOB, but when I ran the app in this way it just displayed a white screen.

What I have done to try to fix this:

  • All references to the System.Windows.Browser.HtmlPage (to avoid DOM interaction) have been removed as per various sources including this SO question and this blog post.
  • Remove any references to SizeChangedEventHandler as per this SO question.
  • Clean projects/solution, including ideas such as deleting *.suo files as per this blog post
  • Uninstalling the installed OOB app, reinstalling

Also:

  • As commented on by "kobruleht" here, attempting to attach the debugger does not appear to work. Visual Studio (2010, SP1) reports that it is attached without help from me, but breakpoints are not being hit.

And so:

Can anyone advise on other courses of action? At the very least I'd like to be able to step through and hit breakpoints (or even break on Exceptions!)

Was it helpful?

Solution

OK, I have a resolution.

In AppManifest.xml I specified assemblies to be loaded, one of these was not loading correctly, which meant that App.xaml.cs->App()was never reached. The problem is difficult to diagnose because the program runs, with no errors or exceptions, but then displays a white screen - quite misleading.

For anyone experiencing the same problem, the simplest debugging steps to take in this case is to run the app in in-browser mode, copy the results from the Output window, then compare the results from the Output window when you try to run in OOB mode. Any discrepancies will give a good hint to the problem.

I should also mention, that I have not had trouble with SizeChangedEventHandler as mentioned above.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top