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)"
"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:
- Right-click on the solution in the Visual Studio Solution Explorer and open the Properties window.
- Click the compile tab: Visual Basic, or the build tab: Visual C#.
- For Visual Basic, click the Advanced tab.
- Select x86 as the Target CPU (Visual Basic) or Platform Target (Visual C#).
- Rebuild the solution.
Created: 5/4/2007
Last Modified: 10/30/2009
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· winform 绘制太阳,地球,月球 运作规律
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· AI与.NET技术实操系列(五):向量存储与相似性搜索在 .NET 中的实现
· 超详细:普通电脑也行Windows部署deepseek R1训练数据并当服务器共享给他人
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理