.NET Core Tool Installer task
Use this task in a build or release pipeline to acquire a specific version of .NET Core from the Internet or the tools cache and add it to the PATH.
You can also use this task to change the version of .NET Core used in subsequent tasks like .NET Core cli task.
One other reason to use tool installer is if you want to decouple your pipeline from our update cycles to help avoid a pipeline run being broken due to a change we make to our agent software.
Package to install
|Please select whether to install only runtime or SDK|
Default value: sdk
|Specify version of .NET Core SDK or runtime to install.|
Versions can be given in the following formats
Find the value of
Include Preview Versions
|Select if you want preview versions to be included while searching for latest versions, such as while searching 2.2.x. This setting is ignored if you specify an exact version, such as: 3.0.100-preview3-010431 |
Default value: false
Path To Install .Net Core
|Specify where .Net Core SDK/Runtime should be installed. Different paths can have the following impact on .Net's behavior.|
Note that you can also configure Multi-Level Lookup setting which can configure .Net host's probing for a suitable version.
Default value: $(Agent.ToolsDirectory)/dotnet
Perform Multi Level Lookup
|This input is only applicable to Windows based agents. This configures the behavior of .Net host process for looking up a suitable shared framework.|
The default global locations are:
C:/Program Files/dotnet (64-bit processes)
C:/Program Files (x86)/dotnet (32-bit process)
This YAML example installs version 2.2.203 of .NET Core.
steps: - task: UseDotNet@2 displayName: 'Use .NET Core sdk' inputs: packageType: sdk version: 2.2.203 installationPath: $(Agent.ToolsDirectory)/dotnet
This task is open source on GitHub. Feedback and contributions are welcome.