Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to .NET 7 #256

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
191 changes: 191 additions & 0 deletions UpgradeReport.sarif
Original file line number Diff line number Diff line change
@@ -0,0 +1,191 @@
{
"$schema": "https://schemastore.azurewebsites.net/schemas/json/sarif-2.1.0-rtm.5.json",
"version": "2.1.0",
"runs": [
{
"tool": {
"driver": {
"name": "Add package 'Microsoft.DotNet.UpgradeAssistant.Extensions.Default.Analyzers'",
"semanticVersion": "",
"informationUri": "https://github.com/dotnet/upgrade-assistant#usage",
"rules": [
{
"id": "Microsoft.DotNet.UpgradeAssistant.Steps.Packages.PackageUpdaterStep+PackageManipulationStep`1[[Microsoft.DotNet.UpgradeAssistant.NuGetReference, Microsoft.DotNet.UpgradeAssistant.Abstractions, Version=0.4.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]",
"fullDescription": {
"text": "Add package 'Microsoft.DotNet.UpgradeAssistant.Extensions.Default.Analyzers'"
},
"helpUri": "about:blank"
}
]
}
},
"results": [
{
"ruleId": "Microsoft.DotNet.UpgradeAssistant.Steps.Packages.PackageUpdaterStep+PackageManipulationStep`1[[Microsoft.DotNet.UpgradeAssistant.NuGetReference, Microsoft.DotNet.UpgradeAssistant.Abstractions, Version=0.4.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]",
"message": {
"text": "Complete: Add package 'Microsoft.DotNet.UpgradeAssistant.Extensions.Default.Analyzers'"
},
"locations": [
{
"physicalLocation": {
"artifactLocation": {
"uri": "file:///D:/Practice/Repos/blazor-wasm-boilerplate/src/Host/Host.csproj"
},
"region": {}
}
}
]
}
],
"columnKind": "utf16CodeUnits"
},
{
"tool": {
"driver": {
"name": "Add package 'Microsoft.AspNetCore.Mvc.NewtonsoftJson'",
"semanticVersion": "",
"informationUri": "https://github.com/dotnet/upgrade-assistant#usage",
"rules": [
{
"id": "Microsoft.DotNet.UpgradeAssistant.Steps.Packages.PackageUpdaterStep+PackageManipulationStep`1[[Microsoft.DotNet.UpgradeAssistant.NuGetReference, Microsoft.DotNet.UpgradeAssistant.Abstractions, Version=0.4.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]",
"fullDescription": {
"text": "Add package 'Microsoft.AspNetCore.Mvc.NewtonsoftJson'"
},
"helpUri": "about:blank"
}
]
}
},
"results": [
{
"ruleId": "Microsoft.DotNet.UpgradeAssistant.Steps.Packages.PackageUpdaterStep+PackageManipulationStep`1[[Microsoft.DotNet.UpgradeAssistant.NuGetReference, Microsoft.DotNet.UpgradeAssistant.Abstractions, Version=0.4.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]",
"message": {
"text": "Complete: Add package 'Microsoft.AspNetCore.Mvc.NewtonsoftJson'"
},
"locations": [
{
"physicalLocation": {
"artifactLocation": {
"uri": "file:///D:/Practice/Repos/blazor-wasm-boilerplate/src/Host/Host.csproj"
},
"region": {}
}
}
]
}
],
"columnKind": "utf16CodeUnits"
},
{
"tool": {
"driver": {
"name": "Update TFM",
"semanticVersion": "",
"informationUri": "https://github.com/dotnet/upgrade-assistant#usage",
"rules": [
{
"id": "Microsoft.DotNet.UpgradeAssistant.Steps.ProjectFormat.SetTFMStep",
"fullDescription": {
"text": "Updated TFM to net7.0"
},
"helpUri": "about:blank"
}
]
}
},
"results": [
{
"ruleId": "Microsoft.DotNet.UpgradeAssistant.Steps.ProjectFormat.SetTFMStep",
"message": {
"text": "Complete: Updated TFM to net7.0"
},
"locations": [
{
"physicalLocation": {
"artifactLocation": {
"uri": "file:///D:/Practice/Repos/blazor-wasm-boilerplate/src/Host/Host.csproj"
},
"region": {}
}
}
]
}
],
"columnKind": "utf16CodeUnits"
},
{
"tool": {
"driver": {
"name": "Add template files",
"semanticVersion": "",
"informationUri": "https://github.com/dotnet/upgrade-assistant#usage",
"rules": [
{
"id": "Microsoft.DotNet.UpgradeAssistant.Steps.Templates.TemplateInserterStep",
"fullDescription": {
"text": "Added template file Program.cs"
},
"helpUri": "about:blank"
}
]
}
},
"results": [
{
"ruleId": "Microsoft.DotNet.UpgradeAssistant.Steps.Templates.TemplateInserterStep",
"message": {
"text": "Complete: Added template file Program.cs"
},
"locations": [
{
"physicalLocation": {
"artifactLocation": {
"uri": "file:///D:/Practice/Repos/blazor-wasm-boilerplate/Program.cs"
},
"region": {}
}
}
]
}
],
"columnKind": "utf16CodeUnits"
},
{
"tool": {
"driver": {
"name": "Add template files",
"semanticVersion": "",
"informationUri": "https://github.com/dotnet/upgrade-assistant#usage",
"rules": [
{
"id": "Microsoft.DotNet.UpgradeAssistant.Steps.Templates.TemplateInserterStep",
"fullDescription": {
"text": "Added template file Startup.cs"
},
"helpUri": "about:blank"
}
]
}
},
"results": [
{
"ruleId": "Microsoft.DotNet.UpgradeAssistant.Steps.Templates.TemplateInserterStep",
"message": {
"text": "Complete: Added template file Startup.cs"
},
"locations": [
{
"physicalLocation": {
"artifactLocation": {
"uri": "file:///D:/Practice/Repos/blazor-wasm-boilerplate/Startup.cs"
},
"region": {}
}
}
]
}
],
"columnKind": "utf16CodeUnits"
}
]
}
37 changes: 21 additions & 16 deletions src/Client.Infrastructure/Client.Infrastructure.csproj
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<RootNamespace>FSH.BlazorWebAssembly.Client.Infrastructure</RootNamespace>
<AssemblyName>FSH.BlazorWebAssembly.Client.Infrastructure</AssemblyName>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Blazored.LocalStorage" Version="4.2.0" />
<PackageReference Include="Blazored.LocalStorage" Version="4.3.0" />
<PackageReference Include="MediatR.Courier.DependencyInjection" Version="5.0.0" />
<PackageReference Include="MediatR.Extensions.Microsoft.DependencyInjection" Version="10.0.1" />
<PackageReference Include="Microsoft.AspNetCore.Components.Authorization" Version="6.0.5" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="6.0.5" />
<PackageReference Include="MediatR.Extensions.Microsoft.DependencyInjection" Version="11.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.Authorization" Version="7.0.2" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="7.0.2" />
<PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="6.0.5" />
<PackageReference Include="Microsoft.Authentication.WebAssembly.Msal" Version="6.0.5" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="6.0.1" />
<PackageReference Include="Microsoft.Extensions.Http" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Localization" Version="6.0.5" />
<PackageReference Include="MudBlazor" Version="6.0.10" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="NSwag.MSBuild" Version="13.15.10">
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="7.0.2" />
<PackageReference Include="Microsoft.Authentication.WebAssembly.Msal" Version="7.0.2" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Http" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Localization" Version="7.0.2" />
<PackageReference Include="MudBlazor" Version="6.1.7" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
<PackageReference Include="NSwag.MSBuild" Version="13.18.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand All @@ -30,10 +30,15 @@
<ProjectReference Include="..\Shared\Shared.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="Roslynator.Analyzers" Version="4.2.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<Target Name="NSwag">
<Exec WorkingDirectory="$(ProjectDir)\ApiClient"
EnvironmentVariables="ASPNETCORE_ENVIRONMENT=Development"
Command="$(NSwagExe_Net60) run nswag.json /variables:Configuration=$(Configuration)" />
<Exec WorkingDirectory="$(ProjectDir)\ApiClient" EnvironmentVariables="ASPNETCORE_ENVIRONMENT=Development" Command="$(NSwagExe_Net60) run nswag.json /variables:Configuration=$(Configuration)" />
</Target>

</Project>
15 changes: 11 additions & 4 deletions src/Client/Client.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<RootNamespace>FSH.BlazorWebAssembly.Client</RootNamespace>
<AssemblyName>FSH.BlazorWebAssembly.Client</AssemblyName>
<ServiceWorkerAssetsManifest>service-worker-assets.js</ServiceWorkerAssetsManifest>
Expand All @@ -10,11 +10,11 @@

<ItemGroup>
<PackageReference Include="Mapster" Version="7.3.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="6.0.5" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="6.0.5" PrivateAssets="all" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="7.0.2" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="7.0.2" PrivateAssets="all" />
<PackageReference Include="Microsoft.AspNetCore.Localization" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.WebUtilities" Version="2.2.0" />
<PackageReference Include="MudBlazor" Version="6.0.10" />
<PackageReference Include="MudBlazor" Version="6.1.7" />
</ItemGroup>

<ItemGroup>
Expand All @@ -32,4 +32,11 @@
the user gets redirected to authentication/login-failed with no error message. -->
<TrimmerRootAssembly Include="Microsoft.Authentication.WebAssembly.Msal" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="Roslynator.Analyzers" Version="4.2.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
</Project>
49 changes: 27 additions & 22 deletions src/Host/Host.csproj
Original file line number Diff line number Diff line change
@@ -1,24 +1,29 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>FSH.BlazorWebAssembly.Host</RootNamespace>
<AssemblyName>FSH.BlazorWebAssembly.Host</AssemblyName>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="6.0.5" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Client\Client.csproj" />
<ProjectReference Include="..\Shared\Shared.csproj" />
</ItemGroup>

<ItemGroup>
<Content Update="appsettings.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<RootNamespace>FSH.BlazorWebAssembly.Host</RootNamespace>
<AssemblyName>FSH.BlazorWebAssembly.Host</AssemblyName>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="7.0.2" />
<PackageReference Include="Microsoft.DotNet.UpgradeAssistant.Extensions.Default.Analyzers" Version="0.4.355802">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="7.0.2" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Client\Client.csproj" />
<ProjectReference Include="..\Shared\Shared.csproj" />
</ItemGroup>
<ItemGroup>
<Content Update="appsettings.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<PackageReference Update="Roslynator.Analyzers" Version="4.2.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
</Project>
8 changes: 7 additions & 1 deletion src/Shared/Shared.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<RootNamespace>FSH.WebApi.Shared</RootNamespace>
<AssemblyName>FSH.WebApi.Shared</AssemblyName>
</PropertyGroup>
<ItemGroup>
<PackageReference Update="Roslynator.Analyzers" Version="4.2.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
</Project>
Loading