I am creating an application for AutoCAD 2012 using Visual Studio in C#.
My work so far includes new commands, graphical tools and additions to the ribbon with PNGs to use as Ribbon icons included as Properties.Resources. I have references to AdWindows, PresentationCore, PresentationFramework, and more.
If I want to roll out my application to another machine, what do I need to include? For my testing purposes I've been able to debug from Visual Studio to create my DLL and then NETLOAD that in.
The machines I'm deploying to do not have any special setup - they don't have ObjectARX installed, they (as far as I know) don't have any special DLLs.
Loading my one DLL on another machine didn't work (duh) but I'm not sure if I should include acdbmgd, acmgd, if they should be in the same path, how to configure that, etc.
Ideally, once I know where everything is to go, I will provide a batch script or Inno Setup to make it easy for a user to install the application component.
Solved! Go to Solution.
Solved by dgorsman. Go to Solution.
You shouldn't need to include anything other then the DLL. First check your target Framework, found under project properties>Compile>Advanced Compile Options. 2012 wants 3.5? I think the Visual Studio install adds extra framework packages which allow things to run on your comp that wont on others. And you dont need to install it, I personally prefer to netload through the Acad.lsp.
I'm using Visual Studio Express 2010, whose menus aren't quite the same as regular VS2010... but I have it set with Target Framework of 4.0, which I'm pretty sure it what AutoCAD 2012 wants (and it works on my machine with 2012).
If I build, and grab my DLL (Status.dll) and have another machine NETLOAD it, instead of running, a bunch of garbage appears in the editor.
Within the project, I reference other DLLs like acdbmgd, acmgd, and AdWindows... should these be set up differently? Relative location vs. local? Maybe my DLL isn't including their functionality when it is created and expects these to be present on the new machines?
Some of that "garbage" may also help with the diagnosis.
Hey, you were both right!
The problem was that I was loading from a network location instead of the local hard drive. Placing the DLL locally made it run.
Furthermore, I should have read through that "garbage" because it included that exact diagnosis.
System.NotSupportedException: An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework. This release of the .NET Framework does not enable CAS policy by default, so this load may be dangerous. If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch. See http://go.microsoft.com/fwlink/?LinkId=155569 for more information.
Anyway, thanks for that help. I still haven't tackled setting up an installer but with all the links provided here I'm sure I can figure it out. I also need to learn how to sign the DLL, but that's a different story.
"How we think determines what we do, and what we do determines what we get."
Can't find what you're looking for? Ask the community or share your knowledge.