I ran the LoadableComponent project (Mentioned here by Kean Walmsley) in my machine successfully After Building with Visual Studio. Whenever I try to run it on another machine (Without Building with Visual Studio) I get this Exception:
System.IO.FileNotFoundException: Problem in loading application
at Autodesk.AutoCAD.Interop.IAcadApplication.GetInterfaceObject(String ProgID)
I did everything Kean said (RegAsm and everything) but nothing works.
My Machine: Windows 7 x64, AutoCAD 2014, Visual Studio 2010
Other Machines: Windows 7 x64, AutoCAD 2014
Things I tried:
Registry Permissions
Files UnBlock - To make sure they are not blocked by any program
Tried on Several Other Machines without Building in Visual Studio
Things I tried and Worked:
Installed Visual Studio on the other Machines, Built the Project, after several trials got it to work
I want to deploy the Application, so I don't want to build the code on other Machines.
Any help would be Appreciated.
Please Help
Solved! Go to Solution.
Solved by Mahmoud.Abdelmoneam. Go to Solution.
Building the Application Inside AutoCAD Folder Solved it.
Could you elaborate on what building the Application Inside AutoCAD Folder means and how to do it?
I am starting out with all of this! I appreciate any help 🙂
As I remember, you set the build location inside the installation folder of Autocad.
Are you referring to the output path located in the build tab of project properties? Also, are you referring to .exe build path or the .dll build path?
Thanks again!
The .dll yes, it needs several referances to build correctly, that's why u need to build into the installation folder.
Hmm, this does not seem to work for me, when I try to build the solution, an error says access to the installation folder is denied!
I don't recommend building your app into any folder belonging to another app. If the app is updated or removed, you will lose part of your project. Also, the reason you have file access issues is that you are trying to write to areas of the C:\ drive that are protected, e.g. Program Filies. Running as Administrator bypasses Windows security. You can follow the steps in this tutorial on how to set up a new project. The tutorial is about creating a VS template, but the template is used to set up a new project. At the end are some tips for debugging the project.
Thanks for your reply. I agree with you completely. However, for this use case nothing else worked for me, and no one replied with a better solution yet.
Looking back at your first post, if ran regasm on your pc, and then you just copy the exe/dll to another pc, wouldn't you need to run regasm on the other pc too?
I've worked on this project a long time ago, if I remember correctly, I think I used the installation itself to do this on users' machines.
Hey,
Even after building in the project in AutoCAD directory, it does not work for me. I guess I didn't follow the step correctly. I think I will resort to utilizing the ActiveX interop object model to get internal data from AutoCAD to my .exe application.
Thank you guys for your help.