1

I have some helpers.vb which I'm using in debug mode.

Now I would like to exclude them, when I publish a project.

Is there any config or something like that to handle this like in Visual Web Developer Express?

I found various threads where it's solved with a web.config file in Visual Web Developer Express

How to exclude web.config when publishing with Visual Web Developer Express?

Exclude files from web site publish in Visual Studio

In Project Properties window/Publish there's an button called something like application files. Where I'm able to exclude the exe (which doesn't make sense for me) and the manifest. If you check the Show all files box, you will see a pbd and a xml, too. But I can't exclude vb files.

Community
  • 1
  • 1
MaBi
  • 1,372
  • 3
  • 13
  • 19
  • answered thoroughly here :) http://stackoverflow.com/questions/3311390/segregating-debug-and-release-code-in-c-sharp – Daniel Jul 13 '13 at 15:47
  • thanks for that, i use `#If DEBUG Then MsgBox("Mode Debug") #Else MsgBox("Some other mode") #End If` and it works great to call something only in debug mode. But isn't it possible to completly exclude a whole file from compiling? Or will I have to outsource the file as dll? – MaBi Jul 13 '13 at 16:34

0 Answers0