Skip to content

Commit 16d3d76

Browse files
committed
Published Release v4.12.0.0
1 parent 72ecc65 commit 16d3d76

File tree

6 files changed

+31
-25
lines changed

6 files changed

+31
-25
lines changed

help.txt

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

44
Usage: cscs <switch 1> <switch 2> <file> [params] [//x]
@@ -78,6 +78,8 @@ params Specifies optional parameters for a script file to be run.
7878
executable for integrating it with CS-Script by using -vs:init option.
7979
Alternatively, you can even ask to integrate the first detected executable with:
8080
cscs -vs:init 0
81+
-vs:init 0 is also an instruction of selecting the latest version of detected Visual Studio executable since the
82+
list is of available versions is ordered by the latest version first.
8183

8284
-vscode
8385
Generates .NET project file and opens it in Visual Studio Code.
@@ -102,12 +104,13 @@ params Specifies optional parameters for a script file to be run.
102104
-ng|-engine:<csc|dotnet|roslyn>
103105
Forces compilation to be done by one of the supported .NET engines.
104106

105-
dotnet - dotnet.exe compiler; this is the most versatile compilation engine though it does have a startup
106-
overhead when running the script for the first time. It requires .NET SDK to be installed on the target
107-
system.
107+
dotnet - dotnet.exe compiler
108+
This is the most versatile compilation engine though it does have a startup overhead when running the script for
109+
the first time. It requires .NET SDK to be installed on the target system.
108110

109-
csc - csc.exe compiler; the fastest compiler available. It is not suitable for WPF scripts as csc.exe cannot
110-
compile XAML. It requires .NET SDK to be installed on the target system.
111+
csc - csc.exe compiler; the fastest compiler available.
112+
Though it is not suitable for WPF scripts as csc.exe cannot compile XAML.
113+
It also requires .NET SDK to be installed on the target system.
111114
This value is just a shorter form of the full equivalent csc-inproc.
112115
Legacy:
113116
Value csc-outproc triggers the compilation in the separate child process build.exe which is somewhat
@@ -118,8 +121,10 @@ params Specifies optional parameters for a script file to be run.
118121
family distributions. And it's only retained for the compatibility reasons. Starting from v4.10.0 the
119122
use of csc-outproc offers no benefits.
120123

121-
roslyn - Microsoft.CodeAnalysis.CSharp.Scripting.dll compiler; this is the most portable compilation engine. It
122-
does not require .NET SDK being installed. Though it does have limitations (see documentation).
124+
roslyn - Microsoft.CodeAnalysis.CSharp.Scripting.dll compiler
125+
This is the most portable compilation engine. It does not require .NET SDK being installed.
126+
Though it does have limitations. The script must have static Main(), you cannot have nested namespaces etc. (see
127+
documentation).
123128
The compilation is performed in the separate child process cscs (another instance of script engine)
124129
which is somewhat equivalent of VBCSCompiler.exe (build server) from .NET toolset.
125130
CS-Script communicates with cscs build server via socket (default port 17002). You can control port
@@ -403,7 +408,7 @@ params Specifies optional parameters for a script file to be run.
403408

404409
-nuget[:restore]
405410
Installs new or updates existing NuGet packages. It is a very close equivalent of dotnet restore command
406-
Note, using nuget directives in the script text aoffers more flexibility (e.g. version support. See cscs -syntax
411+
Note, using nuget directives in the script text offers more flexibility (e.g. version support. See cscs -syntax
407412
//css_nuget
408413

409414
-nuget - prints the list of all root packages in the repository
@@ -461,8 +466,6 @@ Engine directives:
461466
- //css_include <file>;
462467
- //css_import <file>[, preserve_main][, rename_namespace(<oldName>, <newName>)];
463468
- //css_nuget [-force] [-ver:<version>] [-pre|--prerelease] package0[,package1]..[,packageN];
464-
- //css_nuget [-noref] [-force[:delay]] [-ver:<version>] [-rt:<runtime>] [-ng:<nuget arguments>]
465-
package0[,package1]..[,packageN];
466469
- //css_args arg0[,arg1]..[,argN];
467470
- //css_reference <file>;
468471
- //css_precompiler <file 1>,<file 2>;
@@ -549,6 +552,8 @@ newName - new name of a namespace to be renamed during importing
549552
------------------------------------
550553

551554
//css_nuget [-force] [-ver:<version>] [-pre|--prerelease] package0[,package1]..[,packageN];
555+
Note: .NET 10 file-based execution directive '#:package' is also supported by internally converting it to the
556+
//css_nuget equivalent.
552557

553558
Downloads/Installs the NuGet package. It also automatically references the downloaded package assemblies.
554559
By default, the package is not downloaded again if it was already downloaded.
@@ -574,7 +579,7 @@ Note: Legacy NuGet support is less reliable, predictable or flexible (e.g. does
574579
thus it's highly recommend that you use this mode only if you have to.
575580

576581
The legacy NuGet support CLI is somewhat different:
577-
//css_nuget [-noref] [-force[:delay]] [-ver:<version>] [-rt:<runtime>] [-ng:<nuget arguments>]
582+
(Legacy) - //css_nuget [-noref] [-force[:delay]] [-ver:<version>] [-rt:<runtime>] [-ng:<nuget arguments>]
578583
package0[,package1]..[,packageN];
579584

580585
If no version is specified then the highest downloaded version (if any) will be used.
@@ -623,9 +628,10 @@ Note: the arguments must be coma separated.
623628
Alias - //css_ref
624629

625630
file - name of the assembly file to be loaded at run-time.
631+
Note: .NET 10 file-based execution directive '#r' is also supported the same way as //css_reference.
626632
This directive is used to reference assemblies required at run time.
627-
The assembly must be in GAC, the same folder with the script file or in the 'Script Library' folders (see 'CS-Script
628-
settings').
633+
The assembly must be in one of the search directories (in config file), the same folder with the script file or in the
634+
'Script Library' folders (see 'CS-Script settings').
629635

630636
Note if you use wildcard in the referenced assembly name (e.g. socket.*.dll) the directive will only reference from
631637
the first probing directory where the matching file(s) is found. Be careful with the wide wildcard as '*.dll' as they

scoop-bucket/cs-script.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
2-
"version": "4.11.4.0",
2+
"version": "4.12.0.0",
33
"description": "CS-Script is a C# scripting platform for Windows.",
44
"homepage": "https://github.com/oleg-shilo/cs-script",
55
"license": "MIT",
6-
"url": "https://github.com/oleg-shilo/cs-script/releases/download/v4.11.4.0/cs-script.win.v4.11.4.0.zip",
7-
"hash": "sha256:4476bc843a1968eb41cf46b86c1e68fbe7825a50278d352426b491e160e3f8cf",
6+
"url": "https://github.com/oleg-shilo/cs-script/releases/download/v4.12.0.0/cs-script.win.v4.12.0.0.zip",
7+
"hash": "sha256:002CC63A056B5E1CB4CFAB41AFA8E26CEF061FAA9A93519B75DC1C1BF1944C1F",
88
"bin": [["cscs.exe", "css"]],
99
"checkver": {
1010
"github": "oleg-shilo/cs-script"
1111
},
1212
"env_set": {
1313
"CSSCRIPT_ROOT": "$dir"
1414
}
15-
}
15+
}

src/chocolatey/publish.cmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
echo off
22
rem choco apikey --key ???????? --source https://push.chocolatey.org/
33

4-
choco push cs-script.4.11.2.nupkg --source https://push.chocolatey.org/
4+
choco push cs-script.4.12.0.nupkg --source https://push.chocolatey.org/
55
pause

src/chocolatey/tools/chocolateyInstall.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
$packageName = 'cs-script'
2-
$url = 'https://github.com/oleg-shilo/cs-script/releases/download/v4.11.2.0/cs-script.win.v4.11.2.0.7z'
2+
$url = 'https://github.com/oleg-shilo/cs-script/releases/download/v4.12.0.0/cs-script.win.v4.12.0.0.7z'
33

44
try {
55
$installDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
66

7-
$checksum = '57D9D3399045242FD105969C69AAF266DE1F1B1C7BF524A343A5C99DDB463438'
7+
$checksum = '3F9B7CD01DBB5F6792AE5F9142A860E8504B073BAFC114EDEB914DFCC832BC4D'
88
$checksumType = "sha256"
99

1010
function stop-server

src/chocolatey/update_package.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
ServicePointManager.Expect100Continue = true;
1010
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
1111

12-
var url = "https://github.com/oleg-shilo/cs-script/releases/download/v4.11.2.0/cs-script.win.v4.11.2.0.7z";
12+
var url = "https://github.com/oleg-shilo/cs-script/releases/download/v4.12.0.0/cs-script.win.v4.12.0.0.7z";
1313

1414
var installScript = @"tools\chocolateyInstall.ps1";
1515

src/out/ci/update_choco_scripts.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,17 @@
1717

1818
// scoop
1919
PatchFile(
20-
@".\..\..\..\bucket\cs-script.json",
20+
@".\..\..\..\scoop-bucket\cs-script.json",
2121
x => x.Trim().StartsWith("\"version\": \""),
2222
$" \"version\": \"{version}\",");
2323

2424
PatchFile(
25-
@".\..\..\..\bucket\cs-script.json",
25+
@".\..\..\..\scoop-bucket\cs-script.json",
2626
x => x.Trim().StartsWith("\"url\": \"https://github.com/oleg-shilo/cs-script/releases"),
2727
$" \"url\": \"{zip_url}\",");
2828
PatchFile(
2929

30-
@".\..\..\..\bucket\cs-script.json",
30+
@".\..\..\..\scoop-bucket\cs-script.json",
3131
x => x.Trim().StartsWith("\"hash\": \"sha256:"),
3232
$" \"hash\": \"sha256:{zipChecksum}\",");
3333

0 commit comments

Comments
 (0)