I'd like to exclude / include a complete form in my project. But when I add the needed #if CONST
and #endif
the compiler complains about resources that may get wrong names.
warning MSB3042: A namespace or class definition was found within a conditional compilation directive in the file "Form1.cs". This may lead to an incorrect choice for the manifest resource name for resource "Form1.resx".
What does this mean?
And how do I fix it?
Explanation: A normal Form (created from a Template) consists of 2 .cs files and a .resx file. By eliminating the Form1 class you 'orphan' the resources.
Workarounds:
I favor 3, what benefits do you expect from removing the Form?