Is it possible to add to my C# project a reference to a different dll versions in x86 and x64 (and switch automatically between them, while changing Configuration Mode)?
+4
A:
I don't think there's anything in the IDE that will do this, but you can probably accomplish this by manually editing the C# project file.
Something that looks like: <Reference Include="ThirdPartyAssembly" />
Could be changed to:
<Reference Include="ThirdPartyAssembly.x86" Condition="'$(Platform)' == 'x86' />
<Reference Include="ThirdPartyAssembly.x64" Condition="'$(Platform)' == 'x64' />
That is entirely compile time, he needs it most probably at runtime.
Dykam
2010-09-20 21:25:12
@Dykam: I thought it was pretty clear in the original question that rook wanted a compile time solution.
Mattias S
2010-09-21 07:53:32
Somehow I read "change Configuration Mode" as runtime mode... I take it back.
Dykam
2010-09-21 08:10:01
Works as a charm, thanks! In fact both dlls appear in the 'References' section in the Solution Explorer, but only one is loaded. Another is shown as if it was unresolved. It works fine, though.
rook
2010-09-21 16:51:46