title: 0x80040154 (REGDB_E_CLASSNOTREG) error at runtime
body: <p>I was trying to run my program in windows 8 machine and it's giving me this error at runtime (0x80040154 (REGDB_E_CLASSNOTREG)). I don't experience any problem when I run it on a machine with windows 7 installed.</p>
  
  <p>Here are the details (inner exception) :</p>
  
  <pre><code> System.InvalidOperationException was unhandled
   HResult=-2146233079
   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=PayrollSystem
  StackTrace:
     at PayrollSystem.My.MyProject.MyForms.Create__Instance__[T](T Instance) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 190
     at PayrollSystem.My.MyProject.MyForms.get_frmMain()
     at PayrollSystem.My.MyApplication.OnCreateMainForm() in \\Acc4-22\hideki programs\PayrollSystem_Program\PayrollSystem\My Project\Application.Designer.vb:line 35
     at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
     at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
     at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
     at PayrollSystem.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81
     at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
     at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
     at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
     at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
     at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
     at System.Threading.ThreadHelper.ThreadStart()
  InnerException: System.Runtime.InteropServices.COMException
     HResult=-2147221164
     Message=Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))
     Source=System.Windows.Forms
     ErrorCode=-2147221164
     StackTrace:
          at System.Windows.Forms.UnsafeNativeMethods.CoCreateInstance(Guid&amp; clsid, Object punkOuter, Int32 context, Guid&amp; 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 PayrollSystem.frmMain.InitializeComponent() in \\Acc4-22\hideki programs\PayrollSystem_Program\PayrollSystem\FrmMain.Designer.vb:line 522
          at PayrollSystem.frmMain..ctor()
     InnerException:
  </code></pre>
  
  <p>Thanks for any help.</p>