Home > ActiveX Control, COM > Error: Failed to create component ‘AxHost’

Error: Failed to create component ‘AxHost’

When adding an ActiveX control onto a Visual Studio 2008 or 2010 Form, you get an error message stating Failed to create component ‘AxHost’, followed by some other text. This is caused any existing AxInterop.????.dll and Interop.?????.dll file that may already existing in the Project\obj\Debug folder. This is not to be confused with the Project\bin\Debug directory.

To correct, remove any Project level reference, then delete the 2 dll files. Then you can add the ActiveX control to the Form without any error.

Advertisements
Categories: ActiveX Control, COM
  1. kztd
    April 12, 2012 at 8:05 pm

    It worked great, I had to (also) use the control in a new project, then copy those .dll’s in, create a new form with the control on it, and then copy over my code from the old form and delete the old form. That was alot easier that recreating the whole solution.

    Thanks

  2. December 2, 2013 at 3:33 am

    Thanks bro!
    This was a time saver.
    It really made me cry…

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: