I'm successfully using Environment variables and conditional compilation. MSBuild can easily translate environment variables into preprocessor symbols which you can use in your code. Your MSBuild file must include this translation like this:
<PropertyGroup Condition="'$(ENVIRONMENT_VARIABLE)' != '' ">
<DefineConstants>$(DefineConstants);ENVIRONMENT_VARIABLE</DefineConstants>
</PropertyGroup>
What this snipped does is checking for the presence of ENVIRONMENT_VARIABLE
and then then appends that variable to the existing DefineConstants
list that indicates to MSBuild which symbols to define for compilation.
Defining an environment variable only on your build server/ or only on your dev boxes (depending on what's easier) is a very lean and flexible way to achieve simple configuration. If you need more advanced strategies, config files may be the way to go. But be careful with introducing different build combinations, usually they create a lot of overhead and introduce chance to break the build accidentially.
Whenever you can, avoid it.