Skip to content

Commit 10c3f21

Browse files
authored
Update .NET SDK from 8.0 to 10.0
1 parent 47fcdc9 commit 10c3f21

6 files changed

Lines changed: 17 additions & 17 deletions

File tree

‎.github/copilot-instructions.md‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,27 @@
22

33
## Build & Test
44

5-
Requires .NET SDK 8.0+. Use `dotnet` directly for building and testing — it's faster and
5+
Requires .NET SDK 10.0+. Use `dotnet` directly for building and testing — it's faster and
66
requires no extra tooling. The `Invoke-Build` script requires the `InvokeBuild` and `platyPS`
77
PowerShell modules (platyPS is `#Requires`'d at the top, so the whole script fails without it),
88
and is mainly needed to assemble the full PowerShell module for release.
99

1010
```powershell
1111
# Build (run both; Hosting depends on the core library)
1212
dotnet publish src/PowerShellEditorServices/PowerShellEditorServices.csproj -f netstandard2.0
13-
dotnet publish src/PowerShellEditorServices.Hosting/PowerShellEditorServices.Hosting.csproj -f net8.0
13+
dotnet publish src/PowerShellEditorServices.Hosting/PowerShellEditorServices.Hosting.csproj -f net10.0
1414
1515
# Run all unit tests
16-
dotnet test test/PowerShellEditorServices.Test/ --framework net8.0
16+
dotnet test test/PowerShellEditorServices.Test/ --framework net10.0
1717
1818
# Run a single test by name
19-
dotnet test test/PowerShellEditorServices.Test/ --framework net8.0 --filter "FullyQualifiedName~CompletesCommandInFile"
19+
dotnet test test/PowerShellEditorServices.Test/ --framework net10.0 --filter "FullyQualifiedName~CompletesCommandInFile"
2020
2121
# Run tests by trait category
22-
dotnet test test/PowerShellEditorServices.Test/ --framework net8.0 --filter "Category=Completions"
22+
dotnet test test/PowerShellEditorServices.Test/ --framework net10.0 --filter "Category=Completions"
2323
2424
# Run E2E tests
25-
dotnet test test/PowerShellEditorServices.Test.E2E/ --framework net8.0
25+
dotnet test test/PowerShellEditorServices.Test.E2E/ --framework net10.0
2626
```
2727

2828
For assembling the full module or running the complete CI suite (including Windows PowerShell
@@ -48,11 +48,11 @@ Protocol (DAP)** server for PowerShell, consumed by VS Code and other editors.
4848
- **`src/PowerShellEditorServices`** (`netstandard2.0`) — Core library containing all LSP/DAP
4949
handlers, services, and the PowerShell execution engine. Namespace:
5050
`Microsoft.PowerShell.EditorServices`.
51-
- **`src/PowerShellEditorServices.Hosting`** (`net8.0`, `net462`) — Entry point layer that loads
51+
- **`src/PowerShellEditorServices.Hosting`** (`net10.0`, `net462`) — Entry point layer that loads
5252
PSES into a PowerShell process via `StartEditorServicesCommand`. Uses a custom
5353
`AssemblyLoadContext` (`PsesLoadContext`) on .NET Core to isolate dependencies.
5454
- **`module/PowerShellEditorServices/`** — The shipped PowerShell module. The build assembles
55-
compiled binaries into `bin/Core/` (net8.0) and `bin/Desktop/` (net462). The module manifest
55+
compiled binaries into `bin/Core/` (net10.0) and `bin/Desktop/` (net462). The module manifest
5656
loads the appropriate DLL based on PowerShell edition.
5757

5858
### Key Services (registered in `PsesServiceCollectionExtensions`)
@@ -136,7 +136,7 @@ Because of that, treat any change to an existing `public` member as potentially
136136
### Multi-targeting
137137

138138
The core library targets `netstandard2.0` for compatibility with both .NET Core and .NET
139-
Framework. The hosting project and tests dual-target `net8.0` and `net462` (Windows PowerShell
139+
Framework. The hosting project and tests dual-target `net10.0` and `net462` (Windows PowerShell
140140
5.1). Non-Windows platforms skip `net462` targets.
141141

142142
## Pull Request Labels

‎PowerShellEditorServices.build.ps1‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ $script:BuildInfoPath = "src/PowerShellEditorServices.Hosting/BuildInfo.cs"
4040

4141
$script:NetFramework = @{
4242
PS51 = 'net462'
43-
PS74 = 'net8.0'
43+
PS74 = 'net10.0'
4444
Standard = 'netstandard2.0'
4545
}
4646

@@ -58,7 +58,7 @@ Task FindDotNet {
5858

5959
# Strip out semantic version metadata so it can be cast to `Version`
6060
[Version]$existingVersion, $null = (dotnet --version) -split " " -split "-"
61-
Assert ($existingVersion -ge [Version]("8.0")) ".NET SDK 8.0 or higher is required, please update it: https://aka.ms/dotnet-cli"
61+
Assert ($existingVersion -ge [Version]("10.0")) ".NET SDK 10.0 or higher is required, please update it: https://aka.ms/dotnet-cli"
6262

6363
Write-Build DarkGreen "Using dotnet v$(dotnet --version) at path $((Get-Command dotnet).Source)"
6464
}

‎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.416",
3+
"version": "10.0.301",
44
"rollForward": "latestFeature",
55
"allowPrerelease": false
66
}

‎src/PowerShellEditorServices.Hosting/PowerShellEditorServices.Hosting.csproj‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), PowerShellEditorServices.Common.props))\PowerShellEditorServices.Common.props" />
44

55
<PropertyGroup>
6-
<TargetFrameworks>net8.0;net462</TargetFrameworks>
6+
<TargetFrameworks>net10.0;net462</TargetFrameworks>
77
<AssemblyName>Microsoft.PowerShell.EditorServices.Hosting</AssemblyName>
88
</PropertyGroup>
99

‎test/PowerShellEditorServices.Test.E2E/PowerShellEditorServices.Test.E2E.csproj‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), PowerShellEditorServices.Common.props))\PowerShellEditorServices.Common.props" />
44

55
<PropertyGroup>
6-
<TargetFrameworks>net8.0</TargetFrameworks>
6+
<TargetFrameworks>net10.0</TargetFrameworks>
77
<IsPackable>false</IsPackable>
88
</PropertyGroup>
99

‎test/PowerShellEditorServices.Test/PowerShellEditorServices.Test.csproj‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), PowerShellEditorServices.Common.props))\PowerShellEditorServices.Common.props" />
33

44
<PropertyGroup>
5-
<TargetFrameworks>net8.0;net462</TargetFrameworks>
5+
<TargetFrameworks>net10.0;net462</TargetFrameworks>
66
<AssemblyName>Microsoft.PowerShell.EditorServices.Test</AssemblyName>
77
<TargetPlatform>x64</TargetPlatform>
88
</PropertyGroup>
@@ -17,12 +17,12 @@
1717
</ItemGroup>
1818

1919
<!-- The Hosting assembly (and thus PsesLoadContext) only exists on .NET Core. -->
20-
<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' ">
20+
<ItemGroup Condition=" '$(TargetFramework)' == 'net10.0' ">
2121
<ProjectReference Include="..\..\src\PowerShellEditorServices.Hosting\PowerShellEditorServices.Hosting.csproj" />
2222
</ItemGroup>
2323

2424
<!-- PowerShell 7.4.x -->
25-
<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' ">
25+
<ItemGroup Condition=" '$(TargetFramework)' == 'net10.0' ">
2626
<PackageReference Include="Microsoft.PowerShell.SDK" />
2727
</ItemGroup>
2828

0 commit comments

Comments
 (0)