-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…10199) * Adding DotNetCoreInstallerV1 features to UseDotNetV2 task. * Added multiple manifest file, only installing nuget when proxy settings are present, and setting multilevel lookup only when dotnet version is being installed.
- Loading branch information
Showing
42 changed files
with
3,075 additions
and
2,199 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# Use .NET V2 Task | ||
|
||
## Overview | ||
|
||
The Use .NET Core task acquires a specific version of [.NET Core](https://docs.microsoft.com/en-us/dotnet/core/tools/?tabs=netcore2x) from internet or the tools cache and adds it to the PATH of the Azure Pipelines Agent (hosted or private). Use this task to change the version of .NET Core used in subsequent tasks like [.NET Core cli task](https://github.com/Microsoft/azure-pipelines-tasks/tree/master/Tasks/DotNetCoreCLIV2). | ||
Adding this task before the [.NET Core cli task](https://github.com/Microsoft/azure-pipelines-tasks/tree/master/Tasks/DotNetCoreCLIV2) in a build definition ensures that the version would be available at the time of building, testing and publishing your app. | ||
|
||
The tool installer approach also allows you to decouple from the agent update cycles. If the .NET Core version you are looking for is missing from the Azure Pipelines agent (Hosted or Private), then you can use this task to get the right version installed on the agent. | ||
|
||
### Whats New | ||
- Support for installing multiple versions side by side. | ||
|
||
- Support for patterns in version to fetch latest in minor/major version. Example you can now specify 2.2.x to get the latest patch. | ||
|
||
- Perfrom Multi-level lookup. This input is only applicable to Windows based agents. It configures the .Net Core's host process behviour for looking for a suitable shared framework on the machine. You can read more about it **[HERE](https://github.com/dotnet/core-setup/blob/master/Documentation/design-docs/multilevel-sharedfx-lookup.md)** | ||
|
||
- Installs NuGet version 4.4.1 and sets up proxy configuration if present in NuGet config. | ||
|
||
## Contact Information | ||
|
||
Please report a problem at [Developer Community Forum](https://developercommunity.visualstudio.com/spaces/21/index.html) if you are facing problems in making this task work. You can also share feedback about the task like, what more functionality should be added to the task, what other tasks you would like to have, at the same place. | ||
|
||
### Parameters of the task | ||
|
||
* **Package to install\*:** You can choose to install either runtime or SDK. | ||
|
||
|
||
* **Version\*:** Specify version of .NET Core SDK or runtime to install. It also allows you to always get the latest version in a minor or major version. See below for examples | ||
Examples: | ||
- To install 2.2.104 SDK, use 2.2.104 | ||
- To install 2.2.1 runtime, use 2.2.1 | ||
- To install 3.0.100-preview3-010431 sdk, use 3.0.100-preview3-010431 | ||
- To install latest patch version of 2.1 sdk, use 2.1.x | ||
- To install latest minor version of 2. sdk, use 2.x<br/>For getting more details about exact version, refer [this link](https://github.com/dotnet/core/blob/master/release-notes/releases-index.json). | ||
|
||
|
||
* **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 | ||
|
||
|
||
* **Path To Install .Net Core**: Specify where .Net Core SDK/Runtime should be installed. In case there was already a differnt version on the specified path, that earlier version wont be deleted. | ||
|
||
|
||
* **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. | ||
* *unchecked*: Only versions present in the folder specified in this task would be looked by the host process. | ||
* *checked*: The host will attempt to look in pre-defined global locations using multi-level lookup. | ||
|
||
The default global locations are: | ||
- **For Windows**: | ||
<br/>C:\\Program Files\\dotnet (64-bit processes) | ||
<br/>C:\\Program Files (x86)\\dotnet (32-bit process) | ||
|
||
You can read more about it [**HERE**](https://github.com/dotnet/core-setup/blob/master/Documentation/design-docs/multilevel-sharedfx-lookup.md).<br/> | ||
|
||
|
85 changes: 85 additions & 0 deletions
85
Tasks/UseDotNetV2/Strings/resources.resjson/en-US/resources.resjson
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
{ | ||
"loc.friendlyName": "Use dotnet", | ||
"loc.helpMarkDown": "[More Information](https://aka.ms/AA4xgy0)", | ||
"loc.description": "Acquires a specific version of the .NET Core SDK from the internet or the local cache and adds it to the PATH. Use this task to change the version of .NET Core used in subsequent tasks. Additionally provides proxy support.", | ||
"loc.instanceNameFormat": "Use dotnet $(packageType) $(version)", | ||
"loc.releaseNotes": "<li>Support for installing multiple versions side by side.</li><li>Support for patterns in version to fetch latest in minor/major version.</li><li>Restrict Multi-level lookup</li><li>Installs NuGet and provides proxy support.</li>", | ||
"loc.group.displayName.advanced": "Advanced", | ||
"loc.input.label.packageType": "Package to install", | ||
"loc.input.help.packageType": "Please select whether to install only runtime or SDK.", | ||
"loc.input.label.version": "Version", | ||
"loc.input.help.version": "Specify version of .NET Core SDK or runtime to install.<br/>Versions can be given in the following formats<li>2.x => Install latest in major version.</li><li>2.2.x => Install latest in major and minor version</li><li>2.2.104 => Install exact version</li><br/>Find the value of `version` for installing SDK/Runtime, from the releases.json. The link to releases.json of that major.minor version can be found in [**releases-index file.**](https://github.com/dotnet/core/blob/master/release-notes/releases-index.json). Like link to releases.json for 2.2 version is https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/2.2/releases.json", | ||
"loc.input.label.includePreviewVersions": "Include Preview Versions", | ||
"loc.input.help.includePreviewVersions": "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", | ||
"loc.input.label.installationPath": "Path To Install .Net Core", | ||
"loc.input.help.installationPath": "Specify where .Net Core SDK/Runtime should be installed. Different paths can have the following impact on .Net's behavior.<li>$(Agent.ToolsDirectory): This makes the version to be cached on the agent since this directory is not cleanup up across pipelines. All pipelines running on the agent, would have access to the versions installed previously using the agent.</li><li>$(Agent.TempDirectory): This can ensure that a pipeline doesn't use any cached version of .Net core since this folder is cleaned up after each pipeline.</li><li>Any other path: You can configure any other path given the agent process has access to the path. This will change the state of the machine and impact all processes running on it.<br/>Note that you can also configure Multi-Level Lookup setting which can configure .Net host's probing for a suitable version.", | ||
"loc.input.label.performMultiLevelLookup": "Perform Multi Level Lookup", | ||
"loc.input.help.performMultiLevelLookup": "This input is only applicable to Windows based agents. This configures the behavior of .Net host process for looking up a suitable shared framework.<li>unchecked: Only versions present in the folder specified in this task would be looked by the host process.</li><li>checked: The host will attempt to look in pre-defined global locations using multi-level lookup.<br/>The default global locations are: <br/><b>For Windows:</b><br/>C:\\Program Files\\dotnet (64-bit processes)<br/>C:\\Program Files (x86)\\dotnet (32-bit process)</li> You can read more about it [**HERE**](https://github.com/dotnet/core-setup/blob/master/Documentation/design-docs/multilevel-sharedfx-lookup.md).<br/>", | ||
"loc.messages.ToolFailed": "Tool install failed: %s", | ||
"loc.messages.ImplicitVersionNotSupported": "Version should be a valid and explicit version: %s", | ||
"loc.messages.getMachinePlatformFailed": "Failed to get machine platform details. Error: %s.", | ||
"loc.messages.getDownloadUrlsFailed": "Failed to get download URLS. Error: %s.", | ||
"loc.messages.UsingCachedTool": "Cached copy of .NET Core exists. No need to install afresh. Cached tool location: %s.", | ||
"loc.messages.CheckingToolCache": "Checking if a cached copy exists for this version...", | ||
"loc.messages.InstallingAfresh": "The cache does not contain the requested version of .NET Core. Downloading and installing it now.", | ||
"loc.messages.GettingDownloadUrl": "Getting URL to download .NET Core %s version: %s.", | ||
"loc.messages.CouldNotDetectPlatform": "Could not detect the machine's OS", | ||
"loc.messages.NullDownloadUrls": "Could not construct download URL. Please ensure that specified version %s is valid.", | ||
"loc.messages.DownloadingUrl": "Downloading .NET Core package from URL: %s", | ||
"loc.messages.ExtractingPackage": "Extracting downloaded package %s.", | ||
"loc.messages.CachingTool": "Caching this installed tool.", | ||
"loc.messages.SuccessfullyInstalled": "Successfully installed .NET Core %s version %s.", | ||
"loc.messages.ToolToInstall": "Tool to install: .NET Core %s version %s.", | ||
"loc.messages.PrimaryPlatform": "Detected platform (Primary): %s", | ||
"loc.messages.LegacyPlatform": "Detected platform (Legacy): %s", | ||
"loc.messages.WarningVersionNotFound": "Could not fetch download information for version %s. Please check if the version specified is correct. You can refer the link for supported versions => https://github.com/dotnet/core/blob/master/release-notes/releases.json. Falling back to creating convention based URL.", | ||
"loc.messages.CouldNotDownload": "Could not download installation package from this URL: %s Error: %s", | ||
"loc.messages.FailedToDownloadPackage": "Failed to download package for installation", | ||
"loc.messages.PrependGlobalToolPath": "Creating global tool path and pre-pending to PATH.", | ||
"loc.messages.VersionsFileMalformed": "The specified version's download links are not correctly formed in the supported versions document => %s/", | ||
"loc.messages.MatchingVersionNotFound": "No matching %s version could be found for specified version: %s Kindly note the preview versions are only considered in latest version searches if Include Preview Versions checkbox is checked.", | ||
"loc.messages.UnableToAccessPath": "Unable to access path: %s. Error: %s \n please make sure that agent process has path to the path.", | ||
"loc.messages.VersionCanNotBeDownloadedFromUrl": "Version: %s cannot be downloaded from URL: %s. Either the URL or version is incorrect.", | ||
"loc.messages.CopyingFoldersIntoPath": "Copying all root folders into installation path: %s", | ||
"loc.messages.CopyingFilesIntoPath": "Copying root files (such as dotnet.exe) into installation path: %s", | ||
"loc.messages.FailedToCopyTopLevelFiles": "Failed to copy root files into installation path: %s. Error: %s", | ||
"loc.messages.FailedWhileInstallingVersionAtPath": "Failed while installing version: %s at path: %s with error: %s", | ||
"loc.messages.ExplicitVersionRequired": "Version: %s is not allowed. Versions to be installed should be of format: major.minor.patchversion. For example: 2.2.1", | ||
"loc.messages.VersionFoundInCache": "Version: %s was found in cache.", | ||
"loc.messages.VersionNotFoundInCache": "Version %s was not found in cache.", | ||
"loc.messages.CreatingInstallationCompeleteFile": "Creating installation complete file for .Net core %s version %s", | ||
"loc.messages.CannotFindRuntimeVersionForCompletingInstallation": "Cannot find runtime version for package type: %s with version: %s", | ||
"loc.messages.PathNotFoundException": "Path: %s could not be located/found. Make sure the path exists.", | ||
"loc.messages.VersionIsLocalLatest": "Version: %s is the latest among the versions present at path: %s", | ||
"loc.messages.VersionIsNotLocalLatest": "Version: %s is not the latest among the versions present at %s", | ||
"loc.messages.DownloadUrlForMatchingOsNotFound": "Download URL for .Net Core %s version %s could not be found for the following OS platforms (rid): %s", | ||
"loc.messages.ExceptionWhileDownloadOrReadReleasesIndex": "Failed to download or parse release-index.json with error: %s", | ||
"loc.messages.MatchingVersionForUserInputVersion": "Found version %s in channel %s for user specified version spec: %s", | ||
"loc.messages.UrlForReleaseChannelNotFound": "Could not find URL for releases.json of channel version: %s", | ||
"loc.messages.NoSuitableChannelWereFound": "Channel corresponding to version %s could not be found.", | ||
"loc.messages.DetectingPlatform": "Detecting OS platform to find correct download package for the OS.", | ||
"loc.messages.FailedInDetectingMachineArch": "Failed while detecting machine OS platform with error: %s", | ||
"loc.messages.runtimeVersionPropertyNotFound": "runtime-version property could not be found for .Net Core %s version %s.", | ||
"loc.messages.VersionNotFound": "%s version matching: %s could not be found", | ||
"loc.messages.VersionNotAllowed": "Version %s is not allowed. Allowed version types are: majorVersion.x, majorVersion.minorVersion.x, majorVersion.minorVersion.patchVersion", | ||
"loc.messages.VersionsCanNotBeCompared": "Versions %s and %s cannot be compared. Both versions should be explicit.", | ||
"loc.messages.FileNameNotCorrectCompleteFileName": "File name %s is not correct version.complete file name.", | ||
"loc.messages.ChannelVersionsNotComparable": "Channel versions %s and %s can not be compared. They both must have numeric major and minor versions.", | ||
"loc.messages.LookingForVersionInChannel": "Searching for version in channel %s", | ||
"loc.messages.FallingBackToAdjacentChannels": "Version %s could not be found in its channel, will now search in adjacent channels.", | ||
"loc.messages.ErrorWhileSettingDotNetToolPath": "Failed while prepending .Net Core Tool path to PATH envrionment variable. Error: %s", | ||
"loc.messages.RequiredChannelVersionForSpec": "Finding channel %s for version %s", | ||
"loc.messages.ErrorWhileGettingVersionFromChannel": "Failed while getting version %s from channel %s with error: %s", | ||
"loc.messages.ComparingInstalledFolderVersions": "Comparing if version being installed %s is greater than already installed version with folder name %s", | ||
"loc.messages.ComparingInstalledFileVersions": "Comparing if version being installed %s is greater than already installed version with version complete file name %s", | ||
"loc.messages.InvalidChannelObject": "Object cannot be used as Channel, required properties such as channel-version, releases.json is missing.", | ||
"loc.messages.ReleasesIndexBodyIncorrect": "Parsed releases index body is not correct. Kindly see if the releases-index section is not empty in the file.", | ||
"loc.messages.InvalidVersionObject": "Releases.json has a release with invalid %s object: %s", | ||
"loc.messages.FilesDataIsIncorrectInVersion": "In release %s for version %s, File data is incorrect (might have missing required fields, such as name, rid and url): %s", | ||
"loc.messages.VersionFilesDataIncorrect": "Version's files data is missing or has missing required fields.", | ||
"loc.messages.VersionInformationNotComplete": "Version: %s required information is not complete in releases.json file. Error: %s", | ||
"loc.messages.FailedWhileExtractingPacakge": "Failed while extracting downloaded package with error: %s", | ||
"loc.messages.InstallingNuGetVersion": "Installing NuGet version %s", | ||
"loc.messages.FailureWhileInstallingNuGetVersion": "Failed while installing NuGet version. Error: %s", | ||
"loc.messages.SettingUpNugetProxySettings": "Setting up proxy configuration for NuGet." | ||
} |
Oops, something went wrong.