Valued Contributor
69 Posts
1 Kudo
Registered: ‎07-25-2012
Post 1 of 5

Build VB.NET program on 2009 then run on 2013

799 Views, 4 Replies
07-25-2012 02:20 PM

I have a computer I'm using for development of a VB.NET project which is heavily interfaced with AutoCAD. This computer is running AutoCAD 2009. This program will very soon need to be run on a computer which is running AutoCAD 2013. Will the be any issues with this or will I need to install my VB 2010 Express on the 2013 machine and build the program again using the COM references to AC 2013 in lieu of 2009?

ADN Support Specialist
256 Posts
32 Kudos
Registered: ‎08-25-2004
Post 2 of 5

Re: Build VB.NET program on 2009 then run on 2013

07-25-2012 04:10 PM in reply to: btillman



Here is an old article from our knowledge base on this:


>> >>

How to keep .NET COM Interop DLL compatible between a series of AutoCAD versions?


I have developed several applications that take advantage of the COM API from VB.NET to access named selection sets for AutoCAD 2008. And they worked just fine for my users until I installed AutoCAD 2009 on my development machine. Then when I recompiled those applications that referenced the COM object, the programs are now looking for a 2009 reference, which my clients do not have.


How do I build applications for a 2008 environment after I install 2009? I thought they were binary compatible?



The COM Interop DLL is registered via the registry using the Public Key Token eed84259d7cbf30b and the specific version of this Interop DLL will relate to the newest version of AutoCAD that you have installed. For AutoCAD 2009 it is, for AutoCAD 2008 it is 

 If you reference the COM Interop DLL's then this Public Key Token is referred to and the specific version is imported, there is nothing you can do to specify the version at this point other than to modify the registry by hand, which we don't advise.


As you have found, compiling against the version gives problems on a raw 2008 system.

Now, it appears that the system only contains the version but actually if you take a look in the Windows\Assembly folder you will see that we install all the versions of the Interop DLL's, it’s just that the main COM entry in the registry only refers to the newest.


The last thing to know is that those COM Interop DLL's are merely .NET assemblies…

To compile your COM Interop DLL against a specific version (preferably the lowest of the series (say 2007)), Add A Reference, go to the specific ObjectARX/inc of the version you want, pick both Interop DLL's and you are then done. In other words, don't include them via the Add Reference->COM tab.

<< <<



Wayne Brill
Developer Technical Services
Autodesk Developer Network

Valued Contributor
69 Posts
1 Kudo
Registered: ‎07-25-2012
Post 3 of 5

Re: Build VB.NET program on 2009 then run on 2013

07-27-2012 05:51 AM in reply to: wayne.brill



Thanks very much for your reply. I'm not sure I fully grasp this. So let me explain what I do understand and let's see if it's what you're suggesting.


On the machine at my desk which is running 2009, I build my program and I have added the COM references:

    AutoCAD 2009 Type Library

    AutoCAD/ObjectDBX Common 17.0 Type Library


I can build and run this application on this machine just fine. So when I compile it, I should be able to take the .exe file, copy it to the network drives, which I can then access from the other machine running 2013. Then on the computer with 2013 I should be able to successfully run the program?



Valued Contributor
69 Posts
1 Kudo
Registered: ‎07-25-2012
Post 4 of 5

Re: Build VB.NET program on 2009 then run on 2013

07-27-2012 06:20 AM in reply to: btillman

I have been moved over to the ACAD 2013 machine for expediency. So on that machine I installed VB 2010 Express and started from the beginning again. So as I start writing, or copying and pasting the same code which worked fine on my other desktop running AutoCAD 2009, I added these references:


AutoCAD 2013 Type Library

AutoCAD/ObjectDBX Common 19.0 Type Library


The trouble is that now I cannot add the namespace lines:



Imports Autodesk.AutoCAD.Interop.AcadDocumentClass
Imports Autodesk.AutoCAD.Interop.Common


They are not available and of course the code I wrote yesterday on the 2009 system which worked so well is useless without these. I'm still very new to a lot of this so some kindly advice would be appreciated.


Valued Contributor
69 Posts
1 Kudo
Registered: ‎07-25-2012
Post 5 of 5

Re: Build VB.NET program on 2009 then run on 2013

07-27-2012 07:19 AM in reply to: btillman

Okay, I seem to have found it. The syntax for the namespaces has changed substantially. I wonder if the folks who do the development from one release to the next had to do my job. They may stop making so many changes to the syntax. This is like trying to hit a moving target.

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Are you interested in helping shape the future of the Autodesk Community? To participate in this brief usability study, please click here. Your time and input is greatly appreciated!