【问题标题】:How to add assemblies for multiplatform development?如何为多平台开发添加程序集?
【发布时间】:2013-12-11 09:44:06
【问题描述】:

我正在为 x86 和 x64 平台使用单独的程序集开发项目。如何将此程序集添加到 Visual Studio 项目中,以便能够为 x86 和 x64 编译解决方案,而无需替换库?

【问题讨论】:

    标签: .net visual-studio-2010 visual-studio cpu-architecture


    【解决方案1】:

    手动编辑项目文件并像这样更改引用

    <Reference Include="YourAssembly" Condition="'$(Configuration)' == 'Release32'">
      <HintPath>PathTo32BitAssembly\YourAssembly.dll</HintPath>
    </Reference>
    <Reference Include="YourAssembly" Condition="'$(Configuration)' == 'Release64'">
      <HintPath>PathTo64BitAssembly\YourAssembly.dll</HintPath>
    </Reference>
    

    【讨论】:

    • 谢谢。最后我使用了这个: ..\libs\sapnco\x86\sapnco.dll..\libs\sapnco\x64\sapnco.dll
    猜你喜欢
    • 2012-02-13
    • 2013-02-11
    • 2013-06-09
    • 2020-05-24
    • 1970-01-01
    • 2014-04-11
    • 2021-07-19
    • 1970-01-01
    相关资源
    最近更新 更多