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

なぜそれが起こったのか:

imageMainPage.xamlで使用されていたものがありました。この画像のソースのCopy to Output directoryプロパティがに設定されDo not copyていたため、画像の読み込みに失敗し、アプリがクラッシュしました。

それを修正する方法:

image問題のソースのCopy to Output directoryプロパティをCopy Alwaysからに変更しDo not copyます。

それを防ぐ方法:

私の画像のCopy to Output directoryプロパティをいじらないでください。

...そして何が原因でしたかSystem.OverflowException

System.OverflowException問題を修正した後も出力ウィンドウにこれらがポップアップし続けたため、ディスク容量が少ないことがsの原因であると思います。ここSystem.OverflowExceptionでsを読んでください。

于 2011-07-21T01:42:45.623 に答える