This project is read-only.

ApplicationShellApplication problem with multiple entry points

Jul 6, 2007 at 7:56 AM
Edited Jul 6, 2007 at 7:56 AM

I am in the process of moving our application from the WPF/CAP Layer ( to the SCSFContrib version, but I am having problems using the recommended ApplicationShellApplication class.

I am starting from a basic WPF Windows Application and trying to modify it to use WPF/CAB Layer according to My problem is that the Shell.Main method clashes with the generated App.Main method (App.g.cs).

Do you have any ideas as to solve this problem?

I am using VS 2005 with the November 2006 WPF extensions.


Lau Bakman
Jul 6, 2007 at 12:01 PM

I found a solution although I think it is a bit of a hack.

By changing the ApplicationDefinition element to a Page element in the csproj file, the problem is fixed.

If there is a better solution I would very much like to know it.


Lau Bakman
Jul 7, 2007 at 2:06 AM
Hi Lau,

The solution is also mentioned in the documentation (in the last step). Since, by default, the XAML compiler generates a Main method in your Application class, you will have two Main methods - one in your Application class and one in your Shell class. You need to edit the project settings and tell the compiler which Main method to use. You do this with the Startup object (under the Application tab) setting.

Jul 9, 2007 at 7:09 AM
Hi Kent

Thank you very much. I missed that part of the documentation.