Releases: oleg-shilo/cs-script
Release v3.27.1.0
Minor usability improvements
- Added System.dll auto-referencing on EnableDbgPrint:true to allow regular expressions to be used in auto-injected dbg.cs.
- Issue #78: Beautify command line help output
- Issue #71: Issue with multiple indirect relative paths
- Added ResolveRelativeFromParentScriptLocation for ALL non absolute paths in //css_import
Release v3.27.0.0
Use choco install cs-script
to deploy the release (instructions on how to use/enable choco). Note: it may take some time before the release will appear on Chocolatey.
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).
Significant usability improvements CLI and Roslyn integration. Most of he features are triggered by VSCode and Mono/Linux integration.
Most of the changes and their impact are reflected in the new CLI guide: https://github.com/oleg-shilo/cs-script/wiki/CLI---User-Guide
-
CLI improvements
- Added console out feedback for
-e
and-cd
options (build exe and dll) - Added avoiding accidental decorating of VB scripts in auto-class mode (
-ac
CLI argument). - Added disabling auto-class decoration if no "main" is detected in the script.
- Improved CLI help content
- Added printing new config value during
-config:set
operation - Added
-ac:out
switch for printing auto-class decoration result. - removed
-noconfig
support - described
-config:set:roslyn
- added support for case insensitive property name during
-config:set
and-config:get
- added support for
_
separators in property name during-config:set
and-config:get
- added support for
add:
anddel:
opcodes in-config:set
- default
-ac
to-ac:1
- added command
-config:set:roslyn
- Added console out feedback for
-
Misc
- Added 'compiler options' hash to the script metadata structure (part of 'IsOutOfDate' algorithm)
- Setting
autoClass_DecorateAsCS6
is set to true by default - Fixed problem with generating debug info for Mono-Debug on Windows
- Added
System
to DefaultRefAssemblies on .NET (previously it was only done under Mono) - CSSCodeProvider.v4.7.dll replaced with CSSRoslynProvider.dll
- Removed obsolete .NET 1 specific code
- Removed obsolete
CSScript.BuildEval
code
Release v3.26.2.0
Use choco install cs-script
to deploy the release (instructions on how to use/enable choco). Note: it may take some time before the release will appear on Chocolatey.
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).
The most notable features of this release are the significant usability improvements particularly for supporting C# 7 on Mono/Linux. As well as the features triggered by VSCode integration.
-
Linux support
- Added "/debug:pdbonly" workaround to allow generation of debug symbols on Linux+Mono. Needed as Mono "/debug+" is broken on Linux.
- Added resolving GAC assemblies from namespaces Mono/Linux
- Added on-fly conversion of *.pdb to *.mdb under Mono
- Patched Microsoft.CodeDom.Providers.DotNetCompilerPlatform to allow using Roslyn on Linux. This work around allows custom compiler (csc.exe) path and handles Mono problem when interfacing Roslyn (C#7). This is a work around for https://bugzilla.xamarin.com/show_bug.cgi?id=57130
- Moved lock objects (*.lock files) on Linux away (to cache) from the actual folders where the files to be locked are. Just to stop pouting the file system
-
Deployment
- Default CS-Script code provider renamed to CSSRoslynProvider.dll.
- Default code provider CSSRoslynProvider.dll embeds patched Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll to allow simplified low footprint deployment.
- Added auto-loading CSSRoslynProvider.dll if found in the script engine folder.
- Added resolving code provider when it is specified by file name without extension
-
C# 7 and general improvements
dbg.print
extended with direct support for IDictionary.- Added alias to the '-provider' switch: '-pvdr'
- Added fully named equivalent of '-s' switch: '-sample'
- Added C# 7 specific sample with '-s:7' switch
- Added '-tc' switch for tracing the actual compiler input for CSSRoslynProvider.dll
- Script engine assembly (e.g. cscs.exe) has been exposed to the precompiler routines.
- Added ScriptParser.ProcessImportedScript to be used from precompilers.
-
VSCode integration features
- Added -stop CLI switch to stop Roslyn server if any active.
- Added option to inject breakpoint into autoclass decoration with -ac:* switch.
- Added Settings.RoslynDir.
- Added 'dbg' methods extensions.
- Added option to include injected dbg.cs file into script project printout
-
Assorted defect fixes
- Issue #73: In 3.26.0.0 running default install gives error about alternative compiler
- Issue #71: Issue with multiple indirect relative paths
- Issue #70: Minor issue related to platform dependent line breaks, e.g. in error messages
- Issue #69: Basic types not available to precompilers on linux
- Issue #68: Add option to take Main from primary script file
- Issue #67: Same script, multiple concurrent instances, on Linux (again)
Release v3.26.1.0
Use choco install cs-script
to deploy the release (instructions on how to use/enable choco). Note: it may take some time before the release will appear on Chocolatey.
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).
v3.26.1.0
- Issue #73: In 3.26.0.0 running default install gives error about alternative compiler
- Issue #71: Issue with multiple indirect relative paths
v3.26.0.0
The most notable features of this release are the significant usability improvements particularly for supporting C# 7 on Mono/Linux. As well as the features triggered by VSCode integration.
-
Linux support
- Added "/debug:pdbonly" workaround to allow generation of debug symbols on Linux+Mono. Needed as Mono "/debug+" is broken on Linux.
- Added resolving GAC assemblies from namespaces Mono/Linux
- Added on-fly conversion of *.pdb to *.mdb under Mono
- Patched Microsoft.CodeDom.Providers.DotNetCompilerPlatform to allow using Roslyn on Linux. This work around allows custom compiler (csc.exe) path and handles Mono problem when interfacing Roslyn (C#7). This is a work around for https://bugzilla.xamarin.com/show_bug.cgi?id=57130
- Moved lock objects (*.lock files) on Linux away (to cache) from the actual folders where the files to be locked are. Just to stop pouting the file system
-
Deployment
- Default CS-Script code provider renamed to CSSRoslynProvider.dll.
- Default code provider CSSRoslynProvider.dll embeds patched Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll to allow simplified low footprint deployment.
- Added auto-loading CSSRoslynProvider.dll if found in the script engine folder.
- Added resolving code provider when it is specified by file name without extension
-
C# 7 and general improvements
dbg.print
extended with direct support for IDictionary.- Added alias to the '-provider' switch: '-pvdr'
- Added fully named equivalent of '-s' switch: '-sample'
- Added C# 7 specific sample with '-s:7' switch
- Added '-tc' switch for tracing the actual compiler input for CSSRoslynProvider.dll
- Script engine assembly (e.g. cscs.exe) has been exposed to the precompiler routines.
- Added ScriptParser.ProcessImportedScript to be used from precompilers.
-
VSCode integration features
- Added -stop CLI switch to stop Roslyn server if any active.
- Added option to inject breakpoint into autoclass decoration with -ac:* switch.
- Added Settings.RoslynDir.
- Added 'dbg' methods extensions.
- Added option to include injected dbg.cs file into script project printout
-
Assorted defect fixes
Release v3.25.3.0
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).
- Added support for resolving NuGet packages from the
netstandard
lib subfolders - Added defaultRefAssemblies exchange in InitExecuteOptions()
- .NET Core support (RC)
- Issue #61: Issues with caching; Sample:
CSScript.GlobalSettings.LegacyTimestampCaching = false;
(default isfalse
) - Added support for
//css_ac_end
to allow Extension methods in classless scripts - Implemented caching for InMemory script assemblies
- Fixed collapsing spaces in the DefaulrRefAssemblies settings value
The most important features of this release are
.NET Core - Release Candidate
The CS-Script functionality for .NET Core is bound to (defined by) the scope of the currently implemented Reflection namespace found in .NET Core. Thus some CS-Script features are not ported yet. They will be as soon as .NET Core completes and releases currently missing functionality.
The full set of supported features is presented in this test code.
The binary will be published on NuGet soon.
Changes in the script caching/timestamping algorithm.
Prompted by Issue #61 CS-Script timestamp-based caching algorithm has been updated to avoid modifying compiled assemblies LastModifiedTime file attribute. Now the timestamp is injected in the assembly cs-script metadata instead of being saved as a file attribute. If for whatever reason the old believer is required you can always re-enable it as follows:
CSScript.GlobalSettings.LegacyTimestampCaching = false;
Alternatively you can set CSS_LEGACY_TIMESTAMP_CACHING
environment variable to true
.
Support for extension methods in classless scripts
Before this release it was impossible to have extension methods in the classless scripts due to the fact that the whole script code is wrapped in the on-fly class definition. Thus none of the extension methods from the classless script can be in a top-level class definitions but rather a nested class definition instead. This causes a compile error for the obvious reason.
space
To avoid this limitation a special directive //css_ac_end
has been introduced. This directive indicates the end of the auto-class (classless) script so the runtime stops decorating any code after that directive.
//css_args -ac
using System;
void main()
{
Console.WriteLine("\textension\ttest".TabToSpaces());
}
//css_ac_end
static class Extensions
{
public static string TabToSpaces(this string text, string replacement = " ")
{
return text.Replace("\t", replacement);
}
}
Release v3.25.1.0
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).
- Added support for C# 7.
In order to activate it you need to adjust the default settings to use CS-Script code provider:
cscs -config:set:UseAlternativeCompiler:%CSSCRIPT_DIR%\lib\CSSCodeProvider.v4.6.dll
Read more here - Assorted defect fixed
- Added setting
LastCompilingResult
even when compiling script has failed. - Issue #56: Concurrency control for hosted scripts needs to be system wide
- Issue #47: Error while compiling related to environment block
- Added CSScript.IgnoreSystemWideConfig()
- Disabled "dbg.print" triggered injection of System.Linq/Core on Linux
- Disabled dbg.cs inclusion if dbg.print is disabled
- Added VS2017 shel extensions
- Fixed problem with propagating
CSScript.GlobalSettings.EnableDbgPrint
for hosted execution - Adding extra referenced namespaces when
CSScript.GlobalSettings.EnableDbgPrint == true
is made runtime version aware to avoid adding System.Linq for .NET 3.5. (System.Linq.dll exists only on .NET 4.0+)
- Added setting
Release v3.25.0.0
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).
- Added support for C# 7.
In order to activate it you need to adjust the default settings to use CS-Script code provider:
cscs -config:set:UseAlternativeCompiler:%CSSCRIPT_DIR%\lib\CSSCodeProvider.v4.6.dll
- Assorted defect fixed
- Added setting
LastCompilingResult
even when compiling script has failed. - Issue #47: Error while compiling related to environment block
- Added CSScript.IgnoreSystemWideConfig()
- Disabled "dbg.print" triggered injection of System.Linq/Core on Linux
- Disabled dbg.cs inclusion if dbg.print is disabled
- Fixed problem with propagating
CSScript.GlobalSettings.EnableDbgPrint
for hosted execution - Adding extra referenced namespaces when
CSScript.GlobalSettings.EnableDbgPrint == true
is made runtime version aware to avoid adding System.Linq for .NET 3.5. (System.Linq.dll exists only on .NET 4.0+)
- Added setting
Release v3.24.2.0
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).
- Issue #47: Error while compiling related to environment block
- Added CSScript.EnableScriptLocationReflection
- Added CSScript.IgnoreSystemWideConfig()
- Disabled "dbg.print" triggered injection of System.Linq/Core on Linux
- Disabled dbg.cs inclusion if dbg.print is disabled
- Adding extra referenced namespaces when
CSScript.GlobalSettings.EnableDbgPrint == true
is made 'runtime version aware' to avoid adding System.Linq for .NET 3.5. (System.Linq.dll exists only on .NET 4.0+) - Fixed problem with propagating
CSScript.GlobalSettings.EnableDbgPrint
for hosted execution
Release v3.24.0
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).
- Issue #45: Deprecation in wsdl.cs
-
Fixed setting
EntryScript
env variable. Previously it was set after execution of 'pre-scripts'. -
Updated wsdl.cs to reflect use
EntryScript
anv variable.static string ResolveOutputLocation(string file) { string primaryScriptFile = Environment.GetEnvironmentVariable("EntryScript"); ... }
-
- Issue #44: Neither AsmHelper nor Compiling provides the additional directories specified by //css_searchdir
-
Added
CompilingInfo.ParsingContext
that contains all parsing result data without resorting to store the whole parser. -
Added
CSScript.LastCompilingResult
, which is always set to the CompilingInfo of the last operation as opposite to theCSScript.CompilingHistory
log that is kept only if enabled. -
Added SimpleAsmProbing for simple assembly probing within specified dirs. Supports
using
statement declaration.var script = CSScript.Load("printer.cs"); var search_dirs = CSScript.LastCompilingResult.ParsingContext.SearchDirs; using (SimpleAsmProbing.For(search_dirs)) { dynamic printer = script.CreateObject("Printer"); printer.Print("Hello World!"); }
-
- All sample/lib scripts are now under source control: https://github.com/oleg-shilo/cs-script/tree/master/Source/deployment
- Added
-preload
command for preloading "heavy" compilers (e.g. Roslyn) - Further AutoclassGenerator improvements (IDE integration related)
- Further removal of net1 conditional compilations
Release v3.23.0
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).
- Added auto-referencing System.Linq.dll+System.Core.dll if dbg.cs is injected
- Added Settings.EnableDbgPrint to control inclusion of dbg.cs for Python-like
print(...)
methods - Added
-config:<raw|xml>
for printing raw/xml config file - Replaced embedding
dbg.cs
into resources with embedded string constant. To avoid explicit v4.5 dependency. - Added test for multiple entry points in the script
- Non-functional changes:
- Added reporting proper error on failure to invoke CLI
-config:set
- Added pre-build step for preparing dbg.res.cs
- Fixed problem with AutoclassGenerator incorrectly handling caret at the end of line
- Added reporting proper error on failure to invoke CLI