I have here a Windos Service Project in Visual Studio and because you cannot start a service without installing it, I have to compile + uninstall old service + install new service again and again if I want to test some changes on my code. This is taking forever.
Is there no easier way to test windows services? Thank you
Run the service from VS as a console application. In fact, if you are smart, you can test whether
Environment.UserInteractive
This way with a simple “if” you can have your service running normally, without the windows service stuff if you run it in an interactive mode or, if it is run as a service, you perform a normal service startup.