Upgrade .NET SDK version to 10.0 in Dockerfile and project file; enable static files in Program.cs

This commit is contained in:
MaddoScientisto 2026-03-17 19:17:55 +01:00
commit d3887f1dd0
3 changed files with 6 additions and 4 deletions

View file

@ -1,4 +1,4 @@
FROM mcr.microsoft.com/dotnet/sdk:9.0-noble AS dev
FROM mcr.microsoft.com/dotnet/sdk:10.0-noble AS dev
WORKDIR /workspace
RUN apt-get update \
@ -10,7 +10,7 @@ ENV ASPNETCORE_URLS=http://+:8080
EXPOSE 8080
FROM mcr.microsoft.com/dotnet/sdk:9.0-noble AS build
FROM mcr.microsoft.com/dotnet/sdk:10.0-noble AS build
WORKDIR /src
COPY ["WorkTracker.csproj", "./"]
@ -19,7 +19,7 @@ RUN dotnet restore "WorkTracker.csproj"
COPY . .
RUN dotnet publish "WorkTracker.csproj" -c Release -o /app/publish /p:UseAppHost=false
FROM mcr.microsoft.com/dotnet/aspnet:9.0-noble AS final
FROM mcr.microsoft.com/dotnet/aspnet:10.0-noble AS final
WORKDIR /app
RUN apt-get update \

View file

@ -69,6 +69,8 @@ if (useHttpsRedirection)
app.UseHttpsRedirection();
}
app.UseStaticFiles();
app.UseRequestLocalization(localizationOptions);
app.UseAuthentication();

View file

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<UserSecretsId>aspnet-WorkTracker-28f934c3-03b2-413d-afbf-a5edbadc5530</UserSecretsId>