Posts: 20
Registered: ‎11-06-2008
Message 1 of 3 (258 Views)

dll doesn't load unless using debug

258 Views, 2 Replies
05-10-2011 07:27 AM



I am using VB.NET 2010 Express, and have created a dll that only appears to load correctly when launching the debugger. When I use netload to load my dll I get an error stating:

"Cannot load assembly. Error details: System.IO.FileLoadException: Could not load file or assembly...

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


The error pops even if I move the dll to the local acad support folder. I have already changed the target framework to ".NET Framework 4" since I am modifying this from a file that loaded correctly in 2011 with 3.5.


Any ideas of what I am doing wrong?



Valued Contributor
Posts: 76
Registered: ‎11-19-2010
Message 2 of 3 (220 Views)

Re: dll doesn't load unless using debug

05-19-2011 08:51 AM in reply to: kemp77
The solution found at http://go.microsoft.com/fwlink/?LinkId=155569 works for me i added the line in the acad.exe.config file. (i did try paste the config file as text here but it didnt like the format...)
New Member
Posts: 2
Registered: ‎05-22-2011
Message 3 of 3 (187 Views)

Re: dll doesn't load unless using debug

05-23-2011 06:12 AM in reply to: kemp77

Probally not any help but I have found that net 3.5 is more reliable than 4.0 in Autocad but Im in environment with various versions of autocad. 2008 to 2011


My first guess would be that you should be in net 3.5 and copy dll to local drive and load from there but you have ruled that out.

I assume you have all your references with copy local = false


?? Something differnt beween your development environment and where your loading dll ??


Hope someone else can help you better.

Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.