Skip to content

Commit 99fad95

Browse files
Update to ASP.NET Core 9 (#1784)
Update to ASP.NET Core RC1.
1 parent b193b90 commit 99fad95

File tree

14 files changed

+66
-19
lines changed

14 files changed

+66
-19
lines changed

.vscode/launch.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"type": "coreclr",
77
"request": "launch",
88
"preLaunchTask": "build",
9-
"program": "${workspaceFolder}/src/Website/bin/Debug/net8.0/Website.dll",
9+
"program": "${workspaceFolder}/src/Website/bin/Debug/net9.0/Website.dll",
1010
"args": [],
1111
"cwd": "${workspaceFolder}/src/Website",
1212
"stopAtEntry": false,

.vsconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"components": [
44
"Microsoft.VisualStudio.Component.CoreEditor",
55
"Microsoft.VisualStudio.Workload.CoreEditor",
6-
"Microsoft.NetCore.Component.Runtime.8.0",
6+
"Microsoft.NetCore.Component.Runtime.9.0",
77
"Microsoft.NetCore.Component.SDK",
88
"Microsoft.VisualStudio.Component.Roslyn.Compiler",
99
"Microsoft.VisualStudio.Component.Roslyn.LanguageServices",

Directory.Packages.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
<PackageVersion Include="coverlet.msbuild" Version="6.0.2" />
1010
<PackageVersion Include="GitHubActionsTestLogger" Version="2.4.1" />
1111
<PackageVersion Include="MartinCostello.Logging.XUnit" Version="0.4.0" />
12-
<PackageVersion Include="Microsoft.AspNetCore.AzureAppServices.HostingStartup" Version="8.0.8" />
13-
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.8" />
12+
<PackageVersion Include="Microsoft.AspNetCore.AzureAppServices.HostingStartup" Version="9.0.0-rc.1.24452.1" />
13+
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="9.0.0-rc.1.24452.1" />
1414
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
1515
<PackageVersion Include="Microsoft.Playwright" Version="1.46.0" />
1616
<PackageVersion Include="Microsoft.TypeScript.MSBuild" Version="5.6.2" />

benchmark.ps1

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@ param(
1111
$ErrorActionPreference = "Stop"
1212
$ProgressPreference = "SilentlyContinue"
1313

14-
if ($null -eq ${env:MSBUILDTERMINALLOGGER}) {
15-
${env:MSBUILDTERMINALLOGGER} = "auto"
16-
}
17-
1814
$solutionPath = $PSScriptRoot
1915
$sdkFile = Join-Path $solutionPath "global.json"
2016

build.ps1

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@ param(
66
$ErrorActionPreference = "Stop"
77
$ProgressPreference = "SilentlyContinue"
88

9-
if ($null -eq $env:MSBUILDTERMINALLOGGER) {
10-
$env:MSBUILDTERMINALLOGGER = "auto"
11-
}
12-
139
$solutionPath = $PSScriptRoot
1410
$sdkFile = Join-Path $solutionPath "global.json"
1511

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"sdk": {
3-
"version": "8.0.401",
3+
"version": "9.0.100-rc.1.24452.12",
44
"allowPrerelease": false,
55
"rollForward": "latestMajor"
66
}

perf/Website.Benchmarks/Website.Benchmarks.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<OutputType>Exe</OutputType>
66
<RootNamespace>MartinCostello.Website.Benchmarks</RootNamespace>
77
<Summary>$(Description)</Summary>
8-
<TargetFramework>net8.0</TargetFramework>
8+
<TargetFramework>net9.0</TargetFramework>
99
</PropertyGroup>
1010
<ItemGroup>
1111
<ProjectReference Include="..\..\src\Website\Website.csproj" />

src/Website/Website.csproj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,13 @@
1111
<PublishSelfContained>true</PublishSelfContained>
1212
<RootNamespace>MartinCostello.Website</RootNamespace>
1313
<Summary>Martin Costello's website</Summary>
14-
<TargetFramework>net8.0</TargetFramework>
14+
<TargetFramework>net9.0</TargetFramework>
1515
<TrimmerSingleWarn>false</TrimmerSingleWarn>
1616
<TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>
1717
<TypeScriptToolsVersion>latest</TypeScriptToolsVersion>
1818
<UserSecretsId>martincostello.com</UserSecretsId>
19+
<!-- HACK Workaround for https://github.com/dotnet/runtime/issues/106566 -->
20+
<UseSystemZlib>false</UseSystemZlib>
1921
</PropertyGroup>
2022
<ItemGroup>
2123
<PackageReference Include="Azure.Monitor.OpenTelemetry.Exporter" />

startvs.cmd

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
@ECHO OFF
2+
SETLOCAL
3+
4+
:: This command launches a Visual Studio solution with environment variables required to use a local version of the .NET SDK.
5+
6+
:: This tells .NET to use the same dotnet.exe that the build script uses.
7+
SET DOTNET_ROOT=%~dp0.dotnetcli
8+
SET DOTNET_ROOT(x86)=%~dp0.dotnetcli\x86
9+
10+
:: Put our local dotnet.exe on PATH first so Visual Studio knows which one to use.
11+
SET PATH=%DOTNET_ROOT%;%PATH%
12+
13+
SET sln=%~dp0Website.sln
14+
15+
IF NOT EXIST "%DOTNET_ROOT%\dotnet.exe" (
16+
echo The .NET SDK has not yet been installed. Run `%~dp0build.ps1` to install it
17+
exit /b 1
18+
)
19+
20+
IF "%VSINSTALLDIR%" == "" (
21+
start "" "%sln%"
22+
) else (
23+
"%VSINSTALLDIR%\Common7\IDE\devenv.com" "%sln%"
24+
)

startvscode.cmd

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
@ECHO OFF
2+
SETLOCAL
3+
4+
:: This command launches Visual Studio Code with environment variables required to use a local version of the .NET SDK.
5+
6+
:: This tells .NET to use the same dotnet.exe that the build script uses.
7+
SET DOTNET_ROOT=%~dp0.dotnetcli
8+
SET DOTNET_ROOT(x86)=%~dp0.dotnetcli\x86
9+
10+
:: Put our local dotnet.exe on PATH first so Visual Studio Code knows which one to use.
11+
SET PATH=%DOTNET_ROOT%;%PATH%
12+
13+
:: Sets the Target Framework for Visual Studio Code.
14+
SET TARGET=net9.0
15+
16+
SET FOLDER=%~1
17+
18+
IF NOT EXIST "%DOTNET_ROOT%\dotnet.exe" (
19+
echo The .NET SDK has not yet been installed. Run `%~dp0build.ps1` to install it
20+
exit /b 1
21+
)
22+
23+
IF "%FOLDER%"=="" (
24+
code .
25+
) else (
26+
code "%FOLDER%"
27+
)
28+
29+
exit /b 1

0 commit comments

Comments
 (0)