Skip to content

Commit

Permalink
upgrade to dotnet 9 (#150)
Browse files Browse the repository at this point in the history
  • Loading branch information
luizbon authored Nov 29, 2024
1 parent 95d7b5e commit 1f45ff6
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 15 deletions.
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,12 @@ Learn more at [httpstat.us](https://httpstat.us).

## Tech

The site is .NET 7 and it is hosted as a [containerised Azure AppService](https://azure.microsoft.com/services/app-service/containers/?WT.mc_id=dotnet-00000-aapowell#overview).
The site is .NET 9 and it is hosted as a [containerised Azure AppService](https://azure.microsoft.com/services/app-service/containers/?WT.mc_id=dotnet-00000-aapowell#overview).

## Self hosting

If you want, you are able to self-host the service using the provided image, which can be found [on GitHub packages](https://github.com/aaronpowell/httpstatus/pkgs/container/httpstatus). This may be useful for testing HTTP status codes which are not available in Azure, or time outs longer than we support in the hosted version.

### Docker on ARM

Presently, Docker on ARM (such as Mac M1) is not supported due to a bug in the .NET 7 build engine: https://github.com/NuGet/Home/issues/12227. Legacy versions on the .NET 6 runtime are available but not supported.

## LICENSE

[License](./License.md).
12 changes: 6 additions & 6 deletions src/Teapot.Web.Tests/Teapot.Web.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.8" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
<PackageReference Include="Moq" Version="4.20.70" />
<PackageReference Include="NUnit" Version="4.1.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="9.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageReference Include="Moq" Version="4.20.72" />
<PackageReference Include="NUnit" Version="4.2.2" />
<PackageReference Include="NUnit3TestAdapter" Version="4.6.0" />
<PackageReference Include="NUnit.Analyzers" Version="4.3.0">
<PackageReference Include="NUnit.Analyzers" Version="4.4.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
4 changes: 2 additions & 2 deletions src/Teapot.Web/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.

FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443

FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
WORKDIR /src
COPY ["src/Teapot.Web/Teapot.Web.csproj", "Teapot.Web/"]
COPY [".git", ".git"]
Expand Down
4 changes: 2 additions & 2 deletions src/Teapot.Web/Teapot.Web.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable>
<UserSecretsId>26052284-5a8d-4e62-83dc-7e394f7fa038</UserSecretsId>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
Expand All @@ -11,7 +11,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.22.0" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.21.0" />
<PackageReference Include="GitVersion.MsBuild" Version="6.0.2">
<PackageReference Include="GitVersion.MsBuild" Version="6.0.5">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
</ItemGroup>
Expand Down

0 comments on commit 1f45ff6

Please sign in to comment.