c# – CS-Script “Could not load file or assembly” – Education Career Blog

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
‘file:///C:\Users…\CSScriptLibrary.dll’
or one of its dependencies. Operation
is not supported. (Exception from
HRESULT: 0x80131515)

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.

Any suggestion?

,

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

-Edit-
If that doesn’t work, try this: Link

Leave a Comment