Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/wpf/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 运行时错误总是在清理生成后消失_C#_Wpf - Fatal编程技术网

C# 运行时错误总是在清理生成后消失

C# 运行时错误总是在清理生成后消失,c#,wpf,C#,Wpf,我有一个WPF MVVM应用程序。当我第一次启动VisualStudio并在调试模式下运行应用程序时,会出现如下所述的异常。在干净的构建之后,应用程序运行良好,直到重新启动VisualStudio并再次运行 'The invocation of the constructor on type 'MyView' that matches the specified binding constraints threw an exception.' Line number '135' and line

我有一个WPF MVVM应用程序。当我第一次启动VisualStudio并在调试模式下运行应用程序时,会出现如下所述的异常。在干净的构建之后,应用程序运行良好,直到重新启动VisualStudio并再次运行

'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是一个用户控件,存在于正在搜索它的文件夹中,并包含在主项目中

这是一个虚假的例外,我认为这与找不到视图无关。我注意到,当我禁用我设置的自定义日志记录机制时,错误消失了,很可能是一个异常导致了这种情况