diff --git a/BlazorApp1.Application.Unit.Tests/BlazorApp1.Application.Unit.Tests.csproj b/BlazorApp1.Application.Unit.Tests/BlazorApp1.Application.Unit.Tests.csproj index 3735dcf..786c477 100644 --- a/BlazorApp1.Application.Unit.Tests/BlazorApp1.Application.Unit.Tests.csproj +++ b/BlazorApp1.Application.Unit.Tests/BlazorApp1.Application.Unit.Tests.csproj @@ -1,7 +1,7 @@ - net6.0 + net7.0 enable enable diff --git a/BlazorApp1.Application/BlazorApp1.Application.csproj b/BlazorApp1.Application/BlazorApp1.Application.csproj index bbcdf82..c8d5e66 100644 --- a/BlazorApp1.Application/BlazorApp1.Application.csproj +++ b/BlazorApp1.Application/BlazorApp1.Application.csproj @@ -1,7 +1,7 @@  - net6.0 + net7.0 enable enable diff --git a/BlazorApp1.Data/BlazorApp1.Domain.csproj b/BlazorApp1.Data/BlazorApp1.Domain.csproj index 132c02c..cfadb03 100644 --- a/BlazorApp1.Data/BlazorApp1.Domain.csproj +++ b/BlazorApp1.Data/BlazorApp1.Domain.csproj @@ -1,7 +1,7 @@ - net6.0 + net7.0 enable enable diff --git a/BlazorApp1.Domain.Tests/BlazorApp1.Domain.Tests.csproj b/BlazorApp1.Domain.Tests/BlazorApp1.Domain.Tests.csproj index b701d84..7fee2f3 100644 --- a/BlazorApp1.Domain.Tests/BlazorApp1.Domain.Tests.csproj +++ b/BlazorApp1.Domain.Tests/BlazorApp1.Domain.Tests.csproj @@ -1,7 +1,7 @@  - net6.0 + net7.0 enable enable diff --git a/BlazorApp1.Server.Abstractions/BlazorApp1.Server.Abstractions.csproj b/BlazorApp1.Server.Abstractions/BlazorApp1.Server.Abstractions.csproj index 27ac386..a1ed5b3 100644 --- a/BlazorApp1.Server.Abstractions/BlazorApp1.Server.Abstractions.csproj +++ b/BlazorApp1.Server.Abstractions/BlazorApp1.Server.Abstractions.csproj @@ -1,7 +1,7 @@  - net6.0 + net7.0 enable enable diff --git a/BlazorApp1.Server.Integration.Tests/BlazorApp1.Server.Integration.Tests.csproj b/BlazorApp1.Server.Integration.Tests/BlazorApp1.Server.Integration.Tests.csproj index 6778d2f..e8f6a87 100644 --- a/BlazorApp1.Server.Integration.Tests/BlazorApp1.Server.Integration.Tests.csproj +++ b/BlazorApp1.Server.Integration.Tests/BlazorApp1.Server.Integration.Tests.csproj @@ -1,7 +1,7 @@  - net6.0 + net7.0 enable enable diff --git a/BlazorApp1.Server.Unit.Tests/BlazorApp1.Server.Unit.Tests.csproj b/BlazorApp1.Server.Unit.Tests/BlazorApp1.Server.Unit.Tests.csproj index ddcb698..605e7f0 100644 --- a/BlazorApp1.Server.Unit.Tests/BlazorApp1.Server.Unit.Tests.csproj +++ b/BlazorApp1.Server.Unit.Tests/BlazorApp1.Server.Unit.Tests.csproj @@ -1,7 +1,7 @@  - net6.0 + net7.0 enable enable diff --git a/BlazorApp1/Client/BlazorApp1.Client.csproj b/BlazorApp1/Client/BlazorApp1.Client.csproj index 0f1c57b..516154f 100644 --- a/BlazorApp1/Client/BlazorApp1.Client.csproj +++ b/BlazorApp1/Client/BlazorApp1.Client.csproj @@ -1,14 +1,14 @@  - net6.0 + net7.0 enable enable - - + + diff --git a/BlazorApp1/Server/BlazorApp1.Server.csproj b/BlazorApp1/Server/BlazorApp1.Server.csproj index 60446da..ae1c93c 100644 --- a/BlazorApp1/Server/BlazorApp1.Server.csproj +++ b/BlazorApp1/Server/BlazorApp1.Server.csproj @@ -1,7 +1,7 @@  - net6.0 + net7.0 enable enable aed99edb-905a-40c5-8371-347900b76c53 @@ -12,7 +12,7 @@ - + diff --git a/BlazorApp1/Server/Dockerfile b/BlazorApp1/Server/Dockerfile index 04ece37..6fd87ec 100644 --- a/BlazorApp1/Server/Dockerfile +++ b/BlazorApp1/Server/Dockerfile @@ -1,11 +1,11 @@ #See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging. -FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base +FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base WORKDIR /app EXPOSE 80 EXPOSE 443 -FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build +FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build WORKDIR /src COPY ["BlazorApp1/Server/BlazorApp1.Server.csproj", "BlazorApp1/Server/"] COPY ["BlazorApp1/Client/BlazorApp1.Client.csproj", "BlazorApp1/Client/"] diff --git a/BlazorApp1/Server/Program.cs b/BlazorApp1/Server/Program.cs index ea117b7..7aa5830 100644 --- a/BlazorApp1/Server/Program.cs +++ b/BlazorApp1/Server/Program.cs @@ -1,18 +1,23 @@ using BlazorApp1.Application; using BlazorApp1.Data; -using BlazorApp1.Server.Abstractions.Contracts; using BlazorApp1.Server.Abstractions.Contracts.JsonContext; using BlazorApp1.Server.BackgroundServices; using BlazorApp1.Server.Profiles; using Microsoft.EntityFrameworkCore; +using System.Text.Encodings.Web; var builder = WebApplication.CreateBuilder(args); // Add services to the container. builder.Services.AddControllersWithViews() - // .AddJsonOptions(options => options.JsonSerializerOptions.AddContext()) - ; + .AddJsonOptions(options => + { + // ??? :D https://github.com/dotnet/aspnetcore/issues/38720#issuecomment-1017156458 + options.JsonSerializerOptions.Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping; + options.JsonSerializerOptions.AddContext(); + }); + builder.Services.AddRazorPages(); builder.Services.AddWeatherForecastDataLayer(); diff --git a/BlazorApp1/Shared/BlazorApp1.Data.csproj b/BlazorApp1/Shared/BlazorApp1.Data.csproj index 67afbeb..8c2185f 100644 --- a/BlazorApp1/Shared/BlazorApp1.Data.csproj +++ b/BlazorApp1/Shared/BlazorApp1.Data.csproj @@ -1,7 +1,7 @@ - net6.0 + net7.0 enable enable