I’m currently developing a c# .net service for a client. I had issues with debugging .net service in the past so I added the Debug.Launch(); bit of code so that my IDE would launch on startup as suggested by Easier way to debug a Windows service. All of that works great.
But then it came time for launch, I turned off debugging…and it still did it! wha?! So as a solution I ripped out all debug startup code….and it still asks to load a debugger. I tried installing with release mode and it still does this. I can simply click no to continue…but that is not acceptable for a client.
Any suggestions on what I might be missing?
When VS debugger gets attached to the process you will see the stack trace. This will help you find the reason. It will stop on the Debugger.Launch() call if this call is what triggers debugger launch. And as I said in comment you might need to simply reregister your service in windows because VS builds release version in bin/Release, not in bin/Debug where you registered it originally.