Provide Language Model Tools for LLM/VS Code Agent to Manage .NET#2557
Open
nagilson wants to merge 31 commits intodotnet:mainfrom
Open
Provide Language Model Tools for LLM/VS Code Agent to Manage .NET#2557nagilson wants to merge 31 commits intodotnet:mainfrom
Language Model Tools for LLM/VS Code Agent to Manage .NET#2557nagilson wants to merge 31 commits intodotnet:mainfrom
Conversation
…nstall # Add Language Model Tools for AI Agent Integration ## Summary This PR adds Language Model Tools (`languageModelTools`) support to the .NET Install Tool extension, enabling AI agents like GitHub Copilot to help users manage .NET installations through natural language interactions. This is an improvement upon dotnet#2375 - at the time of that PR, agents couldn't directly invoke vscode contributing commands, so this approach used an MCP server and a subprocess that could communicate with the MCP server. Now there's a more robust way of doing this. ## Changes ### New Features #### Language Model Tools (6 tools) Added support for VS Code's `languageModelTools` contribution point with the following tools: | Tool | Purpose | |------|---------| | `installDotNetSdk` | Install .NET SDK system-wide (MSI on Windows, PKG on macOS, apt/yum on Linux) | | `listDotNetVersions` | List available .NET SDK/Runtime versions from Microsoft with support phase info | | `listInstalledDotNetVersions` | Query installed SDKs/Runtimes for a given dotnet executable | | `findDotNetPath` | Find existing .NET installations that meet version/architecture requirements | | `uninstallDotNet` | Uninstall .NET SDK or Runtime versions | | `getDotNetSettingsInfo` | Comprehensive guide about settings, installation types, and troubleshooting | Each tool includes: - Detailed `modelDescription` with OS-specific guidance (MSI/PKG/apt/yum installers) - User-friendly `userDescription` - JSON schema for parameters - Comprehensive error handling with troubleshooting tips #### Comprehensive AI Agent Documentation The `getDotNetSettingsInfo` tool returns a detailed guide covering: - Difference between LOCAL (extension-managed) vs GLOBAL (system-wide) installs - `existingDotnetPath` setting explanation (commonly misunderstood) - SDK vs Runtime versioning relationship - `global.json` file handling - Common user scenarios and troubleshooting - "Uninstall trick" for registering global SDKs not in the extension's list
its hard to verify since it involves installing / uninstalling from the system state and requires user interaction. This may be overkill and im open to removing some of this.
This allows the extension to run properly on the new version of code + node js + ts that supports llm features
… llm worse for these
MiYanni
approved these changes
Feb 14, 2026
nagilson
added a commit
to nagilson/vscode-dotnet-runtime
that referenced
this pull request
Feb 23, 2026
We need to migrate to the new Linux image in CI so we can run tests on Linux again. dotnet#2557 This PR initially had the changes but it should really be an isolated fix - was intending to put it there to improve PR merge velocity
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add Language Model Tools for AI Agent Integration in VS Code
Summary
This PR adds Language Model Tools (
languageModelTools) support to the .NET Install Tool extension, enabling AI agents like GitHub Copilot to help users manage .NET installations through natural language interactions.This is an improvement upon #2375 - at the time of that PR, agents couldn't directly invoke vscode contributing commands, so this approach used an MCP server and a subprocess that could communicate with the MCP server. Now there's a more robust way of doing this.
I also messed around with the agent window and setting up repos myself before adding this. The agent seemed to get very confused on what the existingPath setting did amongst other things, and it didn't understand how the dotnet hive / muxer worked and what installs were available where, and how they were used. I was somewhat inspired by a 'dogfooding' effort we did to try to use our own tooling. I've improved its knowledge of .NET now.
Changes
New Features
Language Model Tools (6 tools)
Added support for VS Code's
languageModelToolscontribution point.See https://code.visualstudio.com/api/extension-guides/ai/tools
Tested
Example:
Before:

Now:


For unsupported scenarios, tooling is now aware of MS Learn and uses proper commands per distro / WSL instead of install script:

The unsupported text isn't great, it's finnicky to get it to stop saying that vs get confused and think that it shouldnt try to install .NET at all, vs it trying to run the tool in vscode when it doesn't work.