Silverlight 4 浏览器外问题:应用程序显示空白(白色)屏幕,没有抛出异常,没有命中断点
正如标题中所指出的,我在浏览器外使用 Silverlight 4 时遇到问题。
我做了什么:
更新项目设置以启用浏览器外。这启用了 OOB,但是当我以这种方式运行应用程序时,它只显示白屏。
我已采取措施尝试解决此问题:
- 对
System.Windows.Browser.HtmlPage
的所有引用(以避免 DOM 交互)已根据各种来源删除,包括< a href="https://stackoverflow.com/questions/3032166/why-would-my-silverlight-4-out-of-browser-application-just-display-white">这个问题 和 <一个href="http://blogs.blackmarble.co.uk/blogs/rfennell/post/2010/01/29/empty-page-being-show-for-silverlight-application-running-out-of-browser.aspx “ rel="nofollow noreferrer">这篇博文。 - 按照这个问题删除对 SizeChangedEventHandler 的任何引用。
- 清理项目/解决方案,包括按照 此博文
- 卸载已安装的 OOB 应用程序,重新安装
另外:
- 正如“kobruleht”所评论的此处,尝试附加调试器似乎不起作用。 Visual Studio(2010,SP1)报告它在没有我帮助的情况下附加,但没有命中断点。
所以:
任何人都可以就其他行动方案提出建议吗?至少我希望能够单步执行并命中断点(甚至在异常时中断!)
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!)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,我有一个决心。
在
AppManifest.xml
中,我指定了要加载的程序集,其中一个程序集未正确加载,这意味着App.xaml.cs->App()
从未到达。该问题很难诊断,因为程序运行时没有错误或异常,但随后显示白屏 - 相当具有误导性。对于遇到相同问题的任何人,在这种情况下要采取的最简单的调试步骤是在浏览器内模式下运行应用程序,从“输出”窗口复制结果,然后在尝试在 OOB 中运行时比较“输出”窗口中的结果模式。任何差异都会很好地提示问题。
我还应该提到,如上所述,我没有遇到
SizeChangedEventHandler
的问题。OK, I have a resolution.
In
AppManifest.xml
I specified assemblies to be loaded, one of these was not loading correctly, which meant thatApp.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.