views:

19

answers:

1

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?

A: 

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: http://blogs.msdn.com/b/brada/archive/2009/12/11/visual-studio-project-sample-loading-error-assembly-could-not-be-loaded-and-will-be-ignored-could-not-load-file-or-assembly-or-one-of-its-dependencies-operation-is-not-supported-exception-from-hresult-0x80131515.aspx

Drackir
You sir, are me hero. :)
Lazlo
For future reference, which one worked?
Drackir