Is it possible to write executable application in .net that can be registered as Win32 Service and operate as service but for debug purposes can be launched as console application with console output (as performance counters, text log files are not very useful for monitoring)
Or shall I put application logic (Application class) in a separate assembly and write two completely different executable wrappers (win32 service and console) that reference this library with Application
class?
Console
main()
{
Application.Start();
Console.Readkey();
Application.Stop();
}
Win32 Service
OnStart()
{
Application.Start();
}
OnStop()
{
Application.Stop();
}