TheSwamp

Code Red => .NET => Topic started by: Bill Tillman on June 23, 2014, 04:03:03 PM

Title: Why So Many Copies of the AutoCAD References in VS 2013 Express
Post by: Bill Tillman on June 23, 2014, 04:03:03 PM
I'm working with C#.NET and VB.NET apps in VS 2013 Express. I notice when I go to add a reference for AutoCAD in the Solution Explorer that there are no less than 12 entries in the list for AutoCAD 2013 Type Library. Same for AutoCAD/ObjectDBX Common 19.0 Type Library. Is this really necessary or what if anything is out of place with this?
Title: Re: Why So Many Copies of the AutoCAD References in VS 2013 Express
Post by: n.yuan on June 24, 2014, 01:46:32 PM
I think it is just a bug in Visual Studio, which has been there for quite a few VS version, at least with VS2010 that I currently still use along with VS2012/2013.

You can select any one of the repeated item as the reference. Then, if you open the References dialog box again, you would see all the repeated same items are flagged as referenced.

Note, when you use AutoCAD COM API, you do not have to go to reference dialog box's COM tab, if you have downloaded ObjectARX SDK. You can browse to ObjectARX SDK folder and set reference to the COM interop assemblies coming with the SDK.

Also note, older AutoCAD (at least up to Acad2012), the COM Interop assemblies are installed into GAC when AutoCAD is installed, So, in your project, the "Copy Local" to the interop assemblies should be set to "False". Since Acad2013 (or 2014? my memory is vague on this, because I rarely use COM API these days), AutoCAD stops installing COM Interop assemblies into GAC. in this case, you need to make sure the COM interop assemblies go with your add-in assemblies together.
Title: Re: Why So Many Copies of the AutoCAD References in VS 2013 Express
Post by: mohnston on June 26, 2014, 10:28:18 AM
If you hold your cursor over each one you will see that they are referencing different languages. I usually select the one that ends with "enu". (English)