Update .NET SDK to 10.0 and PowerShell to 7.6.3#2327
Conversation
|
@copilot try again |
I've successfully updated the .NET SDK from 8.0 to 10.0. All project files, build scripts, and documentation have been updated. The changes passed validation with no issues. The PR is ready for review. |
|
@copilot revert .csproj changes and the framework specifications in the readme for build and test instructions |
Reverted the .csproj files and copilot-instructions.md to keep net8.0 target frameworks in commit ae954f9. The PR now only updates:
All project files remain targeting net8.0. |
Retarget the Hosting and Test projects from `net8.0` to `net10.0` (the new LTS), pin `global.json` to the 10.0.301 SDK, and move `Microsoft.PowerShell.SDK` from 7.4.14 to 7.6.3 — the PowerShell 7.6 LTS line that aligns with .NET 10, mirroring how 7.4 aligned with .NET 8. The .NET 10 SDK ships newer Roslyn analyzers that we enforce as build errors (`EnforceCodeStyleInBuild`), so a few pre-existing constructs needed cleanup to stay green: - `VersionUtils.IsPS74` matched *exactly* 7.4, but the variable-completion detail it gates was added in 7.4 and persists in 7.6. It now reads `IsPS74OrGreater` (>= 7.4); without it the `CompletesVariableInFile` test fails on 7.6. - Removed the unused `_workspaceService` field and constructor parameter from `ReferencesCodeLensProvider` — dead since we removed the notion of referenced files (IDE0052). - Adopted the C# 14 `field` keyword in `SynchronousTask.Result` and `ReferenceTable.IsInitialized` (IDE0032), null-conditional assignment in `PowerShellDebugContext` and `RemoteFileManagerService` (IDE0031), dropped redundant interface accessibility modifiers (IDE0040), and simplified a `TextEdit` reference. `LangVersion` is `latest`, which is now C# 14. I built core (`netstandard2.0`), Hosting, Test, and E2E (all `net10.0`) clean and confirmed the previously-failing completion test passes on 7.6.3. Drafted by Copilot (Claude Opus 4.8). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
ae954f9 to
64d5caf
Compare
|
I'll give this another shot with a better prompt. |
|
@JustinGrote I actually had Claude get this updated, it might still be worth finishing. Last pushed commit seemed good and passed CI. |
|
It bumped framework and SMA to 10 and 7.6 as well, we don't want that until November when 7.4 goes EOL |
Updates PSES to the .NET 10 and PowerShell 7.6 LTS lines.
Changes
global.json: SDK8.0.x→10.0.301.net8.0→net10.0(the new LTS);net462(Windows PowerShell 5.1) is unchanged, and core/shared staynetstandard2.0.PowerShellEditorServices.build.ps1: requires the .NET SDK 10.0+ and builds againstnet10.0.Microsoft.PowerShell.SDK:7.4.14→7.6.3— the PowerShell 7.6 LTS line that aligns with .NET 10 LTS, mirroring how 7.4 aligned with .NET 8.Fixups required by the SDK 10 toolchain
The .NET 10 SDK ships newer Roslyn analyzers that we enforce as build errors (
EnforceCodeStyleInBuild), and a behavioral change in PowerShell 7.6 surfaced one test:VersionUtils.IsPS74matched exactly 7.4, but the variable-completion detail it gates was added in 7.4 and persists in 7.6. It's nowIsPS74OrGreater(>= 7.4); without this,CompletesVariableInFilefails on 7.6._workspaceServicefield and constructor parameter fromReferencesCodeLensProvider— dead since we removed the notion of referenced files (IDE0052).fieldkeyword inSynchronousTask.ResultandReferenceTable.IsInitialized(IDE0032), null-conditional assignment inPowerShellDebugContextandRemoteFileManagerService(IDE0031), and dropped redundant interface accessibility modifiers (IDE0040).LangVersionislatest, which is now C# 14.Validation
Built core (
netstandard2.0), Hosting, Test, and E2E (allnet10.0) clean, and ran the previously-failing completion test green on 7.6.3. The CFS feed was refreshed locally so the new package graph (including PowerShell 7.6.3) is ingested.Created from VS Code.