In an attempt to make my references update based on my configuration, I've tweaked my .csproj file by adding a property and changing all the references to use it as follows:
<PropertyGroup>
<ReferencePath Condition=" '$(Configuration)' == 'Release'">foo\release\1.0.0.9\bin\</ReferencePath>
<ReferencePath Condition=" '$(Configuration)' == 'Debug'">bar\debug\</ReferencePath>
</PropertyGroup>
<Reference Include="BasicControls, Version=5.0.53.0, Culture=neutral, PublicKeyToken=25ad4b03c913ffff, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>$(ReferencePath)\BasicControls.dll</HintPath>
</Reference>
Something is wrong and preventing the changes from propagating. Nothing I do to the .csproj file changes the paths of the references - no matter what I do, right-clicking on the reference and looking at its Path in the properties shows the same path it showed before I started editing the file.
- I've tried unloading and reloading the project
- I've tried changing the configuration from Debug to Release
- I've opened and closed the solution
- While the solution was closed, I deleted the .suo file.
- I've clicked reload on the solution explorer.
All of the references in the .csproj use the $(ReferencePath)
setup, and neither of my ReferencePaths use the original path.
What am I missing? Is it something in the way I'm using the Property?