Search code examples
c#.netdllmaxscript

Error when using .Net DLL published


I create a few dll in .net to be used in maxscript program.

(maxscript is a script language to 3ds max program, that allow you use .net dlls).

Here is the deal: when I compiled all my files (as debug or release) in visual studio and use the files in my maxscript code everything works fine.

But if I copy these files and use in other machine (with .net installed and visual studio) when I try to load the assembly these error always come up:

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.

I can't understand what is happening and I can't get more information about this error, cause maxscript don't allow me to see the full exception only the message.

Anyone can guide me to some direction or explain why this is happening?


Solution

  • If you're .dlls have been copied to the other machine, then I'm guessing you passed those files to the other machine w/ a web service like DropBox or something similar. When you do that, Windows attaches a alternate stream to those files to indicate that they came from the wild. You have to right-click on the file and unblock the file.