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

AutoCad 2015 DLL won't load without <loadFromRemoteSources enabled="true"/>

7 REPLIES 7
SOLVED
Reply
Message 1 of 8
dennis
3278 Views, 7 Replies

AutoCad 2015 DLL won't load without <loadFromRemoteSources enabled="true"/>

In the acad.exe.config file, I had to add the line in the runtime section:

<loadFromRemoteSources enabled="true"/>

 

Is there a way to avoid this?  It loads fine without the addition on my laptop that I developed the DLL, but on our training PCs it will not load without the added line.

7 REPLIES 7
Message 2 of 8
BlackBox_
in reply to: dennis


@DENNIS wrote:

In the acad.exe.config file, I had to add the line in the runtime section:

<loadFromRemoteSources enabled="true"/>

 

Is there a way to avoid this?  It loads fine without the addition on my laptop that I developed the DLL, but on our training PCs it will not load without the added line.


More information is needed.

 

On your training PC, where is the assembly being loaded from (i.e., local disk, or network)? 

 

Are you using Autoloader, your own registry loader, or manual/LISP call to NETLOAD Command?



"How we think determines what we do, and what we do determines what we get."

Message 3 of 8
dennis
in reply to: BlackBox_

Right at this time, I am trying to load the DLL manually via the NETLOAD command.  I have placed the DLL first in the folder "C:\Program FIles\Autodesk\AutoCAD 2015\PLNT".  Then tried a network drive and made the folder there Trusted.  Then I tried the local C:drive.  Each time I got the same message that it could not be loaded, and the message then refered me to the Microsoft help to add the <loadFromRemoteSources enabled= to be added in the runtime section of the acad.exe.config.

Eventually I would like to Autoloader it, but I need to resolve this first.  

Message 4 of 8
hgasty1001
in reply to: dennis

Hi,

 

The MS documentation says that "In Framework 4.5 assemblies on local network shares are run as full trust by default; you do not have to enable the <loadFromRemoteSources> element". So it's not a normal behavior, did you target Framework 4.5 in your project setup?

 

Gaston Nunez

 

 

Message 5 of 8
dennis
in reply to: hgasty1001

Yes.  Right-click the project name, pick Properties.  It shows Target Framework = .NET Framework 4.5.  Application type = WPF Class Library.  Could the Application Type be wrong?

An update too: when I move the DLL out of the x64/debug folder, it would not load on my laptop used for development either without the  <loadFromRemoteSources enabled=

Smiley Mad

Message 6 of 8
augusto.goncalves
in reply to: dennis

If you have a .NET DLL on a remote location, for instance, a network path, then you need to add this loadFromRemoteSources attribute.

 

If is local, then no need.

 

As you plan to actually deploy on the machine, just use the Apploader mechanism, much better. You might need a second DLL that will check the server for a newer version, but that will need custom implementation.

Regards,



Augusto Goncalves
Twitter @augustomaia
Autodesk Developer Network
Message 7 of 8


@augusto.goncalves wrote:

If you have a .NET DLL on a remote location, for instance, a network path, then you need to add this loadFromRemoteSources attribute.

 

If is local, then no need.

 

As you plan to actually deploy on the machine, just use the Apploader mechanism, much better. You might need a second DLL that will check the server for a newer version, but that will need custom implementation.


Augusto,

 

The OP is using AutoCAD 2015 (.NET Framework 4.5), thus LoadFromRemoteSources XmlAttribute *should not* be needed as Gasty points out above... If the OP's assembly is not being NETLOADed properly from network location, there's another issue at play.

 

Also, unless I've missed an ADN email, I believe you meant "Autoloader Mechanism" and not "Apploader Mechanism."

 

Cheers



"How we think determines what we do, and what we do determines what we get."

Message 8 of 8

Thanks for the additional comments...

 

Yes, Autoloader mechanism (using .bundle folder and PackageContents.xml)

Regards,



Augusto Goncalves
Twitter @augustomaia
Autodesk Developer Network

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