AutoCAD Plugins with C# setup
The plugin will be a DLL. You will need to add the DLLs which are required to run C# as a plugin inside AutoCAD. You need to add references for this, as shown below:
You will have to add these three DLL files from within the AutoCAD directory:
This system is only for plugins and will not work if you are trying to build an standalone exe which communicates with AutoCAD.
You may see this if you are starting with an existing project:
You may also have to set all configurations to X64 to avoid an error like this:
Warning: There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "acdbmgd", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.
I've found that setting everything to X64 works...
When you compile the program note the name and position and then use the NETLOAD command from within AutoCAD. Note that there is no NETUNLOAD command.