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

How to lOAD DLL files on another PC !

8 REPLIES 8
Reply
Message 1 of 9
staz004
788 Views, 8 Replies

How to lOAD DLL files on another PC !

I have a project in my PC, and build it to file ".dll". It is working fine in my machine with "netload" command (to load it).

But in another PC "Netload" command can not load it .

How i can load Dll file on other PC?

 

8 REPLIES 8
Message 2 of 9
michiel_robben
in reply to: staz004

sometimes networkadministrators block .dll, exe etc from network.

Ill had the sameproblem and even load from the local disk doesnt work.

When i save it to a usb-drive, it works fine..

 

Message 3 of 9
dgorsman
in reply to: staz004

Did you build using the SDK, or using an AutoCAD install?  And have you compared the load security settings on the two computers?

----------------------------------
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 4 of 9
Alfred.NESWADBA
in reply to: staz004

Hi,

 

>> But in another PC "Netload" command can not load it .

Let's start with the most important thing: what did the command line report when you tried to _NETLOAD your dll? (press <F2> after the command if you don't see enough lines).

 

Another question is "what is different between those two workstations"? AutoCAD version & -service pack, operating system, 32bit/64bit, admin-rights, ...

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)
Message 5 of 9
staz004
in reply to: staz004

I reference  the acdbmgd.dll & acmgd.dll &accoremgd.dll &intercop in "\...Autocad2014" (folder install Autocad),

Build file DLL can use in another pc which the same version autocad 2014?

Report Error :

Command: NETLOAD
Cannot load assembly. Error details: System.IO.FileLoadException: Could not load file or assembly 'file://\\vs2012\ClassLibrary1\ClassLibrary1\bin\Debug\ClassLibrary1.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
File name: 'file://\\VS2012\ClassLibrary1\ClassLibrary1\bin\Debug\ClassLibrary1.dll' ---> 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.
at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark)
at System.Reflection.Assembly.LoadFrom(String assemblyFile)
at Autodesk.AutoCAD.Runtime.ExtensionLoader.Load(String fileName)
at loadmgd()

 

Message 6 of 9
Alfred.NESWADBA
in reply to: staz004

Hi,

 

try to add this line:

   <loadFromRemoteSources enabled="true"/>

to the runtime-section from the acad.exe.config file like shown >>>here<<<.

 

I don't know why, but it seems like the NETLOAD thinks you are loading the dll from a network.

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)
Message 7 of 9
staz004
in reply to: Alfred.NESWADBA

thank you so much !

Message 8 of 9

Help me pls,how to add this line to config??

Message 9 of 9
_gile
in reply to: staz004

Hi,

Perhaps you need to 'unblock' the DLL.



Gilles Chanteau
Programmation AutoCAD LISP/.NET
GileCAD
GitHub

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