Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
4a68b63
Provide `Language Model Tools` for LLM/VS Code Agent to Manage .NET I…
nagilson Feb 6, 2026
ee1e5f6
add more tests
nagilson Feb 6, 2026
2fa2f73
enable faster query of .net installs
nagilson Feb 6, 2026
c564427
proper node version for VS Code version
nagilson Feb 6, 2026
f111e7e
bump ts version and dependencies
nagilson Feb 6, 2026
45460e1
fix typescript / node version dependencies for new vscode vers
nagilson Feb 6, 2026
d2363a4
lint + unspported scenarios
nagilson Feb 6, 2026
67a9746
Logging of language model tool consumption + tests prevent duplicate …
nagilson Feb 10, 2026
6ca8651
add can be referenced in prompt, shorten model description
nagilson Feb 11, 2026
09e9589
language model tool specifications follow guidance
nagilson Feb 11, 2026
8d4b0a8
Warn of unsupported scenarios + link to proper reference - don't make…
nagilson Feb 12, 2026
960b546
add ability to throw back up error for better llm diagnostic
nagilson Feb 12, 2026
329f181
Merge remote-tracking branch 'upstream/main' into nagilson-mcp-for-in…
nagilson Feb 12, 2026
d1145e5
cautious creation of worker context for uninstall cmd failure error …
nagilson Feb 12, 2026
3740d6f
merge fix
nagilson Feb 12, 2026
76925b5
dont truncate what is available.
nagilson Feb 12, 2026
03412fc
missing code rmvl
nagilson Feb 12, 2026
69763d3
group runtimes properly
nagilson Feb 12, 2026
4b005d8
group runtimes properly
nagilson Feb 12, 2026
73ccf5b
fix tests and unix pool
nagilson Feb 13, 2026
854c9ad
pool provider fix
nagilson Feb 13, 2026
e35a97a
use paths feature in global json for local sdk
nagilson Feb 13, 2026
9cb2d2f
Fix pool provider again
nagilson Feb 17, 2026
abbd462
Move instrutions to a new file
nagilson Feb 18, 2026
b50da38
Try to improve unsupported scenario and error handling
nagilson Feb 18, 2026
051d729
Use Test Versions to match CI Runner version support
nagilson Feb 18, 2026
a6ee7f9
allow disabling the LLM tools
nagilson Feb 19, 2026
d81721d
try to include needed unix dependency for new image
nagilson Feb 19, 2026
b87318b
Attempt : progress reporting to AI
nagilson Feb 23, 2026
4aa4714
Merge branch 'main' into nagilson-mcp-for-installing
nagilson Feb 24, 2026
2be92c9
Merge remote-tracking branch 'upstream/main' into nagilson-mcp-for-in…
nagilson Mar 3, 2026
f6e17c2
Merge branch 'main' into nagilson-mcp-for-installing
nagilson Mar 26, 2026
36f464c
Try to follow guidance for skills and AI guidance from Anthropic
nagilson Mar 26, 2026
43eaf8c
Minimize settings info content following same anthropic principles
nagilson Mar 26, 2026
892a156
Merge remote-tracking branch 'upstream/main' into nagilson-mcp-for-in…
nagilson Mar 26, 2026
848e539
fix build dependencies post merge
nagilson Mar 26, 2026
a4dce8b
select changes to ai prompting
nagilson Mar 27, 2026
fb37894
Static methods to check state of distro / is wsl
nagilson Mar 30, 2026
48efb6a
Fix Distro Resolution
nagilson Mar 30, 2026
f417a35
Refactor wsl / distro check
nagilson Mar 30, 2026
27fce1d
proper dependencies for eslint plugin
nagilson Mar 30, 2026
c270b6e
Move wsl utility functions to the utilities file
nagilson Mar 30, 2026
3356deb
bump test dependencies
nagilson Mar 30, 2026
47df857
Ensure all axios relevant packages are pinned
nagilson Mar 31, 2026
23aff8f
Merge remote-tracking branch 'origin/nagilson-ensure-axios-pinning' i…
nagilson Mar 31, 2026
4d4b9df
add in lllm tools type post merge
nagilson Mar 31, 2026
571f80b
mock which dotnet
nagilson Mar 31, 2026
8f77c47
Final guidance check from anthropic guidelines
nagilson Mar 31, 2026
f185529
ensure it doesn't try to use installscript
nagilson Mar 31, 2026
3d5c67e
fix ordering of check
nagilson Mar 31, 2026
d4c8d8a
Merge branch 'main' into nagilson-mcp-for-installing
nagilson Mar 31, 2026
62e788d
Merge remote-tracking branch 'upstream/main' into nagilson-mcp-for-in…
nagilson Apr 9, 2026
967d3e9
tweaks to ai settings context
nagilson Apr 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 14 additions & 8 deletions sample/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

44 changes: 27 additions & 17 deletions sample/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ import * as path from 'path';
import * as vscode from 'vscode';
// import * as runtimeExtension from 'vscode-dotnet-runtime'; // comment this out when packing the extension
import
{
DotnetInstallMode,
DotnetVersionSpecRequirement,
IDotnetAcquireContext,
IDotnetAcquireResult,
IDotnetFindPathContext,
IDotnetListVersionsResult,
} from 'vscode-dotnet-runtime-library';
{
DotnetInstallMode,
DotnetVersionSpecRequirement,
IDotnetAcquireContext,
IDotnetAcquireResult,
IDotnetFindPathContext,
IDotnetListVersionsResult,
} from 'vscode-dotnet-runtime-library';

export function activate(context: vscode.ExtensionContext)
{
Expand Down Expand Up @@ -106,17 +106,17 @@ ${stderr}`);
}
}

const sampleAcquireRegistration = vscode.commands.registerCommand('sample.dotnet.acquire', async (version) =>
const sampleAcquireRegistration = vscode.commands.registerCommand('sample.dotnet.acquire', async (version: string | undefined) =>
{
await callAcquireAPI(version, undefined);
});

const sampleAcquireASPNETRegistration = vscode.commands.registerCommand('sample.dotnet.acquireASPNET', async (version) =>
const sampleAcquireASPNETRegistration = vscode.commands.registerCommand('sample.dotnet.acquireASPNET', async (version: string | undefined) =>
{
await callAcquireAPI(version, 'aspnetcore');
});

const sampleAcquireNoForceRegistration = vscode.commands.registerCommand('sample.dotnet.acquireNoForce', async (version) =>
const sampleAcquireNoForceRegistration = vscode.commands.registerCommand('sample.dotnet.acquireNoForce', async (version: string | undefined) =>
{
const mode = await vscode.window.showInputBox({
placeHolder: 'runtime',
Expand All @@ -127,7 +127,7 @@ ${stderr}`);
await callAcquireAPI(undefined, mode as DotnetInstallMode, false);
});

const sampleAcquireStatusRegistration = vscode.commands.registerCommand('sample.dotnet.acquireStatus', async (version) =>
const sampleAcquireStatusRegistration = vscode.commands.registerCommand('sample.dotnet.acquireStatus', async (version: string | undefined) =>
{
if (!version)
{
Expand Down Expand Up @@ -222,7 +222,7 @@ ${stderr}`);
}
});

const sampleGlobalSDKFromRuntimeRegistration = vscode.commands.registerCommand('sample.dotnet.acquireGlobalSDK', async (version) =>
const sampleGlobalSDKFromRuntimeRegistration = vscode.commands.registerCommand('sample.dotnet.acquireGlobalSDK', async (version: string | undefined) =>
{
if (!version)
{
Expand All @@ -233,6 +233,11 @@ ${stderr}`);
});
}

if (!version)
{
return;
}

try
{
await vscode.commands.executeCommand('dotnet.showAcquisitionLog');
Expand Down Expand Up @@ -289,7 +294,7 @@ ${stderr}`);
${JSON.stringify(result) ?? 'undefined'}`);
});

const sampleAvailableInstallsRegistration = vscode.commands.registerCommand('sample.dotnet.availableInstalls', async (version) =>
const sampleAvailableInstallsRegistration = vscode.commands.registerCommand('sample.dotnet.availableInstalls', async (version: string | undefined) =>
{
let dotnetPath = await vscode.window.showInputBox({
placeHolder: 'undefined',
Expand Down Expand Up @@ -342,7 +347,7 @@ ${JSON.stringify(result) ?? 'undefined'}`);

// ---------------------sdk extension registrations--------------------------

const sampleSDKAcquireRegistration = vscode.commands.registerCommand('sample.dotnet-sdk.acquire', async (version) =>
const sampleSDKAcquireRegistration = vscode.commands.registerCommand('sample.dotnet-sdk.acquire', async (version: string | undefined) =>
{
if (!version)
{
Expand All @@ -364,7 +369,7 @@ ${JSON.stringify(result) ?? 'undefined'}`);
}
});

const sampleSDKGlobalAcquireRegistration = vscode.commands.registerCommand('sample.dotnet-sdk.acquireGlobal', async (version) =>
const sampleSDKGlobalAcquireRegistration = vscode.commands.registerCommand('sample.dotnet-sdk.acquireGlobal', async (version: string | undefined) =>
{
if (!version)
{
Expand All @@ -375,6 +380,11 @@ ${JSON.stringify(result) ?? 'undefined'}`);
});
}

if (!version)
{
return;
}

try
{
await vscode.commands.executeCommand('dotnet-sdk.showAcquisitionLog');
Expand All @@ -387,7 +397,7 @@ ${JSON.stringify(result) ?? 'undefined'}`);
}
});

const sampleSDKAcquireStatusRegistration = vscode.commands.registerCommand('sample.dotnet-sdk.acquireStatus', async (version) =>
const sampleSDKAcquireStatusRegistration = vscode.commands.registerCommand('sample.dotnet-sdk.acquireStatus', async (version: string | undefined) =>
{
if (!version)
{
Expand Down
12 changes: 6 additions & 6 deletions vscode-dotnet-runtime-extension/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

168 changes: 167 additions & 1 deletion vscode-dotnet-runtime-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,166 @@
"main": "./dist/extension.js",
"types": "./dist/extension.d.ts",
"contributes": {
"languageModelTools": [
{
"name": "install_dotnet_sdk",
"when": "config.dotnetAcquisitionExtension.enableLanguageModelTools",
"displayName": "Install .NET SDK",
"toolReferenceName": "installDotNetSdk",
"canBeReferencedInPrompt": true,
"icon": "$(tools)",
"userDescription": "Installs a .NET SDK system-wide for building and running .NET projects",
"modelDescription": "Installs .NET SDK system-wide (requires admin). Use when user wants to install, set up, or add .NET. Supports Windows, macOS, Ubuntu, Debian, RHEL; returns manual instructions for unsupported platforms. Install exactly what user requests, even EOL/preview. Version resolution: (1) user request, (2) TargetFramework in .csproj (net8.0→'8'), (3) global.json, (4) call listDotNetVersions. Formats: '6', '6.0', '6.0.1xx'.",
"inputSchema": {
"type": "object",
"properties": {
"version": {
"type": "string",
"description": "The .NET SDK version. Examples: '6', '6.0', '6.0.1xx'. Install exactly what user requests, even if EOL."
}
},
"required": [
"version"
]
}
},
{
"name": "list_available_dotnet_versions_to_install",
"when": "config.dotnetAcquisitionExtension.enableLanguageModelTools",
"displayName": "List Available .NET Versions",
"toolReferenceName": "listDotNetVersions",
"canBeReferencedInPrompt": true,
"icon": "$(list-unordered)",
"userDescription": "Lists available .NET SDK and Runtime versions that can be installed",
"modelDescription": "Lists .NET SDK or Runtime versions available from Microsoft with support phase (active/maintenance/eol). Use when user asks what versions exist, which to install, or needs to pick a version. Default: SDKs. Set listRuntimes=true for runtimes.",
"inputSchema": {
"type": "object",
"properties": {
"listRuntimes": {
"type": "boolean",
"description": "If true, lists runtime versions. Default: SDK versions."
}
}
}
},
{
"name": "find_dotnet_executable_path",
"when": "config.dotnetAcquisitionExtension.enableLanguageModelTools",
"displayName": "Find .NET Path",
"toolReferenceName": "findDotNetPath",
"canBeReferencedInPrompt": true,
"icon": "$(search)",
"userDescription": "Finds the path to a .NET installation that meets specified requirements",
"modelDescription": "Checks if .NET is already installed before suggesting installation. Use when user asks 'is .NET installed?', 'where is dotnet?', or before calling installDotNetSdk. Searches: existingDotnetPath → PATH → DOTNET_ROOT → extension-managed installs. Extension-managed local installs are NOT on PATH.",
"inputSchema": {
"type": "object",
"properties": {
"version": {
"type": "string",
"description": "Minimum .NET version required (e.g., '8.0')"
},
"mode": {
"type": "string",
"enum": [
"sdk",
"runtime",
"aspnetcore"
],
"description": "SDK or runtime. Default: 'runtime'."
},
"architecture": {
"type": "string",
"enum": [
"x64",
"x86",
"arm64"
],
"description": "CPU architecture. Default: current system architecture."
}
},
"required": [
"version"
]
}
},
{
"name": "uninstall_dotnet",
"when": "config.dotnetAcquisitionExtension.enableLanguageModelTools",
"displayName": "Uninstall .NET",
"toolReferenceName": "uninstallDotNet",
"canBeReferencedInPrompt": true,
"icon": "$(trash)",
"userDescription": "Uninstalls a .NET SDK or Runtime version",
"modelDescription": "Uninstalls a .NET SDK or runtime. Use when user wants to remove, uninstall, or clean up .NET. Supports Windows, macOS, Ubuntu, Debian, RHEL; returns manual instructions for unsupported platforms. Call listInstalledDotNetVersions first to get exact version+mode. Global uninstalls require admin.",
"inputSchema": {
"type": "object",
"properties": {
"version": {
"type": "string",
"description": "The .NET version to uninstall. Call listInstalledDotNetVersions first."
},
"mode": {
"type": "string",
"enum": [
"sdk",
"runtime",
"aspnetcore"
],
"description": "SDK or runtime to uninstall."
},
"global": {
"type": "boolean",
"description": "True: global/system-wide. False: VS Code-managed local."
}
},
"required": [
"version"
]
}
},
{
"name": "get_settings_info_for_dotnet_installation_management",
"when": "config.dotnetAcquisitionExtension.enableLanguageModelTools",
"displayName": "Get .NET Install Tool Guide",
"toolReferenceName": "getDotNetSettingsInfo",
"canBeReferencedInPrompt": true,
"icon": "$(info)",
"userDescription": "Get information about .NET Install Tool settings, installation types, and troubleshooting",
"modelDescription": "Returns .NET Install Tool settings guide and current config. Use when user asks about .NET settings, troubleshooting, existingDotnetPath, 'C# extension can't find .NET', or extension configuration. Covers: existingDotnetPath (extension runtime only — NOT project SDK, use global.json), local vs global installs, common fixes.",
"inputSchema": {
"type": "object",
"properties": {}
}
},
{
"name": "list_installed_dotnet_versions",
"when": "config.dotnetAcquisitionExtension.enableLanguageModelTools",
"displayName": "List Installed .NET Versions",
"toolReferenceName": "listInstalledDotNetVersions",
"canBeReferencedInPrompt": true,
"icon": "$(list-tree)",
"userDescription": "Lists .NET SDK or Runtime versions that are currently installed on the system",
"modelDescription": "Lists .NET SDKs and runtimes currently installed on the system. Use when user asks 'what .NET do I have?', 'which versions are installed?', or before uninstall. Default: queries PATH. Pass dotnetPath for a specific executable. Windows Desktop Runtime not tracked — use 'dotnet --list-runtimes' in terminal if needed for that.",
"inputSchema": {
"type": "object",
"properties": {
"dotnetPath": {
"type": "string",
"description": "Path to a dotnet executable to query. Default: PATH lookup."
},
"mode": {
"type": "string",
"enum": [
"sdk",
"runtime",
"aspnetcore"
],
"description": "Omit for both SDKs and Runtimes. Set to filter."
}
}
}
}
],
"commands": [
{
"command": "dotnet.reportIssue",
Expand All @@ -66,6 +226,11 @@
"configuration": {
"title": ".NET Install Tool",
"properties": {
"dotnetAcquisitionExtension.enableLanguageModelTools": {
"type": "boolean",
"default": true,
"description": "Enable AI-powered language model tools for .NET management (install, uninstall, list versions, etc.) in GitHub Copilot and agent mode. Set to false to hide all .NET tools from the LLM. Restart VS Code to apply changes."
},
"dotnetAcquisitionExtension.enableTelemetry": {
"type": "boolean",
"default": true,
Expand Down Expand Up @@ -93,7 +258,7 @@
},
"dotnetAcquisitionExtension.sharedExistingDotnetPath": {
"type": "string",
"description": "The path of the preexisting .NET Runtime you'd like to use for ALL extensions. Restart VS Code to apply changes.",
"description": "The path of a preexisting .NET Runtime for ALL VS Code extensions to use for their internal components. This does NOT control the SDK or runtime used by your projects. Restart VS Code to apply changes.",
"examples": [
"C:\\Program Files\\dotnet\\dotnet.exe",
"/usr/local/share/dotnet/dotnet",
Expand Down Expand Up @@ -141,6 +306,7 @@
"compile": "npm run clean && tsc -p ./",
"watch": "npm run compile && tsc -watch -p ./",
"test": "npm run compile --silent && node ./dist/test/functional/runTest.js",
"test:lm-tools": "npm run compile --silent && node ./dist/test/functional/runLmToolsTest.js",
"clean": "npx rimraf dist",
"compile-all": "cd ../vscode-dotnet-runtime-library && npm install && npm run compile && cd ../vscode-dotnet-runtime-extension && npm install && npm run compile",
"lint": "eslint -c .eslintrc.js --ext=.ts vscode-dotnet-runtime-library/src/**/*.ts vscode-dotnet-runtime-extension/src/**/*.ts --ignore-pattern \"**/test/\" --fix",
Expand Down
Loading