C # exclude full form / usercontrol using compiler constants

I would like to exclude / include the full form in my project. But when I add the necessary #if CONSTand #endif, the compiler complains about resources that may get the wrong names.

warning MSB3042: The definition of a namespace or class was found in the conditional compilation directive in the file "Form1.cs". This can lead to the wrong manifest resource name for the resource "Form1.resx".

What does it mean?

And how to fix it?

+3
source share
3 answers
  • : ( ) 2 .cs .resx. Form1, "" .

  • :

    • .
    • #else Form1
    • () , .

3, ?

+4

resx (.. ), Form1.resx.

0

#if CONST/#endif, , Form1.cs. , .

0

Source: https://habr.com/ru/post/1725947/


All Articles