There are 2 solutions: one method is for "project-references"; the other is for "path-hardcoded dll references". Unfortunately, both involve manually editing the .csproj file yuk... AFAIK, there is no way to do this within the VisualStudio 2008 UI - I don't know about VS 2010. Note that it is NOT necessary to modify any of the references to the .NET dlls.
One quick note about these solutions is that they are independent of the Platform Architecture of the machine that is compiling the projects!
After opening the .csproj file in a text-editor (or as a .xml file within VisualStudio), do either of the following depending on your needs. Note that valid platform values are either: x86, x64, or ia64.
Platform-Specific Project References:
<ProjectReference Include="..\SomeLibrary.csproj" Condition="'$(Platform)' == 'x64'">
<Project>{GUID of existing proj ref goes here...}</Project>
<Name>SomeLibrary</Name>
</ProjectReference>
Platform-Specific Binary (.dll) References:
<Reference Include="SomeDll, Version=..., Culture=..., PublicKeyToken=..., processorArchitecture=x86" Condition="'$(Platform)' == 'x86'" />
<SpecificVersion>False</SpecificVersion>
<HintPath>C:\MyAppReferences\x86\SomeLibrary.dll</HintPath>
</Reference>
<Reference Include="SomeDll, Version=..., Culture=..., PublicKeyToken=..., processorArchitecture=x64" Condition="'$(Platform)' == 'x64'" />
<SpecificVersion>False</SpecificVersion>
<HintPath>C:\MyAppReferences\x64\SomeLibrary.dll</HintPath>
</Reference>
No comments:
Post a Comment