This is a kind of hack, but you can try to apply the HostControl interface to ConsoleRunHost , and if it is this type, you start the console application.
This is not ideal, of course, but you can hide it in the extension method to make it less ugly.
public static bool IsRunningAsConsole(this HostControl control) { return control is ConsoleRunHost; }
Chris patterson
source share