Skip to content

Release v3.20.0

Compare
Choose a tag to compare
@oleg-shilo oleg-shilo released this 09 Jan 00:40
· 931 commits to master since this release

Use choco install cs-script to deploy the release (instructions on how to use/enable choco).
If you prefer manual install then avoid using WinZip or WinRar as they lead to locking the downloaded content. Use 7zip instead.

Extension Pack contains some additional content representing somewhat less mainstream functionality and experimental features. For installing it extract cs-script.ExtensionPack.7z archive to your install location (e.g. C:\ProgramData\chocolatey\lib\cs-script\tools\cs-script).


  • Fixed problem with Console.OutputEncoding not being set correctly for script surrogate host (e.g. //css_host /platform:x86)
  • Added default option to resolve in the compile errors text the all references to the derived auto-generated files (e.g. errors in the decorated classless scripts) with the path of the original files (e.g. classless script itself).
  • Improved help documentation
  • Added .NET ver printout for -ver
  • Added injection of dbg.print object dumper to the console scripts (see details in the next section).
  • Mono evaluator migrated to Mono.CSharp.dll v4.6.57.0
  • Conditionally disabled Linux incompatible routines
  • Improved handling -proj switch by incorporating -l evaluation
  • Improved handling invalid "-help [cmd]" CLI commands
  • Issue#24. Implemented single step conversion of *.resx into *.resources with //css_res.
  • Added "contextData["CompilerOptions"] = options.compilerOptions;" for precompilers

Starting from this release CS-Script will always inject into a console mode scripts a special tiny class dbg for convenient evaluation of the runtime objects. This feature is particularly useful when you are executing the scripts in the environments where debugger is unavailable.

Now you you can call dbg.print for any runtime object and it will print a dump of the tree of the object members and their values:

using System.IO;
using System;
using static dbg;

class Script
{
    static public void Main(string[] args)
    {
        var info = new DirectoryInfo(Environment.CurrentDirectory); 
        print(info);
    }
}

The code above will produce the following output:


{E:\cs-script\samples}
  .Attributes = Directory
  .CreationTime = {13/04/2011 9:25:49 PM}
  .CreationTimeUtc = {13/04/2011 11:25:49 AM}
  .Exists = True
  .Extension = ""
  .FullName = "E:\cs-script\samples"
  .LastAccessTime = {7/01/2017 4:09:06 PM}
  .LastAccessTimeUtc = {7/01/2017 5:09:06 AM}
  .LastWriteTime = {7/01/2017 4:09:06 PM}
  .LastWriteTimeUtc = {7/01/2017 5:09:06 AM}
  .Name = "samples"
  .Parent = {cs-script}
  .Root = {E:\}
  .DisplayPath = "E:\cs-script\samples"
  .FullPath = "E:\cs-script\samples"
  .OriginalPath = "E:\cs-script\samples"
  .UnsafeGetFullName = "E:\cs-script\samples"
  .demandDir = {System.String[]}
  ._data = Microsoft.Win32.Win32Native+WIN32_FILE_ATTRIBUTE_DATA
  ._dataInitialised = 0