I have been working on a WPF application using vb.net and I've recently run into a problem.
When I build my code, the build is successful but when it comes to running the code the System.IO.IOexception throws an exception "Cannot locate resource ViewModel/ViewModel/Mainwindow.xaml" The .Xaml windows are located in a folder called ViewModel hence I don't know where the other ViewModel/ViewModel... path is coming from, isn't it supposed to be viewModel/MainWindow.Xaml? I have tried all possible solutions including cleaning up the Project but it doesn't seem to work.
The only solution that seems to work is if I change the StartupUri from
StartupUri = "ViewModel\MainWindow.Xaml"
TO StartupUri = "...\MainWindow.xaml"
but I doubt if that is the right thing to do.
.\ViewModel\MainWindow.xaml
? One question, why is a view located in a VM namespace? Doesn't make sence, since the VMs should not be aware of the views. – DHNViewModel
that has the namespaceMyApplication.ViewModel.ViewModel
– Rachel