Skip to content

Commit fb54f50

Browse files
authored
Update packages and change target frameworks (#122)
1 parent c0a1b25 commit fb54f50

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+320
-173
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,3 +338,4 @@ tools/**
338338

339339
__mismatch__/
340340
*.Development.json
341+
appsettings.*.json

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"sdk": {
3-
"version": "3.1.401"
3+
"version": "5.0.103"
44
}
55
}

src/Clients/src/AspNetCore/AspNetCore.csproj

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,15 @@
1010
<IsPackable>true</IsPackable>
1111
</PropertyGroup>
1212

13-
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
13+
<ItemGroup>
1414
<FrameworkReference Include="Microsoft.AspNetCore.App" />
1515
</ItemGroup>
1616

17-
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0' OR '$(TargetFramework)' == 'netstandard2.1'">
18-
<PackageReference Include="Microsoft.AspNetCore.Http" Version="2.2.0" />
19-
<PackageReference Include="Microsoft.AspNetCore.Http.Extensions" Version="2.2.0" />
20-
<PackageReference Include="Microsoft.AspNetCore.Hosting" Version="2.2.7" />
17+
<ItemGroup Condition="'$(TargetFramework)' == 'net5.0'">
18+
<PackageReference Include="Microsoft.Extensions.Options" Version="5.0.0" />
2119
</ItemGroup>
2220

23-
<ItemGroup>
21+
<ItemGroup Condition="'$(TargetFramework)' != 'net5.0'">
2422
<PackageReference Include="Microsoft.Extensions.Options" Version="3.1.0" />
2523
</ItemGroup>
2624

src/Clients/src/AspNetCore/ClaimsPrincipalExtensions.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
using System;
2-
using System.IdentityModel.Tokens.Jwt;
1+
using System;
32
using System.Linq;
43
using System.Security.Claims;
54

@@ -10,7 +9,7 @@ internal static class ClaimsPrincipalExtensions
109
public static Guid? GetId(this ClaimsPrincipal user)
1110
{
1211
string rawUserId = user?.Claims?
13-
.Where(c => c.Type == JwtRegisteredClaimNames.Sub)
12+
.Where(c => c.Type == "sub")
1413
.Select(c => c.Value)
1514
.FirstOrDefault();
1615

src/Clients/src/Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" />
33

44
<PropertyGroup>
5-
<TargetFrameworks>netcoreapp3.1; netstandard2.1; netstandard2.0</TargetFrameworks>
5+
<TargetFrameworks>net5.0; netcoreapp3.1</TargetFrameworks>
66
</PropertyGroup>
77
</Project>

src/Clients/src/GenericHost/GenericHost.csproj

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@
1010
<IsPackable>true</IsPackable>
1111
</PropertyGroup>
1212

13-
<ItemGroup>
13+
<ItemGroup Condition="'$(TargetFramework)' == 'net5.0'">
14+
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="5.0.0" />
15+
</ItemGroup>
16+
17+
<ItemGroup Condition="'$(TargetFramework)' != 'net5.0'">
1418
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="3.1.0" />
1519
</ItemGroup>
1620

src/Clients/src/Hosting/Hosting.csproj

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@
1010
<IsPackable>true</IsPackable>
1111
</PropertyGroup>
1212

13-
<ItemGroup>
13+
<ItemGroup Condition="'$(TargetFramework)' == 'net5.0'">
14+
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="5.0.0" />
15+
</ItemGroup>
16+
17+
<ItemGroup Condition="'$(TargetFramework)' != 'net5.0'">
1418
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="3.1.0" />
1519
</ItemGroup>
1620

src/Clients/src/HotChocolate/HotChocolate.csproj

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,8 @@
1010
<IsPackable>true</IsPackable>
1111
</PropertyGroup>
1212

13-
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
14-
<FrameworkReference Include="Microsoft.AspNetCore.App" />
15-
</ItemGroup>
16-
17-
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0' OR '$(TargetFramework)' == 'netstandard2.1'">
18-
<PackageReference Include="Microsoft.AspNetCore.Http" Version="2.2.0" />
19-
</ItemGroup>
20-
2113
<ItemGroup>
14+
<FrameworkReference Include="Microsoft.AspNetCore.App" />
2215
<PackageReference Include="HotChocolate" Version="11.0.0" />
2316
</ItemGroup>
2417

src/Clients/src/Http/Http.csproj

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@
1010
<IsPackable>true</IsPackable>
1111
</PropertyGroup>
1212

13-
<ItemGroup>
13+
<ItemGroup Condition="'$(TargetFramework)' == 'net5.0'">
14+
<PackageReference Include="Microsoft.Extensions.Http" Version="5.0.0" />
15+
</ItemGroup>
16+
17+
<ItemGroup Condition="'$(TargetFramework)' != 'net5.0'">
1418
<PackageReference Include="Microsoft.Extensions.Http" Version="3.1.0" />
1519
</ItemGroup>
1620

src/Clients/test/AspNetCore.FunctionalTest/AspNetCore.FunctionalTest.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
44
<AssemblyName>Thor.Hosting.AspNetCore.FunctionalTest</AssemblyName>

0 commit comments

Comments
 (0)