1. Use the tlbimp tool run against the AutoCAD type libraries to create your own interop assemblies and reference the generated assemblies from you app.
2. Use assembly re-directs either in the application configuration file or through the .Net Configuration console i.e. always compile against 2006 assemblies and use a re-direct when the app is deployed on a 2007 system.
I'm not sure how this pans out for 2006/2007, but we support 2004 - 2006 using the first method.
Your #1 approach is what I would recommend, but I couldn't figure out how it would work.
Let's say you use tlbimp to generate an interop assembly for 2006 and 2007.
I would assume you would give each a unique namespace. i.e. AutoDesk.AutoCAD.2006 and AutoDesk.AutoCAD.2007
If this were the case, how would you declare an object of a specific type (say AcadApplication) and expect this to compile?
They share no inheritance. How do you do it without writing separate functions for each specific version of AutoCAD?
You only create an interop assembly using the 2006 typelibs - this means you cannot use new API features of 2007, but that's probably not going to be a big issue if you are supporting multiple versions. Like I say, I'm not sure how this pans out for 2006/2007, I'm assuming there have been no major changes to the typelibs. We have taken this approach using an interop assembly created against 2004 and it works for 2005 & 2006.