I'm using VS2010 professional, and I have a project, but i want to have a way that compiles only some of the code in one configuration, and the rest in another. #ifdef is rather clunky, as it must surround said code, and there are lots of fragments. I was thinking like an attribute. And if theres any minecraft modders here, i basically need forge's @SideOnly for C#.
public class Foo{
[BuildConfig("Config1")]
public void Bar(){}
[BuildConfig("Config2")]
public void Baz(){}
}
compiling this code under Config1 would leave out Baz, and vice versa.