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

dll doesn't load unless using debug

2 REPLIES 2
Reply
Message 1 of 3
kemp77
524 Views, 2 Replies

dll doesn't load unless using debug

Hi,

 

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?

 

Thanks 

2 REPLIES 2
Message 2 of 3
StormyC
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...)
Message 3 of 3
TimNell
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.

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