YouTube | Facebook | X(Twitter) | RSS

64bit OS 環境の Visual Studio 2010 スタンドアロン アプリケーションに ArcGIS コントロールを使用する場合の設定方法

2016/9/1 (木)

<!--
64bit OS環境のVisual Studio 2010でArcGISコントロールを使用したスタンドアロン アプリケーションを構築する場合の設定方法
プロジェクトのXML内に以下のXMLを埋め込む
-->
<!--
      Workaround for VS2010 .NET 3.5 application referencing x86 assembly in resx file on 64-bit OS
      http://social.msdn.microsoft.com/Forums/en-US/msbuild/thread/e5900710-9849-4d10-aa28-48b734d06bf2
-->
<PropertyGroup>
  <ForceResGen32Bit Condition="'$(MSBuildToolsVersion)'=='4.0' And '$(PROCESSOR_ARCHITEW6432)'!='' And '$(TargetingClr2Framework)'=='true' And '$(PlatformTarget)'=='x86'">true</ForceResGen32Bit>
</PropertyGroup>
<Target Name="BeforeResGen" Condition="'$(ForceResGen32Bit)' == 'true'">
  <PropertyGroup>
    <ResGenSdkToolsPath>$(IntermediateOutputPath)ResGenForced32Bit\</ResGenSdkToolsPath>
  </PropertyGroup>
  <!-- Copy resgen.exe to intermediate working directory for UAC settings -->
  <Copy SourceFiles="$(TargetFrameworkSDKToolsDirectory)ResGen.exe"
        DestinationFiles="$(ResGenSdkToolsPath)ResGen.exe" />
  <!-- corflags.exe resgen.exe /32BIT+ /Force-->
  <Exec WorkingDirectory="$(ResGenSdkToolsPath)"
        Command=""$(TargetFrameworkSDKToolsDirectory)corflags.exe" ResGen.exe /32BIT+ /Force" />
  <!-- GenerateResource Task parameters
        Using the non-64bit Tracker.exe and indicate resgen.exe has been forced to x86 -->
  <PropertyGroup>
    <ResGenTrackerSdkPath>$(SDK40ToolsPath)</ResGenTrackerSdkPath>
    <ResGenToolArchitecture>Managed32Bit</ResGenToolArchitecture>
    <CacheTargetFrameworkSDKToolsDirectory>$(TargetFrameworkSDKToolsDirectory)</CacheTargetFrameworkSDKToolsDirectory>
    <TargetFrameworkSDKToolsDirectory>$(ResGenSdkToolsPath)</TargetFrameworkSDKToolsDirectory>
  </PropertyGroup>
</Target>
<Target Name="AfterResGen" Condition="'$(ForceResGen32Bit)' == 'true'">
  <PropertyGroup>
    <TargetFrameworkSDKToolsDirectory>$(CacheTargetFrameworkSDKToolsDirectory)</TargetFrameworkSDKToolsDirectory>
  </PropertyGroup>
  <RemoveDir Directories="$(ResGenSdkToolsPath)" Condition="Exists('$(ResGenSdkToolsPath)')" />
</Target>

関連記事

  • この記事を書いた人

羽田 康祐

伊達と酔狂のGISエンジニア。GIS上級技術者、Esri認定インストラクター、CompTIA CTT+ Classroom Trainer、潜水士、PADIダイブマスター、四アマ。WordPress は 2.1 からのユーザーで歴だけは長い。 代表著書『地図リテラシー入門―地図の正しい読み方・描き方がわかる』 GIS を使った自己紹介はこちら。ESRIジャパン(株)所属、元青山学院大学非常勤講師を兼務。日本地図学会第31期常任委員。発言は個人の見解です。

-プログラミング, ArcGIS
-, ,

WINGFIELD since1981をもっと見る

今すぐ購読し、続きを読んで、すべてのアーカイブにアクセスしましょう。

続きを読む