In my project, I use both configurations - 32-bit and 64-bit (because I am developing on a 32-bit machine, but deploy it on a 64-bit machine).
My project contains a class library located in the folder "C: ... \ Commons \ bin \ Debug \ Commons.dll". I added this DLL to the links, but of course, when I switched to 64-bit, this will not work.
So, I need a mechanism to add โplatform linksโ.
I know I can edit the .csproj file to add something like this:
<Reference Include="Commons" Condition="$(Platform) == 'x64'"> <HintPath>..\Commons\bin\x64\Release\Commons.dll</HintPath> </Reference> <Reference Include="Commons" Condition="$(Platform) == 'x86'"> <HintPath>..\Commons\bin\x86\Release\Commons.dll</HintPath> </Reference>
Should I do the same for the class library?
I'm just curious that VS does not support the platform-dependent reference mechanism even for class libraries?
upd It seems that I really need to bind 4 types of dll somehow - x86 / Debug, x86 / Release, x64 / Debug, x64 / Release
source share