probably at the beach
probably at the beach

Reputation: 15217

visual studio setup project caching compilation symbols

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 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?

Upvotes: 0

Views: 142

Answers (1)

Jim Fell
Jim Fell

Reputation: 14254

Try this:

#if DEBUG
...
#endif

Upvotes: 2

Related Questions