I'm working on a web site project on vb.net - asp.net 4 - visual studio 2010.
I need to implement a part of code that is used only when debug compilation is chosen within visual studio, e.g.:
' do something
#if DEBUGCONST
' debug mode! do something else
#end if
' proceed as usual..
Unfortunately this is not a web application project, therefore it doesn't come with a complete "property page" (where you can change compilers constant easily).
Googling for an answer, I found: http://msdn.microsoft.com/en-us/library/a15ebt6c%28v=vs.100%29.aspx
..and I changed my web.config in this way:
<system.codedom>
<compilers>
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" compilerOptions="/define:DEBUGCONST"></compiler>
</compilers>
</system.codedom>
Unfortunately, even if it compiles fine, the DEBUGCONST is never defined and the "debug code" is never executed.
Is there something I'm missing?
Thank you in advance for any help!