dll doesn't load unless using debug

dll doesn't load unless using debug

Anonymous
Not applicable
819 Views
2 Replies
Message 1 of 3

dll doesn't load unless using debug

Anonymous
Not applicable

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 

0 Likes
820 Views
2 Replies
Replies (2)
Message 2 of 3

StormyC
Advocate
Advocate
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

Anonymous
Not applicable

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.

0 Likes