Skip to content

Commit 2e39039

Browse files
authored
LFT-2890: Upgrade to .NET 10 (#413)
1 parent d7965a9 commit 2e39039

8 files changed

Lines changed: 18 additions & 20 deletions

File tree

.github/workflows/ci.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,12 @@ jobs:
2020
- uses: Brightspace/third-party-actions@actions/checkout
2121
- uses: Brightspace/third-party-actions@actions/setup-dotnet
2222
with:
23-
dotnet-version: |
24-
6.0.x
25-
7.0.x
23+
dotnet-version: 10.0.x
2624

2725
- name: Unit tests
28-
run: dotnet test -c Release --framework net60 test/D2L.Security.OAuth2.UnitTests/D2L.Security.OAuth2.UnitTests.csproj
26+
run: dotnet test -c Release --framework net10.0 test/D2L.Security.OAuth2.UnitTests/D2L.Security.OAuth2.UnitTests.csproj
2927
- name: Integration tests
30-
run: dotnet test -c Release --framework net60 test/D2L.Security.OAuth2.IntegrationTests/D2L.Security.OAuth2.IntegrationTests.csproj
28+
run: dotnet test -c Release --framework net10.0 test/D2L.Security.OAuth2.IntegrationTests/D2L.Security.OAuth2.IntegrationTests.csproj
3129

3230
windows:
3331
name: Build and test (Windows)

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
</PropertyGroup>
1313

1414
<PropertyGroup>
15-
<LangVersion>11.0</LangVersion>
15+
<LangVersion>14.0</LangVersion>
1616
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
1717
<WarningsAsErrors>CS8785</WarningsAsErrors>
1818
</PropertyGroup>

Directory.Build.targets

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<Project>
2-
<ItemGroup Condition="'$(TargetFramework)' == 'net60'">
2+
<ItemGroup Condition="'$(TargetFramework)' != 'net472'">
33
<Compile Remove="$(MSBuildProjectDirectory)/**/*.net4x.cs" />
44
<None Include="$(MSBuildProjectDirectory)/**/*.net4x.cs" />
55
</ItemGroup>
66

7-
<ItemGroup Condition="'$(TargetFramework)' != 'net60'">
8-
<Compile Remove="$(MSBuildProjectDirectory)/**/*.net60.cs" />
9-
<None Include="$(MSBuildProjectDirectory)/**/*.net60.cs" />
7+
<ItemGroup Condition="'$(TargetFramework)' == 'net472'">
8+
<Compile Remove="$(MSBuildProjectDirectory)/**/*.net5plus.cs" />
9+
<None Include="$(MSBuildProjectDirectory)/**/*.net5plus.cs" />
1010
</ItemGroup>
1111
</Project>

src/D2L.Security.OAuth2.TestFramework/D2L.Security.OAuth2.TestFramework.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks>net472;net60</TargetFrameworks>
3+
<TargetFrameworks>net472;net10.0</TargetFrameworks>
44
<OutputType>Library</OutputType>
55

66
<Title>D2L.Security.OAuth2.TestFramework</Title>
@@ -14,7 +14,7 @@
1414
<PackageReference Include="RichardSzalay.MockHttp" />
1515
</ItemGroup>
1616

17-
<ItemGroup Condition="'$(TargetFramework)' != 'net60'">
17+
<ItemGroup Condition="'$(TargetFramework)' == 'net472'">
1818
<Reference Include="System.Net.Http" />
1919
</ItemGroup>
2020

src/D2L.Security.OAuth2/D2L.Security.OAuth2.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks>net472;net60</TargetFrameworks>
3+
<TargetFrameworks>net472;net10.0</TargetFrameworks>
44
<OutputType>Library</OutputType>
55

66
<Title>D2L.Security.OAuth2</Title>
@@ -25,15 +25,15 @@
2525
<PackageReference Include="System.IdentityModel.Tokens.Jwt" />
2626
</ItemGroup>
2727

28-
<ItemGroup Condition="'$(TargetFramework)' == 'net60'">
28+
<ItemGroup Condition="'$(TargetFramework)' != 'net472'">
2929
<PackageReference Include="Microsoft.Extensions.Caching.Memory" />
3030
</ItemGroup>
3131

32-
<PropertyGroup Condition="'$(TargetFramework)' == 'net60'">
32+
<PropertyGroup Condition="'$(TargetFramework)' != 'net472'">
3333
<SuppressSyncGenerator>true</SuppressSyncGenerator>
3434
</PropertyGroup>
3535

36-
<ItemGroup Condition="'$(TargetFramework)' != 'net60'">
36+
<ItemGroup Condition="'$(TargetFramework)' == 'net472'">
3737
<!-- We use Microsoft.Extensions.Caching.Memory in .NET 5+ -->
3838
<Reference Include="System.Runtime.Caching" />
3939

src/D2L.Security.OAuth2/Keys/Caching/InMemoryPublicKeyCache.net60.cs renamed to src/D2L.Security.OAuth2/Keys/Caching/InMemoryPublicKeyCache.net5plus.cs

File renamed without changes.

test/D2L.Security.OAuth2.IntegrationTests/D2L.Security.OAuth2.IntegrationTests.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks>net472;net60</TargetFrameworks>
3+
<TargetFrameworks>net472;net10.0</TargetFrameworks>
44
<OutputType>Library</OutputType>
55

66
<Title>D2L.Security.OAuth2.IntegrationTests</Title>
@@ -14,7 +14,7 @@
1414
<PackageReference Include="System.IdentityModel.Tokens.Jwt" />
1515
</ItemGroup>
1616

17-
<ItemGroup Condition="'$(TargetFramework)' != 'net60'">
17+
<ItemGroup Condition="'$(TargetFramework)' == 'net472'">
1818
<Reference Include="System.Net.Http" />
1919
</ItemGroup>
2020

test/D2L.Security.OAuth2.UnitTests/D2L.Security.OAuth2.UnitTests.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks>net472;net60</TargetFrameworks>
3+
<TargetFrameworks>net472;net10.0</TargetFrameworks>
44
<OutputType>Library</OutputType>
55

66
<Title>D2L.Security.OAuth2.UnitTests</Title>
@@ -22,7 +22,7 @@
2222
<ProjectReference Include="..\..\src\D2L.Security.OAuth2\D2L.Security.OAuth2.csproj" />
2323
</ItemGroup>
2424

25-
<ItemGroup Condition="'$(TargetFramework)' != 'net60'">
25+
<ItemGroup Condition="'$(TargetFramework)' == 'net472'">
2626
<Reference Include="System.Net.Http" />
2727
<Reference Include="System.Web" />
2828
<Reference Include="System.Web.Extensions" />

0 commit comments

Comments
 (0)