Skip to content

Commit

Permalink
Merge pull request #222 from DuendeSoftware/joe/net9
Browse files Browse the repository at this point in the history
Add support for .NET 9
  • Loading branch information
josephdecock authored Dec 19, 2024
2 parents c2f6942 + 5b83d4e commit a43ab37
Show file tree
Hide file tree
Showing 80 changed files with 268 additions and 1,780 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ jobs:
with:
dotnet-version: |
8.0.x
9.0.x
- run: dotnet --info

- if: contains(matrix.runs-on, 'macOS') || contains(matrix.runs-on, 'ubuntu')
Expand Down
104 changes: 88 additions & 16 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@
// "order": 10
}
},
{
"name": "IdentityServer + All APIs",
"configurations": ["IdentityServer", "Api", "Api with DPoP", "Api with resource isolation"],
"presentation": {
"hidden": false,
"group": "10-compunds",
// "order": 10
}
},
],
"configurations": [
{
Expand Down Expand Up @@ -76,7 +85,7 @@
}
},
{
"name": "Isolated Api",
"name": "Api with resource isolation",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build-api.isolated",
Expand All @@ -94,13 +103,13 @@
}
},
{
"name": "JS8",
"name": "Bff (.NET 8)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build-js8",
"program": "${workspaceFolder}/samples/JS8/bin/Debug/net8.0/JS8.dll",
"preLaunchTask": "build-bff-8",
"program": "${workspaceFolder}/samples/Bff/bin/Debug/net8.0/Bff.dll",
"args": [],
"cwd": "${workspaceFolder}/samples/JS8",
"cwd": "${workspaceFolder}/samples/Bff",
"env": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
Expand All @@ -111,17 +120,17 @@
"console": "externalTerminal",
"presentation": {
"hidden": false,
"order": 10
"order": 100
}
},
{
"name": "JS8 DPoP",
"name": "Bff (.NET 9)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build-js8dpop",
"program": "${workspaceFolder}/samples/JS8.DPoP/bin/Debug/net8.0/JS8.DPoP.dll",
"preLaunchTask": "build-bff-9",
"program": "${workspaceFolder}/samples/Bff/bin/Debug/net9.0/Bff.dll",
"args": [],
"cwd": "${workspaceFolder}/samples/JS8.DPoP",
"cwd": "${workspaceFolder}/samples/Bff",
"env": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
Expand All @@ -136,13 +145,13 @@
}
},
{
"name": "JS8 EF",
"name": "Bff DPoP (.NET 8)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build-js8ef",
"program": "${workspaceFolder}/samples/JS8.EF/bin/Debug/net8.0/JS8.EF.dll",
"preLaunchTask": "build-bffdpop-8",
"program": "${workspaceFolder}/samples/Bff.DPoP/bin/Debug/net8.0/Bff.DPoP.dll",
"args": [],
"cwd": "${workspaceFolder}/samples/JS8.EF",
"cwd": "${workspaceFolder}/samples/Bff.DPoP",
"env": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
Expand All @@ -153,7 +162,70 @@
"console": "externalTerminal",
"presentation": {
"hidden": false,
"order": 10
"order": 101
}
},
{
"name": "Bff DPoP (.NET 9)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build-bffdpop-9",
"program": "${workspaceFolder}/samples/Bff.DPoP/bin/Debug/net9.0/Bff.DPoP.dll",
"args": [],
"cwd": "${workspaceFolder}/samples/Bff.DPoP",
"env": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"serverReadyAction": {
"action": "openExternally",
"pattern": "\\bNow listening on:\\s+(https?://\\S+)"
},
"console": "externalTerminal",
"presentation": {
"hidden": false,
"order": 11
}
},
{
"name": "Bff EF (.NET 8)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build-bffef-8",
"program": "${workspaceFolder}/samples/Bff.EF/bin/Debug/net8.0/Bff.EF.dll",
"args": [],
"cwd": "${workspaceFolder}/samples/Bff.EF",
"env": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"serverReadyAction": {
"action": "openExternally",
"pattern": "\\bNow listening on:\\s+(https?://\\S+)"
},
"console": "externalTerminal",
"presentation": {
"hidden": false,
"order": 102
}
},
{
"name": "Bff EF (.NET 9)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build-bffef-9",
"program": "${workspaceFolder}/samples/Bff.EF/bin/Debug/net9.0/Bff.EF.dll",
"args": [],
"cwd": "${workspaceFolder}/samples/Bff.EF",
"env": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"serverReadyAction": {
"action": "openExternally",
"pattern": "\\bNow listening on:\\s+(https?://\\S+)"
},
"console": "externalTerminal",
"presentation": {
"hidden": false,
"order": 12
}
},
{
Expand All @@ -174,7 +246,7 @@
"console": "externalTerminal",
"presentation": {
"hidden": false,
"order": 10
"order": 50
}
}
]
Expand Down
46 changes: 38 additions & 8 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,48 +62,78 @@
"problemMatcher": "$msCompile"
},
{
"label": "build-jsyarp",
"label": "build-bff-8",
"type": "process",
"command": "dotnet",
"args": [
"build",
"${workspaceFolder}/samples/JS.Yarp/JS.Yarp.csproj",
"--framework=net8.0",
"${workspaceFolder}/samples/Bff/Bff.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "build-js8",
"label": "build-bff-9",
"type": "process",
"command": "dotnet",
"args": [
"build",
"${workspaceFolder}/samples/JS8/JS8.csproj",
"--framework=net9.0",
"${workspaceFolder}/samples/Bff/Bff.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "build-js8dpop",
"label": "build-bffdpop-8",
"type": "process",
"command": "dotnet",
"args": [
"build",
"${workspaceFolder}/samples/JS8.DPoP/JS8.DPoP.csproj",
"--framework=net8.0",
"${workspaceFolder}/samples/Bff.DPoP/Bff.DPoP.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "build-js8ef",
"label": "build-bffdpop-9",
"type": "process",
"command": "dotnet",
"args": [
"build",
"${workspaceFolder}/samples/JS8.EF/JS8.EF.csproj",
"--framework=net9.0",
"${workspaceFolder}/samples/Bff.DPoP/Bff.DPoP.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "build-bffef-8",
"type": "process",
"command": "dotnet",
"args": [
"build",
"--framework=net8.0",
"${workspaceFolder}/samples/Bff.EF/Bff.EF.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "build-bffef-9",
"type": "process",
"command": "dotnet",
"args": [
"build",
"--framework=net9.0",
"${workspaceFolder}/samples/Bff.EF/Bff.EF.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
Expand Down
81 changes: 50 additions & 31 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,50 +1,69 @@
<Project>
<PropertyGroup Condition=" '$(TargetFramework)' == 'net8.0'">
<FrameworkVersionRuntime>8.0.0</FrameworkVersionRuntime>
<FrameworkVersionTesting>8.0.11</FrameworkVersionTesting>
<WilsonVersion>8.0.1</WilsonVersion>
<AspNetCoreVersion>8.0.1</AspNetCoreVersion>
<!-- EF must be at least 8.0.10 so that 'Microsoft.Extensions.Caching.Memory'
is at least 8.0.1, which addresses a known high severity vulnerability.
The SQL Server EF provider that is commonly used has a transitive
vulnerability in 8.0.10 that is fixed in 8.0.11, so going to 8.0.11 seems
prudent. -->
<EFCoreVersion>8.0.11</EFCoreVersion>
<IdentityServerVersion>7.1.0-rc.1</IdentityServerVersion>
<MicrosoftExtensionsVersion>8.0.1</MicrosoftExtensionsVersion>
<YarpVersion>2.1.0</YarpVersion>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'net9.0'">
<AspNetCoreVersion>9.0.0</AspNetCoreVersion>
<EFCoreVersion>9.0.0</EFCoreVersion>
<IdentityServerVersion>7.1.0-rc.1</IdentityServerVersion>
<MicrosoftExtensionsVersion>9.0.0</MicrosoftExtensionsVersion>
<YarpVersion>2.1.0</YarpVersion>
<IdentityServerVersion>7.1.0-preview.1</IdentityServerVersion>
</PropertyGroup>

<ItemGroup>
<!-- build -->
<!-- Build -->
<PackageReference Include="MinVer" Version="4.2.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />

<!-- runtime -->
<!-- Duende -->
<PackageReference Update="Duende.AccessTokenManagement.OpenIdConnect" Version="3.1.1" />
<PackageReference Update="Duende.IdentityModel" Version="7.0.0" />
<PackageReference Update="Duende.AccessTokenManagement.OpenIdConnect" Version="3.1.0-preview.1" />
<!-- Need this version because so 'Microsoft.Extensions.Caching.Memory' is at least 8.0.1 that addresses known high severity vulnerability -->
<PackageReference Update="Microsoft.EntityFrameworkCore.Relational" Version="8.0.10" />
<PackageReference Update="Microsoft.Extensions.Http" Version="$(FrameworkVersionRuntime)" />
<PackageReference Update="Microsoft.AspNetCore.Components.WebAssembly" Version="$(FrameworkVersionRuntime)" />
<PackageReference Update="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="$(FrameworkVersionRuntime)" />
<PackageReference Update="Microsoft.AspNetCore.Components.WebAssembly.Authentication" Version="$(FrameworkVersionRuntime)" />
<PackageReference Update="Microsoft.AspNetCore.Components.Authorization" Version="$(FrameworkVersionRuntime)" />
<PackageReference Update="Yarp.ReverseProxy" Version="$(YarpVersion)" />
<PackageReference Update="Duende.IdentityServer" Version="$(IdentityServerVersion)" />

<!-- samples -->
<!-- ASP.NET Core -->
<PackageReference Update="Microsoft.AspNetCore.Authentication.JwtBearer" Version="$(AspNetCoreVersion)" />
<PackageReference Update="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="$(AspNetCoreVersion)" />
<PackageReference Update="Microsoft.AspNet Core.Components.WebAssembly" Version="$(AspNetCoreVersion)" />
<PackageReference Update="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="$(AspNetCoreVersion)" />
<PackageReference Update="Microsoft.AspNetCore.Components.WebAssembly.Authentication" Version="$(AspNetCoreVersion)" />
<PackageReference Update="Microsoft.AspNetCore.Components.Authorization" Version="$(AspNetCoreVersion)" />

<!-- Entity Framework Core -->
<PackageReference Update="Microsoft.EntityFrameworkCore.Design" Version="$(EFCoreVersion)" />
<PackageReference Update="Microsoft.EntityFrameworkCore.InMemory" Version="$(EFCoreVersion)" />
<PackageReference Update="Microsoft.EntityFrameworkCore.Relational" Version="$(EFCoreVersion)" />
<PackageReference Update="Microsoft.EntityFrameworkCore.Sqlite" Version="$(EFCoreVersion)" />
<PackageReference Update="Microsoft.EntityFrameworkCore.SqlServer" Version="$(EFCoreVersion)" />

<!-- Microsoft Extensions -->
<PackageReference Update="Microsoft.Extensions.Http" Version="$(MicrosoftExtensionsVersion)" />

<!-- Other -->
<PackageReference Update="Yarp.ReverseProxy" Version="$(YarpVersion)" />
<PackageReference Update="Serilog.AspNetCore" Version="8.0.3" />
<PackageReference Update="Microsoft.IdentityModel.JsonWebTokens" Version="$(WilsonVersion)" />
<PackageReference Update="System.IdentityModel.Tokens.Jwt" Version="$(WilsonVersion)" />

<!-- testing -->
<PackageReference Update="Microsoft.EntityFrameworkCore.InMemory" Version="$(FrameworkVersionTesting)" />
<PackageReference Update="Microsoft.AspNetCore.Authentication.JwtBearer" Version="$(FrameworkVersionTesting)" />
<PackageReference Update="Microsoft.AspNetCore.TestHost" Version="$(FrameworkVersionTesting)" />
<PackageReference Update="Microsoft.Extensions.TimeProvider.Testing" Version="$(FrameworkVersionTesting)" />

<PackageReference Update="Duende.IdentityServer" Version="$(IdentityServerVersion)" />

<PackageReference Update="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Update="xunit" Version="2.9.2" />
<PackageReference Update="xunit.runner.visualstudio" Version="2.8.2">


<!-- Testing -->
<PackageReference Update="coverlet.collector" Version="6.0.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Update="FluentAssertions" Version="6.7.0" />
<PackageReference Update="coverlet.collector" Version="6.0.0">
<PackageReference Update="Microsoft.AspNetCore.TestHost" Version="$(AspNetCoreVersion)" />
<PackageReference Update="Microsoft.Extensions.TimeProvider.Testing" Version="8.8.0" />
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Update="xunit" Version="2.9.2" />
<PackageReference Update="xunit.runner.visualstudio" Version="2.8.2">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
Loading

0 comments on commit a43ab37

Please sign in to comment.