我正在尝试部署一个应用程序,该应用程序使用在 C# 中嵌入带有 AxHost 的 ActiveX 控件的库。
当我在我们的测试平台上运行已安装的应用程序时,我发现并显示以下异常:
Unexpected exception.
This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem. (Exception from HRESULT: 0x800736B1)
at System.Windows.Forms.UnsafeNativeMethods.CoCreateInstance(Guid& clsid, Object punkOuter, Int32 context, Guid& iid)
at System.Windows.Forms.AxHost.CreateWithoutLicense(Guid clsid)
at System.Windows.Forms.AxHost.CreateWithLicense(String license, Guid clsid)
at System.Windows.Forms.AxHost.CreateInstanceCore(Guid clsid)
at System.Windows.Forms.AxHost.CreateInstance()
at System.Windows.Forms.AxHost.GetOcxCreate()
at System.Windows.Forms.AxHost.TransitionUpTo(Int32 state)
at System.Windows.Forms.AxHost.CreateHandle()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.AxHost.EndInit()
at ....InitializeComponent()
at ...
我用谷歌搜索了 0x800736B1,所以我知道这意味着无法加载文件。
现在的大问题是如何找出无法加载的文件。
是否可以打开某种日志记录功能,或者是否有某种方法可以从异常中获取更多信息?