清理构建后,运行时错误总是消失

时间:2012-03-10 19:37:32

标签: c# wpf

我有一个WPF MVVM应用程序。当我第一次启动Visual Studio,并在调试模式下运行应用程序时,我得到一个例外,如下所述。在完全构建之后,应用程序运行正常,直到重新启动Visual Studio并再次运行。

'The invocation of the constructor on type 'MyView' that matches the specified binding constraints threw an exception.' Line number '135' and line position '8'.

{"Cannot locate resource 'views/myview.xaml'."}

MyView是一个UserControl,存在于正在搜索的文件夹中,并包含在主项目中。

1 个答案:

答案 0 :(得分:0)

这是一个虚假异常的情况,我不认为它与找不到视图有任何关系。我注意到当我禁用了我设置的自定义日志记录机制时,错误就消失了,因此可能会出现异常情况导致此错误。

相关问题