Conditionally compile a Form in or out?

cjard

Well-known member
Joined
Apr 25, 2006
Messages
7,081
Programming Experience
10+
Hi all

When I write a service, I ususally use IF DEBUG compiler directives to choose whether ServiceBase.Run will be used (release) or whether a Windows.Forms.Application.Run will be used (because services must be installed, its easier to debug them by opening a form to start a message loop and prevent the app from exiting)

Come release time, I wonder how I can use compiler directives to prevent the form being compiled into the assembly? I conditionally removed all the backend form and designer code, and I get a warning:

A namespace or class definition was found within a conditional compilation directive in the file "DebugForm.cs". This may lead to an incorrect choice for the manifest resource name for resource "DebugForm.resx

Does it matter?
 
Back
Top