Is there a way, in code, to determine what "Solutions Configuration" you are running in? For example, 'Debug' vs. 'Release?
I have a service that I like to test in the IDE in Debug, right now I have bool that I set which either runs the 'service' if set to true (which then uses the OnStart method to run my 'main' method), if it's set to false I just run the 'main' method. This works great but I often forget to reset the bool after testing and then when I go to install the service it fails and I have to go back, reset the bool, recompile etc.
If I could just determine programatically that I was running in the IDE in Debug then I could get around this issue.
Edit: While thinking this through, I guess what I really need in the end is to determine if I'm in the 'playing' the app in the ide and not the soulutions configuration. This would allow me to compile in either debug or other configuration.
The simpliest solution seems to check 'System.Diagnostics.Debugger.IsAttached'