I am working on C# in Win 7 visual studio 2012.
I have #if DEBUG
and I want to disable them. But, when I run C# in Visual Studio with \"start without debug
I assume you're already building against the "Release" built profile so I'll explain how to unset the DEBUG constant for release.
Right-click on the project and in the Build section remove flag from "Define DEBUG constant". This flag should be removed only for the "Release" built profile and set for the "Debug" built profile.
When you choose "Start without debug" you are not telling to built for release, but just to not attach the debugger to the process.
Those are 3 different but inter-related things: built profile (Debug/Release), starting with or without debugger attached to the process and setting/unsetting the "Define DEBUG/TRACE constant".
"Start without debugging" only means that VS will not attach the debugger to the running process; it doesn't change anything else. You're probably running using the Debug configuration - if you want to compile in Release, you should choose Release from the dropdown in the toolbar, where you should currently see a dropdown set to Debug.
Visual Studio creates these configurations for your project to start, which control what preprocessor flags are set to, as well as a bunch of other configuration (how much optimization to use, etc.). You can edit them if you want, or even create new ones.
Change your build configuration from Debug to Release.