Visual Studio中加载正确的(x86或x64)的dll! [英] Visual Studio loading the right (x86 or x64) dll!

查看:480
本文介绍了Visual Studio中加载正确的(x86或x64)的dll!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我工作的Visual Studio中的一个x86。我想建立自己的应用程序为x32和64位。但我需要使用SQLite .NET连接器至极有一个DLL用于x86应用程序和另一个DLL用于基于x64的应用程序。如何配置我的Visual Studio加载一个参考,我的配置是x64和另一个当我的配置是86?

I'm working on visual studio in an x86. I would like to build my application for both x32 and x64. But i need to use the sqlite .net connector wich has a dll for x86 apps and another dll for x64 apps. How do i configure my visual studio to load a reference when my configuration is x64 and another when my configuration is x86?

谢谢, 理查德。

推荐答案

在您的项目文件中参考使用MSBUILD条件

in your project file in reference use an MSBUILD conditional

<Reference 
       Include="SomeAssembly86, Version=0.85.5.452, Culture=neutral, PublicKeyToken=41b332442f1101cc, processorArchitecture=MSIL"  
         Condition=" '$(Platform)' == 'AnyCPU' ">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>..\..\Dependencies\SomeAssembly.dll</HintPath>
      <Private>False</Private>
    </Reference>
    <Reference 
         Include="SomeOtherAssembly, Version=0.85.5.999, Culture=neutral, PublicKeyToken=41b332442f1101cc, processorArchitecture=MSIL" 
         Condition=" '$(Platform)' == 'x64' ">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>..\..\Dependencies\SomeOtherAssembly.dll</HintPath>
      <Private>False</Private>
    </Reference>

这篇关于Visual Studio中加载正确的(x86或x64)的dll!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆