Skip to content

Update .NET SDK to 10.0 and PowerShell to 7.6.3#2327

Closed
Copilot wants to merge 2 commits into
mainfrom
copilot/change-dotnet-sdk-8-to-10
Closed

Update .NET SDK to 10.0 and PowerShell to 7.6.3#2327
Copilot wants to merge 2 commits into
mainfrom
copilot/change-dotnet-sdk-8-to-10

Conversation

Copilot AI commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Updates PSES to the .NET 10 and PowerShell 7.6 LTS lines.

Changes

  • global.json: SDK 8.0.x10.0.301.
  • Target frameworks: Hosting and Test retargeted net8.0net10.0 (the new LTS); net462 (Windows PowerShell 5.1) is unchanged, and core/shared stay netstandard2.0.
  • PowerShellEditorServices.build.ps1: requires the .NET SDK 10.0+ and builds against net10.0.
  • Microsoft.PowerShell.SDK: 7.4.147.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.IsPS74 matched exactly 7.4, but the variable-completion detail it gates was added in 7.4 and persists in 7.6. It's now IsPS74OrGreater (>= 7.4); without this, CompletesVariableInFile 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 idioms the analyzers now require: the field keyword in SynchronousTask.Result and ReferenceTable.IsInitialized (IDE0032), null-conditional assignment in PowerShellDebugContext and RemoteFileManagerService (IDE0031), and dropped redundant interface accessibility modifiers (IDE0040). LangVersion is latest, which is now C# 14.

Validation

Built core (netstandard2.0), Hosting, Test, and E2E (all net10.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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.

@JustinGrote

Copy link
Copy Markdown
Collaborator

@copilot try again

Copilot AI commented Jun 24, 2026

Copy link
Copy Markdown
Contributor Author

@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 AI changed the title [WIP] Update .NET SDK from 8 to 10 Update .NET SDK from 8 to 10 Jun 24, 2026
@JustinGrote

Copy link
Copy Markdown
Collaborator

@copilot revert .csproj changes and the framework specifications in the readme for build and test instructions

Copilot AI commented Jun 24, 2026

Copy link
Copy Markdown
Contributor Author

@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:

  • global.json SDK version to 10.0.301
  • Build script SDK requirement to 10.0+

All project files remain targeting net8.0.

Copilot AI and others added 2 commits June 24, 2026 14:37
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>
@andyleejordan andyleejordan force-pushed the copilot/change-dotnet-sdk-8-to-10 branch from ae954f9 to 64d5caf Compare June 24, 2026 22:46
@andyleejordan andyleejordan changed the title Update .NET SDK from 8 to 10 Update .NET SDK to 10.0 and PowerShell to 7.6.3 Jun 24, 2026
@andyleejordan andyleejordan added Area-Build & Release Issue-Enhancement A feature request (enhancement). labels Jun 24, 2026
@JustinGrote

Copy link
Copy Markdown
Collaborator

I'll give this another shot with a better prompt.

@andyleejordan

andyleejordan commented Jun 25, 2026

Copy link
Copy Markdown
Member

@JustinGrote I actually had Claude get this updated, it might still be worth finishing. Last pushed commit seemed good and passed CI.

@JustinGrote

Copy link
Copy Markdown
Collaborator

It bumped framework and SMA to 10 and 7.6 as well, we don't want that until November when 7.4 goes EOL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-Build & Release Issue-Enhancement A feature request (enhancement).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants