.NET

Reply
Member
staz004
Posts: 5
Registered: ‎01-06-2014
Message 1 of 7 (309 Views)

How to lOAD DLL files on another PC !

309 Views, 6 Replies
01-06-2014 01:05 AM

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?

 

Member
michiel_robben
Posts: 4
Registered: ‎04-07-2010
Message 2 of 7 (284 Views)

Re: How to lOAD DLL files on another PC !

01-06-2014 05:42 AM 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..

 

*Expert Elite*
dgorsman
Posts: 5,698
Registered: ‎10-12-2006
Message 3 of 7 (272 Views)

Re: How to lOAD DLL files on another PC !

01-06-2014 07:20 AM 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.
Adopt. Adapt. Overcome. Or be overcome.
A good question will be halfway to a good answer.


*Expert Elite*
Alfred.NESWADBA
Posts: 9,583
Registered: ‎06-29-2007
Message 4 of 7 (264 Views)

Re: How to lOAD DLL files on another PC !

01-06-2014 08:16 AM 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
-------------------------------------------------------------------------
Member
staz004
Posts: 5
Registered: ‎01-06-2014
Message 5 of 7 (252 Views)

Re: How to lOAD DLL files on another PC !

01-06-2014 05:02 PM 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()

 

*Expert Elite*
Alfred.NESWADBA
Posts: 9,583
Registered: ‎06-29-2007
Message 6 of 7 (240 Views)

Re: How to lOAD DLL files on another PC !

01-06-2014 11:42 PM 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
-------------------------------------------------------------------------
Member
staz004
Posts: 5
Registered: ‎01-06-2014
Message 7 of 7 (232 Views)

Re: How to lOAD DLL files on another PC !

01-07-2014 12:25 AM in reply to: Alfred.NESWADBA

thank you so much !

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.