From 2d9b27e91579aa7bf2f795c148469e4da652e77f Mon Sep 17 00:00:00 2001 From: Matthew John Cheetham Date: Mon, 11 Sep 2023 13:16:44 -0700 Subject: [PATCH 1/2] dotnet: update from .NET 7 to .NET 8 --- .vscode/launch.json | 4 ++-- .vscode/tasks.json | 4 ++-- build/GCM.MSBuild.csproj | 2 +- docs/development.md | 4 ++-- src/linux/Packaging.Linux/Packaging.Linux.csproj | 2 +- src/linux/Packaging.Linux/install-from-source.sh | 2 +- src/linux/Packaging.Linux/layout.sh | 2 +- src/osx/Installer.Mac/Installer.Mac.csproj | 2 +- src/osx/Installer.Mac/layout.sh | 2 +- .../Atlassian.Bitbucket.Tests.csproj | 2 +- src/shared/Atlassian.Bitbucket/Atlassian.Bitbucket.csproj | 4 ++-- src/shared/Core.Tests/Core.Tests.csproj | 2 +- src/shared/Core/Core.csproj | 4 ++-- src/shared/DotnetTool/DotnetTool.csproj | 2 +- src/shared/DotnetTool/dotnet-tool.nuspec | 2 +- src/shared/DotnetTool/layout.sh | 2 +- .../Git-Credential-Manager/Git-Credential-Manager.csproj | 4 ++-- src/shared/GitHub.Tests/GitHub.Tests.csproj | 2 +- src/shared/GitHub/GitHub.csproj | 4 ++-- src/shared/GitLab.Tests/GitLab.Tests.csproj | 2 +- src/shared/GitLab/GitLab.csproj | 4 ++-- .../Microsoft.AzureRepos.Tests.csproj | 2 +- src/shared/Microsoft.AzureRepos/Microsoft.AzureRepos.csproj | 4 ++-- src/shared/TestInfrastructure/TestInfrastructure.csproj | 2 +- 24 files changed, 33 insertions(+), 33 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index af72a8e27..d9b004b86 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -10,7 +10,7 @@ "request": "launch", "preLaunchTask": "build", // If you have changed target frameworks, make sure to update the program path. - "program": "${workspaceFolder}/out/shared/Git-Credential-Manager/bin/Debug/net7.0/git-credential-manager.dll", + "program": "${workspaceFolder}/out/shared/Git-Credential-Manager/bin/Debug/net8.0/git-credential-manager.dll", "args": ["get"], "cwd": "${workspaceFolder}/out/shared/Git-Credential-Manager", "console": "integratedTerminal", @@ -22,7 +22,7 @@ "request": "launch", "preLaunchTask": "build", // If you have changed target frameworks, make sure to update the program path. - "program": "${workspaceFolder}/out/shared/Git-Credential-Manager/bin/Debug/net7.0/git-credential-manager.dll", + "program": "${workspaceFolder}/out/shared/Git-Credential-Manager/bin/Debug/net8.0/git-credential-manager.dll", "args": ["store"], "cwd": "${workspaceFolder}/out/shared/Git-Credential-Manager", "console": "integratedTerminal", diff --git a/.vscode/tasks.json b/.vscode/tasks.json index e47892848..c559b17b8 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -56,7 +56,7 @@ "type": "shell", "group": "test", "args": [ - "~/.nuget/packages/reportgenerator/*/*/net7.0/ReportGenerator.dll", + "~/.nuget/packages/reportgenerator/*/*/net8.0/ReportGenerator.dll", "-reports:${workspaceFolder}/**/TestResults/**/coverage.cobertura.xml", "-targetdir:${workspaceFolder}/out/code-coverage" ], @@ -71,7 +71,7 @@ "type": "shell", "group": "test", "args": [ - "${env:USERROFILE}/.nuget/packages/reportgenerator/*/*/net7.0/ReportGenerator.dll", + "${env:USERROFILE}/.nuget/packages/reportgenerator/*/*/net8.0/ReportGenerator.dll", "-reports:${workspaceFolder}/**/TestResults/**/coverage.cobertura.xml", "-targetdir:${workspaceFolder}/out/code-coverage" ], diff --git a/build/GCM.MSBuild.csproj b/build/GCM.MSBuild.csproj index 02f5a8444..3df4909e6 100644 --- a/build/GCM.MSBuild.csproj +++ b/build/GCM.MSBuild.csproj @@ -1,7 +1,7 @@ - net7.0 + net8.0 false diff --git a/docs/development.md b/docs/development.md index 31350192a..7729556f9 100644 --- a/docs/development.md +++ b/docs/development.md @@ -209,13 +209,13 @@ HTML reports can be generated using ReportGenerator, this should be installed during the build process, from the command line: ```shell -dotnet ~/.nuget/packages/reportgenerator/*/*/net7.0/ReportGenerator.dll -reports:./**/TestResults/**/coverage.cobertura.xml -targetdir:./out/code-coverage +dotnet ~/.nuget/packages/reportgenerator/*/*/net8.0/ReportGenerator.dll -reports:./**/TestResults/**/coverage.cobertura.xml -targetdir:./out/code-coverage ``` or ```shell -dotnet {$env:USERPROFILE}/.nuget/packages/reportgenerator/*/*/net7.0/ReportGenerator.dll -reports:./**/TestResults/**/coverage.cobertura.xml -targetdir:./out/code-coverage +dotnet {$env:USERPROFILE}/.nuget/packages/reportgenerator/*/*/net8.0/ReportGenerator.dll -reports:./**/TestResults/**/coverage.cobertura.xml -targetdir:./out/code-coverage ``` Or via VSCode Terminal/Run Task: diff --git a/src/linux/Packaging.Linux/Packaging.Linux.csproj b/src/linux/Packaging.Linux/Packaging.Linux.csproj index 362ffc230..8b9755c78 100644 --- a/src/linux/Packaging.Linux/Packaging.Linux.csproj +++ b/src/linux/Packaging.Linux/Packaging.Linux.csproj @@ -3,7 +3,7 @@ - net7.0 + net8.0 false diff --git a/src/linux/Packaging.Linux/install-from-source.sh b/src/linux/Packaging.Linux/install-from-source.sh index df586ce1c..643afb812 100755 --- a/src/linux/Packaging.Linux/install-from-source.sh +++ b/src/linux/Packaging.Linux/install-from-source.sh @@ -157,7 +157,7 @@ case "$distribution" in # Install dotnet packages and dependencies if needed. if [ -z "$(verify_existing_dotnet_installation)" ]; then # First try to use native feeds (Ubuntu 22.04 and later). - if ! apt_install dotnet7; then + if ! apt_install dotnet8; then # If the native feeds fail, we fall back to # packages.microsoft.com. We begin by adding the dotnet package # repository/signing key. diff --git a/src/linux/Packaging.Linux/layout.sh b/src/linux/Packaging.Linux/layout.sh index 5f3ba8ca8..6679c39ca 100755 --- a/src/linux/Packaging.Linux/layout.sh +++ b/src/linux/Packaging.Linux/layout.sh @@ -38,7 +38,7 @@ GCM_SRC="$SRC/shared/Git-Credential-Manager" PROJ_OUT="$OUT/linux/Packaging.Linux" # Build parameters -FRAMEWORK=net7.0 +FRAMEWORK=net8.0 RUNTIME=linux-x64 # Perform pre-execution checks diff --git a/src/osx/Installer.Mac/Installer.Mac.csproj b/src/osx/Installer.Mac/Installer.Mac.csproj index e46022374..daabd20d4 100644 --- a/src/osx/Installer.Mac/Installer.Mac.csproj +++ b/src/osx/Installer.Mac/Installer.Mac.csproj @@ -3,7 +3,7 @@ - net7.0 + net8.0 false diff --git a/src/osx/Installer.Mac/layout.sh b/src/osx/Installer.Mac/layout.sh index 544b7e106..ad8e2cfc2 100755 --- a/src/osx/Installer.Mac/layout.sh +++ b/src/osx/Installer.Mac/layout.sh @@ -24,7 +24,7 @@ GCM_SRC="$SRC/shared/Git-Credential-Manager" GCM_UI_SRC="$SRC/shared/Git-Credential-Manager.UI.Avalonia" # Build parameters -FRAMEWORK=net7.0 +FRAMEWORK=net8.0 # Parse script arguments for i in "$@" diff --git a/src/shared/Atlassian.Bitbucket.Tests/Atlassian.Bitbucket.Tests.csproj b/src/shared/Atlassian.Bitbucket.Tests/Atlassian.Bitbucket.Tests.csproj index 0e3c94c22..d5d08797c 100644 --- a/src/shared/Atlassian.Bitbucket.Tests/Atlassian.Bitbucket.Tests.csproj +++ b/src/shared/Atlassian.Bitbucket.Tests/Atlassian.Bitbucket.Tests.csproj @@ -1,7 +1,7 @@  - net7.0 + net8.0 false true latest diff --git a/src/shared/Atlassian.Bitbucket/Atlassian.Bitbucket.csproj b/src/shared/Atlassian.Bitbucket/Atlassian.Bitbucket.csproj index af8285c72..6aab348f8 100644 --- a/src/shared/Atlassian.Bitbucket/Atlassian.Bitbucket.csproj +++ b/src/shared/Atlassian.Bitbucket/Atlassian.Bitbucket.csproj @@ -1,8 +1,8 @@  - net7.0 - net7.0;net472 + net8.0 + net8.0;net472 Atlassian.Bitbucket Atlassian.Bitbucket false diff --git a/src/shared/Core.Tests/Core.Tests.csproj b/src/shared/Core.Tests/Core.Tests.csproj index 4ee2d350e..db045a83b 100644 --- a/src/shared/Core.Tests/Core.Tests.csproj +++ b/src/shared/Core.Tests/Core.Tests.csproj @@ -1,7 +1,7 @@  - net7.0 + net8.0 false true latest diff --git a/src/shared/Core/Core.csproj b/src/shared/Core/Core.csproj index 644d07e4e..fde8cb3a0 100644 --- a/src/shared/Core/Core.csproj +++ b/src/shared/Core/Core.csproj @@ -1,8 +1,8 @@  - net7.0 - net7.0;net472 + net8.0 + net8.0;net472 gcmcore GitCredentialManager false diff --git a/src/shared/DotnetTool/DotnetTool.csproj b/src/shared/DotnetTool/DotnetTool.csproj index a951303bb..a1107a4b6 100644 --- a/src/shared/DotnetTool/DotnetTool.csproj +++ b/src/shared/DotnetTool/DotnetTool.csproj @@ -1,6 +1,6 @@ - net7.0 + net8.0 true dotnet-tool.nuspec diff --git a/src/shared/DotnetTool/dotnet-tool.nuspec b/src/shared/DotnetTool/dotnet-tool.nuspec index e707ba27e..cf9ba7444 100644 --- a/src/shared/DotnetTool/dotnet-tool.nuspec +++ b/src/shared/DotnetTool/dotnet-tool.nuspec @@ -12,7 +12,7 @@ - + diff --git a/src/shared/DotnetTool/layout.sh b/src/shared/DotnetTool/layout.sh index 44c712650..f5244dbbd 100755 --- a/src/shared/DotnetTool/layout.sh +++ b/src/shared/DotnetTool/layout.sh @@ -39,7 +39,7 @@ PROJ_OUT="$OUT/$DOTNET_TOOL" CONFIGURATION="${CONFIGURATION:=Debug}" # Build parameters -FRAMEWORK=net7.0 +FRAMEWORK=net8.0 # Outputs OUTDIR="$PROJ_OUT/nupkg/$CONFIGURATION" diff --git a/src/shared/Git-Credential-Manager/Git-Credential-Manager.csproj b/src/shared/Git-Credential-Manager/Git-Credential-Manager.csproj index bc6dcb061..2b594e3eb 100644 --- a/src/shared/Git-Credential-Manager/Git-Credential-Manager.csproj +++ b/src/shared/Git-Credential-Manager/Git-Credential-Manager.csproj @@ -2,8 +2,8 @@ Exe - net7.0 - net472;net7.0 + net8.0 + net472;net8.0 win-x86;osx-x64;linux-x64;osx-arm64 x86 git-credential-manager diff --git a/src/shared/GitHub.Tests/GitHub.Tests.csproj b/src/shared/GitHub.Tests/GitHub.Tests.csproj index a5cda349e..1b892075e 100644 --- a/src/shared/GitHub.Tests/GitHub.Tests.csproj +++ b/src/shared/GitHub.Tests/GitHub.Tests.csproj @@ -1,7 +1,7 @@  - net7.0 + net8.0 false true latest diff --git a/src/shared/GitHub/GitHub.csproj b/src/shared/GitHub/GitHub.csproj index 1de18e7a5..66a4afd79 100644 --- a/src/shared/GitHub/GitHub.csproj +++ b/src/shared/GitHub/GitHub.csproj @@ -1,8 +1,8 @@  - net7.0 - net7.0;net472 + net8.0 + net8.0;net472 GitHub GitHub false diff --git a/src/shared/GitLab.Tests/GitLab.Tests.csproj b/src/shared/GitLab.Tests/GitLab.Tests.csproj index bcd5fe7e8..253c36db4 100644 --- a/src/shared/GitLab.Tests/GitLab.Tests.csproj +++ b/src/shared/GitLab.Tests/GitLab.Tests.csproj @@ -1,7 +1,7 @@  - net7.0 + net8.0 false true latest diff --git a/src/shared/GitLab/GitLab.csproj b/src/shared/GitLab/GitLab.csproj index 66017d55e..25c37f2fe 100644 --- a/src/shared/GitLab/GitLab.csproj +++ b/src/shared/GitLab/GitLab.csproj @@ -1,8 +1,8 @@  - net7.0 - net7.0;net472 + net8.0 + net8.0;net472 GitLab GitLab false diff --git a/src/shared/Microsoft.AzureRepos.Tests/Microsoft.AzureRepos.Tests.csproj b/src/shared/Microsoft.AzureRepos.Tests/Microsoft.AzureRepos.Tests.csproj index 8a475c370..01ec9d411 100644 --- a/src/shared/Microsoft.AzureRepos.Tests/Microsoft.AzureRepos.Tests.csproj +++ b/src/shared/Microsoft.AzureRepos.Tests/Microsoft.AzureRepos.Tests.csproj @@ -1,7 +1,7 @@  - net7.0 + net8.0 false true latest diff --git a/src/shared/Microsoft.AzureRepos/Microsoft.AzureRepos.csproj b/src/shared/Microsoft.AzureRepos/Microsoft.AzureRepos.csproj index c99f102b3..eaf866bfa 100644 --- a/src/shared/Microsoft.AzureRepos/Microsoft.AzureRepos.csproj +++ b/src/shared/Microsoft.AzureRepos/Microsoft.AzureRepos.csproj @@ -1,8 +1,8 @@  - net7.0 - net7.0;net472 + net8.0 + net8.0;net472 Microsoft.AzureRepos Microsoft.AzureRepos false diff --git a/src/shared/TestInfrastructure/TestInfrastructure.csproj b/src/shared/TestInfrastructure/TestInfrastructure.csproj index 467df5c3c..569b64cd5 100644 --- a/src/shared/TestInfrastructure/TestInfrastructure.csproj +++ b/src/shared/TestInfrastructure/TestInfrastructure.csproj @@ -1,7 +1,7 @@  - net7.0 + net8.0 GitCredentialManager.Tests false false From 6144b5fa2198d01cc2e6cac96b0819d434e084f0 Mon Sep 17 00:00:00 2001 From: Matthew John Cheetham Date: Wed, 20 Sep 2023 13:43:29 -0700 Subject: [PATCH 2/2] ci: install .NET 8 SDK in CI and builds --- .github/workflows/codeql-analysis.yml | 5 +++++ .github/workflows/continuous-integration.yml | 6 +++--- .github/workflows/release.yml | 16 ++++++++-------- 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 27274d812..dba63ecf0 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -24,6 +24,11 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Setup .NET + uses: actions/setup-dotnet@v3.2.0 + with: + dotnet-version: 8.0.x + # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL uses: github/codeql-action/init@v3 diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 4482f0b18..1b83a990d 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -21,7 +21,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v4.0.0 with: - dotnet-version: 6.0.201 + dotnet-version: 8.0.x - name: Install dependencies run: dotnet restore @@ -61,7 +61,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v4.0.0 with: - dotnet-version: 6.0.201 + dotnet-version: 8.0.x - name: Install dependencies run: dotnet restore @@ -102,7 +102,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v4.0.0 with: - dotnet-version: 6.0.201 + dotnet-version: 8.0.x - name: Install dependencies run: dotnet restore diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 81af37da3..1d044b48e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -37,7 +37,7 @@ jobs: - name: Set up .NET uses: actions/setup-dotnet@v4.0.0 with: - dotnet-version: 7.0.x + dotnet-version: 8.0.x - name: Build run: | @@ -152,7 +152,7 @@ jobs: - name: Set up .NET uses: actions/setup-dotnet@v4.0.0 with: - dotnet-version: 7.0.x + dotnet-version: 8.0.x - name: Build run: | @@ -192,7 +192,7 @@ jobs: - name: Set up .NET uses: actions/setup-dotnet@v4.0.0 with: - dotnet-version: 7.0.x + dotnet-version: 8.0.x - name: Build with signed payload run: | @@ -238,7 +238,7 @@ jobs: - name: Set up .NET uses: actions/setup-dotnet@v4.0.0 with: - dotnet-version: 7.0.x + dotnet-version: 8.0.x - name: Build run: dotnet build --configuration=LinuxRelease @@ -316,7 +316,7 @@ jobs: - name: Set up .NET uses: actions/setup-dotnet@v4.0.0 with: - dotnet-version: 7.0.x + dotnet-version: 8.0.x - name: Build .NET tool run: | @@ -404,7 +404,7 @@ jobs: - name: Set up .NET uses: actions/setup-dotnet@v4.0.0 with: - dotnet-version: 7.0.x + dotnet-version: 8.0.x - name: Package tool run: | @@ -508,7 +508,7 @@ jobs: - name: Set up .NET uses: actions/setup-dotnet@v4.0.0 with: - dotnet-version: 7.0.x + dotnet-version: 8.0.x - name: Download artifacts uses: actions/download-artifact@v4 @@ -578,7 +578,7 @@ jobs: - name: Set up .NET uses: actions/setup-dotnet@v4.0.0 with: - dotnet-version: 7.0.x + dotnet-version: 8.0.x - name: Download artifacts uses: actions/download-artifact@v4