• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录

gisoracle

  • 博客园
  • 联系
  • 订阅
  • 管理

公告

View Post

ArcEngine9.3没有原生支持64位,而是以32位兼容方式运行

ArcEngine9.3没有原生支持64位,而是以32位兼容方式运行

来自:http://blog.csdn.net/janssenkm/archive/2009/11/23/4859652.aspx

VS2008在64位Windows平台上编译ArcEngine导致HRESULT:0x80040154 (REGDB_E_CLASSNOTREG)错误的解决办法。 收藏

VS2008 在64位的系统(XP/Vista/Win7均是)中编译ArcEngine(9.3SP1)并运行时提示:

没有注册类 (异常来自 HRESULT:0x80040154 (REGDB_E_CLASSNOTREG))

原因:ArcEngine9.3没有原生支持64位,而是以32位兼容方式运行

解决办法:在项目属性里设置“生成”=>“目标平台”为x86而不是默认的ANY CPU.

ESRI官方也是这么解决的:

http://support.esri.com/index.cfm?fa=knowledgebase.techarticles.articleShow&d=33000

Bug:  Error: Class not registered(Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)

Article ID: 33000
Bug Id: NIM007516
Software:  ArcGIS Engine Runtime 9.2, 9.3
Platforms:  Windows 2000, XP

 

Description

Running an application from Visual Studio 2005 on 64-bit computers, displays the following error message:

"Error : Class not registered(Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)"

Cause

When running a Visual Studio application, the default Common Language Runtime (CLR) platform in the Visual Studio is set to Any CPU. This default must be changed on 64-bit computers to compile the assemblies with the 32-bit, x86 compatible CLR.

Workaround

Change the default Platform Target CPU to allow applications to run on 64-bit machines:

  1. Right-click on the solution in the Visual Studio Solution Explorer and open the Properties window.
  2. Click the compile tab: Visual Basic, or the build tab: Visual C#.
  3. For Visual Basic, click the Advanced tab.
  4. Select x86 as the Target CPU (Visual Basic) or Platform Target (Visual C#).
  5. Rebuild the solution.

Created: 5/4/2007
Last Modified: 10/30/2009

posted on 2010-03-06 11:36  gisai  阅读(1043)  评论(0)    收藏  举报

刷新页面返回顶部
 
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3