I'm have a c# visual studio 2010 project that uses [Conditional("DEBUG")]
above some of my logging code that I don't want used in my release build. When I build the release
configuration in the project and step through the code, it is missed as expected.
My setup project uses the output exe file though and when I rebuilt the MSI, the debugging code was still being printed out. This开发者_JAVA技巧 occurred till I deleted the exe output from the setup project then re-added it. This is contrary to what I expected so I was wandering if other people have experienced this?
Try this:
#if DEBUG
...
#endif
精彩评论