Releases: oleg-shilo/cs-script
Release v3.28.3.0
- Added probing for C#/VB compiler on Linux; Needed for CS-Script.Syntaxer.
- Fixed Rolsyn support for VB.NET syntax (on Windows)
- Fixed problem with file name only scripts being imported from the script local dir even if they are not found there. Was caused by incorrect processing of
ResolveRelativeFromParentScriptLocation
setting. - Added -nuget CLI command ('Installs new or updates existing NuGet package')
> cscs -nuget ?
-nuget[:<package|purge>]
Installs new or updates existing NuGet package.
This command allows light management of the NuGet packages in the CS-Script local
package repository (%PROGRAMDATA%\CS-Script\nuget).
The tasks are limited to installing, updating and listing the local packages.
-nuget - prints the list of all root packages in the repository
-nuget:<package> - downloads and installs the latest version of the package(s).
Wild cards can be used to update multiple packages. For example
'-nuget:ServiceStack*' will update all already installed
ServiceStack packages.
You can also use the index of the package instead of its full
name.
Installing packages this way is an alternative to have '//css_nuget -force ...'
directive in the script code as it may be more convenient for the user to update
packages manually instead of having them updated on every script
execution/recompilation.
Release v3.28.2.1-HotFix
- Fixed problem with file name only scripts being imported from the script local dir even if they are not found there. Was caused by incorrect processing of
ResolveRelativeFromParentScriptLocation
setting. - Added -nuget CLI command ('Installs new or updates existing NuGet package')
> cscs -nuget ?
-nuget[:<package|purge>]
Installs new or updates existing NuGet package.
This command allows light management of the NuGet packages in the CS-Script local
package repository (%PROGRAMDATA%\CS-Script\nuget).
The tasks are limited to installing, updating and listing the local packages.
-nuget - prints the list of all root packages in the repository
-nuget:<package> - downloads and installs the latest version of the package(s).
Wild cards can be used to update multiple packages. For example
'-nuget:ServiceStack*' will update all already installed
ServiceStack packages.
You can also use the index of the package instead of its full
name.
Installing packages this way is an alternative to have '//css_nuget -force ...'
directive in the script code as it may be more convenient for the user to update
packages manually instead of having them updated on every script
execution/recompilation.
Release v3.28.2.0
- CS-Script.Core
- Issue #106: Fix netstandard2 version to work in 4.6.1 and fix ReferenceDomainAssemblies
- Fix netstandard2 version to work in 4.6.1 and fix ReferenceDomainAssemblies
- CS-Script
- Issue #108: Option to no longer suppress TargetInvocationException in AsmBrowser
AsmHelper.UnpackTargetInvocationExceptions = false;
- Fixed problem with
cscs -config:get
not handling the properties containing '_' - Issue #107: //css_resource fails to resolve relative paths
- Solved problem with
MarshalByRefObjectWithInfiniteLifetime
being defined in both cscs and CSScriptLibrary - Renamed MarshalByRefObjectWithInfiniteLifetime -> CSScriptLibrary.MarshalByRefObjectWithInfiniteLifetime
- Processing feedback on #98 fixes.
Release v3.28.0.0
The most important changes in this release are the first CSScriptLib for .NET Core (NuGet package) and long awaited debugging support for Roslyn-based Evaluator engine.
Release changes:
- CSScriptLib .NET Core v1.0.0.0 (NuGet package)
- Implemented debugging in RoslynEvaluator
- Implemented MarshalByRefObjectWithInfiniteLifetime to allow long living remote script objects
- Added MarshalByRefObjectWithInfiniteLifetime class for managing remote scripts lifetime
- Improved RoslynEvaluator error reporting
- Added exception handling on AsmHelper disposing.
More reading:
Debugging Roslyn executed scripts:
Add package:
.NET Core: dotnet add package CS-Script.Core
.NET: Install-Package CS-Script.lib.Roslyn
CSScript.EvaluatorConfig.DebugBuild = true;
dynamic script = CSScript.RoslynEvaluator
.LoadMethod(@"void Hello()
{
System.Diagnostics.Debugger.Break();
Console.WriteLine(""Hello World!"");
}");
script.Hello();
Release v3.27.5.0
Continuation of the CLI/Mono/VSCode related effort started with v3.27.0.
- Added test for "being installed" on Linux
- Fixed problem with "\n\n" being treated as an escaped delimiter on Linux. The problem was compromising parsing some //css_* directives on Linux.
- Added real hashbang for Linux C#7 sample file. Though the hashbang is commented out to not to interfere with VSCode.
- Ubuntu/Debian package - change of the repo URL in the -update.cs
- Added support for '-?' sub argument for 'scripted args'
- Added automatic suppressing the
using static dbg;
when default compiler is used on Win. Even if the injection is enabled in config. - Prepared Ubuntu package (https://github.com/oleg-shilo/cs-script/tree/master/docs/linux/ubuntu)
Release v3.27.4
Continuation of the CLI/Mono/VSCode related effort started with v3.27.0.
- Fixed flawed boolean logic that got activated as the result of the new "scripted arg" support.
- Removed '-nl' (no logo) option. Printing logo is suppressed now by default for all CLI scenarios except help, version and 'no args'.
- Added typical Linux CLI double-dash prefix for help and version.
- Added support for 'scripted args' ("cscs -update" where "-update" is a script file).
- Enabled setting CS-Script runtime environment variables on Linux.
- Reviewed and refined concurrency support on Linux:
- mutex cleanup and prompt release
- ensuring assembly file is opened for reading during
inmem
loading
- Further improvements for issue #82.
CS-Script now allows defining CLI custom arguments as a script. The sample below demonstrates how to create -log
argument that creates Start/End entries in the EventLog for every script executed with the -log
argument.
CLI:
cscs -log text.cs
Content of the -log
file:
using System;
using System.Linq;
using System.Reflection;
using System.Diagnostics;
class Script
{
static public void Main(string[] args)
{
string args_text = string.Join(" ", args);
using (var eventLog = new EventLog("Application"))
{
eventLog.Source = "Application";
eventLog.WriteEntry("CS-Script execution start: '" + args_text + "'", EventLogEntryType.Information, 101, 1);
try
{
if (args.Any())
{
var engine = Assembly.GetEntryAssembly() ??
Assembly.LoadFrom(Environment.GetEnvironmentVariable("CSScriptRuntimeLocation"));
engine.EntryPoint.Invoke(null, new object[] { args });
}
}
finally
{
eventLog.WriteEntry("CS-Script execution end.", EventLogEntryType.Information, 101, 1);
}
}
}
}
Release v3.27.2
Continuation of the CLI/Mono/VSCode related effort started with v3.27.0.
Assorted usability improvements and bug fixes
- CLI help improvements
- Runtime optimization
- Fixed problem with CLI being hosted under Mono+Node.js (Console.WindowWidth is always 0)
- Throw informative exception on "in-memory" assembly being subject of "AlighnToInterface" use-case.
- Issue #82: More specific error message in case of file resolution fails related to //css_import
- Issue #81: CodeDom and interfaces
- Added CLI help content separators to assist with parsing when hosted by IDEs.
- Fixed typo in CLI output for
-proj
('searcDir:' -> 'searchDir:') - Started phasing out of
CSScript.Load
in favor ofCSScript.LoadFile
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)