我是.Net开发人员.OPC的新手.当我尝试一些OPC客户端样本时,所有这些样本都会出现此错误.似乎DLL似乎没有注册.但我不知道如何以及在何处注册.
error: retrieving the COM class factory for component with CLSID failed due to the following error: 80040154
Run Code Online (Sandbox Code Playgroud)
即使我试过这个
regsvr32 Interop.OPCAutomation.dll",
Run Code Online (Sandbox Code Playgroud)
但它也会抛出错误
The module "Interop.OPCAutomation.dll" was loaded but the entry-point DllRegisterServeer was not found.
Make sure that "Interop.OPCAutomation.dll" is a valid DLL or OCX file and then try again.
Run Code Online (Sandbox Code Playgroud)
我经历了这么多现有的论坛.他们中的很多人都表示将平台目标更改为x86,但我仍然遇到同样的问题.仅供参考,我只能在"项目属性"的"构建"选项卡顶部的"平台"选项中看到"活动(任何CPU)".
这是我的环境细节:
.Net 2005
OPCAutomation Weapper
Windows 7 64-bit OS
Dell Inspiron 1525 (I hope this is not a 64bit machine, but my engineer installed 64bit OS somehow).
Run Code Online (Sandbox Code Playgroud)
请帮我.
提前致谢!
小智 5
以防万一有人正在处理这个问题(我最近一直在......)我完成了它!过了一段时间,我发现它是关于在64位机器上运行的.NET框架.只要.NET应用程序仅适用于32位CLR,我们必须设置.NET框架以在WOW模式下加载CLR.为此,请键入:
C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\Ldr64.exe SetWow
Run Code Online (Sandbox Code Playgroud)
在此之后,您应该能够运行应用程序.
您可以通过键入以下命令返回并恢复以前的.NET Framework:
C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\Ldr64.exe Set64
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
11447 次 |
| 最近记录: |