I’m using CS-Script (link: http://www.csscript.net/) to compile a script file. According to their documentation, I’m doing it right.
new AsmHelper(CSScript.Compile("test.cs"), null, true);
However at runtime, I get:
Could not load file or assembly
or one of its dependencies. Operation
is not supported. (Exception from
I’m somehow suspecting .NET 4.0 or some obscure manifest, but I did add the CSScriptLibrary.dll in the .NET 4.0 directory of cs-script/Lib/Bin.
Make sure you add it as a reference in your C# project.
See here for info on how to do it: http://msdn.microsoft.com/en-us/library/7314433t(VS.80).aspx
If that doesn’t work, try this: Link