VS 2008 Projekt Konfigurationen und (#ifdef) Compilier direktiven
-
Hallo ihr,
wenn ich 2 Konfiguationen habe (.NET C# Applikation) bspw. "Release_A" und "Release_B"
dann will ich im Code folgendes ereichen:
#if Release_A _base= new FooA(); #else _base= new FooB(); #endif
Aber egal was ich als Projekt Konfiguration auswähöe, ist immer die else- Klausel aktiv!?! Wie mach ich das, das dies funktioniert?
-
Du mußt diese Konstanten auch unter "Project Properties / Build / Conditional compilation symbols" angeben - nur der Name der Konfiguration alleine reicht nicht aus.
-
Klappt wunderbar, danke;)