From 53e584eeb294dfada8684d081ddaeb06b9bec807 Mon Sep 17 00:00:00 2001 From: Bernhard Richter Date: Thu, 15 Sep 2022 13:58:28 +0200 Subject: [PATCH 01/16] Initial support for net7.0 --- azure-pipelines.yml | 16 ++++++++-------- global.json | 4 ++-- src/Dotnet.Script.Core/Dotnet.Script.Core.csproj | 2 +- .../ScriptAssemblyLoadContext.cs | 4 ++-- .../Compilation/CompilationDependencyResolver.cs | 2 +- .../Dotnet.Script.Tests.csproj | 3 ++- src/Dotnet.Script/Dotnet.Script.csproj | 2 +- 7 files changed, 17 insertions(+), 16 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index b0b520c2..78eb2531 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -17,10 +17,10 @@ jobs: displayName: Ubuntu Agent condition: succeeded() pool: - vmImage: 'ubuntu-18.04' + vmImage: "ubuntu-18.04" steps: - - bash: "curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin -version 3.1.102" - displayName: "Install 3.0.100" + - bash: "curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin -version 7.0.100-rc.1.22431.12" + displayName: "Install 7.0.100" - bash: "curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin -version 5.0.100" displayName: " 5.0.100" @@ -43,11 +43,11 @@ jobs: displayName: Mac Agent condition: succeeded() pool: - vmImage: 'macOS-latest' + vmImage: "macOS-latest" steps: - bash: | - curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin -version 3.1.102 - displayName: "Install 3.0.100" + curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin -version 7.0.100-rc.1.22431.12 + displayName: "Install 7.0.100" - bash: | curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin -version 5.0.100 @@ -73,9 +73,9 @@ jobs: steps: - powershell: | iwr https://raw.githubusercontent.com/dotnet/cli/release/2.1.3xx/scripts/obtain/dotnet-install.ps1 -outfile dotnet-install.ps1 - .\dotnet-install.ps1 -Version 3.1.102 + .\dotnet-install.ps1 -Version 7.0.100-rc.1.22431.12 - displayName: "Install 3.0.100" + displayName: "Install 7.0.100" - powershell: | iwr https://raw.githubusercontent.com/dotnet/cli/release/2.1.3xx/scripts/obtain/dotnet-install.ps1 -outfile dotnet-install.ps1 diff --git a/global.json b/global.json index b2d7a05a..b68e0c11 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "6.0.100", + "version": "7.0.100-rc.1.22431.12", "rollForward": "latestFeature" } -} \ 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 113f54ec..6e077f5d 100644 --- a/src/Dotnet.Script.Core/Dotnet.Script.Core.csproj +++ b/src/Dotnet.Script.Core/Dotnet.Script.Core.csproj @@ -4,7 +4,7 @@ A cross platform library allowing you to run C# (CSX) scripts with support for debugging and inline NuGet packages. Based on Roslyn. 1.3.1 filipw - netstandard2.0;netcoreapp3.1 + net5.0;netstandard2.0 Dotnet.Script.Core Dotnet.Script.Core script;csx;csharp;roslyn diff --git a/src/Dotnet.Script.Core/ScriptAssemblyLoadContext.cs b/src/Dotnet.Script.Core/ScriptAssemblyLoadContext.cs index f5691074..603661ae 100644 --- a/src/Dotnet.Script.Core/ScriptAssemblyLoadContext.cs +++ b/src/Dotnet.Script.Core/ScriptAssemblyLoadContext.cs @@ -1,4 +1,4 @@ -#if NETCOREAPP +#if NET using System; using System.Reflection; @@ -20,7 +20,7 @@ public ScriptAssemblyLoadContext() { } -#if NETCOREAPP3_0_OR_GREATER +#if NET5_0_OR_GREATER /// /// Initializes a new instance of the class /// with a name and a value that indicates whether unloading is enabled. diff --git a/src/Dotnet.Script.DependencyModel/Compilation/CompilationDependencyResolver.cs b/src/Dotnet.Script.DependencyModel/Compilation/CompilationDependencyResolver.cs index 51dbc3c0..033f19d4 100644 --- a/src/Dotnet.Script.DependencyModel/Compilation/CompilationDependencyResolver.cs +++ b/src/Dotnet.Script.DependencyModel/Compilation/CompilationDependencyResolver.cs @@ -44,7 +44,7 @@ public IEnumerable GetDependencies(string targetDirectory } // On .Net Core, we need to fetch the compilation references for framework assemblies separately. - if (defaultTargetFramework.StartsWith("netcoreapp3", StringComparison.InvariantCultureIgnoreCase) || + if (defaultTargetFramework.StartsWith("net7", StringComparison.InvariantCultureIgnoreCase) || defaultTargetFramework.StartsWith("net5", StringComparison.InvariantCultureIgnoreCase) || defaultTargetFramework.StartsWith("net6", StringComparison.InvariantCultureIgnoreCase)) { diff --git a/src/Dotnet.Script.Tests/Dotnet.Script.Tests.csproj b/src/Dotnet.Script.Tests/Dotnet.Script.Tests.csproj index af049301..f0b545ae 100644 --- a/src/Dotnet.Script.Tests/Dotnet.Script.Tests.csproj +++ b/src/Dotnet.Script.Tests/Dotnet.Script.Tests.csproj @@ -1,6 +1,7 @@ - net6.0;net5.0;netcoreapp3.1 + + net7.0; false true ../dotnet-script.snk diff --git a/src/Dotnet.Script/Dotnet.Script.csproj b/src/Dotnet.Script/Dotnet.Script.csproj index e17ab3a5..d320b7de 100644 --- a/src/Dotnet.Script/Dotnet.Script.csproj +++ b/src/Dotnet.Script/Dotnet.Script.csproj @@ -4,7 +4,7 @@ 1.3.1 filipw Dotnet.Script - net6.0;net5.0;netcoreapp3.1 + net7.0;net6.0;net5.0 portable dotnet-script Exe From 5e53172b5b8e8f97d3954a4ba6b2316d1ef67cb8 Mon Sep 17 00:00:00 2001 From: Bernhard Richter Date: Thu, 15 Sep 2022 15:55:56 +0200 Subject: [PATCH 02/16] Use dotnet-script 1.3.1 in build script --- azure-pipelines.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 78eb2531..f92dbb4f 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -30,7 +30,7 @@ jobs: - bash: | export PATH=/home/vsts/.dotnet:$PATH - curl -L https://github.com/filipw/dotnet-script/releases/download/1.2.1/dotnet-script.1.2.1.zip > dotnet-script.zip + curl -L https://github.com/filipw/dotnet-script/releases/download/1.3.1/dotnet-script.1.3.1.zip > dotnet-script.zip unzip -o dotnet-script.zip -d ./ displayName: "Install dotnet-script" @@ -58,7 +58,7 @@ jobs: displayName: "Install 6.0.100" - bash: | - curl -L https://github.com/filipw/dotnet-script/releases/download/1.2.1/dotnet-script.1.2.1.zip > dotnet-script.zip + curl -L https://github.com/filipw/dotnet-script/releases/download/1.3.1/dotnet-script.1.3.1.zip > dotnet-script.zip unzip -o dotnet-script.zip -d ./ displayName: "Install dotnet-script" @@ -105,7 +105,7 @@ jobs: - bash: | export PATH=/c/Users/VssAdministrator/AppData/Local/Microsoft/dotnet:$PATH cd build - curl -L https://github.com/filipw/dotnet-script/releases/download/1.2.1/dotnet-script.1.2.1.zip > dotnet-script.zip + curl -L https://github.com/filipw/dotnet-script/releases/download/1.3.1/dotnet-script.1.3.1.zip > dotnet-script.zip unzip -o dotnet-script.zip -d ./ displayName: "Install dotnet-script" From d4de60ddce6ec0f9c429ac3c5457e7bd2fb588ca Mon Sep 17 00:00:00 2001 From: Bernhard Richter Date: Thu, 15 Sep 2022 16:47:28 +0200 Subject: [PATCH 03/16] GitHub Action First Try --- .github/workflows/main.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..747e97d6 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,27 @@ +name: CI + +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Install .Net Core + uses: actions/setup-dotnet@v2 + with: + dotnet-version: | + 5.0.x + 6.0.x + 7.0.x + include-prerelease: true + - name: Install dotnet-script + run: dotnet tool install dotnet-script --global + + - name: Run build script + run: dotnet-script build/build.csx + env: # Or as an environment variable + GITHUB_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} + IS_SECURE_BUILDENVIRONMENT: ${{ secrets.IS_SECURE_BUILDENVIRONMENT }} + NUGET_APIKEY: ${{ secrets.NUGET_APIKEY }} From 37890a8cdb6d98a11238c920cbeb321e0368da6b Mon Sep 17 00:00:00 2001 From: Bernhard Richter Date: Thu, 15 Sep 2022 16:49:07 +0200 Subject: [PATCH 04/16] Fix build script casing --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 747e97d6..f253ab9d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -20,7 +20,7 @@ jobs: run: dotnet tool install dotnet-script --global - name: Run build script - run: dotnet-script build/build.csx + run: dotnet-script build/Build.csx env: # Or as an environment variable GITHUB_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} IS_SECURE_BUILDENVIRONMENT: ${{ secrets.IS_SECURE_BUILDENVIRONMENT }} From b62f58fc15af873d4a2f8d0936ebc4f7362b9504 Mon Sep 17 00:00:00 2001 From: Bernhard Richter Date: Thu, 15 Sep 2022 16:58:06 +0200 Subject: [PATCH 05/16] Use net6.0 for GitHub artifact --- build/Build.csx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build/Build.csx b/build/Build.csx index e9b6782f..623e404b 100644 --- a/build/Build.csx +++ b/build/Build.csx @@ -4,10 +4,10 @@ #load "Choco.csx" #load "BuildContext.csx" -using static ReleaseManagement; +using System.Xml.Linq; using static ChangeLog; using static FileUtils; -using System.Xml.Linq; +using static ReleaseManagement; [StepDescription("Runs all tests.")] Step test = () => RunTests(); @@ -35,7 +35,7 @@ await StepRunner.Execute(Args); private void CreateGitHubReleaseAsset() { - DotNet.Publish(dotnetScriptProjectFolder, publishArtifactsFolder, "netcoreapp3.1"); + DotNet.Publish(dotnetScriptProjectFolder, publishArtifactsFolder, "net6.0"); Zip(publishArchiveFolder, pathToGitHubReleaseAsset); } From 8b8f103be4be1af057f884295b39de0cc9f64a46 Mon Sep 17 00:00:00 2001 From: Bernhard Richter Date: Thu, 15 Sep 2022 17:18:01 +0200 Subject: [PATCH 06/16] Add Windows build --- .github/workflows/main.yml | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f253ab9d..8cd02c65 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -3,9 +3,28 @@ name: CI on: [push, pull_request] jobs: - build: + build-linux: runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Install .Net Core + uses: actions/setup-dotnet@v2 + with: + dotnet-version: | + 5.0.x + 6.0.x + 7.0.x + include-prerelease: true + - name: Install dotnet-script + run: dotnet tool install dotnet-script --global + + - name: Run build script + run: dotnet-script build/Build.csx + + build-windows: + runs-on: windows-latest + steps: - uses: actions/checkout@v3 - name: Install .Net Core From 3d5eb0a092455da64905cc68da37f964ef0d26fb Mon Sep 17 00:00:00 2001 From: Bernhard Richter Date: Thu, 15 Sep 2022 17:52:08 +0200 Subject: [PATCH 07/16] Use net5-7 in Desktop.Tests --- src/Dotnet.Script.Desktop.Tests/CompilationDepenencyTests.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Dotnet.Script.Desktop.Tests/CompilationDepenencyTests.cs b/src/Dotnet.Script.Desktop.Tests/CompilationDepenencyTests.cs index e3b01a0b..5a2c1665 100644 --- a/src/Dotnet.Script.Desktop.Tests/CompilationDepenencyTests.cs +++ b/src/Dotnet.Script.Desktop.Tests/CompilationDepenencyTests.cs @@ -15,8 +15,9 @@ public CompilationDependencyTests(ITestOutputHelper testOutputHelper) } [Theory] - [InlineData("netcoreapp3.1")] [InlineData("net5.0")] + [InlineData("net6.0")] + [InlineData("net7.0")] public void ShouldGetCompilationDependenciesForNetCoreApp(string targetFramework) { var resolver = CreateResolver(); From 58d0c2cec8e4f22c6893a5af1547193995cba56d Mon Sep 17 00:00:00 2001 From: Bernhard Richter Date: Thu, 15 Sep 2022 18:15:33 +0200 Subject: [PATCH 08/16] Use ScriptPathFolder for saving nuspec file --- build/Choco.csx | 3 +-- build/omnisharp.json | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/build/Choco.csx b/build/Choco.csx index 9a00be3b..8fb9b6b1 100644 --- a/build/Choco.csx +++ b/build/Choco.csx @@ -78,8 +78,7 @@ public static class Choco filesElement.Add(CreateFileElement(@"tools\*.*", $@"{packageId}\tools")); var srcGlobPattern = $@"{pathToBinaries}\**\*"; filesElement.Add(CreateFileElement(srcGlobPattern, packageId)); - - using var fileStream = new FileStream("Chocolatey/chocolatey.nuspec", FileMode.Create); + using var fileStream = new FileStream(Path.Combine(FileUtils.GetScriptFolder(), "Chocolatey", "chocolatey.nuspec"), FileMode.Create); new XDocument(packageElement).Save(fileStream); } diff --git a/build/omnisharp.json b/build/omnisharp.json index 44278159..74b7fc1b 100644 --- a/build/omnisharp.json +++ b/build/omnisharp.json @@ -1,6 +1,6 @@ { "script": { "enableScriptNuGetReferences": true, - "defaultTargetFramework": "netcoreapp3.1" + "defaultTargetFramework": "net6.0" } } \ No newline at end of file From 6e31bf35cc64b1812c1fbe04c0ee2974b012ea2e Mon Sep 17 00:00:00 2001 From: Bernhard Richter Date: Thu, 15 Sep 2022 18:16:11 +0200 Subject: [PATCH 09/16] Remove azure-pipelines file --- azure-pipelines.yml | 126 -------------------------------------------- 1 file changed, 126 deletions(-) delete mode 100644 azure-pipelines.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml deleted file mode 100644 index f92dbb4f..00000000 --- a/azure-pipelines.yml +++ /dev/null @@ -1,126 +0,0 @@ -resources: - - repo: self - -trigger: - tags: - include: - - refs/tags/* - branches: - include: - - "*" - -variables: - - group: dotnet-script-api-keys - -jobs: - - job: Job_3 - displayName: Ubuntu Agent - condition: succeeded() - pool: - vmImage: "ubuntu-18.04" - steps: - - bash: "curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin -version 7.0.100-rc.1.22431.12" - displayName: "Install 7.0.100" - - - bash: "curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin -version 5.0.100" - displayName: " 5.0.100" - - - bash: "curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin -version 6.0.100" - displayName: " 6.0.100" - - - bash: | - export PATH=/home/vsts/.dotnet:$PATH - curl -L https://github.com/filipw/dotnet-script/releases/download/1.3.1/dotnet-script.1.3.1.zip > dotnet-script.zip - unzip -o dotnet-script.zip -d ./ - displayName: "Install dotnet-script" - - - bash: | - export PATH=/home/vsts/.dotnet:$PATH - dotnet dotnet-script/dotnet-script.dll build/Build.csx - displayName: "Run build.csx" - - - job: Job_1 - displayName: Mac Agent - condition: succeeded() - pool: - vmImage: "macOS-latest" - steps: - - bash: | - curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin -version 7.0.100-rc.1.22431.12 - displayName: "Install 7.0.100" - - - bash: | - curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin -version 5.0.100 - displayName: "Install 5.0.100" - - - bash: | - curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin -version 6.0.100 - displayName: "Install 6.0.100" - - - bash: | - curl -L https://github.com/filipw/dotnet-script/releases/download/1.3.1/dotnet-script.1.3.1.zip > dotnet-script.zip - unzip -o dotnet-script.zip -d ./ - displayName: "Install dotnet-script" - - - bash: "dotnet dotnet-script/dotnet-script.dll build/build.csx" - displayName: "Run build.csx" - - - job: Job_2 - displayName: Windows Agent - condition: succeeded() - pool: - name: Hosted Windows 2019 with VS2019 - steps: - - powershell: | - iwr https://raw.githubusercontent.com/dotnet/cli/release/2.1.3xx/scripts/obtain/dotnet-install.ps1 -outfile dotnet-install.ps1 - .\dotnet-install.ps1 -Version 7.0.100-rc.1.22431.12 - - displayName: "Install 7.0.100" - - - powershell: | - iwr https://raw.githubusercontent.com/dotnet/cli/release/2.1.3xx/scripts/obtain/dotnet-install.ps1 -outfile dotnet-install.ps1 - .\dotnet-install.ps1 -Version 5.0.100 - - displayName: "Install 5.0.100" - - - powershell: | - iwr https://raw.githubusercontent.com/dotnet/cli/release/2.1.3xx/scripts/obtain/dotnet-install.ps1 -outfile dotnet-install.ps1 - .\dotnet-install.ps1 -Version 6.0.100 - - displayName: "Install 6.0.100" - - # NuGet Tool Installer - # Acquires a specific version of NuGet from the internet or the tools cache and adds it to the PATH. Use this task to change the version of NuGet used in the NuGet tasks. - - task: NuGetToolInstaller@0 - inputs: - versionSpec: "4.8.2" - - #checkLatest: false # Optional - - bash: | - export PATH=/c/Users/VssAdministrator/AppData/Local/Microsoft/dotnet:$PATH - dotnet --info - - displayName: "Show installed sdk" - - - bash: | - export PATH=/c/Users/VssAdministrator/AppData/Local/Microsoft/dotnet:$PATH - cd build - curl -L https://github.com/filipw/dotnet-script/releases/download/1.3.1/dotnet-script.1.3.1.zip > dotnet-script.zip - unzip -o dotnet-script.zip -d ./ - displayName: "Install dotnet-script" - - - bash: | - export PATH=/c/Users/VssAdministrator/AppData/Local/Microsoft/dotnet:$PATH - cd build - dotnet dotnet-script/dotnet-script.dll build.csx - displayName: "Run build.csx" - env: - IS_SECURE_BUILDENVIRONMENT: $(IS_SECURE_BUILDENVIRONMENT) - GITHUB_REPO_TOKEN: $(GITHUB_REPO_TOKEN) - NUGET_APIKEY: $(NUGET_APIKEY) - CHOCOLATEY_APIKEY: $(CHOCOLATEY_APIKEY) - - - task: PublishPipelineArtifact@0 - displayName: "Publish Pipeline Artifact" - inputs: - targetPath: build/Artifacts From 4f8e5a48fa973519a029c6b4f285237c623aefc2 Mon Sep 17 00:00:00 2001 From: Bernhard Richter Date: Thu, 15 Sep 2022 18:34:46 +0200 Subject: [PATCH 10/16] Use ScriptFolder for choco pack --- build/Choco.csx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/Choco.csx b/build/Choco.csx index 8fb9b6b1..05c8de13 100644 --- a/build/Choco.csx +++ b/build/Choco.csx @@ -13,7 +13,7 @@ public static class Choco { string pathToProjectFile = Directory.GetFiles(pathToProjectFolder, "*.csproj").Single(); CreateSpecificationFromProject(pathToProjectFile, pathToBinaries); - Command.Execute("choco.exe", $@"pack Chocolatey\chocolatey.nuspec --outputdirectory {outputFolder}"); + Command.Execute("choco.exe", $@"pack {Path.Combine(FileUtils.GetScriptFolder(), "Chocolatey", "chocolatey.nuspec")} --outputdirectory {outputFolder}"); } public static void Push(string packagesFolder, string apiKey, string source = "https://push.chocolatey.org/") From 3421e12a601616e6e47171c04650c4e21f6282b0 Mon Sep 17 00:00:00 2001 From: Bernhard Richter Date: Thu, 15 Sep 2022 21:18:00 +0200 Subject: [PATCH 11/16] Added Mac-build --- .github/workflows/main.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8cd02c65..485b5a70 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -22,6 +22,25 @@ jobs: - name: Run build script run: dotnet-script build/Build.csx + build-mac: + runs-on: macos-latest + + steps: + - uses: actions/checkout@v3 + - name: Install .Net Core + uses: actions/setup-dotnet@v2 + with: + dotnet-version: | + 5.0.x + 6.0.x + 7.0.x + include-prerelease: true + - name: Install dotnet-script + run: dotnet tool install dotnet-script --global + + - name: Run build script + run: dotnet-script build/Build.csx + build-windows: runs-on: windows-latest From f5d5af438979941b9825ed6db4bba5d5fe6acb01 Mon Sep 17 00:00:00 2001 From: Bernhard Richter Date: Fri, 16 Sep 2022 15:28:46 +0200 Subject: [PATCH 12/16] Inlude all frameworks in tests --- src/Dotnet.Script.Tests/Dotnet.Script.Tests.csproj | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Dotnet.Script.Tests/Dotnet.Script.Tests.csproj b/src/Dotnet.Script.Tests/Dotnet.Script.Tests.csproj index f0b545ae..9abc6492 100644 --- a/src/Dotnet.Script.Tests/Dotnet.Script.Tests.csproj +++ b/src/Dotnet.Script.Tests/Dotnet.Script.Tests.csproj @@ -1,7 +1,6 @@ - - net7.0; + net7.0;net6.0;net5.0 false true ../dotnet-script.snk From 635cf021856577ec437f9019b50e223f00e12ff2 Mon Sep 17 00:00:00 2001 From: Bernhard Richter Date: Fri, 16 Sep 2022 18:41:54 +0200 Subject: [PATCH 13/16] Removed unneeded framework-check (CompilationDependencyResolver) --- .../Compilation/CompilationDependencyResolver.cs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/Dotnet.Script.DependencyModel/Compilation/CompilationDependencyResolver.cs b/src/Dotnet.Script.DependencyModel/Compilation/CompilationDependencyResolver.cs index 033f19d4..136cb552 100644 --- a/src/Dotnet.Script.DependencyModel/Compilation/CompilationDependencyResolver.cs +++ b/src/Dotnet.Script.DependencyModel/Compilation/CompilationDependencyResolver.cs @@ -43,14 +43,8 @@ public IEnumerable GetDependencies(string targetDirectory result.Add(compilationDependency); } - // On .Net Core, we need to fetch the compilation references for framework assemblies separately. - if (defaultTargetFramework.StartsWith("net7", StringComparison.InvariantCultureIgnoreCase) || - defaultTargetFramework.StartsWith("net5", StringComparison.InvariantCultureIgnoreCase) || - defaultTargetFramework.StartsWith("net6", StringComparison.InvariantCultureIgnoreCase)) - { - var compilationreferences = _compilationReferenceReader.Read(projectFileInfo); - result.Add(new CompilationDependency("Dotnet.Script.Default.Dependencies", "99.0", compilationreferences.Select(cr => cr.Path).ToArray(), Array.Empty())); - } + var compilationReferences = _compilationReferenceReader.Read(projectFileInfo); + result.Add(new CompilationDependency("Dotnet.Script.Default.Dependencies", "99.0", compilationReferences.Select(cr => cr.Path).ToArray(), Array.Empty())); return result; } From 918a72825f9d444d4af769c484e5e2394f8dded1 Mon Sep 17 00:00:00 2001 From: Bernhard Richter Date: Fri, 16 Sep 2022 18:43:59 +0200 Subject: [PATCH 14/16] Bumped versions to 1.4.0 --- src/Dotnet.Script.Core/Dotnet.Script.Core.csproj | 2 +- .../Dotnet.Script.DependencyModel.NuGet.csproj | 2 +- .../Dotnet.Script.DependencyModel.csproj | 2 +- src/Dotnet.Script/Dotnet.Script.csproj | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Dotnet.Script.Core/Dotnet.Script.Core.csproj b/src/Dotnet.Script.Core/Dotnet.Script.Core.csproj index 6e077f5d..9da52a7d 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.3.1 + 1.4.0 filipw net5.0;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 05999b1a..c0df9c53 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.3.1 + 1.4.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 3dccf82a..0a4df0c5 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.3.1 + 1.4.0 latest true ../dotnet-script.snk diff --git a/src/Dotnet.Script/Dotnet.Script.csproj b/src/Dotnet.Script/Dotnet.Script.csproj index d320b7de..bb4b088e 100644 --- a/src/Dotnet.Script/Dotnet.Script.csproj +++ b/src/Dotnet.Script/Dotnet.Script.csproj @@ -1,7 +1,7 @@  Dotnet CLI tool allowing you to run C# (CSX) scripts. - 1.3.1 + 1.4.0 filipw Dotnet.Script net7.0;net6.0;net5.0 From 77e05fc7b9e3510679f84e0926a11e0917df7359 Mon Sep 17 00:00:00 2001 From: Bernhard Richter Date: Mon, 19 Sep 2022 11:31:24 +0200 Subject: [PATCH 15/16] Removed support for net5.0 --- .github/workflows/main.yml | 3 --- src/Dotnet.Script.Core/Dotnet.Script.Core.csproj | 2 +- src/Dotnet.Script/Dotnet.Script.csproj | 2 +- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 485b5a70..64f1e6b4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -12,7 +12,6 @@ jobs: uses: actions/setup-dotnet@v2 with: dotnet-version: | - 5.0.x 6.0.x 7.0.x include-prerelease: true @@ -31,7 +30,6 @@ jobs: uses: actions/setup-dotnet@v2 with: dotnet-version: | - 5.0.x 6.0.x 7.0.x include-prerelease: true @@ -50,7 +48,6 @@ jobs: uses: actions/setup-dotnet@v2 with: dotnet-version: | - 5.0.x 6.0.x 7.0.x include-prerelease: true diff --git a/src/Dotnet.Script.Core/Dotnet.Script.Core.csproj b/src/Dotnet.Script.Core/Dotnet.Script.Core.csproj index 9da52a7d..132db377 100644 --- a/src/Dotnet.Script.Core/Dotnet.Script.Core.csproj +++ b/src/Dotnet.Script.Core/Dotnet.Script.Core.csproj @@ -4,7 +4,7 @@ A cross platform library allowing you to run C# (CSX) scripts with support for debugging and inline NuGet packages. Based on Roslyn. 1.4.0 filipw - net5.0;netstandard2.0 + net6.0;netstandard2.0 Dotnet.Script.Core Dotnet.Script.Core script;csx;csharp;roslyn diff --git a/src/Dotnet.Script/Dotnet.Script.csproj b/src/Dotnet.Script/Dotnet.Script.csproj index bb4b088e..c446dccf 100644 --- a/src/Dotnet.Script/Dotnet.Script.csproj +++ b/src/Dotnet.Script/Dotnet.Script.csproj @@ -4,7 +4,7 @@ 1.4.0 filipw Dotnet.Script - net7.0;net6.0;net5.0 + net7.0;net6.0 portable dotnet-script Exe From 07af9cf3d5f5d6189c3676154a4bce8aa284a6ee Mon Sep 17 00:00:00 2001 From: Bernhard Richter Date: Mon, 19 Sep 2022 11:38:46 +0200 Subject: [PATCH 16/16] Use net6.0 in Dotnet.Script.Tests --- src/Dotnet.Script.Desktop.Tests/CompilationDepenencyTests.cs | 1 - src/Dotnet.Script.Tests/Dotnet.Script.Tests.csproj | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Dotnet.Script.Desktop.Tests/CompilationDepenencyTests.cs b/src/Dotnet.Script.Desktop.Tests/CompilationDepenencyTests.cs index 5a2c1665..e20e33e0 100644 --- a/src/Dotnet.Script.Desktop.Tests/CompilationDepenencyTests.cs +++ b/src/Dotnet.Script.Desktop.Tests/CompilationDepenencyTests.cs @@ -15,7 +15,6 @@ public CompilationDependencyTests(ITestOutputHelper testOutputHelper) } [Theory] - [InlineData("net5.0")] [InlineData("net6.0")] [InlineData("net7.0")] public void ShouldGetCompilationDependenciesForNetCoreApp(string targetFramework) diff --git a/src/Dotnet.Script.Tests/Dotnet.Script.Tests.csproj b/src/Dotnet.Script.Tests/Dotnet.Script.Tests.csproj index 9abc6492..138b3a56 100644 --- a/src/Dotnet.Script.Tests/Dotnet.Script.Tests.csproj +++ b/src/Dotnet.Script.Tests/Dotnet.Script.Tests.csproj @@ -1,6 +1,6 @@ - net7.0;net6.0;net5.0 + net7.0;net6.0 false true ../dotnet-script.snk