Skip to content

Commit 72ecc65

Browse files
committed
# Release v4.12.0.0
--- ## Changes - 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. ### CLI - CS-Script ported to .NET 10 - Added '-l' option for auto-selecting the latest available .NET Runtime with the call: `css -self-rt -l` - Added support for .NET 10 file-based execution directives: `#:package` and `#r`. - Changed the search dir priorities to low local overwrite of the distributed included scrips (libs): `%CSSCRIPT_INC%` is now higher than "%CSSCRIPT_ROOT%/lib` - In the `css.exe` status print out is now saying `<not set>` instead of `<not integrated>` for the InstallationDir field. It's not really about the integration but setting the CSSCRIPT_ROOT envar. - Updated `ProjectBuilder.GenerateProjectFor` to include the script engine assembly and global includes (e.g. `global-usings`) ### CSScriptLib - #428: Script.Evaluator.Eval() exception - Added `/shared` option for CodeDomEvaluator. To dramatically speedup "next" compilation.
1 parent 79a6827 commit 72ecc65

File tree

20 files changed

+207
-112
lines changed

20 files changed

+207
-112
lines changed

src/1.build-binaries.cmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ if exist "C:\Program Files\Microsoft Visual Studio\2022\%vs_edition%" (
1010
)
1111

1212
set PATH=%PATH%;%%\out\ci\
13-
set target=net9.0
13+
set target=net10.0
1414
set target_prev=net8.0
1515
md "out\Linux\"
1616
md "out\Linux\lib"

src/BuildServer/BuildServer.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
55
<!--<TargetFramework>net9.0</TargetFramework>-->
6-
<TargetFrameworks>net9.0;net8.0</TargetFrameworks>
6+
<TargetFrameworks>net10.0;net8.0</TargetFrameworks>
77
<AssemblyName>build</AssemblyName>
88
<RootNamespace>Compiler</RootNamespace>
99
<AssemblyVersion>1.0.2.0</AssemblyVersion>

src/CSScriptLib/src/CSScriptLib/CSScriptLib.csproj

Lines changed: 16 additions & 9 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.11.5.0</Version>
18+
<Version>4.12.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,19 +29,26 @@
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+
3234
### CLI
33-
- Added auto initialization on the first run of `css -vs`
34-
- Added convenient `csscript.run(this string app, string args, string dir)` to be available to all script files
35-
- Improved `-which`
36-
- Addressed integration issue with Notepad++ when including `global_using`
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`)
3743

3844

3945
### CSScriptLib
40-
- no changes</PackageReleaseNotes>
46+
- #428: Script.Evaluator.Eval() exception
47+
- Added `/shared` option for CodeDomEvaluator. To dramatically speedup "next" compilation.</PackageReleaseNotes>
4148
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
42-
<AssemblyVersion>4.11.5.0</AssemblyVersion>
43-
<FileVersion>4.11.5.0</FileVersion>
44-
<PackageVersion>4.11.5.0</PackageVersion>
49+
<AssemblyVersion>4.12.0.0</AssemblyVersion>
50+
<FileVersion>4.12.0.0</FileVersion>
51+
<PackageVersion>4.12.0.0</PackageVersion>
4552
<PackageLicenseExpression>MIT</PackageLicenseExpression>
4653
<PackageIcon>css_logo.png</PackageIcon>
4754
<SignAssembly>True</SignAssembly>

src/Tests.CSScriptLib/Tests.CSScriptLib.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net9.0</TargetFramework>
4+
<TargetFramework>net10.0</TargetFramework>
55

66
<IsPackable>false</IsPackable>
77

src/Tests.cscs/Tests.CLI.csproj

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,44 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

3-
<PropertyGroup>
4-
<TargetFramework>net9.0</TargetFramework>
5-
6-
<IsPackable>false</IsPackable>
7-
8-
<AssemblyName>cscs.tests</AssemblyName>
9-
10-
<RootNamespace />
11-
</PropertyGroup>
12-
13-
<ItemGroup>
14-
<Compile Remove="linux\run.cs" />
15-
<Compile Remove="linux\xunit.polyfill.cs" />
16-
<Compile Remove="test.cs" />
17-
<Compile Remove="tests.cs" />
18-
<Compile Remove="xunit.polyfill.cs" />
19-
</ItemGroup>
20-
21-
<ItemGroup>
22-
<None Include="..\out\static_content\-self\-test\-run.cs" Link="linux\-run.cs" />
23-
<None Include="..\out\static_content\-self\-test\xunit.polyfill.cs" Link="linux\xunit.polyfill.cs" />
24-
</ItemGroup>
25-
26-
<ItemGroup>
27-
<PackageReference Include="Microsoft.Diagnostics.Tracing.TraceEvent" Version="3.1.19" />
28-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.13.0" />
29-
<PackageReference Include="xunit" Version="2.9.3" />
30-
<PackageReference Include="xunit.runner.visualstudio" Version="3.0.2">
31-
<PrivateAssets>all</PrivateAssets>
32-
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
33-
</PackageReference>
34-
</ItemGroup>
35-
36-
<ItemGroup>
37-
<ProjectReference Include="..\cscs\cscs.csproj" />
38-
</ItemGroup>
39-
40-
<ItemGroup>
41-
<Folder Include="linux\" />
42-
</ItemGroup>
3+
<PropertyGroup>
4+
<TargetFramework>net10.0</TargetFramework>
5+
6+
<IsPackable>false</IsPackable>
7+
8+
<AssemblyName>cscs.tests</AssemblyName>
9+
10+
<RootNamespace />
11+
</PropertyGroup>
12+
13+
<ItemGroup>
14+
<Compile Remove="linux\run.cs" />
15+
<Compile Remove="linux\xunit.polyfill.cs" />
16+
<Compile Remove="test.cs" />
17+
<Compile Remove="tests.cs" />
18+
<Compile Remove="xunit.polyfill.cs" />
19+
</ItemGroup>
20+
21+
<ItemGroup>
22+
<None Include="..\out\static_content\-self\-test\-run.cs" Link="linux\-run.cs" />
23+
<None Include="..\out\static_content\-self\-test\xunit.polyfill.cs" Link="linux\xunit.polyfill.cs" />
24+
</ItemGroup>
25+
26+
<ItemGroup>
27+
<PackageReference Include="Microsoft.Diagnostics.Tracing.TraceEvent" Version="3.1.19" />
28+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.13.0" />
29+
<PackageReference Include="xunit" Version="2.9.3" />
30+
<PackageReference Include="xunit.runner.visualstudio" Version="3.0.2">
31+
<PrivateAssets>all</PrivateAssets>
32+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
33+
</PackageReference>
34+
</ItemGroup>
35+
36+
<ItemGroup>
37+
<ProjectReference Include="..\cscs\cscs.csproj" />
38+
</ItemGroup>
39+
40+
<ItemGroup>
41+
<Folder Include="linux\" />
42+
</ItemGroup>
4343

4444
</Project>

src/Tests.cscs/cli.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,6 @@ public void new_cmd()
291291
}
292292
}
293293

294-
[Fact]
295294
[FactWinOnly]
296295
public void syntax_version_10()
297296
{

src/chocolatey/cs-script.nuspec

Lines changed: 13 additions & 6 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.11.5.0</version>
5+
<version>4.12.0.0</version>
66
<title>CS-Script</title>
77
<authors>Oleg Shilo</authors>
88
<owners>Oleg Shilo</owners>
@@ -28,15 +28,22 @@
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+
3133
### CLI
32-
- Added auto initialization on the first run of `css -vs`
33-
- Added convenient `csscript.run(this string app, string args, string dir)` to be available to all script files
34-
- Improved `-which`
35-
- Addressed integration issue with Notepad++ when including `global_using`
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`)
3642

3743

3844
### CSScriptLib
39-
- no changes</releaseNotes>
45+
- #428: Script.Evaluator.Eval() exception
46+
- Added `/shared` option for CodeDomEvaluator. To dramatically speedup "next" compilation.</releaseNotes>
4047
<copyright>Oleg Shilo</copyright>
4148
<tags>cs-script C# script dynamic hosting</tags>
4249
<dependencies>

src/cscs/CodeDom/CSharpCompiler.engines.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,12 +283,11 @@ bool not_facade_asm_in_engine_dir(string asm)
283283
if (ExecuteOptions.options.isNetFx)
284284
{
285285
common_args.Add("-define:NETFRAMEWORK");
286-
common_args.Add("/shared");
287286
gac_asms.Add("mscorlib.dll");
288287
}
289288
else
290289
{
291-
common_args.Add("/shared");
290+
common_args.Add("/shared"); // available only for .NET Core family
292291

293292
if (options.GetTargetPlatform() == "x86" && Environment.Is64BitProcess)
294293
{

src/cscs/CodeDom/Proxies.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ public CompilerResults CompileAssemblyFromFileBatch(CompilerParameters options,
117117
$"To remove this warning either install .NET {Environment.Version.Major} SDK " +
118118
$"or set the default compiler engine to `{compiler_roslyn}` with {NewLine}" +
119119
$" css -config:set:DefaultCompilerEngine={compiler_roslyn}.{NewLine}" +
120+
$"Note, Roslyn engine has some fundamental limitation." +
120121
$"--------");
121122
engine = compiler_roslyn;
122123
}

src/cscs/HelpProvider.cs

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,9 @@ static AppArgs()
303303
"You can let CS-Script to detect installed Visual Studio executable and interactively select " +
304304
"the detected executable for integrating it with CS-Script by using `-vs:init` option.",
305305
"Alternatively, you can even ask to integrate the first detected executable with: ",
306-
" " + AppInfo.AppName + " -vs:init 0");
306+
" " + AppInfo.AppName + " -vs:init 0",
307+
"`-vs:init 0` is also an instruction of selecting the latest version of detected Visual Studio executable " +
308+
"since the list is of available versions is ordered by the latest version first.");
307309
switch1Help[vscode] = new ArgInfo("-vscode",
308310
"Generates .NET project file and opens it in Visual Studio Code.",
309311
"The path to the Visual Studio Code executable (code.exe) needs to be defined in the " +
@@ -327,12 +329,13 @@ static AppArgs()
327329
switch1Help[ng] = new ArgInfo("-ng|-engine:<csc|dotnet|roslyn>",
328330
"Forces compilation to be done by one of the supported .NET engines.",
329331
" ",
330-
"`dotnet` - ${<==}dotnet.exe compiler; this is the most versatile compilation engine though " +
331-
"it does have a startup overhead when running the script for the first time. It requires .NET SDK to be installed " +
332-
"on the target system.",
332+
"`dotnet` - ${<==}dotnet.exe compiler",
333+
"This is the most versatile compilation engine though it does have a startup overhead when running the script for the first time. " +
334+
"It requires .NET SDK to be installed on the target system.",
333335
" ",
334-
"`csc` - ${<==}csc.exe compiler; the fastest compiler available. It is not suitable " +
335-
"for WPF scripts as csc.exe cannot compile XAML. It requires .NET SDK to be installed on the target system.",
336+
"`csc` - ${<==}csc.exe compiler; the fastest compiler available. ",
337+
"Though it is not suitable for WPF scripts as csc.exe cannot compile XAML.",
338+
"It also requires .NET SDK to be installed on the target system.",
336339
" ${<==}This value is just a shorter form of the full equivalent `csc-inproc`.",
337340
" ${<==}Legacy:",
338341
" ${<==}Value `csc-outproc` triggers the compilation in the separate child process `build.exe` which is somewhat " +
@@ -342,8 +345,9 @@ static AppArgs()
342345
"in the .NET Core family distributions. And it's only retained for the compatibility reasons. Starting from v4.10.0 the use of " +
343346
"`csc-outproc` offers no benefits.",
344347
" ",
345-
"`roslyn` - ${<==}Microsoft.CodeAnalysis.CSharp.Scripting.dll compiler; this is the most portable compilation " +
346-
"engine. It does not require .NET SDK being installed. Though it does have limitations (see documentation).",
348+
"`roslyn` - ${<==}Microsoft.CodeAnalysis.CSharp.Scripting.dll compiler",
349+
"This is the most portable compilation engine. It does not require .NET SDK being installed.",
350+
"Though it does have limitations. The script must have `static Main()`, you cannot have nested namespaces etc. (see documentation).",
347351
" ${<==}The compilation is performed in the separate child process " + AppInfo.AppName + " (another " +
348352
"instance of script engine) which is somewhat equivalent of VBCSCompiler.exe (build server) from .NET toolset.",
349353
" ${<==}CS-Script communicates with " + AppInfo.AppName + " build server via socket (default port 17002). " +

0 commit comments

Comments
 (0)