Skip to content

Commit 81d6302

Browse files
committed
chore: add support for .NET 10
1 parent e5e94d7 commit 81d6302

File tree

20 files changed

+53
-46
lines changed

20 files changed

+53
-46
lines changed

.github/actions/build/action.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@ description: build the project
33
runs:
44
using: "composite"
55
steps:
6-
- uses: actions/setup-node@v4
6+
- uses: actions/setup-node@v6
77
with:
88
node-version: 22
99

10-
- uses: actions/setup-dotnet@v4
10+
- uses: actions/setup-dotnet@v5
1111
with:
1212
dotnet-version: |
13+
10.x
1314
9.x
1415
8.x
1516

.github/workflows/ci.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,21 @@ jobs:
3131
shell: bash
3232
working-directory: templates
3333

34-
- run: dotnet test -c Release -f net8.0 --no-build --collect:"XPlat Code Coverage" --consoleLoggerParameters:"Summary;Verbosity=Minimal"
35-
id: test-net80
34+
- run: dotnet test -c Release -f net10.0 --no-build --collect:"XPlat Code Coverage" --consoleLoggerParameters:"Summary;Verbosity=Minimal"
35+
id: test-net100
3636

3737
- run: dotnet test -c Release -f net9.0 --no-build --collect:"XPlat Code Coverage" --consoleLoggerParameters:"Summary;Verbosity=Minimal"
3838
if: matrix.os == 'ubuntu-latest'
3939
id: test-net90
4040

41+
- run: dotnet test -c Release -f net8.0 --no-build --collect:"XPlat Code Coverage" --consoleLoggerParameters:"Summary;Verbosity=Minimal"
42+
if: matrix.os == 'ubuntu-latest'
43+
id: test-net80
44+
4145
- run: npm i -g @percy/cli
4246
if: matrix.os == 'ubuntu-latest'
4347

44-
- run: percy exec -- dotnet test -c Release -f net8.0 --filter Stage=Percy --no-build --collect:"XPlat Code Coverage"
48+
- run: percy exec -- dotnet test -c Release -f net10.0 --filter Stage=Percy --no-build --collect:"XPlat Code Coverage"
4549
if: matrix.os == 'ubuntu-latest'
4650
env:
4751
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}
@@ -55,8 +59,8 @@ jobs:
5559
- run: echo "DOTNET_DbgEnableMiniDump=1" >> $GITHUB_ENV
5660
if: matrix.os == 'ubuntu-latest'
5761

58-
- run: dotnet run -c Release --no-build -f net8.0 --project src/docfx -- docs/docfx.json
59-
- run: dotnet run -c Release --no-build -f net8.0 --project src/docfx -- samples/seed/docfx.json --output docs/_site/seed
62+
- run: dotnet run -c Release --no-build -f net10.0 --project src/docfx -- docs/docfx.json
63+
- run: dotnet run -c Release --no-build -f net10.0 --project src/docfx -- samples/seed/docfx.json --output docs/_site/seed
6064

6165
- uses: actions/upload-pages-artifact@v4
6266
if: matrix.os == 'ubuntu-latest'

.github/workflows/lint.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,6 @@ jobs:
1919
- name: Checkout
2020
uses: actions/checkout@v5
2121

22-
- name: Setup .NET SDK
23-
uses: actions/setup-dotnet@v5
24-
with:
25-
dotnet-version: |
26-
9.x
27-
2822
- name: Run `dotnet format` command
2923
run: |
3024
dotnet restore

.github/workflows/nightly.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@ jobs:
1515
permissions:
1616
packages: write
1717
steps:
18-
- uses: actions/setup-dotnet@v5
19-
with:
20-
dotnet-version: |
21-
10.x
2218

2319
- uses: actions/checkout@v5
2420
with:
@@ -34,6 +30,9 @@ jobs:
3430
- name: dotnet test
3531
run: dotnet test -c Release -f net8.0 --no-build
3632

33+
- name: dotnet test
34+
run: dotnet test -c Release -f net9.0 --no-build
35+
3736
- name: dotnet test
3837
run: dotnet test -c Release -f net10.0 --no-build
3938

.github/workflows/release.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ jobs:
1616

1717
- name: dotnet publish
1818
run: |
19-
dotnet publish src/docfx -f net8.0 -c Release /p:Version=${GITHUB_REF_NAME#v} --self-contained -r win-x64 -o drop/publish/win-x64
20-
dotnet publish src/docfx -f net8.0 -c Release /p:Version=${GITHUB_REF_NAME#v} --self-contained -r linux-x64 -o drop/publish/linux-x64
21-
dotnet publish src/docfx -f net8.0 -c Release /p:Version=${GITHUB_REF_NAME#v} --self-contained -r osx-x64 -o drop/publish/osx-x64
19+
dotnet publish src/docfx -f net10.0 -c Release /p:Version=${GITHUB_REF_NAME#v} --self-contained -r win-x64 -o drop/publish/win-x64
20+
dotnet publish src/docfx -f net10.0 -c Release /p:Version=${GITHUB_REF_NAME#v} --self-contained -r linux-x64 -o drop/publish/linux-x64
21+
dotnet publish src/docfx -f net10.0 -c Release /p:Version=${GITHUB_REF_NAME#v} --self-contained -r osx-x64 -o drop/publish/osx-x64
2222
mkdir -p drop/bin
2323
2424
- run: zip -r ../../bin/docfx-win-x64-${GITHUB_REF_NAME}.zip .
@@ -44,14 +44,15 @@ jobs:
4444
steps:
4545
- uses: actions/setup-dotnet@v5
4646
with:
47-
dotnet-version: 8.x
47+
dotnet-version: 10.x
4848

4949
- uses: actions/download-artifact@v5
5050
with:
5151
name: nuget
5252
path: drop/nuget
5353

54-
- run: dotnet tool install --tool-path . sign --version 0.9.1-beta.24170.3
54+
# Install `Sign CLI` to use Azure Key Vault (See: https://github.com/dotnet/sign/blob/main/docs/comparisons.md)
55+
- run: dotnet tool install --tool-path . sign --version 0.9.1-beta.25379.1
5556

5657
- run: >
5758
./sign code azure-key-vault
@@ -79,7 +80,7 @@ jobs:
7980
steps:
8081
- uses: actions/setup-dotnet@v5
8182
with:
82-
dotnet-version: 8.x
83+
dotnet-version: 10.x
8384

8485
- uses: actions/download-artifact@v5
8586
with:

.github/workflows/snapshot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
- uses: ./.github/actions/build
3535

3636
# Update snapshots & accept changes
37-
- run: dotnet test -c Release -f net8.0 --no-build --filter Stage=Snapshot
37+
- run: dotnet test -c Release -f net10.0 --no-build --filter Stage=Snapshot
3838
working-directory: test/docfx.Snapshot.Tests
3939
env:
4040
BUILD_SERVER: false # Need to accept file changes automatically.

Directory.Build.props

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<Project>
22
<PropertyGroup>
33
<ContinuousIntegrationBuild Condition="'$(GITHUB_ACTIONS)' == 'true'">true</ContinuousIntegrationBuild>
4-
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
5-
<TargetFrameworks Condition="'$(DOCFX_PREVIEW_BUILD)' == 'true'">net8.0;net10.0</TargetFrameworks>
4+
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
5+
<!--<TargetFrameworks Condition="'$(DOCFX_PREVIEW_BUILD)' == 'true'">net8.0;net9.0;net10.0</TargetFrameworks>-->
66
<LangVersion>Preview</LangVersion>
77
<ImplicitUsings>enable</ImplicitUsings>
88
<SuppressNETCoreSdkPreviewMessage>true</SuppressNETCoreSdkPreviewMessage>
@@ -17,7 +17,7 @@
1717
<!--
1818
Suppress warnings similar to the following:
1919
warning NU1507: There are 2 package sources defined in your configuration.
20-
warning NU5104: A stable release of a package should not have a prerelease dependency. Either modify the version spec of dependency "PdfPig [0.1.9-alpha-20240510-d86c2, )" or update the version field in the nuspec.
20+
warning NU5104: A stable release of a package should not have a prerelease dependency.
2121
warning NU5111: The script file 'tools\.playwright\package\bin\install_media_pack.ps1' is not recognized by NuGet and hence will not be executed during installation of this package.
2222
-->
2323
<NoWarn>$(NoWarn);NU1507;NU5104;NU5111</NoWarn>

Directory.Packages.props

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@
3636
</ItemGroup>
3737

3838
<ItemGroup>
39-
<PackageVersion Include="Microsoft.CodeAnalysis" Version="4.14.0" />
40-
<PackageVersion Include="Microsoft.CodeAnalysis.Common" Version="4.14.0" />
41-
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.14.0" />
42-
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.14.0" />
43-
<PackageVersion Include="Microsoft.CodeAnalysis.VisualBasic.Workspaces" Version="4.14.0" />
44-
<PackageVersion Include="Microsoft.CodeAnalysis.VisualBasic" Version="4.14.0" />
45-
<PackageVersion Include="Microsoft.CodeAnalysis.Workspaces.Common" Version="4.14.0" />
46-
<PackageVersion Include="Microsoft.CodeAnalysis.Workspaces.MSBuild" Version="4.14.0" />
39+
<PackageVersion Include="Microsoft.CodeAnalysis" Version="5.0.0-2.final" />
40+
<PackageVersion Include="Microsoft.CodeAnalysis.Common" Version="5.0.0-2.final" />
41+
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="5.0.0-2.final" />
42+
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="5.0.0-2.final" />
43+
<PackageVersion Include="Microsoft.CodeAnalysis.VisualBasic.Workspaces" Version="5.0.0-2.final" />
44+
<PackageVersion Include="Microsoft.CodeAnalysis.VisualBasic" Version="5.0.0-2.final" />
45+
<PackageVersion Include="Microsoft.CodeAnalysis.Workspaces.Common" Version="5.0.0-2.final" />
46+
<PackageVersion Include="Microsoft.CodeAnalysis.Workspaces.MSBuild" Version="5.0.0-2.final" />
4747
</ItemGroup>
4848
</Project>

samples/csharp/src/CSharp.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-
<TargetFrameworks>net8.0</TargetFrameworks>
4+
<TargetFrameworks>net10.0</TargetFrameworks>
55
<LangVersion>preview</LangVersion>
66
<Nullable>enable</Nullable>
77
<ImplicitUsings>enable</ImplicitUsings>

samples/extensions/build/build.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>net8.0</TargetFramework>
5+
<TargetFramework>net10.0</TargetFramework>
66
<ImplicitUsings>enable</ImplicitUsings>
77
<Nullable>enable</Nullable>
88
</PropertyGroup>

0 commit comments

Comments
 (0)