如何解决 80040154 没有注册类 (异常来自 HRESULT:0x80040154 (REGDB_E_CLASSNOTREG))

xuwenke 10 Reputation points
2023-01-31T13:34:03.3+00:00

User's image

在使用 open xml sdk开发时,使用了Microsoft.Office.Interop.Word命名空间中的Application,在编译过程中,出现了上图所示的问题,提示没有注册类。

我使用的系统是win11专业版,安装的有wps和office365

Microsoft 365 and Office | Development | Other
Microsoft 365 and Office | Word | For business | Windows
Developer technologies | C#
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.