0

我有一个 .net(框架版本 4.5.1)控制台应用程序,它在执行时遇到以下错误:

       System.Runtime.InteropServices.COMException (0x80040111): Retrieving the COM class factory for component with CLSID {F374E943-076A-40B9-813E- 0FBFB823E638} failed due to the following error: 80040111 ClassFactory cannot supply requested class (Exception from HRESULT: 0x80040111 (CLASS_E_CLASSNOTAVAILABLE)).
       at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
       at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
       at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
       at System.Activator.CreateInstance(Type type, Boolean nonPublic)
       at System.Activator.CreateInstance(Type type)

我已经尝试根据我发现的与此类似的其他帖子将平台目标更改为 X86,但这对我不起作用。在我的控制台应用程序中引用的 .dll 是 Interop.MOVEitAPI.dll。问题可能来自控制台应用程序中引用的 MOVEitAPI 版本与运行控制台应用程序的服务器上实际安装的版本不匹配吗?

4

1 回答 1

0

在您正在执行程序的机器上,确保您拥有用于构建程序的原始 COM MOVEitAPI.dll,并确保该 DLL 已注册。要注册 DLL,请运行

regsvr32 MOVEitAPI.dll

在命令提示符下作为管理员。

于 2019-03-05T20:17:37.430 回答