views:

34

answers:

2

Hey.

I accidently deleted by App.xaml and App.xaml.cs files in my blend 4 project.

So I made a new one successfully - however now when I go to run the app it says :

ok done that thanks, now it says Program " does not have a static main method suitable for an entry point.

How do I make its main method - where should it exist , and what should it look like!?

A: 

How do I make its main method - where should it exist , and what should it look like!?

In a WPF application, you typically don't create the Main method yourself. It is generated based on App.xaml. You need to make sure that the build action for App.xaml is set to ApplicationDefinition and the custom tool is set to MSBuild:Compile, otherwise the Main method won't be generated (this is for VS, no Blend, but I assume Blend has something similar)

Thomas Levesque
A: 

in app.xaml add StartupUri to Main Window/Page etc.

<Application ...
 StartupUri="Menu.xaml"
lukas
It already has that....
RenegadeAndy