From b3b1e36e990000d2faa22623f1641b99d54f8e3c Mon Sep 17 00:00:00 2001 From: filipw Date: Mon, 23 Aug 2021 16:30:13 +0200 Subject: [PATCH 1/3] drop support for .NET Core 2.1 --- README.md | 8 ++++---- build/Build.csx | 2 +- build/omnisharp.json | 2 +- src/Dotnet.Script.Core/Dotnet.Script.Core.csproj | 2 +- .../Dotnet.Script.DependencyModel.NuGet.csproj | 2 +- .../Dotnet.Script.DependencyModel.csproj | 2 +- .../ProjectSystem/csproj.template | 2 +- .../CompilationDepenencyTests.cs | 4 ++-- src/Dotnet.Script.Tests/Dotnet.Script.Tests.csproj | 2 +- src/Dotnet.Script/Dotnet.Script.csproj | 4 ++-- 10 files changed, 15 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 5d621cd0..ae711e33 100644 --- a/README.md +++ b/README.md @@ -10,8 +10,8 @@ Run C# scripts from the .NET CLI, define NuGet packages inline and edit/debug th | Name | Version | Framework(s) | | ------------------------------------- | ------------------------------------------------------------ | -------------------------------- | -| `dotnet-script` | [![Nuget](http://img.shields.io/nuget/v/dotnet-script.svg?maxAge=10800)](https://www.nuget.org/packages/dotnet-script/) | `netcoreapp2.1`, `netcoreapp3.1` | -| `Dotnet.Script` | [![Nuget](http://img.shields.io/nuget/v/dotnet.script.svg?maxAge=10800)](https://www.nuget.org/packages/dotnet.script/) | `netcoreapp2.1`, `netcoreapp3.1` | +| `dotnet-script` (global tool) | [![Nuget](http://img.shields.io/nuget/v/dotnet-script.svg?maxAge=10800)](https://www.nuget.org/packages/dotnet-script/) | `net5.0`, `netcoreapp3.1` | +| `Dotnet.Script` (CLI as Nuget) | [![Nuget](http://img.shields.io/nuget/v/dotnet.script.svg?maxAge=10800)](https://www.nuget.org/packages/dotnet.script/) | `net5.0`, `netcoreapp3.1` | | `Dotnet.Script.Core` | [![Nuget](http://img.shields.io/nuget/v/Dotnet.Script.Core.svg?maxAge=10800)](https://www.nuget.org/packages/Dotnet.Script.Core/) | `netstandard2.0` | | `Dotnet.Script.DependencyModel` | [![Nuget](http://img.shields.io/nuget/v/Dotnet.Script.DependencyModel.svg?maxAge=10800)](https://www.nuget.org/packages/Dotnet.Script.DependencyModel/) | `netstandard2.0` | | `Dotnet.Script.DependencyModel.Nuget` | [![Nuget](http://img.shields.io/nuget/v/Dotnet.Script.DependencyModel.Nuget.svg?maxAge=10800)](https://www.nuget.org/packages/Dotnet.Script.DependencyModel.Nuget/) | `netstandard2.0` | @@ -316,7 +316,7 @@ To consume a script package all we need to do specify the NuGet package in the ` The following example loads the [simple-targets](https://www.nuget.org/packages/simple-targets-csx) package that contains script files to be included in our script. ```C# -#! "netcoreapp2.1" +#! "netcoreapp3.1" #load "nuget:simple-targets-csx, 6.0.0" using static SimpleTargets; @@ -466,7 +466,7 @@ The following example shows how we can pipe data in and out of a script. The `UpperCase.csx` script simply converts the standard input to upper case and writes it back out to standard output. ```csharp -#! "netcoreapp2.1" +#! "netcoreapp3.1" using (var streamReader = new StreamReader(Console.OpenStandardInput())) { Write(streamReader.ReadToEnd().ToUpper()); diff --git a/build/Build.csx b/build/Build.csx index 02ee632c..0869e914 100644 --- a/build/Build.csx +++ b/build/Build.csx @@ -35,7 +35,7 @@ await StepRunner.Execute(Args); private void CreateGitHubReleaseAsset() { - DotNet.Publish(dotnetScriptProjectFolder, publishArtifactsFolder, "netcoreapp2.1"); + DotNet.Publish(dotnetScriptProjectFolder, publishArtifactsFolder, "netcoreapp3.1"); Zip(publishArchiveFolder, pathToGitHubReleaseAsset); } diff --git a/build/omnisharp.json b/build/omnisharp.json index 5c14541a..44278159 100644 --- a/build/omnisharp.json +++ b/build/omnisharp.json @@ -1,6 +1,6 @@ { "script": { "enableScriptNuGetReferences": true, - "defaultTargetFramework": "netcoreapp2.1" + "defaultTargetFramework": "netcoreapp3.1" } } \ No newline at end of file diff --git a/src/Dotnet.Script.Core/Dotnet.Script.Core.csproj b/src/Dotnet.Script.Core/Dotnet.Script.Core.csproj index 24a97b2f..3b7e406d 100644 --- a/src/Dotnet.Script.Core/Dotnet.Script.Core.csproj +++ b/src/Dotnet.Script.Core/Dotnet.Script.Core.csproj @@ -2,7 +2,7 @@ A cross platform library allowing you to run C# (CSX) scripts with support for debugging and inline NuGet packages. Based on Roslyn. - 1.1.0 + 1.2.0 filipw netstandard2.0 Dotnet.Script.Core diff --git a/src/Dotnet.Script.DependencyModel.Nuget/Dotnet.Script.DependencyModel.NuGet.csproj b/src/Dotnet.Script.DependencyModel.Nuget/Dotnet.Script.DependencyModel.NuGet.csproj index becaacfe..ef8f59f9 100644 --- a/src/Dotnet.Script.DependencyModel.Nuget/Dotnet.Script.DependencyModel.NuGet.csproj +++ b/src/Dotnet.Script.DependencyModel.Nuget/Dotnet.Script.DependencyModel.NuGet.csproj @@ -8,7 +8,7 @@ https://github.com/filipw/dotnet-script.git git script;csx;csharp;roslyn;nuget - 1.1.0 + 1.2.0 A MetadataReferenceResolver that allows inline nuget references to be specified in script(csx) files. dotnet-script dotnet-script diff --git a/src/Dotnet.Script.DependencyModel/Dotnet.Script.DependencyModel.csproj b/src/Dotnet.Script.DependencyModel/Dotnet.Script.DependencyModel.csproj index c1141c7b..5f4f75d5 100644 --- a/src/Dotnet.Script.DependencyModel/Dotnet.Script.DependencyModel.csproj +++ b/src/Dotnet.Script.DependencyModel/Dotnet.Script.DependencyModel.csproj @@ -11,7 +11,7 @@ https://github.com/filipw/dotnet-script.git git script;csx;csharp;roslyn;omnisharp - 1.1.0 + 1.2.0 latest true ../dotnet-script.snk diff --git a/src/Dotnet.Script.DependencyModel/ProjectSystem/csproj.template b/src/Dotnet.Script.DependencyModel/ProjectSystem/csproj.template index 119a3645..43ef3971 100644 --- a/src/Dotnet.Script.DependencyModel/ProjectSystem/csproj.template +++ b/src/Dotnet.Script.DependencyModel/ProjectSystem/csproj.template @@ -1,7 +1,7 @@  Exe - netcoreapp2.1 + net5.0 latest diff --git a/src/Dotnet.Script.Desktop.Tests/CompilationDepenencyTests.cs b/src/Dotnet.Script.Desktop.Tests/CompilationDepenencyTests.cs index ee90241a..e3b01a0b 100644 --- a/src/Dotnet.Script.Desktop.Tests/CompilationDepenencyTests.cs +++ b/src/Dotnet.Script.Desktop.Tests/CompilationDepenencyTests.cs @@ -15,8 +15,8 @@ public CompilationDependencyTests(ITestOutputHelper testOutputHelper) } [Theory] - [InlineData("netcoreapp2.1")] - [InlineData("netcoreapp3.0")] + [InlineData("netcoreapp3.1")] + [InlineData("net5.0")] public void ShouldGetCompilationDependenciesForNetCoreApp(string targetFramework) { var resolver = CreateResolver(); diff --git a/src/Dotnet.Script.Tests/Dotnet.Script.Tests.csproj b/src/Dotnet.Script.Tests/Dotnet.Script.Tests.csproj index 504cb2c0..2278ada9 100644 --- a/src/Dotnet.Script.Tests/Dotnet.Script.Tests.csproj +++ b/src/Dotnet.Script.Tests/Dotnet.Script.Tests.csproj @@ -1,6 +1,6 @@ - net5.0;netcoreapp3.1;netcoreapp2.1 + net5.0;netcoreapp3.1 false true ../dotnet-script.snk diff --git a/src/Dotnet.Script/Dotnet.Script.csproj b/src/Dotnet.Script/Dotnet.Script.csproj index 7cbd6249..ca233066 100644 --- a/src/Dotnet.Script/Dotnet.Script.csproj +++ b/src/Dotnet.Script/Dotnet.Script.csproj @@ -1,10 +1,10 @@  Dotnet CLI tool allowing you to run C# (CSX) scripts. - 1.1.0 + 1.2.0 filipw Dotnet.Script - net5.0;netcoreapp2.1;netcoreapp3.1 + net5.0;netcoreapp3.1 portable dotnet-script Exe From 4bbcc1aee5bfcce9e4566f3bcf54c56423f8ac47 Mon Sep 17 00:00:00 2001 From: filipw Date: Mon, 23 Aug 2021 16:33:45 +0200 Subject: [PATCH 2/3] clean up --- README.md | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index ae711e33..3586ff41 100644 --- a/README.md +++ b/README.md @@ -20,11 +20,11 @@ Run C# scripts from the .NET CLI, define NuGet packages inline and edit/debug th ### Prerequisites -The only thing we need to install is [.NET Core 2.1+ SDK](https://www.microsoft.com/net/download/core). In order to use C# 8.0 features, [.NET Core 3.1+ SDK](https://www.microsoft.com/net/download/core) must be installed. +The only thing we need to install is [.NET Core 3.1 or .NET 5.0 SDK](https://www.microsoft.com/net/download/core). ### .NET Core Global Tool -.NET Core 2.1 introduces the concept of global tools meaning that you can install `dotnet-script` using nothing but the .NET CLI. +.NET Core 2.1 introduced the concept of global tools meaning that you can install `dotnet-script` using nothing but the .NET CLI. ```shell dotnet tool install -g dotnet-script @@ -34,9 +34,6 @@ Tool 'dotnet-script' (version '0.22.0') was successfully installed. ``` The advantage of this approach is that you can use the same command for installation across all platforms. - -> ⚠️ In order to use the global tool you need [.NET Core SDK 2.1.300](https://www.microsoft.com/net/download/dotnet-core/sdk-2.1.300) or higher. The earlier previews and release candidates of .NET Core 2.1 are not supported. - .NET Core SDK also supports viewing a list of installed tools and their uninstallation. ```shell From 07e10a21b6a23572a614c3b490fa36d7e217c415 Mon Sep 17 00:00:00 2001 From: Filip W Date: Mon, 23 Aug 2021 17:16:49 +0200 Subject: [PATCH 3/3] Update README.md --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index 3586ff41..05c5ae0c 100644 --- a/README.md +++ b/README.md @@ -313,7 +313,6 @@ To consume a script package all we need to do specify the NuGet package in the ` The following example loads the [simple-targets](https://www.nuget.org/packages/simple-targets-csx) package that contains script files to be included in our script. ```C# -#! "netcoreapp3.1" #load "nuget:simple-targets-csx, 6.0.0" using static SimpleTargets; @@ -463,7 +462,6 @@ The following example shows how we can pipe data in and out of a script. The `UpperCase.csx` script simply converts the standard input to upper case and writes it back out to standard output. ```csharp -#! "netcoreapp3.1" using (var streamReader = new StreamReader(Console.OpenStandardInput())) { Write(streamReader.ReadToEnd().ToUpper());