.NET Install ToolThis extension provides a unified way for other extensions like the C# and C# Dev Kit extensions to install local versions of the .NET Runtime, and machine-wide versions of the .NET SDK. Those extensions tell the .NET Install Tool when they would like a .NET SDK to be on the machine, and we install one for them if there's not already one that matches the SDK they need to run properly. Users can also install the .NET SDK themselves by reading below. Why do I have this extension?This extension was probably included as a dependency of one of the following extensions, though this list is not exhaustive: The above extensions call into this extension to provide a unified way of downloading shared .NET Runtimes or .NET SDKs. If you already have an installation of .NET that you'd like to use, see the troubleshooting section below. If you want to remove this extension completely, you will need to uninstall any extensions that depend on it first. If this extension is uninstalled, any .NET Runtimes installed by it will also be removed. Using the extension yourselfAs of version 2.0.2, you can install the .NET SDK using part of our private API via the VS Code Command Palette! To use the feature: Bring up the command palette (ctrl + shift + p) and run the command: .NET Install Tool - Install the .NET SDK System-Wide. The command will try to find the best version of .NET for you to install, but you can tell it to install other versions as well based on its prompt. Note this feature does not support all distros, WSL, nor preview or RC versions of .NET. The rest of the extension functionality is still limited to other extensions that rely on our extension. TroubleshootingI already have a .NET Runtime or SDK installed, and I want to use itIf you want to use your own installation(s) of .NET, you can either use one for all extensions in VS Code, or use different installations for specific extensions. This is the path to an existing .NET host executable that will select a runtime based on what's installed beside it for an extension's code to run under.
⚠️ This is NOT the .NET Runtime that your project will use to run. Extensions such as Using a path value in which .NET does not meet the requirements of a specific extension will cause that extension to fail. The version of .NET that is used for your project is determined by the .NET host, or dotnet.exe. The .NET host picks a runtime based on your project. To use a specific version of .NET for your project, install the .NET SDK using the If you want to use the installation for all extensions, set the Example:
If instead you want more granular control, add the requesting extension to the
For C# Dev Kit you would use the same thing, but with the extension ID
Downloading .NET times outIt can sometimes take a while to download .NET. While the default download time is 600 seconds, if you need more time you can set the
You can read more about changing the installation timeout in our documentation. The extension thinks you are offline with error response of 400 or 407, and you have a proxy.This is a known issue with axios, the system we use to make web-requests. The requests we make need to be routed through the proxy. We have logic to try to detect your proxy automatically. If your proxy does not get detected by us, please try adding it here. You may want to consider temporarily switching to version 1.7.2 of the runtime extension if you are still experiencing issues as this version does not use axios. Note that proxies that require additional credentials are not yet supported. Note: GFW / China also blocks some of our requests, which may be why our extension thinks you are offline or times out. You can add the proxy in the extension settings like following the advice above for timeouts.
Information for repo contributorsGoals: Acquiring .NET Runtimes for extensionsPrior to the release of this extension, extension authors had no way of knowing if the .NET Runtime was installed on their target machines. Other solutions had a number of challenges:
This extension attempts to solve the above issues. .NET FoundationThe .NET Install Tool is a .NET Foundation project. See the .NET home repo to find other .NET-related projects. License.NET (including this repo) is licensed under the MIT license. Telemetry NoticePlease note that this extension collects telemetry by default and aims to follow the VS Code Telemetry Policy. You may disable this telemetry in the extension settings. Third Party NoticesThe notices file contains third party notices and licenses. ContributionContributions are always welcome. Please see our contributing guide for more details. Microsoft Open Source Code of ConductThis project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments. Questions and FeedbackProvide feedback File questions, issues, or feature requests for the extension. TrademarksThis project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft’s Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party’s policies. |