.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

COM and .NET -> Files missing, Casting problems

2 REPLIES 2
Reply
Message 1 of 3
drauckman
716 Views, 2 Replies

COM and .NET -> Files missing, Casting problems

I am trying to work through:

 

http://through-the-interface.typepad.com/through_the_interface/2009/05/interfacing-an-external-com-a...

 

I do the following as mentioned in the above post to try get past the casting problem:

 

One thing to mention - I found that the calling application was not able to to cast the returned System.__COMObject to LoadableComponent.INumberAddition unless I updated the project settings to "Register from COM Interop" (near the bottom of the Build tab).

 

As well when I try to build the following error comes up the first time, but not again until I "clean" the project in VS2010:

 

Error 1 Cannot register assembly "C:\Users\User\documents\visual studio 2010\Projects\SimpleBasicTest\SimpleBasicTest\bin\Release\LoadableComponent.dll". Could not load file or assembly 'Acmgd, Version=18.2.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified. LoadableComponent

 

 

When I check the version in the ObjectARX 2012\INC\ folder for acmgd.dll it is18.2.51.0.0

 

Where is this elusive 18.2.0.0 version hiding?  I do not have any references to the managed DLL's in my stand alone project, I only have a reference to the AutoCAD Type Library from the COM tab in the add reference dialog.

 

I am guessing my casting problem is from it not being able to find acmgd and hence not registering the assembly for COM interop? Ok fine but how do I shove Visual Studio's face into this DLL?  I tried adding it to the project, adding to the folders where the build is, adding it as a reference, basically anything I could think of.  And why is it insisting on a version that does not even exist?

2 REPLIES 2
Message 2 of 3
hgasty1001
in reply to: drauckman

Hi,

 

Did you set the output directory to the one where the acmgd.dll is? It seems that it's a necesary step in order to resolve de dependency on acmgd.cll. This is almost a copy from a comment in the Kean's Blog.

 

Gaston Nunez

Message 3 of 3
drauckman
in reply to: drauckman

When I set the output directory to the AutoCAD folder I get:

 

Error 1 The assembly "C:\Program Files\Autodesk\Acade 2012\LoadableComponent.dll" could not be converted to a type library. Type library exporter encountered an error while processing 'LoadableComponent.Commands, LoadableComponent'. Error: Element not found. LoadableComponent
 

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost