Referencing dll files - my AutoCAD plugin only works on my computer

1.2k Views Asked by At

I have created an AutoCAD plugin, but encounter problems when using the plugin on certain machines. It works fine on my machine.

One thing that I have noticed is that if I change the output path of the build to a different directory I get problems stating that certain namespaces cannot be found.

The following shows the build output folder with the dll files in, the build is successful.

https://i.stack.imgur.com/px9w4.jpg

However, if i build to an empty folder (even with dll files referenced) i get the following errors and warnings...

https://i.stack.imgur.com/IbM0U.jpg

This plugin needs to be able to be used by other users, i think im not referencing dll files properly or something as the program only runs successfully on my computer (and all computers that i have opened the solution in visual studio and built to the export folder). Copying all the files shown in the folder above to the same path on another users computer doesn't work, other users get an error stating 'Could not load fil or assembly "c:/info3d/info3dreloaded.dll" or one of its dependencies. Operation not supported. Exception from HRESULT: 0x80131515)'

Thanks in advance for any help!

Chris

2

There are 2 best solutions below

1
On

Right click on the reference and click on properties and set the "copy local" property to true

enter image description here

0
On

For AutoCAD DLLs set the Copy Local to false. AutoCAD provides those via its runtime.

"Once a AutoCAD .NET API DLL is referenced, you must set the Copy Local property of the referenced DLL to False." from http://knowledge.autodesk.com/search-result/caas/CloudHelp/cloudhelp/2015/ENU/AutoCAD-NET/files/GUID-8657D153-0120-4881-A3C8-E00ED139E0D3-htm.html