Crash using 2010 drawing control in Visual Studio 2012

Started by brian123, August 24, 2012, 12:33:39 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

brian123

Trying to create a winforms app in Visual Studio 2012 using the Microsoft Office Visio 14.0 Drawing Control. Once I drag/drop the control onto a winform, I get a crash:
Failed to create component 'AxHost'. System.Runtime.InteropServices.COMException (0x80004005): Error HRESULT E_FAIL has been returned from a call to a COM component.

Has anyone else seen this, and is there a known workaround?

aledlund

Just off the top of my head, I'd start with Project => properties => Advanced => Compile => and your target is set for AnyCpu... Set the target to match the version of Visio that you have installed.

al

brian123

Thanks Al. The new project is set to AnyCPU by default... I also tried .NET version back to 2.0.

Looks like it's broken, not sure if it's a Visual Studio bug or a Visio bug.

aledlund


brian123

That doesn't work either, I've tried all of those simple project settings, net runtimes, etc. I'd be interested in hearing if anyone has gotten this to work.... Anyone?