To build an Autocad application I use C# 4.0.
My application has two module one for 2005 and another for 2010 autocad. it uses special dll's of autocad ,but face some difficulty of finishing it up .All should be universal for 2005 and 2010 autocad since dll's has the same name it was impossible for the app to differ autocad versions.it create problem for autocad interop dll's in reference.help me to use different dll for different module.
Note:In individual project they work perfectly.
need help to use same name dll in one application .
If have any query please ask ,Thanks in advanced.
I've a similar application, it works for autocad from 2006 to 2013 (both x86 and x64) and for bricscad v12-v13.
To solve it I did a visual studio project for each architecture, each of those projects refers different .dll depending on autocad version. In particular each of those projects refers AcDbMgd.dll, AcMgd.dll, Autodesk.AutoCAD.Interop and Autodesk.AutoCAD.Interop.Common
, those dll are specific for each autocad architecture.
You have to pay attention that all of the referenced dll are in copy local FALSE!
In my case all the projects are compiled in different folders but it's not obligatory if you assign a different assembly name for each project.
Thanks to the fact that AutoCAD API are the same from 2006 to 2012 (2013 has some differences), the source code is separated from those projects, each project include it as a linked source file (go to the project in the solution explorer -> right click -> add existing item -> select the source file and press "add as link"). In this way you have the same source code for all the projects but they are compiled including different autocad dlls.
In my case there were also some troubles because BricsCAD has sometimes different API with respect to AutoCAD. To solve this few cases I've set a conditional compilation symbol and used it like so:
#if BricsCad
CADAPI.ApplicationServices.Application.SystemVariableChanged += new CADAPI.ApplicationServices.SystemVariableChangedEventHandler(Application_SystemVariableChanged);
#else
CADDB.LayoutManager.Current.LayoutSwitched += new CADDB.LayoutEventHandler(Current_LayoutSwitched);
#endif
Tell me if you need further information. BTW I think your main problem is the copy local = true for autocad Dlls.