setting references with preprocessor directives

  • Thread starter Thread starter Bob
  • Start date Start date
B

Bob

Hi,
Is it possible to change the references in a project based upon
changing preprocesor symbols?

Thanks,
Bob
 
Bob said:
Is it possible to change the references in a project based upon
changing preprocesor symbols?

Not based on preprocessor symbols as far as I'm aware, but if you tweak
the build file you can change references based on build configurations
(which can also change the preprocessor symbols of course). We do this
for MiscUtil. For instance, we've got sections like this:

<ItemGroup Condition=" '$(Configuration)' != 'Release 2.0' ">
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Xml.Linq">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
</ItemGroup>
 
Back
Top