Hot Fixes

Online Help  





The Current CS-Script Release

C# Script execution engine. Version 3.8.2 Copyright (C) 2004-2013 Oleg Shilo

Attention Windows 7/ Windows 8/ Windows Server 2008  users because of the OS security features the downloaded assemblies may become locked. The solution to the problem is described here.

Download CS-Script Suite (binaries, documentation, samples)        

 Download source

 Release History

Some of the previous CS-Script versions can be found in Release History.

This is an accumulative of all major fixes and minor features since the release v3.4.0.

See What is new? for details.

View readme.txt for the installation/upgrade details.

    Changes since the last release

    • Added setting additional includes from precompilers
          static public bool Compile(ref string content, string scriptFile, bool IsPrimaryScript, Hashtable context)
              if (!IsPrimaryScript)
                  return false;

              var newIncludes = (List<string>)context["NewIncludes"];

              newIncludes.Add(Path.Combine(Path.GetDirectoryName(scriptFile), "Utils.cs"));
    • Added probing for additional includes from precompilers and precompilers itself
          static public bool Compile(ref string content, string scriptFile, bool IsPrimaryScript, Hashtable context)
              newIncludes.Add("Utils.cs"); //now it doesn't have to be an absolute path
    • Extended support for AutoClasses to handle lower-case 'main' entry points.As well as different signatures
       //css_args /ac
      using System;

      void main()

      Other acceptable signatures:
      int main()
      int main(string[] args)
      void main(string[] args) 
    • AutoClasses auto-generated content is made read-only 
    • Added retry and extra synch mechanism for generating AttributeInjectionCode
    • Fixed problem with potential assembly double-referencing of the assembliy from the different locations (*.dll vs. *.DLL)
    • AlignToInterface now flattens the inheritance hierarchy
    • Improved thread-safety of all CSScript.Load/Compile calls. 
    • Added compiling/loading script code to strongly typed delegate LoadDelegate<T>
       var Add = CSScript.LoadDelegate<Func<intintint>>(@"int Add(int a, int b) { return a + b; }"); //you can also use similar CSScript.Evaluator.LoadDelegate  
       int result = Add(5,6);

      Copyright (C) 2004-2014 Oleg Shilo