Skip to content

Commit

Permalink
Upgrade to .NET 8
Browse files Browse the repository at this point in the history
  • Loading branch information
gunndabad committed Jan 27, 2025
1 parent 54407bd commit fd849d9
Show file tree
Hide file tree
Showing 18 changed files with 19 additions and 29 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:

- uses: actions/setup-dotnet@v3
with:
dotnet-version: '7.0.202'
dotnet-version: '8.0.x'

- name: Restore
run: dotnet restore
Expand All @@ -80,7 +80,7 @@ jobs:
echo "::notice::Linting entire codebase"
fi
dotnet tool install -g dotnet-format --version "7.*" --add-source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet7/nuget/v3/index.json >/dev/null
dotnet tool install -g dotnet-format --version "8.*" --add-source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet8/nuget/v3/index.json >/dev/null
dotnet-format --no-restore --verify-no-changes $INCLUDE_ARG
env:
EVENT_NAME: ${{ github.event_name }}
Expand Down
1 change: 0 additions & 1 deletion dotnet-authserver/TeacherIdentity.sln
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
Directory.Build.props = Directory.Build.props
global.json = global.json
nuget.config = nuget.config
EndProjectSection
EndProject
Expand Down
6 changes: 0 additions & 6 deletions dotnet-authserver/global.json

This file was deleted.

4 changes: 2 additions & 2 deletions dotnet-authserver/src/TeacherIdentity.AuthServer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# syntax=docker/dockerfile:1
FROM mcr.microsoft.com/dotnet/aspnet:7.0
FROM mcr.microsoft.com/dotnet/aspnet:8.0
ARG GIT_SHA

COPY bin/Release/net7.0/publish/ App/
COPY bin/Release/net8.0/publish/ App/

ENV GitSha ${GIT_SHA}
WORKDIR /App
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,10 @@ public class ApiKeyAuthenticationHandler : AuthenticationHandler<AuthenticationS
private readonly IApiClientRepository _clientRepository;

public ApiKeyAuthenticationHandler(
IApiClientRepository clientRepository,
IOptionsMonitor<AuthenticationSchemeOptions> options,
ILoggerFactory logger,
UrlEncoder encoder,
ISystemClock clock)
: base(options, logger, encoder, clock)
IApiClientRepository clientRepository) : base(options, logger, encoder)
{
_clientRepository = clientRepository;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ public static async Task Main(string[] args)
{
options.PreSerializeFilters.Add((_, request) =>
{
request.HttpContext.Response.Headers.Add("Cache-Control", "no-cache, no-store, must-revalidate");
request.HttpContext.Response.Headers.TryAdd("Cache-Control", "no-cache, no-store, must-revalidate");
});
});

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<UserSecretsId>TeacherIdentityServer</UserSecretsId>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<UserSecretsId>TeacherIdentityServer</UserSecretsId>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<PropertyGroup Condition=" '$(RunConfiguration)' == 'ResourceServer' " />
Expand Down
4 changes: 2 additions & 2 deletions dotnet-authserver/src/TeacherIdentity.TestClient/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1
FROM mcr.microsoft.com/dotnet/aspnet:7.0
COPY bin/Release/net7.0/publish/ App/
FROM mcr.microsoft.com/dotnet/aspnet:8.0
COPY bin/Release/net8.0/publish/ App/
WORKDIR /App
ENTRYPOINT ["dotnet", "TeacherIdentity.TestClient.dll"]
EXPOSE 80
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<UserSecretsId>TeacherIdentityServerEndToEndTests</UserSecretsId>
<NoDefaultLaunchSettingsFile>true</NoDefaultLaunchSettingsFile>
<IsPackable>false</IsPackable>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<IsPackable>false</IsPackable>
<RunSettingsFilePath>$(MSBuildProjectDirectory)\local.runsettings</RunSettingsFilePath>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<IsTestProject>false</IsTestProject>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,10 @@ public class TestCookieAuthenticationHandler : CookieAuthenticationHandler
private readonly CurrentUserIdContainer _currentUserIdContainer;

public TestCookieAuthenticationHandler(
CurrentUserIdContainer currentUserIdContainer,
IOptionsMonitor<CookieAuthenticationOptions> options,
ILoggerFactory logger,
UrlEncoder encoder,
ISystemClock clock) : base(options, logger, encoder, clock)
CurrentUserIdContainer currentUserIdContainer) : base(options, logger, encoder)
{
_currentUserIdContainer = currentUserIdContainer;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<UserSecretsId>TeacherIdentityAuthServerTests</UserSecretsId>
<NoDefaultLaunchSettingsFile>true</NoDefaultLaunchSettingsFile>
<IsPackable>false</IsPackable>
Expand Down

0 comments on commit fd849d9

Please sign in to comment.