Skip to content

Require at least c#dk version 11 if installed - #9776

Open
dibarbet with Copilot wants to merge 8 commits into
mainfrom
copilot/add-csharpdk-version-check
Open

dibarbet with Copilot wants to merge 8 commits into
mainfrom
copilot/add-csharpdk-version-check

Conversation

Copilot AI commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Breaking compatibility changes require C# Dev Kit v11 when both extensions are active. Users with an older Dev Kit version should install the v11 prerelease or switch to the release C# extension.

  • Compatibility guard

    • Check the installed C# Dev Kit major version during activation.
    • Allow standalone C# usage and Dev Kit v11 prereleases.
    • Stop activation for older versions with actionable guidance.
  • Coverage

    • Cover missing, compatible, future, prerelease, and incompatible Dev Kit versions.
Image

Copilot AI and others added 2 commits September 16, 2026 18:26
Co-authored-by: dibarbet <5749229+dibarbet@users.noreply.github.com>
Co-authored-by: dibarbet <5749229+dibarbet@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: b3a2d96f-a3d1-4cad-868f-50dc15c71516
@dibarbet

Copy link
Copy Markdown
Member

@copilot please also bump the main version number to 11.1 as well

Co-authored-by: dibarbet <5749229+dibarbet@users.noreply.github.com>

Copilot AI commented Sep 16, 2026

Copy link
Copy Markdown
Contributor Author

@copilot please also bump the main version number to 11.1 as well

Updated the minimum required C# Dev Kit version to 11.1 in 2b55f23, including the user message, localization bundle, and boundary tests.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: b3a2d96f-a3d1-4cad-868f-50dc15c71516
@dibarbet dibarbet changed the title Require C# Dev Kit v11 for extension activation Require at least c#dk version 11 if installed Sep 16, 2026
@dibarbet
dibarbet marked this pull request as ready for review September 16, 2026 21:08
@dibarbet
dibarbet requested a review from a team as a code owner September 16, 2026 21:08
Copilot AI lite review requested due to automatic review settings September 16, 2026 21:08

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.

🟡 Changes recommended

Critical test, fixture, and version metadata issues remain unresolved.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Adds an activation-time compatibility guard requiring C# Dev Kit 11 or later when both extensions are active.

Changes:

  • Adds version validation and localized guidance.
  • Runs the guard during activation.
  • Adds unit coverage and updates version metadata.
File summaries
File Summary Review notes
version.json Updates extension version metadata. Revert the unintended 11.1 version change.
test/lsptoolshost/unitTests/checkCSharpDevKitVersion.test.ts Tests Dev Kit compatibility scenarios. Align the expected message with the implementation.
src/main.ts Runs validation during activation.
src/checkCSharpDevKitVersion.ts Implements Dev Kit version validation. Align the integration-test Dev Kit fixture with the required version.
l10n/bundle.l10n.json Adds localized compatibility guidance.
Review details
  • Files reviewed: 5/5 changed files
  • Comments generated: 3
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/checkCSharpDevKitVersion.ts
Comment thread test/lsptoolshost/unitTests/checkCSharpDevKitVersion.test.ts Outdated
Comment thread version.json
Comment thread version.json
Comment thread src/checkCSharpDevKitVersion.ts Outdated
Comment thread src/checkCSharpDevKitVersion.ts Outdated
Copilot AI review requested due to automatic review settings September 16, 2026 21:48

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.

🟡 Changes recommended

The localization key does not match the source string, leaving the new error untranslated.

Get a fresh assessment by requesting another Copilot review.

Review details

Suppressed comments (1)

l10n/bundle.l10n.json:8

  • This bundle entry does not match the string passed to vscode.l10n.t in checkCSharpDevKitVersion.ts, so the new error cannot resolve through the localization bundle and this entry remains unused. Replace the key/value with the shorter message currently used by the implementation (and asserted by the unit test).
  "This version of the C# extension requires C# Dev Kit version 11 or later. Please install the latest pre-release version of C# Dev Kit or use the release version of the C# extension.": "This version of the C# extension requires C# Dev Kit version 11 or later. Please install the latest pre-release version of C# Dev Kit or use the release version of the C# extension.",
  • Files reviewed: 9/9 changed files
  • Comments generated: 1
  • Review effort level: Lite

}

const message = vscode.l10n.t(
'C# Dev Kit version 11 or later is required. Please switch to the pre-release version of the C# Dev Kit.'
Comment thread CHANGELOG.md Outdated
Comment thread l10n/bundle.l10n.json Outdated
Copilot AI review requested due to automatic review settings September 16, 2026 22:23

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.

🔵 Needs a closer look

Fix the version metadata, extension-opening command, and incomplete recovery guidance before approval.

Review details

Suppressed comments (4)

CHANGELOG.md:7

  • The active changelog section is being renamed from 2.152.x to 11.1.x even though this repository's release notes use the 2..x scheme. This would put the new entry under a version that does not match the extension's release automation; restore the existing heading and let the normal snap process create/update release sections.
# 11.1.x
* Require C# Dev Kit version 11 or later (PR: [#9776](https://github.com/dotnet/vscode-csharp/pull/9776))

src/checkCSharpDevKitVersion.ts:29

  • extension.open is not the VS Code command for opening an installed extension. If the user selects this button, executeCommand rejects and the activation failure is reported instead of opening the Dev Kit page. Use the built-in workbench.extensions.action.showExtensionsWithIds command with the Dev Kit ID (and update the corresponding unit-test expectation).
        await vscode.commands.executeCommand('extension.open', csharpDevkitExtensionId);

src/checkCSharpDevKitVersion.ts:25

  • The PR description says users with an older Dev Kit can either install the v11 prerelease or switch to the release C# extension, but this message only offers the prerelease Dev Kit path. Please include the release-extension alternative so users who cannot upgrade Dev Kit receive the documented recovery option; update the generated localization bundle with the same key as well.
    const message = vscode.l10n.t(
        'C# Dev Kit version 11 or later is required. Please switch to the pre-release version of the C# Dev Kit.'
    );

version.json:3

  • This changes the packaged C# extension version from the repository's established 2.x release train to 11.1. The documented scheme uses 2..x versions, and feature PRs leave version.json for the branch-snap workflow; shipping this would produce an incorrectly versioned extension. Please revert this edit and let the release automation update the version.
    "version": "11.1",
  • Files reviewed: 9/9 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants