Wednesday, October 17, 2012

setting c# windows service in debug mode


setting service in debug mode


just comment the below lines

 ServiceBase[] ServicesToRun;
            ServicesToRun = new ServiceBase[]
            {
                new CLIMimoneyTestAsync()
            };
            ServiceBase.Run(ServicesToRun);



and write this,uncomment the above lines when, debugging is done and you want to start the service

 //CLITest service = new CLITest ();
            //service.OnDebug();
            //System.Threading.Thread.Sleep(System.Threading.Timeout.Infinite);

No comments:

Post a Comment