3

我对这个错误束手无策。我终其一生都无法弄清楚问题所在。即使我已经剥离了我所做的所有更改,所以它回到了创建时提供的基本应用程序,它仍然有相同的错误。有一次我设法对它进行排序,但我不知道我做了什么来得到它。

如果有人可以帮助我理解这个错误,我将非常感激!

我什至无法在断点上进行调试,因为它甚至没有达到我设置的任何断点。消息如下:

Error
Exception has been thrown by the target of an invocation.

Error Details
   at System.Windows.Navigation.PageResourceContentLoader.EndLoad(IAsyncResult asyncResult)
   at System.Windows.Navigation.NavigationService.ContentLoader_BeginLoad_Callback(IAsyncResult result)
Caused by: Exception has been thrown by the target of an invocation.

   at System.Windows.Navigation.PageResourceContentLoader.EndLoad(IAsyncResult asyncResult)
   at System.Windows.Navigation.NavigationService.ContentLoader_BeginLoad_Callback(IAsyncResult result)
Caused by: Exception has been thrown by the target of an invocation.

   at System.Windows.Navigation.PageResourceContentLoader.EndLoad(IAsyncResult asyncResult)
   at System.Windows.Navigation.NavigationService.ContentLoader_BeginLoad_Callback(IAsyncResult result)

有没有其他人遇到过这个?有谁知道如何修复它,以便一旦它被抛出,我就可以继续从事同一个项目?

谢谢

4

1 回答 1

0

In conclusion:

This particular error means there is something wrong in the xaml and neither Visual Studio nor Expression Blend can/will give the source of the error and debugging won't help. It is very likely to do with a binding issue. Anyone with this same error would do well to thoroughly check the xaml code.

My problem was compounded by the fact that my default browser (SRWare Iron) was caching the 'website' and would only show an initial version of the application so any changes I made were not updating in what I saw (thus the error would continue to show no matter what I changed in the code). As you can imagine very frustrating! I didn't realise this until I changed the xaml to show a visual difference and the changes weren't shown. - Interestingly this only happened in VS, Expression Blend would load the newest version correctly.

I made IE the default browser (link to method) so the second issue is no longer a problem and the error has magically disappeared (because I fixed the code a long time ago).

I hope this helps anyone who may have either the first or second problem. - While scouring the web I did find a few others who had the browser problem and no-one knew anything about it, so I hope this solves it.

于 2012-05-17T10:29:26.310 回答