Can c# , visualstudio define a conditional compilation variable in another project?

For example, there are 2 assemblies: ProjectA , ProjectB , and ProjectA refers to ProjectB .

ProjectB has this code:

 #if ABC Console.WriteLine("если отобразилось значит ABC определена"); #endif 

Can ABC be defined in ProjectA to display a line?

  • one
    Why not use something of runtime, not compile time? - Andrey NOP
  • You can, thanks for the advice! - Andrey K.
  • They write that it is wrong: stackoverflow.com/q/5149351/5045688 - Alexander Petrov
  • @AlexanderPetrov, but in the same place and practically workaround is given with targets - Grundy
  • 2
    I have not read it to the end: R - Alexander Petrov

0