Quantcast
Channel: Visual Studio General Questions forum
Viewing all articles
Browse latest Browse all 21115

VS2012 Build for Release still defines DEBUG

$
0
0

I have a C# project using VS 2012. I am learning about #if DEBUG which should be defined while the project's build configuration is DEBUG, which works fine. So then I changed by project properties Build Configuration to RELEASE, and in that screen the 'define DEBUG constant' is unchecked - good. So I rebuild my project and my #if DEBUG code is still executed! I did a quick change to the program to make sure it did a Build, but same result. So then I changed the Build and Run option so the MSBuild verbosity is Detail, so the output window will show what the build is doing. The build output shows it is still defining DEBUG! Why is that?

The output details for the build show:

 C:\Windows\Microsoft.NET\Framework\v4.0.30319\Csc.exe
/noconfig /nowarn:1701,1702,2008 /nostdlib+ /platform:AnyCPU
/errorreport:prompt /warn:4 /define:DEBUG;TRACE /errorendlocation
/preferreduilang:en-US /highentropyva+

Thx for any help

philb


philb222


Viewing all articles
Browse latest Browse all 21115

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>