0

每当我尝试调试我的 Windows Phone 7 C# 应用程序时,我都会在输出窗口中收到以下消息:

A first chance exception of type 'System.OverflowException' occurred in mscorlib.dll

A first chance exception of type 'System.OverflowException' occurred in mscorlib.dll

A first chance exception of type 'System.InvalidOperationException' occurred in Microsoft.Phone.dll

...然后,App.xaml.cs 在 VS 中打开(仍处于调试模式,我无法编辑任何内容)和“System.Diagnostics.Debugger.Break();” 突出显示。

为什么会发生这种情况,我该如何解决它,以及将来如何防止它?

4

1 回答 1

3

为什么会这样:

我有一个image在 MainPage.xaml 中使用的。此图片的源Copy to Output directory属性设置为Do not copy,结果图片加载失败,应用崩溃。

如何修复它:

image将有问题的源的Copy to Output directory属性更改为Copy Alwaysfrom Do not copy

如何预防:

不要摆弄我的图像的Copy to Output directory属性。

...以及是什么导致了System.OverflowException

我的磁盘空间不足 [我认为] 是导致System.OverflowExceptions 的原因,因为在我解决了问题后,这些内容继续在我的输出窗口中弹出。System.OverflowException此处阅读。

于 2011-07-21T01:42:45.623 回答