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

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

Running an application from Visual Studio 2005 or 2008 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.

Solution or Workaround

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

If working in Microsoft Visual Studio:
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.

If working in Microsoft Visual Basic or Visual C# Express Editions:
1. Open the solution in the Express Edition.
2. File > Save All, and save the project to a different location.
3. Using Windows Explorer, browse to the newly saved project, and open the project file (.csproj or .vbproj) with a text editor.
4. Insert the text x86 into the ‘Debug|AnyCPU’ and ‘Release|AnyCPU’ sections.
[O-Image]

  1. Save the project file.
  2. Open the solution in the Express Edition, and build and run the application.

Created: 5/5/2016
Last Modified: 5/5/2016
Article ID: 000009384
Software: ArcGIS Engine Runtime 9.2, 9.3, 9.3.1

原文地址:http://support.esri.com/technical-article/000009384

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值