PingPhotonics
asked on
C#.NET - Adding my ActiveX control to my Form throws an Exception
See the screenshot of the exception produced when I try and drag and drop my newly created and registered ActiveX control
My ActiveX control was originally written using Visual Studio 2003 for Windows XP (32-bit)
I used Visual Studio 2008 and recompiled it for 64-bit Windows. I set the platform to x64.
It compiled OK with no errors I then registered it OK from the command line (had to "Run as Administrator") using regsvr32.
I then added my ActiveX (*.ocx) control to by ToolBox. When I dragged my control onto my Windows form I got the attached error (see the screenshot). The error starts off;
Failed to create component 'AxHost'. The error message follows: 'System .BadImageFormatException: A wrapper assembly is not registered for this type library. at System.Windows.Forms.Desig n.Document Designer.. ..
Any ideas whats happening here. Anyone had a similar problem that they managed to fix?
Thanks
activeX-error.png
My ActiveX control was originally written using Visual Studio 2003 for Windows XP (32-bit)
I used Visual Studio 2008 and recompiled it for 64-bit Windows. I set the platform to x64.
It compiled OK with no errors I then registered it OK from the command line (had to "Run as Administrator") using regsvr32.
I then added my ActiveX (*.ocx) control to by ToolBox. When I dragged my control onto my Windows form I got the attached error (see the screenshot). The error starts off;
Failed to create component 'AxHost'. The error message follows: 'System .BadImageFormatException: A wrapper assembly is not registered for this type library. at System.Windows.Forms.Desig
Any ideas whats happening here. Anyone had a similar problem that they managed to fix?
Thanks
activeX-error.png
ASKER
Hi John
Yes I have no problem rebuilding my ActiveX
Yes I have no problem rebuilding my ActiveX
Does problem persist after rebuilding?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Are you able to rebuild your ActiveX?