Friday, November 17, 2006

Copy Local, or not?


When creating installers that deploy to AutoCAD, one little question almost always comes up. Do these files need to be deployed? Will there be problems during deployment if the files are included?

To answer these questions, let's look into what copy local does with a little more detailed. According to Microsoft (via), Copy Local is:

The Copy Local property (corresponding to CopyLocal) determines whether a reference is copied to the local bin path. At run time, a reference must exist in either the Global Assembly Cache (GAC) or the output path of the project. If this property is set to true, the reference is copied to the output path of the project at run time.


So what does this mean to us developing in the AutoCAD world? Since our applications are loaded into AutoCAD's AppDomain, the required DLLs are already loaded. Setting copy local equal to true, will cause AutoCAD to try and reload the acmgd.dll and acdbmgd.dll. This could cause your command not to work.

So, the answer is, Copy Local needs to be FALSE!

No comments: