免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1477 | 回复: 0
打印 上一主题 下一主题

关于arcengine升级到64位操作系统下编译通不过的问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2011-12-20 09:44 |只看该作者 |倒序浏览
AE的程序拷贝到64位Win7下编译的时候老是通不过,总是提示类似的错误:
"Could not load file or assembly 'file:///C:/Program Files (x86)/ArcGIS/DeveloperKit10.0/DotNet/ESRI.ArcGIS.3DAnalyst.dll' or one of its dependencies. An attempt was made to load a program with an incorrect format.

Line 162, position 5. C:\temp\Projects\MyArcGISControlApp\Form1.resx"
 
才搞清楚,只要在工程文件csproj中,</project>前面加入以下内容,就可以了。
<!--

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="&quot;$(TargetFrameworkSDKToolsDirectory)corflags.exe&quot; 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>
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP