Prevent deploying debug build with ClickOnce

Posted by jomi on Stack Overflow See other posts from Stack Overflow or by jomi
Published on 2010-04-13T21:26:04Z Indexed on 2010/04/14 9:33 UTC
Read the original article Hit count: 345

Filed under:
|
|
|

Hi,

I'm publishing a ClickOnce application with VS2008, but before every publish I have to switch to Release config manually. This is fine as far as I don't forget to switch. Is there a way to prevent deploying debug builds ? Is there some compiler directive like:

#if DEBUG
#if ClickOnce
#error You cannot publish a debug build
#endif
#endif

Or is there a way (without build scripts) to automatically switch to Release config before publishing ?

(I've found some similar questions but didn't like the anwsers on them)

Thanks

© Stack Overflow or respective owner

Related posts about c#

Related posts about clickonce