Skip to content

Commit 36445a2

Browse files
committed
# Release v4.13.0.0
--- ## Changes ### CLI - #430: //css_reference search order - Various improvements around `css -help` output - Fixed `css -kill` command ### CSScriptLib - multiple API points made public to address "#431 Generic type for CompileMethod()" challenges
1 parent 26c38d5 commit 36445a2

File tree

9 files changed

+218
-242
lines changed

9 files changed

+218
-242
lines changed

help.txt

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
C# Script execution engine (.NET Core). Version 4.12.0.1.
1+
C# Script execution engine (.NET Core). Version 4.13.0.0.
22
Copyright (C) 2004-2023 Oleg Shilo.
33

44
Usage: cscs <switch 1> <switch 2> <file> [params] [//x]
@@ -384,6 +384,15 @@ params Specifies optional parameters for a script file to be run.
384384

385385
-dir:<directory 1>,<directory N>
386386
Adds path(s) to the assembly probing directory list.
387+
Directory probing order:
388+
0: script dir
389+
1: current dir
390+
2: script host/engine dir
391+
3: dirs from cmd args
392+
4: dirs from code
393+
5: dirs from config
394+
6: csscript special dirs, e.g. cache dir
395+
The precise runtime order can be discovered by executing the script with the -verbose switch.
387396
You can use the reserved word 'show' as a directory name to print the configured probing directories.
388397
(e.g. cscs -dir:C:\MyLibraries myScript.cs; cscs -dir:show).
389398

@@ -447,14 +456,19 @@ params Specifies optional parameters for a script file to be run.
447456
Prints list of supported commands (arguments) as well as the custom commands defined by user.
448457
-cmd:x - Prints detailed information of the custom commands defined by user.
449458

450-
-list|-ls [<kill|k> | <kill-all|ka>
459+
-list|-ls [<kill|k> | <kill-all|ka|*>
451460
Prints list of all currently running scripts.
452461
If script execution tracking is undesirable you can disable it by setting DisableCSScriptProcessTracking
453462
environment variable to a non empty value.
454463
kill|k - Allow user to select and terminate any running script.
455464
* - Terminate all running scripts when 'kill' option is used.
456465
(e.g. cscs -list kill * ).
457466

467+
-kill>
468+
Terminates all instances of running scripts and CS-Script build services.
469+
This command is the easiest way of ensuring no CS-Script files are locked.
470+
E.g. before updating CS-Script installation.
471+
458472
---------
459473

460474

@@ -649,22 +663,31 @@ file - name of the script or assembly file implementing precompiler.
649663
This directive is used to specify the CS-Script precompilers to be loaded and exercised against script at run time
650664
just before compiling it. Precompilers are typically used to alter the script coder before the execution. Thus
651665
CS-Script uses built-in precompiler to decorate classless scripts executed with -autoclass switch.
652-
(see http://www.csscript.net/help/precompilers.html
666+
(see http://www.csscript.net/help/precompilers.html)
653667
------------------------------------
654668
//css_searchdir <directory>;
655669

656670
Alias - //css_dir
657671

658672
directory - name of the directory to be used for script and assembly probing at run-time.
659673

660-
This directive is used to extend set of search directories (script and assembly probing).
661-
The directory name can be a wildcard based expression.In such a case all directories matching the pattern will be this
662-
case all directories will be probed.
674+
This directive is used to extend the set of search directories (script and assembly probing).
675+
The directory name can be a wildcard-=based expression. In such a case all directories matching the pattern will be
676+
this case all directories will be probed.
663677
The special case when the path ends with '**' is reserved to indicate 'sub directories' case. Examples:
664678

665679
//css_dir packages\ServiceStack*.1.0.21\lib\net40
666680
//css_dir packages\**
667681

682+
Directory probing order:
683+
0: script dir
684+
1: current dir
685+
2: script host/engine dir
686+
3: dirs from cmd args
687+
4: dirs from code
688+
5: dirs from config
689+
6: csscript special dirs, e.g. cache dir
690+
The precise runtime order can be discovered by executing the script with the -verbose switch.
668691
------------------------------------
669692
//css_winapp
670693

src/CSScriptLib/src/CSScriptLib/CSScript.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@ static public string WrapMethodToAutoClass(string methodCode, bool injectStatic,
512512
/// <summary>
513513
/// Returns a script-friendly type name for the provided <see cref="Type"/>.
514514
/// For non-generic types this is the type's full name. For generic types the
515-
/// method constructs a readable generic representation (e.g. "Namespace.TypeName<Arg1, Arg2>")
515+
/// method constructs a readable generic representation (e.g. "Namespace.TypeName&lt;Arg1, Arg2&gt;")
516516
/// by recursively formatting generic type arguments.
517517
/// </summary>
518518
/// <param name="type">The <see cref="Type"/> to get the script name for.</param>

src/CSScriptLib/src/CSScriptLib/CSScriptLib.csproj

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
1616
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
1717
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
18-
<Version>4.12.0.1</Version>
18+
<Version>4.13.0.0</Version>
1919
<Authors>Oleg Shilo</Authors>
2020
<Description>CS-Script engine Class Library for .NET 5 (and higher)</Description>
2121
<Copyright>(C) 2018-2023 Oleg Shilo</Copyright>
@@ -29,26 +29,17 @@
2929

3030
## Changes
3131

32-
- CS-Script build for .NET 9 is no longer available. The supported version ar now the last two .NET LTS releases: .NET 8 and .NET 10.
33-
3432
### CLI
35-
36-
- CS-Script ported to .NET 10
37-
- Added '-l' option for auto-selecting the latest available .NET Runtime with the call: `css -self-rt -l`
38-
- Added support for .NET 10 file-based execution directives: `#:package` and `#r`.
39-
- Changed the search dir priorities to low local overwrite of the distributed included scrips (libs): `%CSSCRIPT_INC%` is now higher than "%CSSCRIPT_ROOT%/lib`
40-
- In the `css.exe` status print out is now saying `&lt;not set&gt;` instead of `&lt;not integrated&gt;` for the InstallationDir field.
41-
It's not really about the integration but setting the CSSCRIPT_ROOT envar.
42-
- Updated `ProjectBuilder.GenerateProjectFor` to include the script engine assembly and global includes (e.g. `global-usings`)
43-
33+
- #430: //css_reference search order
34+
- Various improvements around `css -help` output
35+
- Fixed `css -kill` command
4436

4537
### CSScriptLib
46-
- #428: Script.Evaluator.Eval() exception
47-
- Added `/shared` option for CodeDomEvaluator. To dramatically speedup "next" compilation.</PackageReleaseNotes>
38+
- multiple API points made public to address "#431 Generic type for CompileMethod()" challenges</PackageReleaseNotes>
4839
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
49-
<AssemblyVersion>4.12.0.1</AssemblyVersion>
50-
<FileVersion>4.12.0.1</FileVersion>
51-
<PackageVersion>4.12.0.1</PackageVersion>
40+
<AssemblyVersion>4.13.0.0</AssemblyVersion>
41+
<FileVersion>4.13.0.0</FileVersion>
42+
<PackageVersion>4.13.0.0</PackageVersion>
5243
<PackageLicenseExpression>MIT</PackageLicenseExpression>
5344
<PackageIcon>css_logo.png</PackageIcon>
5445
<SignAssembly>True</SignAssembly>

src/chocolatey/cs-script.nuspec

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
33
<metadata>
44
<id>cs-script</id>
5-
<version>4.12.0.1</version>
5+
<version>4.13.0.0</version>
66
<title>CS-Script</title>
77
<authors>Oleg Shilo</authors>
88
<owners>Oleg Shilo</owners>
@@ -28,22 +28,13 @@
2828

2929
## Changes
3030

31-
- CS-Script build for .NET 9 is no longer available. The supported version ar now the last two .NET LTS releases: .NET 8 and .NET 10.
32-
3331
### CLI
34-
35-
- CS-Script ported to .NET 10
36-
- Added '-l' option for auto-selecting the latest available .NET Runtime with the call: `css -self-rt -l`
37-
- Added support for .NET 10 file-based execution directives: `#:package` and `#r`.
38-
- Changed the search dir priorities to low local overwrite of the distributed included scrips (libs): `%CSSCRIPT_INC%` is now higher than "%CSSCRIPT_ROOT%/lib`
39-
- In the `css.exe` status print out is now saying `&lt;not set&gt;` instead of `&lt;not integrated&gt;` for the InstallationDir field.
40-
It's not really about the integration but setting the CSSCRIPT_ROOT envar.
41-
- Updated `ProjectBuilder.GenerateProjectFor` to include the script engine assembly and global includes (e.g. `global-usings`)
42-
32+
- #430: //css_reference search order
33+
- Various improvements around `css -help` output
34+
- Fixed `css -kill` command
4335

4436
### CSScriptLib
45-
- #428: Script.Evaluator.Eval() exception
46-
- Added `/shared` option for CodeDomEvaluator. To dramatically speedup "next" compilation.</releaseNotes>
37+
- multiple API points made public to address "#431 Generic type for CompileMethod()" challenges</releaseNotes>
4738
<copyright>Oleg Shilo</copyright>
4839
<tags>cs-script C# script dynamic hosting</tags>
4940
<dependencies>

0 commit comments

Comments
 (0)