发生第一次机会异常...我不知道为什么 [英] A first chance exception occurred... and I don't know why
问题描述
每当我尝试调试我的Windows Phone 7的C#应用程序,我得到的输出窗口中的以下信息:
Whenever I try to debug my Windows Phone 7 C# app, I get the following message in the Output window:
A第一次机会异常类型'出现System.OverflowException'发生在mscorlib.dll
类型的第一次机会异常'出现System.OverflowException 在mscorlib.dll发生
类型的第一个机会异常'System.InvalidOperationException'发生在Microsoft.Phone .DLL
......然后,在App.xaml.cs VS(仍处于调试模式,开辟了在那里我可以不编辑任何东西),以及System.Diagnostics.Debugger.Break();突出显示。
...And then, App.xaml.cs opens up in VS (still in debug mode, where I can't edit anything), and "System.Diagnostics.Debugger.Break();" is highlighted.
这是怎么回事,我怎么能解决这个问题,我怎么能阻止它的未来?
推荐答案
我有一个图片
这是在MainPage.xaml中使用。此图片的来源的复制到输出目录
属性设置为不要复制
,作为一个结果,图像失败,负载和应用程序崩溃
Why it happened:
I had an image
that was used in MainPage.xaml. This image's source's Copy to Output directory
property was set to Do not copy
, and as a result, the image failed to load and the app crashed.
更改图片
有关的源的复制到输出目录
属性复制始终
从不要复制
Change the image
in question's source's Copy to Output directory
property to Copy Always
from Do not copy
.
别ŧ拨弄我的形象的复制到输出目录
属性。
Don't fiddle with my image's Copy to Output directory
properties.
我的磁盘空间不足[我认为]是什么原因造成的出现System.OverflowException
S,因为这些不断弹出在我的输出窗口后,我解决了这一问题。阅读上出现System.OverflowException
取值的这里。
My low disk space [I think] is what is causing the System.OverflowException
s, because these continued to pop up in my Output window after I fixed the problem. Read up on System.OverflowException
s here.
这篇关于发生第一次机会异常...我不知道为什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!