Search code examples
visual-studioautocad-plugin

Why are AutoCAD Plugins dependent on particular Visual Studio versions?


Autodesk mentions here that AutoCAD plugins need to be developed with a particular Visual Studio version, e.g.

AutoCAD 2016 (supports Microsoft Visual Studio 2012 and 2013)

AutoCAD 2015 (supports Microsoft Visual Studio 2012)

...

Why is it like that? I understand that you need to use particular .NET Framework versions according to your AutoCAD versions.

But why the IDE? You can set your target framework version for each project. Is it because of compiler / debuger issues?

We are planning to upgrade from AutoCAD 2012 to AutoCAD 2016. So we need a new IDE for our plugins and would prefer the latest Visual Studio version (2015)


Solution

  • This strict VS version is for ObjectARX/C++ only.

    For .NET you just need the proper framework version to develop or, if you already have a DLL, legacy compatibility should work. But there is an exception, see below:

    1. AutoCAD 2007 - 2012: compile your code with AcDbMgd and AcMgd and your code should work on all these versions (except if you use a feature that is not available on the version you're executing)
    2. AutoCAD 2013 - 2017: this 'new cycle' also need reference to AcCoreMgd, therefore you need a separate compiled DLL

    For C++ there is a additional requirement regarding Decorated Names and VS compiles the code using this. Therefore you can adjust the Toolset, but need the specific version installed to compile your code.

    I might say that if you're using ActiveX/COM you have some different concerns: the references are different on 32 and 64 bit and between AutoCAD major versions, so it's easier to use late-binding or compile different DLLs for each version/platform.