Skip to content

Commit dc91acd

Browse files
committed
feat(runtime): upgrade to latest .NET version
BREAKING CHANGE: dropped support for non-LTS .NET versions
1 parent 3e278d8 commit dc91acd

3 files changed

Lines changed: 52 additions & 20 deletions

File tree

Lines changed: 28 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,44 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
2-
32
<PropertyGroup>
4-
<TargetFramework>net7.0</TargetFramework>
3+
<TargetFrameworks>net8.0;net10.0</TargetFrameworks>
54
<Nullable>enable</Nullable>
65
<ImplicitUsings>enable</ImplicitUsings>
76
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
87
</PropertyGroup>
98

109
<ItemGroup>
11-
<PackageReference Include="Fido2.AspNet" Version="3.0.0" />
12-
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="7.0.0" />
13-
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="7.0.0" />
14-
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="7.0.0" />
15-
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="7.0.0" />
16-
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.0" />
17-
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="7.0.0">
10+
<PackageReference Include="Fido2.AspNet" Version="3.0.1" />
11+
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.23.0" />
12+
<PackageReference Include="NetDevPack" Version="8.0.2" />
13+
</ItemGroup>
14+
15+
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
16+
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="8.0.23" />
17+
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="8.0.23" />
18+
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="8.0.23" />
19+
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="8.0.23" />
20+
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.23" />
21+
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.23">
1822
<PrivateAssets>all</PrivateAssets>
1923
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2024
</PackageReference>
21-
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.15.1" />
22-
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="7.0.0" />
23-
<PackageReference Include="NetDevPack" Version="6.0.1" />
25+
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="8.0.23" />
2426
</ItemGroup>
2527

26-
<ItemGroup>
27-
<ProjectReference Include="..\..\src\NetDevPack.Fido2.EntityFramework.Store\NetDevPack.Fido2.EntityFramework.Store.csproj" />
28+
<ItemGroup Condition="'$(TargetFramework)' == 'net10.0'">
29+
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="10.0.2" />
30+
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="10.0.2" />
31+
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="10.0.2" />
32+
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="10.0.2" />
33+
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="10.0.2" />
34+
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="10.0.2">
35+
<PrivateAssets>all</PrivateAssets>
36+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
37+
</PackageReference>
38+
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="10.0.2" />
2839
</ItemGroup>
2940

41+
<ItemGroup>
42+
<ProjectReference Include="..\\..\\src\\NetDevPack.Fido2.EntityFramework.Store\\NetDevPack.Fido2.EntityFramework.Store.csproj" />
43+
</ItemGroup>
3044
</Project>
Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
using Fido2NetLib;
1+
using System;
2+
using System.Linq;
3+
using Fido2NetLib;
24
using Fido2NetLib.Objects;
35
using NetDevPack.Fido2.EntityFramework.Store.Model;
46

@@ -8,12 +10,17 @@ internal static class PublicKeyCredentialDescriptorMapper
810
{
911
public static Fido2NetLib.Objects.PublicKeyCredentialDescriptor ToDomain(StoredCredentialDetail model)
1012
{
13+
var transports = string.IsNullOrWhiteSpace(model.Transports)
14+
? null
15+
: model.Transports.Split(';', StringSplitOptions.RemoveEmptyEntries)
16+
.Select(s => s.ToEnum<AuthenticatorTransport>())
17+
.ToArray();
1118

12-
return new Fido2NetLib.Objects.PublicKeyCredentialDescriptor
19+
return new PublicKeyCredentialDescriptor
1320
{
1421
Id = model.PublicKeyId,
15-
Transports = model.Transports?.Split(';').Select(s => s.ToEnum<AuthenticatorTransport>()).ToArray(),
16-
Type = model.Type
22+
Transports = transports,
23+
Type = model.Type ?? PublicKeyCredentialType.PublicKey
1724
};
1825
}
1926
}

src/NetDevPack.Fido2.EntityFramework.Store/NetDevPack.Fido2.EntityFramework.Store.csproj

Lines changed: 13 additions & 2 deletions
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+
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
77
<Authors>Bruno Brito</Authors>
@@ -17,7 +17,18 @@
1717

1818
<ItemGroup>
1919
<PackageReference Include="Fido2" Version="3.0.1" />
20-
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.0" />
20+
</ItemGroup>
21+
22+
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
23+
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.23" />
24+
</ItemGroup>
25+
26+
<ItemGroup Condition="'$(TargetFramework)' == 'net9.0'">
27+
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="9.0.12" />
28+
</ItemGroup>
29+
30+
<ItemGroup Condition="'$(TargetFramework)' == 'net10.0'">
31+
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="10.0.2" />
2132
</ItemGroup>
2233

2334

0 commit comments

Comments
 (0)