Skip to content

Conversation

@joelverhagen
Copy link
Contributor

Copilot AI review requested due to automatic review settings October 8, 2025 19:24
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the NuGet MCP server installation flow to support multiple versions of the server.json schema format. The changes allow the extension to handle both legacy and current schema versions when processing NuGet package manifests.

  • Refactored package reference fixing logic to support multiple schema formats
  • Added comprehensive test coverage for different schema versions
  • Improved error handling and validation for server.json parsing

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/extension/mcp/vscode-node/nuget.ts Refactored readServerManifest method to extract package reference fixing logic and support multiple schema formats (registry_name, registry_type, registryType)
src/extension/mcp/test/vscode-node/nuget.stub.spec.ts Added unit tests to verify handling of different schema versions (2025-07-29 original, latest, and 2025-09-29)

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
}

const json = await fs.readFile(serverJsonPath, 'utf8');
const manifest = JSON.parse(json);
Copy link
Member

Choose a reason for hiding this comment

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

JSON.parse will throw if it's invalid, we should probably catch that here too

Choose a reason for hiding this comment

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

mm

@gmaag583-alt
Copy link

knkl

@gmaag583-alt
Copy link

@connor4312 connor4312 enabled auto-merge October 13, 2025 14:57
@vs-code-engineering vs-code-engineering bot added this to the October 2025 milestone Oct 13, 2025
@connor4312 connor4312 added this pull request to the merge queue Oct 13, 2025
Merged via the queue into microsoft:main with commit 499433b Oct 13, 2025
6 checks passed
dileepyavan pushed a commit that referenced this pull request Oct 14, 2025
…1268)

* Align to latest schema

* Handle more schema differences

* Add tests

* Update src/extension/mcp/vscode-node/nuget.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Prepare the manifest for VS Code integration

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Connor Peet <connor@peet.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[NuGet MCP] Update server.json handling to respect latest schema

4 participants