• 1.7k
  • 172
  • 17k

Error in having 2 App.xaml in same solution

May 23 2017 11:57 AM


I have wpf mvvm project structure Like this-

LoginApp(startup project)
UIApp(project 2)

Earliear 'HomeApp' was startup project & Startup URI="MainWindow.xaml". I addeed the loginApp project for login of users & made it as startup project . Now there are two app.xaml file in my solution. One for LoginApp & another that was there previously existing. After login screen , i have to open homeapp screen . When i am trying to call homeapp window its throwing exception.

homeappWindow app=new homeappWindow; app.Show(); give exception at static resource loading.

My questions are -:

1.Can we keep two app.xaml in same solution or Do i need to delete one app.xaml file from project ? If yes then where & how i will add information of that file ?

2.How to handle static resource loading if i am calling homewindow app from loginapp as I am getting error at InitializeComponent();? Any help is appreciated!

Answers (2)