Alex Rivera | Logout

WPF - Shut-off autogen of Main in App.g.cs

Asked 2009-06-27T13:55:16.057
15

I'm learning WPF.

I want to provide my own Main method in my App.xaml.cs rather than getting one generated for me in App.g.cs. However I keep getting conflicts because I haven't found out how to stop an additional Main from being generated.

Is there a setting in my project file or elsewhere that controls this?

Edit
Report

1 Answer

7

You can also just create a separate class (for example, Entry) which is responsible for bootstrapping your application. Then go to project settings and set your startup object to Entry. That way you don't even have to disable the autogenerated method.

answered 2009-06-27T18:02:14.877

Your Answer