开发者

Expression Blend 4 accidently deleted App.xaml - now new problems with static main method

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 loo开发者_StackOverflowk like!?


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)


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

<Application ...
 StartupUri="Menu.xaml"
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜