MSCorLib(source)- error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))

时间:2017-06-15 10:05:06

标签: c# .net registry

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();
}
}

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

0 个答案:

没有答案