Mscorlib(源) - 错误:80040154类未注册(HRESULT异常:0x80040154(REGDB_E_CLASSNOTREG)) [英] Mscorlib(source)- error: 80040154 class not registered (exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))
本文介绍了Mscorlib(源) - 错误:80040154类未注册(HRESULT异常:0x80040154(REGDB_E_CLASSNOTREG))的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在构建一个使用给定代码读取.mdd文件的应用程序
I am building an application to read .mdd file using given code
class Program
{
static void Main(string[] args)
{
MDMLib.Document document = new Document();
document.Open(@"D:\Sample.mdd", "", MDMLib.openConstants.oREAD);
foreach (IMDMField field in document.Fields)
{
Console.WriteLine(field.Name);
}
Console.ReadLine();
}
}
但我收到错误。错误源文件即将发布mscorlib
but I am getting given error. In error source file is coming mscorlib
Message :Retrieving the COM class factory for component with CLSID {432E4F73-87A8-4732-A98D-85CE5B500AD7} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).
Source :mscorlib
StackTrace : 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)
at MDDTesting.Program.Main(String[] args) in D:\RebusCode\MDDTesting\MDDTesting\MDDTesting\Program.cs:line 14
我尝试了什么:
我使用regasm命令注册了MDMLib.dll,但仍然收到此错误。
What I have tried:
I have registered MDMLib.dll using regasm command but still getting this error.
推荐答案
两种可能性:
1)你真的没有注册MDMLib.dll。 REGASM仅适用于.NET库。如果这个.DLL不是.NET库,你可以在上面使用REGSVR32。
2)一个或多个.DLL的MDMLib.dll依赖不存在/或在MDMLib期望的地方注册。
Two possibilities:
1) You really didn't register MDMLib.dll. REGASM only works on .NET libraries. If this .DLL is not a .NET library, you use REGSVR32 on it instead.
2) One or more .DLL's MDMLib.dll depends on are not present and/or registered where MDMLib expects them.
这篇关于Mscorlib(源) - 错误:80040154类未注册(HRESULT异常:0x80040154(REGDB_E_CLASSNOTREG))的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文