I am attempting to work on a Service in Mono-Develop. When working on services in Visual Studio I do some wrapping (as per a different SE article) to allow me to easily debug:
ServiceBase[] ServicesToRun;
ServicesToRun = new ServiceBase[]
{
new UtilService()
};
if (Environment.UserInteractive)
{
RunInteractive(ServicesToRun);
}
else
{
ServiceBase.Run(ServicesToRun);
};
Unfortunatley, when I run that code in MonoDevelop it determines that Environment.UserInteractive
is false and attempts to run it as a service.
How do I set Environment.UserInteractive
?