.csproj的平台具体ItemGroup的作品集引用而不是内容包括? [英] .csproj's platform specific ItemGroup works for assembly references but not content includes?

查看:729
本文介绍了.csproj的平台具体ItemGroup的作品集引用而不是内容包括?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于我们有三个程序集进来明确的x86和x64版本,我已经编辑了相应的.csproj文件(S)使用,例如,像这样的块:

Since we have three assemblies that come in explicit x86 and x64 versions, I've edited the corresponding .csproj file(s) to use, for example, a block like this:

  <ItemGroup Condition=" '$(Platform)' == 'x86' ">
    <Reference Include="CaliberRMSDK">
      <HintPath>..\Libraries\CaliberRMSDK_IKVM\32bit\CaliberRMSDK.dll</HintPath>
    </Reference>
    <Content Include="..\Libraries\CaliberRMSDK_IKVM\32bit\ikvm-native.dll">
      <Link>ikvm-native.dll</Link>
      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
    </Content>
    <Content Include="..\Libraries\CaliberRMSDK_IKVM\32bit\JVM.dll">
      <Link>JVM.dll</Link>
      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
    </Content>
  </ItemGroup>
  <ItemGroup Condition=" '$(Platform)' == 'x64' ">
    <Reference Include="CaliberRMSDK">
      <HintPath>..\Libraries\CaliberRMSDK_IKVM\64bit\CaliberRMSDK.dll</HintPath>
    </Reference>
    <Content Include="..\Libraries\CaliberRMSDK_IKVM\64bit\ikvm-native.dll">
      <Link>ikvm-native.dll</Link>
      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
    </Content>
    <Content Include="..\Libraries\CaliberRMSDK_IKVM\64bit\JVM.dll">
      <Link>JVM.dll</Link>
      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
    </Content>
  </ItemGroup>

当重新加载在Visual Studio 2010中的.csproj文件,并使用86为平台,所有的工作完全正常。当选择64为平台,在适当的64位集引用使用的可是链接(&LT;内容主要包括= ...&GT; 。 )的总是的使用32位的人(因此应用程序被打破)。

When reloading the .csproj file in Visual Studio 2010 and using 'x86' as platform, all works perfectly fine. When choosing 'x64' as platform, the proper 64bit assembly reference is used BUT the linked ( <Content Include= ...> ..) always uses the 32bit ones (and therefore the app is broken).

有没有任何CPU了项目文件和我会预期它的工作只是罚款的内容包括,太..但事实并非如此。是否有什么我失踪?

There's no Any CPU anymore in the project files and I would have 'expected' it to work just fine for the content includes, too.. but it doesn't. Is there anything I am missing?

推荐答案

这就是'只有'视觉/显示问题。下方建立确实使用了正确的引用等,只有VS2010显示错误之一。所有优秀的,只是不可见。

So this is 'only' a visual / display problem. Underneath builds do use the proper references etc, only VS2010 displays the wrong one. All good, just not visible.

这篇关于.csproj的平台具体ItemGroup的作品集引用而不是内容包括?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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