我遇到了一个很奇怪的问题,我在机器上部署了2个.NET应用程序。两者都在v2.0上运行。
现在,尽管其中一个工作顺利,但另一个甚至都无法启动!而且,它不会引发任何错误,我在事件查看器中看不到任何错误列表。
变得难以调试。在每台其他机器上,两个exe都可以正常工作!
任何已知问题?
编辑:我捕获了一个未处理的异常,异常是这个;
System.Runtime.InteropServices.COMException(0x80040154):未注册类(来自HRESULT的异常:0x80040154(REGDB_E_CLASSNOTREG))位于System.Windows.Forms.UnsafeNativeMethods.CoCreateInstance(Guid&clsid,Object punkOuter,Int32 context,Guid&iid)。 System.Windows.Forms.AxHost.CreateWithLicense(字符串许可证,Guid clsid)(位于System.Windows.Forms.AxHost.CreateInstanceCore(Guid clsid))位于System.Windows.Forms.AxHost System.Windows.Forms.AxHost.GetOcxCreate()的System.Windows.Forms.AxHost.TransitionUpTo(Int32状态)的System.Windows.Forms.AxHost.CreateHandle()的System.Windows.Forms.Control的.CreateInstance() System.Windows.Forms.Control上的.CreateControl(Boolean fIgnoreVisible)。在System.Windows.Forms.AxHost.EndInit()在BrowsingFiles.Form1..ctor()在BrowsingFiles.Program.Main(String [] args)处的CreateControl(Boolean fIgnoreVisible)
谢谢
除了Mitch Wheat给出的解决方案之外,还有一种解决方案
将 DLL 复制到 System32 文件中的正确位置,然后使用命令提示符使用 regsvr32 location-of-the-dll将 DLL 注册到系统