OK, so I know all about the year-year version changing but only the newest is kept in the Common Files folder, so I reference the Autocad Interops in the ObjectARX2010 folder instead. This works fine. Fine, that is, until I throw SheetSetManager into the mix. No matter what I do, or how I reference the SSM Interop, it tries to use the version 18.2 as specified by the GAC. I reference the acSmComponents18.tlb in the ObjectARX libraries and it still finds 2012's.
Is there anyway to build a 2010 specific project, which includes SSM, when 2012 is installed?
I am just getting ready to make my conversion to 2012, and when I do, I won't need to continue working with my 2010 code, so I won't have this problem. That said, step into the wayback machine to when I switched from 2007 to 2009, and what I had to do was set the Specific Version property to true on all the Autodesk references.
Thanks, Chief, but it makes no difference if I set all references which allow this property to be set (which the SSM one does not) I still get this error at compile time:
Yes, and I do.
<Reference Include="Autodesk.AutoCAD.Interop, Version=18.0.0.0, Culture=neutral, PublicKeyToken=eed84259d7cbf30b, processorArchitecture=MSIL"> <HintPath>c:\ObjectARX 2010\inc-win32\Autodesk.AutoCAD.Interop.dll</HintPath> </Reference> <Reference Include="Autodesk.AutoCAD.Interop.Common, Version=18.0.0.0, Culture=neutral, PublicKeyToken=eed84259d7cbf30b, processorArchitecture=MSIL"> <HintPath>C:\ObjectARX 2010\inc-win32\Autodesk.AutoCAD.Interop.Common.dll</HintPath> </Reference>
I have had problems using the AutoCAD templates where no matter what you do they still reference whatever year they were built for.
I have not tested it but if I remove all Autocad references and reference ACSMCOMPONENTS18LIB first then add the Acmgd,AcDbmgd,Autodesk.AuotCADInterop etc........ last then I can get a build to work.
We are having the same issues trying to support 2010 to 2012 with COM referenced to our app. The only way it seemed to work for us is to reference the 64bit version of the interop and set the Copy Local to True and specific Version to True.
However, this does not work of 32bit on Windows XP but seems to work fine for Vista or Windows 7...I don't know why. In our case, we have to compile 2 versions, one with the 32bit COM for 32bit AutoCAD and another for with the 64bit COM for 64bit AutoCAD to make sure it works for all cases because our app is distributed to unknown users.
Hope this helps.
Gary