vb.net中的web组件axspreadsheet没有编译

时间:2009-06-05 00:08:05

标签: vb.net activex ms-office

有人在vb.net中编译Web组件时遇到此错误吗?我在我的表单上添加了axspreadsheet,但它没有编译。它给了我以下错误。请帮忙!

System.InvalidOperationException was unhandled
  Message="An error occurred creating the form. See Exception.InnerException for details.  The error is: Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))"
  Source="Allergy App"
  StackTrace:
       at Allergy_App.My.MyProject.MyForms.Create__Instance__[T](T Instance) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 190
       at Allergy_App.My.MyProject.MyForms.get_frmInput()
       at Allergy_App.frmWelcome.Button1_Click(Object sender, EventArgs e) in C:\Users\alexluvsdanielle\Documents\Visual Studio 2008\Projects\Allergy App\Allergy App\frmWelcome.vb:line 8
       at System.Windows.Forms.Control.OnClick(EventArgs e)
       at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
       at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ButtonBase.WndProc(Message& m)
       at System.Windows.Forms.Button.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
       at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
       at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
       at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
       at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
       at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
       at Allergy_App.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81
       at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
       at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext, String[] activationCustomData)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssemblyDebugInZone()
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException: System.Runtime.InteropServices.COMException
       ErrorCode=-2147221164
       Message="Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))"
       Source="System.Windows.Forms"
       StackTrace:
            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 Allergy_App.frmInput.InitializeComponent() in C:\Users\alexluvsdanielle\Documents\Visual Studio 2008\Projects\Allergy App\Allergy App\frmInput.Designer.vb:line 73
            at Allergy_App.frmInput..ctor()
       InnerException: 

1 个答案:

答案 0 :(得分:2)

这似乎不是构建问题,而是运行时错误。从错误中看起来您正在引用的某个组件未正确注册以在项目中使用。您是否尝试过重新注册DLL?

相关问题