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 9 #682

Merged
merged 12 commits into from
Nov 14, 2024
Merged
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
2 changes: 1 addition & 1 deletion .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"dotnet-reportgenerator-globaltool": {
"version": "5.3.11",
"version": "5.4.1",
"commands": [
"reportgenerator"
]
Expand Down
6 changes: 3 additions & 3 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
FROM mcr.microsoft.com/dotnet/aspnet:6.0-bookworm-slim AS dotnet-lts-runtime
FROM mcr.microsoft.com/dotnet/aspnet:8.0-bookworm-slim AS dotnet-lts-runtime
FROM docker.io/library/mono AS mono

# https://hub.docker.com/_/microsoft-dotnet-sdk/
FROM mcr.microsoft.com/dotnet/sdk:8.0
FROM mcr.microsoft.com/dotnet/sdk:9.0

# install ASP.NET Core 6.0 Runtime
# install ASP.NET Core 8.0 Runtime
COPY --from=dotnet-lts-runtime /usr/share/dotnet /usr/share/dotnet

# install msbuild for Mono
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
],
"portsAttributes": {
"3000": {
"label": "ASP.NET Core Spa proxy",
"label": "ASP.NET Core SPA proxy",
"protocol": "https"
},
"5001": {
Expand Down
26 changes: 26 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# All file types
* text=auto

# Solutions
*.sln text=auto eol=crlf
*.slnx text=auto

# Projects
*.csproj text=auto
*.props text=auto

# Sources
*.cs text=auto diff=csharp

# Scripts
*.sh text eol=lf

# Images
*.ico binary
*.png binary
*.jpg binary
*.gif binary

# Keys
*.snk binary
*.p12 binary
3 changes: 2 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
version: 2
updates:
- package-ecosystem: github-actions
Expand All @@ -11,4 +12,4 @@ updates:
- package-ecosystem: nuget
directory: /
schedule:
interval: monthly
interval: monthly
1 change: 1 addition & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
changelog:
exclude:
labels:
Expand Down
1 change: 1 addition & 0 deletions .github/stale.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
# Configuration for probot-stale - https://github.com/probot/stale

# Number of days of inactivity before an issue becomes stale
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- name: Set up .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
dotnet-version: 9.0.x
- name: Build
run: |
dotnet --info
Expand All @@ -50,6 +50,7 @@ jobs:
with:
dotnet-version: |
8.0.x
9.0.x
- name: Test
run: |
dotnet test --collect:"XPlat Code Coverage"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Set up .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
dotnet-version: 9.0.x
- name: Build packages
run: |
dotnet --info
Expand Down
2 changes: 1 addition & 1 deletion .netconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
[ReportGenerator]
reports = "**/coverage.cobertura.xml"
targetdir = "coverage"
reporttypes = "Cobertura;TextSummary"
reporttypes = Cobertura,TextSummary
5 changes: 0 additions & 5 deletions CAS.sln
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AspNetCoreReactSample", "sa
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AspNetCoreSample", "samples\AspNetCoreSample\AspNetCoreSample.csproj", "{9E34C625-CE58-4630-AF42-C5237660AE27}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OwinSample", "samples\OwinSample\OwinSample.csproj", "{BB89E35B-F73F-426F-8E66-456D6A49FDF3}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BlazorSample", "samples\BlazorSample\BlazorSample.csproj", "{35775C99-782F-4502-B31D-B13E966D0A90}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AspNetCoreMvcSample", "samples\AspNetCoreMvcSample\AspNetCoreMvcSample.csproj", "{F98E8D5E-DB3C-4716-A440-392457A5784B}"
Expand Down Expand Up @@ -101,8 +99,6 @@ Global
{9E34C625-CE58-4630-AF42-C5237660AE27}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9E34C625-CE58-4630-AF42-C5237660AE27}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9E34C625-CE58-4630-AF42-C5237660AE27}.Release|Any CPU.Build.0 = Release|Any CPU
{BB89E35B-F73F-426F-8E66-456D6A49FDF3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BB89E35B-F73F-426F-8E66-456D6A49FDF3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{35775C99-782F-4502-B31D-B13E966D0A90}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{35775C99-782F-4502-B31D-B13E966D0A90}.Debug|Any CPU.Build.0 = Debug|Any CPU
{35775C99-782F-4502-B31D-B13E966D0A90}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand All @@ -126,7 +122,6 @@ Global
{AB5054E3-28CE-4FF1-B9CA-4F6D8EC43EFF} = {EF050CD3-59F8-432E-9E77-7CF8A5F5CD91}
{AF9F6FAF-873B-4C4C-BD6D-0CA09D189B6B} = {EF050CD3-59F8-432E-9E77-7CF8A5F5CD91}
{9E34C625-CE58-4630-AF42-C5237660AE27} = {EF050CD3-59F8-432E-9E77-7CF8A5F5CD91}
{BB89E35B-F73F-426F-8E66-456D6A49FDF3} = {EF050CD3-59F8-432E-9E77-7CF8A5F5CD91}
{35775C99-782F-4502-B31D-B13E966D0A90} = {EF050CD3-59F8-432E-9E77-7CF8A5F5CD91}
{F98E8D5E-DB3C-4716-A440-392457A5784B} = {EF050CD3-59F8-432E-9E77-7CF8A5F5CD91}
EndGlobalSection
Expand Down
8 changes: 2 additions & 6 deletions CAS.slnx
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
<Solution>
<Folder Name="/samples/">
<Project Path="samples\AspNetCoreIdentitySample\AspNetCoreIdentitySample.csproj" />
<Project Path="samples\AspNetCoreMvcSample\AspNetCoreMvcSample.csproj" Type="Classic C#" />
<Project Path="samples\AspNetCoreMvcSample\AspNetCoreMvcSample.csproj" />
<Project Path="samples\AspNetCoreReactSample\AspNetCoreReactSample.csproj" />
<Project Path="samples\AspNetCoreSample\AspNetCoreSample.csproj" />
<Project Path="samples\BlazorSample\BlazorSample.csproj" Type="Classic C#" />
<Project Path="samples\OwinSample\OwinSample.csproj" Type="Classic C#">
<Configuration Solution="Debug|Any CPU" Project="Debug|Any CPU|NoBuild" />
<Configuration Solution="Release|Any CPU" Project="Release|Any CPU|NoBuild" />
</Project>
<Project Path="samples\BlazorSample\BlazorSample.csproj" />
<File Path="samples\Directory.Build.props" />
</Folder>
<Folder Name="/Solution Items/">
Expand Down
41 changes: 20 additions & 21 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -16,31 +16,31 @@
<PackageVersion Include="System.Text.Json" Version="4.7.2" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' != 'netstandard2.0' and '$(TargetFramework)' != 'net462' ">
<PackageVersion Include="Microsoft.Extensions.Caching.Abstractions" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Caching.Memory" Version="8.0.1" />
<PackageVersion Include="Microsoft.Extensions.Options" Version="8.0.2" />
<PackageVersion Include="Microsoft.Extensions.Primitives" Version="8.0.0" />
<PackageVersion Include="System.Security.Cryptography.Xml" Version="8.0.2" />
<PackageVersion Include="System.Text.Encodings.Web" Version="8.0.0" />
<PackageVersion Include="System.Text.Json" Version="8.0.5" />
<PackageVersion Include="Microsoft.Extensions.Caching.Abstractions" Version="9.0.0" />
<PackageVersion Include="Microsoft.Extensions.Caching.Memory" Version="9.0.0" />
<PackageVersion Include="Microsoft.Extensions.Options" Version="9.0.0" />
<PackageVersion Include="Microsoft.Extensions.Primitives" Version="9.0.0" />
<PackageVersion Include="System.Security.Cryptography.Xml" Version="9.0.0" />
<PackageVersion Include="System.Text.Encodings.Web" Version="9.0.0" />
<PackageVersion Include="System.Text.Json" Version="9.0.0" />
</ItemGroup>
<ItemGroup>
<PackageVersion Include="coverlet.collector" Version="6.0.2" />
<PackageVersion Include="Microsoft.AspNet.Mvc" Version="5.3.0" />
<PackageVersion Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="8.0.10" />
<PackageVersion Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="8.0.10" />
<PackageVersion Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="8.0.10" />
<PackageVersion Include="Microsoft.AspNetCore.Identity.UI" Version="8.0.10" />
<PackageVersion Include="Microsoft.AspNetCore.SpaProxy" Version="8.0.10" />
<PackageVersion Include="Microsoft.AspNetCore.TestHost" Version="8.0.10" />
<PackageVersion Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="9.0.0" />
<PackageVersion Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="9.0.0" />
<PackageVersion Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="9.0.0" />
<PackageVersion Include="Microsoft.AspNetCore.Identity.UI" Version="9.0.0" />
<PackageVersion Include="Microsoft.AspNetCore.SpaProxy" Version="9.0.0" />
<PackageVersion Include="Microsoft.AspNetCore.TestHost" Version="9.0.0" />
<PackageVersion Include="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" Version="4.1.0" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.10" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.10" />
<PackageVersion Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="8.0.10" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.2" />
<PackageVersion Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Json" Version="8.0.1" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="8.0.1" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Sqlite" Version="9.0.0" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Tools" Version="9.0.0" />
<PackageVersion Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="9.0.0" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Binder" Version="9.0.0" />
<PackageVersion Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="9.0.0" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Json" Version="9.0.0" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="9.0.0" />
<PackageVersion Include="Microsoft.IdentityModel.Protocols.OpenIdConnect" Version="8.2.0" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageVersion Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3" />
Expand All @@ -58,7 +58,6 @@
<PackageVersion Include="StackExchange.Redis" Version="2.8.16" />
<PackageVersion Include="Sustainsys.Saml2.AspNetCore2" Version="2.10.0" />
<PackageVersion Include="Sustainsys.Saml2.Owin" Version="2.10.0" />
<PackageVersion Include="System.Formats.Asn1" Version="8.0.1" />
<PackageVersion Include="System.Net.Http" Version="4.3.4" />
<PackageVersion Include="System.Text.RegularExpressions" Version="4.3.1" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.8.2" />
Expand Down
15 changes: 0 additions & 15 deletions Owin.slnf

This file was deleted.

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>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
Expand Down
4 changes: 2 additions & 2 deletions samples/AspNetCoreIdentitySample/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,13 @@
}

app.UseHttpsRedirection();
app.UseStaticFiles();
app.MapStaticAssets();

app.UseRouting();

app.UseAuthentication();
app.UseAuthorization();

app.MapRazorPages();
app.MapRazorPages().WithStaticAssets();

app.Run();
2 changes: 1 addition & 1 deletion samples/AspNetCoreMvcSample/AspNetCoreMvcSample.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>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion samples/AspNetCoreMvcSample/Properties/launchSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"profiles": {
"AspNetCoreMvcSample": {
"commandName": "Project",
"dotnetRunMessages": "true",
"dotnetRunMessages": true,
"launchBrowser": true,
"applicationUrl": "https://localhost:5001;http://localhost:5000",
"environmentVariables": {
Expand Down
2 changes: 1 addition & 1 deletion samples/AspNetCoreReactSample/AspNetCoreReactSample.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>
<TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>
<TypeScriptToolsVersion>Latest</TypeScriptToolsVersion>
Expand Down
10 changes: 5 additions & 5 deletions samples/AspNetCoreReactSample/ClientApp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.1.0",
"type": "module",
"private": true,
"packageManager": "pnpm@9.12.3",
"packageManager": "pnpm@9.13.0",
"scripts": {
"prestart": "node aspnetcore-https && node aspnetcore-react",
"start": "vite",
Expand All @@ -18,16 +18,16 @@
"react-router-bootstrap": "^0.26.3",
"rimraf": "^6.0.1",
"typescript": "~5.6.3",
"typescript-eslint": "^8.12.2",
"typescript-eslint": "^8.14.0",
"web-vitals": "^4.2.4",
"wouter": "^3.3.5"
},
"devDependencies": {
"@types/node": "^22.8.6",
"@types/node": "^22.9.0",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@vitejs/plugin-react": "^4.3.3",
"eslint": "^9.13.0",
"vite": "^5.4.10"
"eslint": "^9.14.0",
"vite": "^5.4.11"
}
}
Loading