Cynthia

Cynthia

  • 1.2k
  • 215
  • 34k

Error in having 2 App.xaml in same solution

May 23 2017 11:57 AM

favorite

I have wpf mvvm project structure Like this-

HomeApplication1(solution).
HomeApp(project1)
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();

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)