How to Specify Assembly References Based On Build Configuration

To "Dynamically" change the path of a Reference in Visual Studio you first need to Unload the Project, then Edit the *proj file.

Go down to the References Section change the Hard Coded Path to $(Configuration). This will dynamically change the reference when the Configuration is changed.

    <Reference Include="Dafran.Exceptions, Version=1.0.0.0, Culture=neutral, PublicKeyToken=08f619978b79cd15, processorArchitecture=MSIL">

      <SpecificVersion>False</SpecificVersion>

      <HintPath>\\zero\Builds\Dafran.Security\$(Configuration)\Dafran.Exceptions.dll</HintPath>

    </Reference>

Add comment

Loading