Is there a way to globally declare a #define?
Like I want to have a file that has for instance,
#define MONO
and I want all source-
There is one more workaround, correct me if i'm wrong:
For example, ProjectA references ProjectB, and ProjectsCommon contains base static variable. Both projects refernece ProjectsCommon.
Code in ProjectsCommon:
[assembly: InternalsVisibleTo("ProjectA")]
------------------------------------------
public class ConditionVariables
{
public static bool IsABC { get; internal set; } = false;
}
Code in ProjectA:
#if ABC
ProjectsCommon.ConditionVariables.IsABC = true;
#endif
Code in ProjectB:
if (ProjectsCommon.ConditionVariables.IsABC )
{
// first scenario
}
else
{
// second one
}
However, code in ProjectA should run first. This is probably good when ProjectA is a bootstarapper project.