Ecxeption adding control

Forum for reporting problems
Post Reply
Mosir Poranki
Posts: 0
Joined: Thu Aug 22, 2019 10:32 pm

Ecxeption adding control

Post by Mosir Poranki »

Hello gents

I am using visual studio 2013 on Windows 10. I am trying this:
- Create new project
- C#
- Windows Forms Application
- Open project properties, go to Build tab
- Changed Platform target to x64
- Tried to add the control to the form
I get this error message and nothing appears in the form:

---------------------------
Microsoft Visual Studio
---------------------------
Failed to create component 'AxHost'. The error message follows:

'System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.

at System.Windows.Forms.Design.DocumentDesigner.AxToolboxItem.CreateComponentsCore(IDesignerHost host)

at System.Drawing.Design.ToolboxItem.CreateComponentsCore(IDesignerHost host, IDictionary defaultValues)

at System.Drawing.Design.ToolboxItem.CreateComponents(IDesignerHost host, IDictionary defaultValues)

at System.Windows.Forms.Design.OleDragDropHandler.CreateTool(ToolboxItem tool, Control parent, Int32 x, Int32 y, Int32 width, Int32 height, Boolean hasLocation, Boolean hasSize, ToolboxSnapDragDropEventArgs e)'
---------------------------
OK
---------------------------

I have 64bit v6.0 update 4989 installed

Would you have any suggestions for me?
Thank you

Prashant Kande
Posts: 121
Joined: Mon Apr 04, 2016 4:55 am

Re: Ecxeption adding control

Post by Prashant Kande »

Hello Mosir
There are two things:
1. Control has to be inserted before changing target platform. This is because Visual Studio itself a 32 bit app
2. Change the target platform to x64 in configuration manager instead of going to the Build properties. Build properties will be set automatically
It should work this way

Regards

Mosir Poranki
Posts: 0
Joined: Thu Aug 22, 2019 10:32 pm

Re: Ecxeption adding control

Post by Mosir Poranki »

Nice. Thank you

Post Reply