I created a MainWindow.xaml file in visual studio. Then I clicked on run its working good. I created another file called SecondMainWindow.xaml, now I want to run the SecondMainWindow.xaml as the start file. But when I click run the MainWindow.xaml file is opening. So I excluded that file from the project. Now if I click run then it throw-ed an error saying
MainWindow.xaml does not exist.
Yes that is true because I have excluded it from my project.
But my question how to make SecondMainWindow.xaml as the file that should be opened first when I click on run.
In App.xaml under
StartupUriattribute ofApplicationtag changeMainWindow.xamltoSecondMainWindow.xaml.BTW there was no need of removing
MainWindow.xamlfrom project. You can have n number of xaml files. What you define inStartupUriproperty is the file which is run first.