(WIP) Add support for global runtime and ASP.NET Core installation#2573
Open
JakeRadMSFT wants to merge 1 commit intodotnet:mainfrom
Open
(WIP) Add support for global runtime and ASP.NET Core installation#2573JakeRadMSFT wants to merge 1 commit intodotnet:mainfrom
JakeRadMSFT wants to merge 1 commit intodotnet:mainfrom
Conversation
Generalize the global SDK installation infrastructure to also support installing .NET runtimes and ASP.NET Core runtimes globally. This enables extensions like C# Dev Kit to request global runtime installs when a workspace's global.json requires a newer SDK version. Changes: - GlobalInstallerResolver: Accept DotnetInstallMode to resolve runtime/ aspnetcore installer URLs from the releases JSON (not just SDK) - IGlobalInstaller: Add installGlobal/uninstallGlobal/getExpectedGlobalDotnetPath with backward-compatible defaults delegating to existing SDK methods - LinuxGlobalInstaller: Accept mode, use generalized ValidateAndInstall/Uninstall - LinuxVersionResolver: Add generalized ValidateAndInstall/Uninstall methods - WinMacGlobalInstaller: Accept mode, skip SDK-specific conflict check for runtimes, handle mode-specific uninstall directories on macOS - DotnetCoreAcquisitionWorker: Add acquireGlobalRuntime/acquireGlobalASPNET, pass mode to installer constructors, use generalized install methods - IDotnetCoreAcquisitionWorker: Add interface methods for global runtime/ASPNET - Extension: Register dotnet.acquireGlobalRuntime command supporting both runtime and aspnetcore modes
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.
(Written by Copilot) Just wanted to try and understand the needed changes.
Summary
Generalizes the global SDK installation infrastructure to also support installing .NET runtimes and ASP.NET Core runtimes globally via a new dotnet.acquireGlobalRuntime command.
Motivation
Extensions like C# Dev Kit need to acquire .NET runtimes globally when a workspace's \global.json\ requires a newer SDK version than the extension's bundled tooling runtime. Currently, only \dotnet.acquireGlobalSDK\ supports global installation. This PR adds the equivalent capability for runtimes and ASP.NET Core runtimes.
Changes
Library (\�scode-dotnet-runtime-library)
Extension (\�scode-dotnet-runtime-extension)
untime\ and \�spnetcore\ modes (via \commandContext.mode)
API Usage
\\ ypescript
// Install a .NET runtime globally
const result = await vscode.commands.executeCommand('dotnet.acquireGlobalRuntime', {
version: '9.0.0',
requestingExtensionId: 'ms-dotnettools.csdevkit',
mode: 'runtime', // or 'aspnetcore'
installType: 'global'
});
\\
Backward Compatibility