.COM refernces added but, can find originating .dlls

cyboman

New member
Joined
Jul 23, 2010
Messages
2
Programming Experience
Beginner
Hello,

I am having difficulty with versioning of a .COM reference I have in an application I made. The application is for a CAD software and I am finding that as new releases of the CAD package come out the reference .dll's for my project can become "obsolete" and the application no longer functions. The mystery to me is that when I build the application it creates a .dll in the folder with the .exe. I assumed this was copying it from the Program Files location for the CAD app but, found that there is no .dll with the same name on my system (other then the one created when I add the .COM reference in the project bin folder). There are similarly named ones but not identical and I don't know if they are actually the same?

My question is this: Does .Net change the name of a .COM reference .dll when it is imported? if so, can I find out what the original name is or where it got it from?

I researched a bit an found that you can find the most recent version through binding in the code which would eliminate the "version" issues I am experiencing. I would like to set the Copy Local to false and have the application find the reference on the executing PC so I don't have to deal with rebuilding everytime we change releases or apply service packs.

I am very new to programming so maybe I am just missing something simple? Any help would be greatly appreciated.

Thank You,

Cornell
 
.Net applications need a interop file when consuming the COM library, this is probably what your app generates. This interop library need to be compatible with all versions of the actual COM library to work, but as I see it it should then work. This article explains similar scenario regarding Excel interop, where newer versions have additional functionality the older is usually unchanged: DevCity.NET :: Achieving Backward Compatibility with .NET Interop: Excel as Case Study
 
John,

Thank you for the information. I am anxious to try this out and see if it takes care of my problems. I will give it a try and post back my results.

C-
 
Back
Top