Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for net9.0 #16573

Merged
merged 36 commits into from
Dec 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
cc73373
Fix style warnings for net9.0
sebastienros Sep 30, 2024
58395c3
Add support for net9.0
sebastienros Sep 30, 2024
6fcae5e
More warnings fixes
sebastienros Sep 30, 2024
bd837fc
Merge remote-tracking branch 'origin/main' into sebros/net90
sebastienros Oct 1, 2024
39835c4
Fix build warnings
sebastienros Oct 9, 2024
21980bd
Use rc2
sebastienros Oct 9, 2024
88b6122
Merge branch 'main' into sebros/net90
sebastienros Oct 9, 2024
5d6bbfc
Fix build warnings
sebastienros Oct 10, 2024
16ebf46
Add conditions on TFM
sebastienros Oct 10, 2024
966b4cc
Fix System.Private.Uri
sebastienros Oct 10, 2024
7b70fbe
Fix tag
sebastienros Oct 10, 2024
4f3bce6
Fix extensions versions
sebastienros Oct 10, 2024
8cd50ad
Fix conditioned property group
sebastienros Oct 10, 2024
416c8e2
Update global.json
sebastienros Oct 10, 2024
3da51b1
Merge branch 'main' into sebros/net90
agriffard Nov 9, 2024
d557bd4
BlobModularTenantEvents : override Task RemovingAsync
agriffard Nov 9, 2024
546b408
Fix formatting, Using directive is unnecessary
agriffard Nov 9, 2024
d0e0dd9
Fix build errors
agriffard Nov 9, 2024
ce492d9
Fix more errors
agriffard Nov 9, 2024
6bdad6f
Enum.IsDefined
agriffard Nov 9, 2024
a664625
SqlParserTests
agriffard Nov 9, 2024
7ac9947
Merge branch 'main' into sebros/net90
agriffard Nov 9, 2024
62bb01f
Using directive is unnecessary
agriffard Nov 9, 2024
557775b
Merge branch 'main' into sebros/net90
agriffard Nov 9, 2024
fdbc436
Fix merged files
agriffard Nov 9, 2024
53f4ae7
HttpRequestValue
agriffard Nov 9, 2024
bd703fc
DefaultDocumentSerializerTests
agriffard Nov 9, 2024
6fc93b6
Merge branch 'main' into sebros/net90
sebastienros Nov 11, 2024
7977606
Merge branch 'main' into sebros/net90
sebastienros Nov 12, 2024
a46ce09
Remove unnecessary usings
sebastienros Nov 12, 2024
280c351
Add missing package reference
sebastienros Nov 12, 2024
9ef4b02
One more warning
sebastienros Nov 12, 2024
b186467
Use GA version
sebastienros Nov 12, 2024
d96749e
Merge branch 'main' into sebros/net90
sebastienros Nov 21, 2024
6c0fa17
Merge branch 'main' into sebros/net90
sebastienros Nov 21, 2024
92c1e7f
Merge remote-tracking branch 'origin/main' into sebros/net90
sebastienros Dec 4, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/targetframeworks.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Change target frameworks
about: Update supported TFMs
title: 'Change target frameworks'
labels:
assignees: ''
---

- [ ] Update `global.json` to the required SDK version.
Use the minimal SDK version required, the `rollForward` rule will pick the latest version available on the machine. It's up to the user to update their SDK to the version they want in case there is an update and we don't want to force them into a newer version in case they can't install it.
- [ ] Update `src/OrchardCore.Build/TargetFrameworks.props`.
- [ ] Add a custom `AspNetCorePackagesVersion` for each TFM in `Directory.Packages.props`
- [ ] Update all `uses: actions/setup-dotnet` tasks to the required SDK version.
- [ ] Update all `dotnet publish`, `dotnet build` and `dotnet test` calls to the latest TFM, if specified.
- [ ] Update all `tasks.json` files to target the latest TFM
- [ ] Update the list of template **choices** (see the `template.json` files).
- [ ] Update docker file base images.
- [ ] Update documentation pages specifying a TFM (search for `<TargetFramework>`).
- [ ] Add a note about the supported .NET versions to the upcoming release notes.
10 changes: 5 additions & 5 deletions .github/workflows/functional_all_db.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
# We need to install dotnet in the docker container.
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
dotnet-version: '9.0.x'
- uses: actions/setup-node@v4
with:
node-version: "15"
Expand Down Expand Up @@ -69,7 +69,7 @@ jobs:
# We need to install dotnet in the docker container.
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
dotnet-version: '9.0.x'
- name: Functional Tests
run: |
cd test/OrchardCore.Tests.Functional
Expand Down Expand Up @@ -115,7 +115,7 @@ jobs:
# We need to install dotnet in the docker container.
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
dotnet-version: '9.0.x'
- name: Functional Tests
run: |
cd test/OrchardCore.Tests.Functional
Expand Down Expand Up @@ -157,7 +157,7 @@ jobs:
# We need to install dotnet in the docker container.
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
dotnet-version: '9.0.x'
- name: Functional Tests
run: |
cd test/OrchardCore.Tests.Functional
Expand Down Expand Up @@ -198,7 +198,7 @@ jobs:
# We need to install dotnet in the docker container.
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
dotnet-version: '9.0.x'
- name: Functional Tests
run: |
cd test/OrchardCore.Tests.Functional
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/mac_unit_test_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ jobs:
name: Unit Tests
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.0.x'
- name: Build and test
run: |
dotnet build -c Release -warnaserror /p:TreatWarningsAsErrors=true /p:RunAnalyzers=true
dotnet build -c Release /p:TreatWarningsAsErrors=true /p:RunAnalyzers=true
dotnet test -c Release --no-restore --no-build ./test/OrchardCore.Tests/OrchardCore.Tests.csproj
4 changes: 2 additions & 2 deletions .github/workflows/main_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ jobs:
node-version: "15"
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
dotnet-version: '9.0.x'
- name: Build
# See pr_ci.yml for the reason why we disable NuGet audit warnings.
run: |
dotnet build -c Release -warnaserror /p:TreatWarningsAsErrors=true /p:RunAnalyzers=true /p:NuGetAudit=false
dotnet build -c Release /p:TreatWarningsAsErrors=true /p:RunAnalyzers=true /p:NuGetAudit=false
- name: Unit Tests
run: |
dotnet test -c Release --no-build ./test/OrchardCore.Tests/OrchardCore.Tests.csproj
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ jobs:
node-version: "15"
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
dotnet-version: '9.0.x'
- name: Build
# We disable NuGet audit warnings, see https://learn.microsoft.com/en-us/nuget/reference/errors-and-warnings/nu1901-nu1904.
# Security issues being discovered in NuGet packages we use can happen at any time, and thus all our CI builds that
# treat warnings as errors could break anytime, without us changing the code. This prevents that. Treating them as
# warnings and other better approaches don't work, see https://github.com/OrchardCMS/OrchardCore/pull/16317.
run: |
dotnet build -c Release -warnaserror /p:TreatWarningsAsErrors=true /p:RunAnalyzers=true /p:NuGetAudit=false
dotnet build -c Release /p:TreatWarningsAsErrors=true /p:RunAnalyzers=true /p:NuGetAudit=false
- name: Unit Tests
run: |
dotnet test -c Release --no-build ./test/OrchardCore.Tests/OrchardCore.Tests.csproj
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/preview_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ jobs:
- uses: actions/setup-dotnet@v4
if: steps.check-publish.outputs.should-publish == 'true'
with:
dotnet-version: '8.0.x'
dotnet-version: '9.0.x'
- name: Set build number
if: steps.check-publish.outputs.should-publish == 'true'
run: echo "BuildNumber=$(( $GITHUB_RUN_NUMBER + 16368 ))" >> $GITHUB_ENV
- name: Build
if: steps.check-publish.outputs.should-publish == 'true'
# See pr_ci.yml for the reason why we disable NuGet audit warnings.
run: |
dotnet build -c Release -warnaserror /p:TreatWarningsAsErrors=true /p:RunAnalyzers=true /p:NuGetAudit=false
dotnet build -c Release /p:TreatWarningsAsErrors=true /p:RunAnalyzers=true /p:NuGetAudit=false
- name: Unit Tests
if: steps.check-publish.outputs.should-publish == 'true'
run: |
Expand Down Expand Up @@ -76,6 +76,6 @@ jobs:
Get-ChildItem ./src/OrchardCore.Cms.Web/App_Data -Recurse | Remove-Item -Recurse -Confirm:$false
Get-ChildItem ./src/OrchardCore.Cms.Web/App_Data_Tests -Recurse | Remove-Item -Recurse -Confirm:$false
$output = [System.IO.Path]::GetFullPath("./.build/release")
dotnet publish -c Release --property:PublishDir=$output --no-build --framework net8.0
dotnet publish -c Release --property:PublishDir=$output --no-build --framework net9.0
docker buildx build -f Dockerfile-CI --platform=linux/amd64 -t orchardproject/orchardcore-cms-linux:dev --push .
docker buildx build -f Dockerfile-CI --platform=windows/amd64 -t orchardproject/orchardcore-cms-windows:dev --push .
6 changes: 3 additions & 3 deletions .github/workflows/release_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ jobs:
node-version: "15"
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
dotnet-version: '9.0.x'
- name: Set build number
if: matrix.os == 'ubuntu-latest'
run: echo "BuildNumber=$(( $GITHUB_RUN_NUMBER + 15471 ))" >> $GITHUB_ENV
- name: Build
# NuGetAudit is intentionally not disabled here like it is for other CI builds, because we need to address any
# vulnerable packages before releasing a new version.
run: |
dotnet build -c Release -warnaserror /p:TreatWarningsAsErrors=true /p:RunAnalyzers=true -p:Version=${{ steps.get_version.outputs.VERSION }}
dotnet build -c Release /p:TreatWarningsAsErrors=true /p:RunAnalyzers=true -p:Version=${{ steps.get_version.outputs.VERSION }}
- name: Unit Tests
run: |
dotnet test -c Release --no-build ./test/OrchardCore.Tests/OrchardCore.Tests.csproj
Expand Down Expand Up @@ -82,6 +82,6 @@ jobs:
Get-ChildItem ./src/OrchardCore.Cms.Web/App_Data -Recurse | Remove-Item -Recurse -Confirm:$false
Get-ChildItem ./src/OrchardCore.Cms.Web/App_Data_Tests -Recurse | Remove-Item -Recurse -Confirm:$false
$output = [System.IO.Path]::GetFullPath("./.build/release")
dotnet publish -c Release --property:PublishDir=$output --no-build --framework net8.0
dotnet publish -c Release --property:PublishDir=$output --no-build --framework net9.0
docker buildx build -f Dockerfile-CI --platform=linux/amd64 -t orchardproject/orchardcore-cms-linux:latest -t orchardproject/orchardcore-cms-linux:${{ steps.get_version.outputs.VERSION }} --push .
docker buildx build -f Dockerfile-CI --platform=windows/amd64 -t orchardproject/orchardcore-cms-windows:latest -t orchardproject/orchardcore-cms-windows:${{ steps.get_version.outputs.VERSION }} --push .
22 changes: 11 additions & 11 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
"version": "0.2.0",
"configurations": [
{
"name": ".NET Core Launch (console debug) - net8.0",
"name": ".NET Core Launch (console debug) - net9.0",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "dotnet build (debug) - net8.0",
"program": "${workspaceRoot}/src/OrchardCore.Cms.Web/bin/Debug/net8.0/OrchardCore.Cms.Web.dll",
"preLaunchTask": "dotnet build (debug) - net9.0",
"program": "${workspaceRoot}/src/OrchardCore.Cms.Web/bin/Debug/net9.0/OrchardCore.Cms.Web.dll",
"args": [],
"cwd": "${workspaceRoot}/src/OrchardCore.Cms.Web",
"env": {
Expand All @@ -15,12 +15,12 @@
"stopAtEntry": false
},
{
"name": ".NET Core Launch (web debug) - net8.0",
"name": ".NET Core Launch (web debug) - net9.0",
"type": "coreclr",
"request": "launch",
"internalConsoleOptions": "openOnSessionStart",
"preLaunchTask": "dotnet build (debug) - net8.0",
"program": "${workspaceRoot}/src/OrchardCore.Cms.Web/bin/Debug/net8.0/OrchardCore.Cms.Web.dll",
"preLaunchTask": "dotnet build (debug) - net9.0",
"program": "${workspaceRoot}/src/OrchardCore.Cms.Web/bin/Debug/net9.0/OrchardCore.Cms.Web.dll",
"args": [],
"cwd": "${workspaceRoot}/src/OrchardCore.Cms.Web",
"env": {
Expand All @@ -33,11 +33,11 @@
}
},
{
"name": ".NET Core Launch (web release) - net8.0",
"name": ".NET Core Launch (web release) - net9.0",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "dotnet build (release) - net8.0",
"program": "${workspaceRoot}/src/OrchardCore.Cms.Web/bin/Release/net8.0/OrchardCore.Cms.Web.dll",
"preLaunchTask": "dotnet build (release) - net9.0",
"program": "${workspaceRoot}/src/OrchardCore.Cms.Web/bin/Release/net9.0/OrchardCore.Cms.Web.dll",
"args": [],
"cwd": "${workspaceRoot}/src/OrchardCore.Cms.Web",
"env": {
Expand All @@ -50,10 +50,10 @@
}
},
{
"name": ".NET Core Launch (web debug) - dotnet watch - net8.0",
"name": ".NET Core Launch (web debug) - dotnet watch - net9.0",
"type": "dotnetwatchattach",
"request": "launch",
"task": "dotnet watch - net8.0",
"task": "dotnet watch - net9.0",
"program": "OrchardCore.Cms.Web.exe",
"args": {
"env": {
Expand Down
42 changes: 21 additions & 21 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@
},
"tasks": [
{
"label": "dotnet watch - net8.0",
"label": "dotnet watch - net9.0",
"type": "process",
"command": "dotnet",
"args": [
"watch",
"run",
"${workspaceRoot}/src/OrchardCore.Cms.Web",
"-f",
"net8.0"
"net9.0"
],
"options": {
"cwd": "${workspaceRoot}/src/OrchardCore.Cms.Web"
Expand All @@ -48,7 +48,7 @@
"--project",
"${workspaceRoot}\\src\\OrchardCore.Cms.Web\\OrchardCore.Cms.Web.csproj",
"-f",
"net8.0"
"net9.0"
]
},
{
Expand Down Expand Up @@ -89,7 +89,7 @@
]
},
{
"label": "dotnet build (debug) - net8.0",
"label": "dotnet build (debug) - net9.0",
"type": "shell",
"command": "dotnet",
"args": [
Expand All @@ -98,12 +98,12 @@
"-c",
"Debug",
"-f",
"net8.0"
"net9.0"
],
"problemMatcher": "$msCompile"
},
{
"label": "dotnet build (release) - net8.0",
"label": "dotnet build (release) - net9.0",
"type": "shell",
"command": "dotnet",
"args": [
Expand All @@ -112,12 +112,12 @@
"-c",
"Release",
"-f",
"net8.0"
"net9.0"
],
"problemMatcher": "$msCompile"
},
{
"label": "dotnet rebuild (debug) - net8.0",
"label": "dotnet rebuild (debug) - net9.0",
"type": "shell",
"command": "dotnet",
"args": [
Expand All @@ -127,12 +127,12 @@
"-c",
"Debug",
"-f",
"net8.0"
"net9.0"
],
"problemMatcher": "$msCompile"
},
{
"label": "dotnet rebuild (release) - net8.0",
"label": "dotnet rebuild (release) - net9.0",
"type": "shell",
"command": "dotnet",
"args": [
Expand All @@ -142,7 +142,7 @@
"-c",
"Release",
"-f",
"net8.0"
"net9.0"
],
"problemMatcher": "$msCompile"
},
Expand All @@ -163,7 +163,7 @@
]
},
{
"label": "dotnet publish (self-contained) - release - net8.0",
"label": "dotnet publish (self-contained) - release - net9.0",
"type": "shell",
"command": "dotnet",
"windows": {
Expand All @@ -177,7 +177,7 @@
"win-x64",
"--self-contained",
"--framework",
"net8.0",
"net9.0",
"--output",
".\\.build\\release"
]
Expand All @@ -191,14 +191,14 @@
"linux-x64",
"--self-contained",
"--framework",
"net8.0",
"net9.0",
"--output",
"./.build/release"
],
"problemMatcher": "$msCompile"
},
{
"label": "dotnet publish (framework dependent) - release - net8.0",
"label": "dotnet publish (framework dependent) - release - net9.0",
"type": "shell",
"command": "dotnet",
"windows": {
Expand All @@ -213,7 +213,7 @@
"--self-contained",
"false",
"--framework",
"net8.0",
"net9.0",
"--output",
".\\.build\\release"
]
Expand All @@ -228,24 +228,24 @@
"--self-contained",
"false",
"--framework",
"net8.0",
"net9.0",
"--output",
"./.build/release"
],
"problemMatcher": "$msCompile"
},
{
"label": "tasks: dotnet publish release (self-contained) - net8.0",
"label": "tasks: dotnet publish release (self-contained) - net9.0",
"dependsOn": [
"cleanup publish folder",
"dotnet publish (self-contained) - net8.0"
"dotnet publish (self-contained) - net9.0"
]
},
{
"label": "tasks: dotnet publish release (framework dependent) - net8.0",
"label": "tasks: dotnet publish release (framework dependent) - net9.0",
"dependsOn": [
"cleanup publish folder",
"dotnet publish (framework dependent) - net8.0"
"dotnet publish (framework dependent) - net9.0"
]
},
{
Expand Down
Loading
Loading