.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

What files are needed to deploy my .NET application to other machines?

7 REPLIES 7
SOLVED
Reply
Message 1 of 8
ohioDeveloper
997 Views, 7 Replies

What files are needed to deploy my .NET application to other machines?

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.

7 REPLIES 7
Message 2 of 8

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.

Message 4 of 8

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?

Message 5 of 8
mzakiralam
in reply to: ohioDeveloper

Then check acad.exe.config file of that AutoCAD. Sometimes it can happen that something in config file is commented out and therefore creates problem. Please share your acad.exe.config file of that . Please also make sure that you are trying to load the DLL from local disk like C drive
Message 6 of 8
dgorsman
in reply to: mzakiralam

Some of that "garbage" may also help with the diagnosis.

----------------------------------
If you are going to fly by the seat of your pants, expect friction burns.
"I don't know" is the beginning of knowledge, not the end.


Message 7 of 8

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.

Message 8 of 8
BlackBox_
in reply to: ohioDeveloper

FWIW - to NETLOAD an assembly in 2012 (or 2011, 2010 for that matter), you need to enable the LoadFromRemoteSources XmlAttribute within Acad.exe.config (after making a backup copy, of course).

Kean has a good article on this you should be able to find via Google.

I've done this for all of our user machines so that I can mitigate all local install assemblies, and instead place a single one on the network each NETLOADs from. Autoloader .bundles are the only internal customizations I've had to deploy to each machine.

Cheers


"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.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost