Skip to content

Commit d91f017

Browse files
authored
Update dotnet version (#9376)
1 parent edeb2d8 commit d91f017

13 files changed

+42
-33
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"ConnectionString": "Server=tfb-database;Database=hello_world;User Id=benchmarkdbuser;Password=benchmarkdbpass;SSL Mode=Disable;Maximum Pool Size=18;NoResetOnClose=true;Enlist=false;Max Auto Prepare=4;Multiplexing=true;Write Coalescing Buffer Threshold Bytes=1000",
2+
"ConnectionString": "Server=tfb-database;Database=hello_world;User Id=benchmarkdbuser;Password=benchmarkdbpass;SSL Mode=Disable;Maximum Pool Size=512;NoResetOnClose=true;Enlist=false;Max Auto Prepare=4",
33
"Database": "postgresql"
44
}

frameworks/CSharp/aspnetcore/aspnetcore-aot.dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
1+
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
22
RUN apt-get update
33
RUN apt-get -yqq install clang zlib1g-dev
44
WORKDIR /app
55
COPY src/Platform .
66
RUN dotnet publish -c Release -o out /p:DatabaseProvider=Npgsql /p:PublishAot=true /p:OptimizationPreference=Speed /p:GarbageCollectionAdaptationMode=0
77

8-
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS runtime
9-
ENV URLS http://+:8080
8+
FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS runtime
9+
ENV URLS=http://+:8080
1010

1111
WORKDIR /app
1212
COPY --from=build /app/out ./

frameworks/CSharp/aspnetcore/aspnetcore-minimal.dockerfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1-
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
1+
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
22
WORKDIR /app
33
COPY src/Minimal .
44
RUN dotnet publish -c Release -o out
55

6-
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS runtime
6+
FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS runtime
77
ENV URLS http://+:8080
8+
ENV DOTNET_GCDynamicAdaptationMode=0
9+
ENV DOTNET_ReadyToRun=0
10+
ENV DOTNET_HillClimbing_Disable=1
811

912
WORKDIR /app
1013
COPY --from=build /app/out ./

frameworks/CSharp/aspnetcore/aspnetcore-mvc.dockerfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1-
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
1+
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
22
WORKDIR /app
33
COPY src/Mvc .
44
RUN dotnet publish -c Release -o out
55

6-
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS runtime
6+
FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS runtime
77
ENV URLS http://+:8080
8+
ENV DOTNET_GCDynamicAdaptationMode=0
9+
ENV DOTNET_ReadyToRun=0
10+
ENV DOTNET_HillClimbing_Disable=1
811

912
WORKDIR /app
1013
COPY --from=build /app/out ./

frameworks/CSharp/aspnetcore/aspnetcore-mysql.dockerfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1-
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
1+
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
22
WORKDIR /app
33
COPY src/Platform .
44
RUN dotnet publish -c Release -o out /p:DatabaseProvider=MySqlConnector
55

6-
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS runtime
6+
FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS runtime
77
ENV URLS http://+:8080
8+
ENV DOTNET_GCDynamicAdaptationMode=0
9+
ENV DOTNET_ReadyToRun=0
10+
ENV DOTNET_HillClimbing_Disable=1
811

912
WORKDIR /app
1013
COPY --from=build /app/out ./

frameworks/CSharp/aspnetcore/aspnetcore.dockerfile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1-
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
1+
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
22
WORKDIR /app
33
COPY src/Platform .
44
RUN dotnet publish -c Release -o out /p:DatabaseProvider=Npgsql
55

6-
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS runtime
7-
ENV URLS http://+:8080
6+
FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS runtime
7+
ENV URLS=http://+:8080
8+
ENV DOTNET_GCDynamicAdaptationMode=0
9+
ENV DOTNET_ReadyToRun=0
10+
ENV DOTNET_HillClimbing_Disable=1
811

912
WORKDIR /app
1013
COPY --from=build /app/out ./
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFramework>net8.0</TargetFramework>
4+
<TargetFramework>net9.0</TargetFramework>
55
<Nullable>enable</Nullable>
66
<ImplicitUsings>enable</ImplicitUsings>
77
<LangVersion>latest</LangVersion>
88
<UserSecretsId>38063504-d08c-495a-89c9-daaad2f60f31</UserSecretsId>
99
</PropertyGroup>
1010

1111
<ItemGroup>
12-
<PackageReference Include="Npgsql" Version="8.0.3" />
13-
<PackageReference Include="Dapper" Version="2.1.21" />
14-
<PackageReference Include="RazorSlices" Version="0.7.0" />
12+
<PackageReference Include="Npgsql" Version="8.0.5" />
13+
<PackageReference Include="Dapper" Version="2.1.35" />
14+
<PackageReference Include="RazorSlices" Version="0.8.1" />
1515
</ItemGroup>
1616

1717
</Project>

frameworks/CSharp/aspnetcore/src/Minimal/Program.cs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
// Copyright (c) .NET Foundation. All rights reserved.
22
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
33

4-
using System.Text.Encodings.Web;
5-
using System.Text.Unicode;
6-
using Microsoft.AspNetCore.Http.HttpResults;
7-
using RazorSlices;
84
using Minimal;
95
using Minimal.Database;
106
using Minimal.Models;
7+
using System.Text.Encodings.Web;
8+
using System.Text.Unicode;
119

1210
var builder = WebApplication.CreateBuilder(args);
1311

@@ -36,14 +34,14 @@
3634

3735
app.MapGet("/db", async (Db db) => await db.LoadSingleQueryRow());
3836

39-
var createFortunesTemplate = RazorSlice.ResolveSliceFactory<List<Fortune>>("/Templates/Fortunes.cshtml");
4037
var htmlEncoder = CreateHtmlEncoder();
4138

4239
app.MapGet("/fortunes", async (HttpContext context, Db db) => {
4340
var fortunes = await db.LoadFortunesRows();
44-
var template = (RazorSliceHttpResult<List<Fortune>>)createFortunesTemplate(fortunes);
45-
template.HtmlEncoder = htmlEncoder;
46-
return template;
41+
var result = Results.Extensions.RazorSlice<Minimal.Slices.Fortunes, List<Fortune>>(fortunes);
42+
result.HtmlEncoder = htmlEncoder;
43+
44+
return result;
4745
});
4846

4947
app.MapGet("/queries/{count?}", async (Db db, string? count) => await db.LoadMultipleQueriesRows(count));

0 commit comments

Comments
 (0)