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>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top