I have a WPF MVVM application. When I start Visual Studio for the first time, and run the app in debug mode, I get an exception as described below. Following a clean build, the application runs fine until re-starting Visual Studio and running again.
'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 is a UserControl, exists in the folder it’s being searched for in and is contained in the main project.
This is a case of a spurious exception, I don’t think it had anything to do with not finding the view. I noticed when I disabled a custom logging mechanism I had set up, the errors went away so likely an exception further up was causing this.