Skip to content

Commit 064c6c4

Browse files
authored
Update Mac and Linux targets to .NET 8 LTS (#1579)
Update the target framework version for Mac and Linux to .NET 8, which is the latest LTS. .NET 7 is [leaving support on 2024-05-14](https://dotnet.microsoft.com/en-us/platform/support/policy/dotnet-core) so we need to do this. Windows is not being updated at this time due our courtesy to Visual Studio (that bundle the same GCM version across all their versions) who need Windows 8.x support until.. 2029... 😢 and Windows 10 is required for .NET (Core) 8. I plan to revisit the .NET Framework to Core on Windows effort after a discussion with the VS team at Microsoft.
2 parents fd05865 + 6144b5f commit 064c6c4

27 files changed

+49
-44
lines changed

.github/workflows/codeql-analysis.yml

+5
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ jobs:
2424
steps:
2525
- uses: actions/checkout@v4
2626

27+
- name: Setup .NET
28+
uses: actions/[email protected]
29+
with:
30+
dotnet-version: 8.0.x
31+
2732
# Initializes the CodeQL tools for scanning.
2833
- name: Initialize CodeQL
2934
uses: github/codeql-action/init@v3

.github/workflows/continuous-integration.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- name: Setup .NET
2222
uses: actions/[email protected]
2323
with:
24-
dotnet-version: 6.0.201
24+
dotnet-version: 8.0.x
2525

2626
- name: Install dependencies
2727
run: dotnet restore
@@ -61,7 +61,7 @@ jobs:
6161
- name: Setup .NET
6262
uses: actions/[email protected]
6363
with:
64-
dotnet-version: 6.0.201
64+
dotnet-version: 8.0.x
6565

6666
- name: Install dependencies
6767
run: dotnet restore
@@ -102,7 +102,7 @@ jobs:
102102
- name: Setup .NET
103103
uses: actions/[email protected]
104104
with:
105-
dotnet-version: 6.0.201
105+
dotnet-version: 8.0.x
106106

107107
- name: Install dependencies
108108
run: dotnet restore

.github/workflows/release.yml

+8-8
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
- name: Set up .NET
3838
uses: actions/[email protected]
3939
with:
40-
dotnet-version: 7.0.x
40+
dotnet-version: 8.0.x
4141

4242
- name: Build
4343
run: |
@@ -152,7 +152,7 @@ jobs:
152152
- name: Set up .NET
153153
uses: actions/[email protected]
154154
with:
155-
dotnet-version: 7.0.x
155+
dotnet-version: 8.0.x
156156

157157
- name: Build
158158
run: |
@@ -192,7 +192,7 @@ jobs:
192192
- name: Set up .NET
193193
uses: actions/[email protected]
194194
with:
195-
dotnet-version: 7.0.x
195+
dotnet-version: 8.0.x
196196

197197
- name: Build with signed payload
198198
run: |
@@ -238,7 +238,7 @@ jobs:
238238
- name: Set up .NET
239239
uses: actions/[email protected]
240240
with:
241-
dotnet-version: 7.0.x
241+
dotnet-version: 8.0.x
242242

243243
- name: Build
244244
run: dotnet build --configuration=LinuxRelease
@@ -316,7 +316,7 @@ jobs:
316316
- name: Set up .NET
317317
uses: actions/[email protected]
318318
with:
319-
dotnet-version: 7.0.x
319+
dotnet-version: 8.0.x
320320

321321
- name: Build .NET tool
322322
run: |
@@ -404,7 +404,7 @@ jobs:
404404
- name: Set up .NET
405405
uses: actions/[email protected]
406406
with:
407-
dotnet-version: 7.0.x
407+
dotnet-version: 8.0.x
408408

409409
- name: Package tool
410410
run: |
@@ -508,7 +508,7 @@ jobs:
508508
- name: Set up .NET
509509
uses: actions/[email protected]
510510
with:
511-
dotnet-version: 7.0.x
511+
dotnet-version: 8.0.x
512512

513513
- name: Download artifacts
514514
uses: actions/download-artifact@v4
@@ -578,7 +578,7 @@ jobs:
578578
- name: Set up .NET
579579
uses: actions/[email protected]
580580
with:
581-
dotnet-version: 7.0.x
581+
dotnet-version: 8.0.x
582582

583583
- name: Download artifacts
584584
uses: actions/download-artifact@v4

.vscode/launch.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"request": "launch",
1111
"preLaunchTask": "build",
1212
// If you have changed target frameworks, make sure to update the program path.
13-
"program": "${workspaceFolder}/out/shared/Git-Credential-Manager/bin/Debug/net7.0/git-credential-manager.dll",
13+
"program": "${workspaceFolder}/out/shared/Git-Credential-Manager/bin/Debug/net8.0/git-credential-manager.dll",
1414
"args": ["get"],
1515
"cwd": "${workspaceFolder}/out/shared/Git-Credential-Manager",
1616
"console": "integratedTerminal",
@@ -22,7 +22,7 @@
2222
"request": "launch",
2323
"preLaunchTask": "build",
2424
// If you have changed target frameworks, make sure to update the program path.
25-
"program": "${workspaceFolder}/out/shared/Git-Credential-Manager/bin/Debug/net7.0/git-credential-manager.dll",
25+
"program": "${workspaceFolder}/out/shared/Git-Credential-Manager/bin/Debug/net8.0/git-credential-manager.dll",
2626
"args": ["store"],
2727
"cwd": "${workspaceFolder}/out/shared/Git-Credential-Manager",
2828
"console": "integratedTerminal",

.vscode/tasks.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
"type": "shell",
5757
"group": "test",
5858
"args": [
59-
"~/.nuget/packages/reportgenerator/*/*/net7.0/ReportGenerator.dll",
59+
"~/.nuget/packages/reportgenerator/*/*/net8.0/ReportGenerator.dll",
6060
"-reports:${workspaceFolder}/**/TestResults/**/coverage.cobertura.xml",
6161
"-targetdir:${workspaceFolder}/out/code-coverage"
6262
],
@@ -71,7 +71,7 @@
7171
"type": "shell",
7272
"group": "test",
7373
"args": [
74-
"${env:USERROFILE}/.nuget/packages/reportgenerator/*/*/net7.0/ReportGenerator.dll",
74+
"${env:USERROFILE}/.nuget/packages/reportgenerator/*/*/net8.0/ReportGenerator.dll",
7575
"-reports:${workspaceFolder}/**/TestResults/**/coverage.cobertura.xml",
7676
"-targetdir:${workspaceFolder}/out/code-coverage"
7777
],

build/GCM.MSBuild.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net7.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
<IncludeBuildOutput>false</IncludeBuildOutput>
66
</PropertyGroup>
77

docs/development.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -209,13 +209,13 @@ HTML reports can be generated using ReportGenerator, this should be installed
209209
during the build process, from the command line:
210210

211211
```shell
212-
dotnet ~/.nuget/packages/reportgenerator/*/*/net7.0/ReportGenerator.dll -reports:./**/TestResults/**/coverage.cobertura.xml -targetdir:./out/code-coverage
212+
dotnet ~/.nuget/packages/reportgenerator/*/*/net8.0/ReportGenerator.dll -reports:./**/TestResults/**/coverage.cobertura.xml -targetdir:./out/code-coverage
213213
```
214214

215215
or
216216

217217
```shell
218-
dotnet {$env:USERPROFILE}/.nuget/packages/reportgenerator/*/*/net7.0/ReportGenerator.dll -reports:./**/TestResults/**/coverage.cobertura.xml -targetdir:./out/code-coverage
218+
dotnet {$env:USERPROFILE}/.nuget/packages/reportgenerator/*/*/net8.0/ReportGenerator.dll -reports:./**/TestResults/**/coverage.cobertura.xml -targetdir:./out/code-coverage
219219
```
220220

221221
Or via VSCode Terminal/Run Task:

src/linux/Packaging.Linux/Packaging.Linux.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
44

55
<PropertyGroup>
6-
<TargetFramework>net7.0</TargetFramework>
6+
<TargetFramework>net8.0</TargetFramework>
77
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
88
</PropertyGroup>
99

src/linux/Packaging.Linux/install-from-source.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ case "$distribution" in
157157
# Install dotnet packages and dependencies if needed.
158158
if [ -z "$(verify_existing_dotnet_installation)" ]; then
159159
# First try to use native feeds (Ubuntu 22.04 and later).
160-
if ! apt_install dotnet7; then
160+
if ! apt_install dotnet8; then
161161
# If the native feeds fail, we fall back to
162162
# packages.microsoft.com. We begin by adding the dotnet package
163163
# repository/signing key.

src/linux/Packaging.Linux/layout.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ GCM_SRC="$SRC/shared/Git-Credential-Manager"
3838
PROJ_OUT="$OUT/linux/Packaging.Linux"
3939

4040
# Build parameters
41-
FRAMEWORK=net7.0
41+
FRAMEWORK=net8.0
4242
RUNTIME=linux-x64
4343

4444
# Perform pre-execution checks

src/osx/Installer.Mac/Installer.Mac.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
44

55
<PropertyGroup>
6-
<TargetFramework>net7.0</TargetFramework>
6+
<TargetFramework>net8.0</TargetFramework>
77
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
88
</PropertyGroup>
99

src/osx/Installer.Mac/layout.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ GCM_SRC="$SRC/shared/Git-Credential-Manager"
2424
GCM_UI_SRC="$SRC/shared/Git-Credential-Manager.UI.Avalonia"
2525

2626
# Build parameters
27-
FRAMEWORK=net7.0
27+
FRAMEWORK=net8.0
2828

2929
# Parse script arguments
3030
for i in "$@"

src/shared/Atlassian.Bitbucket.Tests/Atlassian.Bitbucket.Tests.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net7.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
<IsPackable>false</IsPackable>
66
<IsTestProject>true</IsTestProject>
77
<LangVersion>latest</LangVersion>

src/shared/Atlassian.Bitbucket/Atlassian.Bitbucket.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net7.0</TargetFrameworks>
5-
<TargetFrameworks Condition="'$(OSPlatform)'=='windows'">net7.0;net472</TargetFrameworks>
4+
<TargetFrameworks>net8.0</TargetFrameworks>
5+
<TargetFrameworks Condition="'$(OSPlatform)'=='windows'">net8.0;net472</TargetFrameworks>
66
<AssemblyName>Atlassian.Bitbucket</AssemblyName>
77
<RootNamespace>Atlassian.Bitbucket</RootNamespace>
88
<IsTestProject>false</IsTestProject>

src/shared/Core.Tests/Core.Tests.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net7.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
<IsPackable>false</IsPackable>
66
<IsTestProject>true</IsTestProject>
77
<LangVersion>latest</LangVersion>

src/shared/Core/Core.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net7.0</TargetFrameworks>
5-
<TargetFrameworks Condition="'$(OSPlatform)'=='windows'">net7.0;net472</TargetFrameworks>
4+
<TargetFrameworks>net8.0</TargetFrameworks>
5+
<TargetFrameworks Condition="'$(OSPlatform)'=='windows'">net8.0;net472</TargetFrameworks>
66
<AssemblyName>gcmcore</AssemblyName>
77
<RootNamespace>GitCredentialManager</RootNamespace>
88
<IsTestProject>false</IsTestProject>

src/shared/DotnetTool/DotnetTool.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.Build.NoTargets/3.5.6">
22
<PropertyGroup>
3-
<TargetFramework>net7.0</TargetFramework>
3+
<TargetFramework>net8.0</TargetFramework>
44
<PackAsTool>true</PackAsTool>
55
<NuSpecFile>dotnet-tool.nuspec</NuSpecFile>
66
<!-- Inject correct properties into NuSpec -->

src/shared/DotnetTool/dotnet-tool.nuspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
</packageTypes>
1313
</metadata>
1414
<files>
15-
<file src="$publishdir$payload/" target="tools/net7.0/any" />
15+
<file src="$publishdir$payload/" target="tools/net8.0/any" />
1616
<file src="$publishdir$images/icon.png" target="images" />
1717
</files>
1818
</package>

src/shared/DotnetTool/layout.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ PROJ_OUT="$OUT/$DOTNET_TOOL"
3939
CONFIGURATION="${CONFIGURATION:=Debug}"
4040

4141
# Build parameters
42-
FRAMEWORK=net7.0
42+
FRAMEWORK=net8.0
4343

4444
# Outputs
4545
OUTDIR="$PROJ_OUT/nupkg/$CONFIGURATION"

src/shared/Git-Credential-Manager/Git-Credential-Manager.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFrameworks>net7.0</TargetFrameworks>
6-
<TargetFrameworks Condition="'$(OSPlatform)'=='windows'">net472;net7.0</TargetFrameworks>
5+
<TargetFrameworks>net8.0</TargetFrameworks>
6+
<TargetFrameworks Condition="'$(OSPlatform)'=='windows'">net472;net8.0</TargetFrameworks>
77
<RuntimeIdentifiers>win-x86;osx-x64;linux-x64;osx-arm64</RuntimeIdentifiers>
88
<PlatformTarget Condition="'$(OSPlatform)'=='windows'">x86</PlatformTarget>
99
<AssemblyName>git-credential-manager</AssemblyName>

src/shared/GitHub.Tests/GitHub.Tests.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net7.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
<IsPackable>false</IsPackable>
66
<IsTestProject>true</IsTestProject>
77
<LangVersion>latest</LangVersion>

src/shared/GitHub/GitHub.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net7.0</TargetFrameworks>
5-
<TargetFrameworks Condition="'$(OSPlatform)'=='windows'">net7.0;net472</TargetFrameworks>
4+
<TargetFrameworks>net8.0</TargetFrameworks>
5+
<TargetFrameworks Condition="'$(OSPlatform)'=='windows'">net8.0;net472</TargetFrameworks>
66
<AssemblyName>GitHub</AssemblyName>
77
<RootNamespace>GitHub</RootNamespace>
88
<IsTestProject>false</IsTestProject>

src/shared/GitLab.Tests/GitLab.Tests.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net7.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
<IsPackable>false</IsPackable>
66
<IsTestProject>true</IsTestProject>
77
<LangVersion>latest</LangVersion>

src/shared/GitLab/GitLab.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net7.0</TargetFrameworks>
5-
<TargetFrameworks Condition="'$(OSPlatform)'=='windows'">net7.0;net472</TargetFrameworks>
4+
<TargetFrameworks>net8.0</TargetFrameworks>
5+
<TargetFrameworks Condition="'$(OSPlatform)'=='windows'">net8.0;net472</TargetFrameworks>
66
<AssemblyName>GitLab</AssemblyName>
77
<RootNamespace>GitLab</RootNamespace>
88
<IsTestProject>false</IsTestProject>

src/shared/Microsoft.AzureRepos.Tests/Microsoft.AzureRepos.Tests.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net7.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
<IsPackable>false</IsPackable>
66
<IsTestProject>true</IsTestProject>
77
<LangVersion>latest</LangVersion>

src/shared/Microsoft.AzureRepos/Microsoft.AzureRepos.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net7.0</TargetFrameworks>
5-
<TargetFrameworks Condition="'$(OSPlatform)'=='windows'">net7.0;net472</TargetFrameworks>
4+
<TargetFrameworks>net8.0</TargetFrameworks>
5+
<TargetFrameworks Condition="'$(OSPlatform)'=='windows'">net8.0;net472</TargetFrameworks>
66
<AssemblyName>Microsoft.AzureRepos</AssemblyName>
77
<RootNamespace>Microsoft.AzureRepos</RootNamespace>
88
<IsTestProject>false</IsTestProject>

src/shared/TestInfrastructure/TestInfrastructure.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net7.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
<RootNamespace>GitCredentialManager.Tests</RootNamespace>
66
<IsPackable>false</IsPackable>
77
<IsTestProject>false</IsTestProject>

0 commit comments

Comments
 (0)