diff --git a/Tasks/UseDotNetV2/_buildConfigs/Node16/FilesOverriddenForConfigGoHereREADME.txt b/Tasks/UseDotNetV2/_buildConfigs/Node16/FilesOverriddenForConfigGoHereREADME.txt new file mode 100644 index 000000000000..b338e624afcd --- /dev/null +++ b/Tasks/UseDotNetV2/_buildConfigs/Node16/FilesOverriddenForConfigGoHereREADME.txt @@ -0,0 +1 @@ +Place files overridden for this config in this directory \ No newline at end of file diff --git a/Tasks/UseDotNetV2/_buildConfigs/Node16/Tests/L0.ts b/Tasks/UseDotNetV2/_buildConfigs/Node16/Tests/L0.ts new file mode 100644 index 000000000000..8a79b0517d44 --- /dev/null +++ b/Tasks/UseDotNetV2/_buildConfigs/Node16/Tests/L0.ts @@ -0,0 +1,536 @@ +"use strict"; +const assert = require('assert'); +const ttm = require('azure-pipelines-task-lib/mock-test'); +const os = require('os'); +const path = require('path'); + +function setResponseFile(name) { + process.env['MOCK_RESPONSES'] = path.join(__dirname, name); +} + +function runValidations(validator: () => void, tr, done) { + try { + validator(); + done(); + } + catch (error) { + console.log("STDERR", tr.stderr); + console.log("STDOUT", tr.stdout); + done(error); + } +} + +describe('UseDotNet', function () { + this.timeout(30000); + before((done) => { + done(); + }); + after(function () { + }); + + it("[VersionUtilities] versionCompareFunction should throw for non explicit versions or empty version strings", (done) => { + process.env["__non_explicit__"] = "true" + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionUtilityVersionCompareTests.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == false, ("should have thrown and failed")); + assert(tr.stdout.indexOf("FunctionThrewAsExpected") > -1, "Should have thrown as versions are not explicit and are empty strings."); + }, tr, done); + }); + + it("[VersionUtilities] versionCompareFunction should return 1, 0 or -1 when versionA is gt, eq or lt versionB", (done) => { + process.env["__non_explicit__"] = "false"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionUtilityVersionCompareTests.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should have succeeded")); + assert(tr.stdout.indexOf("FunctionGaveRightResult") > -1, "Should have given right results for all cases."); + }, tr, done); + }); + + it("[VersionUtilities] compareChannelVersion function should throw when either or both channel versions are empty or are non numeric", (done) => { + process.env["__non_explicit__"] = "true" + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionUtilityVersionCompareTests.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == false, ("should have thrown and failed")); + assert(tr.stdout.indexOf("FunctionThrewAsExpected") > -1, "Should have thrown as versions are not explicit and are empty strings."); + }, tr, done); + }); + + it("[VersionUtilities] compareChannelVersion function should return 1, 0 or -1 when channelVersionA is gt, eq or lt channelVersionB", (done) => { + process.env["__non_explicit__"] = "false"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionUtilityChannelVersionCompareTests.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should have succeeded")); + assert(tr.stdout.indexOf("FunctionGaveRightResult") > -1, "Should have given right results for all cases."); + }, tr, done); + }); + + it("[VersionUtilities] getMatchingVersionFromList should return null for empty versionInfoList, versionInfoList elements having empty version or no matching version found in list while toggling includePreviewVersionsValue", (done) => { + process.env["__empty__"] = "true" + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionUtilityGetMatchingVersionFromListTests.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should have succeeded")); + assert(tr.stdout.indexOf("FunctionReturnedNull") > -1, "Should have returned null for all cases and print the message."); + }, tr, done); + }); + + it("[VersionUtilities] getMatchingVersionFromList should return heighest version for the spec when versionSpec is not exact version", (done) => { + process.env["__empty__"] = "false" + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionUtilityGetMatchingVersionFromListTests.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should have succeeded")); + assert(tr.stdout.indexOf("FuctionReturnedCorrectVersion") > -1, "Should have returned null for all cases and print the message."); + }, tr, done); + }); + + it("[Models.VersionParts] constructor should throw when version fails validation", (done) => { + process.env["__invalid_versionparts__"] = "true"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "modelsVersionPartsTests.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == false, ("Should have failed")); + assert(tr.stdout.indexOf("FunctionThrewAsExpected") > -1, "Should have thrown for all invalid version specs."); + }, tr, done); + }); + + it("[Models.VersionParts] constructor return object instance with correct major, minor and patch version", (done) => { + process.env["__invalid_versionparts__"] = "false"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "modelsVersionPartsTests.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should have returned right objects")); + assert(tr.stdout.indexOf("VersionPartsCreatedSuccessfully") > -1, "Should have returned the correct objects and print the statement."); + }, tr, done); + }); + + it("[Models.Channel] constructor should throw if object passed doesn't contain channel-version or releasesJsonUrl, or contains invalid releasesJsonUrl", (done) => { + process.env["__invalid_channelobject__"] = "true"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "modelsChannelTests.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == false, ("Should have failed for incorrect objects.")); + assert(tr.stdout.indexOf("FunctionThrewAsExpected") > -1, "Should have thrown error in all cases."); + }, tr, done); + }); + + it("[Models.Channel] constructor should pass if object contains channel-version and valid releasesJsonUrl", (done) => { + process.env["__invalid_channelobject__"] = "false"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "modelsChannelTests.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should have successfully created channel objects.")); + assert(tr.stdout.indexOf("ChannelCreatedSuccessfully") > -1, "Should have returned the correct objects and print the statement."); + }, tr, done); + }); + + it("[Models.VersionInfo] getRuntimeVersion should return correct runtime-version from sdk versionInfo object", (done) => { + process.env["__sdk_runtime__"] = "true"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "modelsGetRuntimeVersionTests.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should have successfully returned runtime versions for sdk package type.")); + assert(tr.stdout.indexOf("RuntimeVersionsReturnedForSdkAreCorrect") > -1, "Should have returned correct runtime versions for all cases of packageType sdk."); + }, tr, done); + }); + + it("[Models.VersionInfo] getRuntimeVersion should return version for runtime versionInfo object", (done) => { + process.env["__sdk_runtime__"] = "false"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "modelsGetRuntimeVersionTests.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should have successfully returned runtime versions for runtime package type.")); + assert(tr.stdout.indexOf("RuntimeVersionsReturnedAreCorrect") > -1, "Should have returned correct runtime versions for all cases of packageType runtime."); + }, tr, done); + }); + + it("[VersionFetcher.DotNetCoreVersionFetcher] getVersionInfo should throw if version for pacakge type can not be found, and error message should contain the package type", (done) => { + process.env["__failat__"] = "versionnotfound"; + process.env["__versionspec__"] = "2.2.999-cantbefound-234"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionFetcherGetVersionInfoFailTests.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == false, ("Should have failed as the wanted version of package type can not be found.")); + assert(tr.stdout.indexOf("VersionNotFound") > -1, "Should have thrown version not found exception."); + }, tr, done); + }); + + it("[VersionFetcher.DotNetCoreVersionFetcher] getVersionInfo should throw if getting channel fails", (done) => { + process.env["__failat__"] = "channelfetch"; + process.env["__versionspec__"] = "2.2.999-cantbefound-234"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionFetcherGetVersionInfoFailTests.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == false, ("Should have failed as channels could not be fetched.")); + assert(tr.stdout.indexOf("ExceptionWhileDownloadOrReadReleasesIndex") > -1, "Should have thrown exception and returned."); + }, tr, done); + }); + + it("[VersionFetcher.DotNetCoreVersionFetcher] getVersionInfo should throw if preview versions included and version not found", (done) => { + process.env["__failat__"] = "versionnotfound"; + process.env["__versionspec__"] = "4.40.x"; + process.env["__inlcudepreviewversion__"] = "true"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionFetcherGetVersionInfoFailTests.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == false, ("Should have failed as channels could not be fetched.")); + assert(tr.stdout.indexOf("MatchingVersionNotFound") > -1, "Should not have found a matching version."); + assert(tr.stdout.indexOf("VersionNotFound") > -1, "Should have thrown with VersionNotFound error."); + }, tr, done); + }); + + it("[VersionFetcher.DotNetCoreVersionFetcher] getVersionInfo should return correct version info for a correct version spec", (done) => { + process.env["__versionspec__"] = "2.2.103"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionFetcherGetVersionInfoTestsCorrect.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should have returned the correct version info.")); + }, tr, done); + }); + + it("[VersionFetcher.DotNetCoreVersionFetcher] getVersionInfo should be able to return versionInfo for sdk present in sdks property of a release object.", (done) => { + process.env["__versionspec__"] = "2.2.104"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionFetcherGetVersionInfoTestsCorrect.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should have returned the correct version info.")); + }, tr, done); + }); + + it("[VersionFetcher.DotNetCoreVersionFetcher] getVersionInfo should return correct version info for a version which exists in a different channel of the same major version", (done) => { + process.env["__versionspec__"] = "2.1.104"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionFetcherGetVersionInfoTestsCorrect.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should have returned the correct version info.")); + }, tr, done); + }); + + it("[VersionFetcher.DotNetCoreVersionFetcher] getVersionInfo should return latest version info in a major version for a versionSpec of type majorVersion.x", (done) => { + process.env["__versionspec__"] = "2.x"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionFetcherGetVersionInfoTestsCorrect.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should have returned the correct version info.")); + }, tr, done); + }); + + it("[VersionFetcher.DotNetCoreVersionFetcher] getVersionInfo should return latest version info in a major.minor version for a versionSpec of type majorVersion.minorVersion.x", (done) => { + process.env["__versionspec__"] = "2.2.x"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionFetcherGetVersionInfoTestsCorrect.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should have returned the correct version info.")); + }, tr, done); + }); + + it("[VersionFetcher.DotNetCoreVersionFetcher] getVersionInfo should return latest preview version info if includePreviewVersion is true and latest version is a preview version", (done) => { + process.env["__versionspec__"] = "2.2.x"; + process.env["__inlcudepreviewversion__"] = "true"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionFetcherGetVersionInfoTestsCorrect.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should have returned the correct version info.")); + }, tr, done); + }); + + it("[VersionFetcher.DotNetCoreVersionFetcher] getVersionInfo should return latest version info even if includePreviewVersion is true but latest version is non preview", (done) => { + process.env["__versionspec__"] = "2.3.x"; + process.env["__inlcudepreviewversion__"] = "true"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionFetcherGetVersionInfoTestsCorrect.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should have returned the correct version info.")); + }, tr, done); + }); + + it("[VersionFetcher.DotNetCoreVersionFetcher] getVersionInfo should return latest version info if includePreviewVersion is true and only 1 channel and is preview", (done) => { + process.env["__versionspec__"] = "3.x"; + process.env["__inlcudepreviewversion__"] = "true"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionFetcherGetVersionInfoTestsCorrect.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should have returned the correct version info.")); + }, tr, done); + }); + + it("[VersionFetcher.DotNetCoreVersionFetcher] getVersionInfo should return latest version info if includePreviewVersion is false and latest version is preview", (done) => { + process.env["__versionspec__"] = "4.x"; + process.env["__inlcudepreviewversion__"] = "false"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionFetcherGetVersionInfoTestsCorrect.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should have returned the correct version info.")); + }, tr, done); + }); + + it("[VersionFetcher.DotNetCoreVersionFetcher] getDownloadUrl should throw if VersionFilesData doesn't contain download URL", (done) => { + process.env["__ostype__"] = "win"; + process.env["__getmachineosfail__"] = "false"; + process.env["__versioninfo__"] = `{"version":"2.2.104", "files": [{"name":"winpackage.zip", "rid":"win-x64", "url": ""}]}`; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionFetcherGetDownloadUrlFailTests.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == false, ("Should have failed as download URL is missing.")); + assert(tr.stdout.indexOf("DownloadUrlForMatchingOsNotFound") > 0, ("Should have thrown the error message as download URL is not present.")) + }, tr, done); + }); + + it("[VersionFetcher.DotNetCoreVersionFetcher] getDownloadUrl should throw if download information object with RID matching OS, could not be found", (done) => { + process.env["__ostype__"] = "win"; + process.env["__getmachineosfail__"] = "false"; + process.env["__versioninfo__"] = `{"version":"2.2.104", "files": [{"name": "linux.tar.gz", "rid":"linux-x64", "url": ""}, {"name": "win.zip", "rid":"win-x86", "url": ""}]}`; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionFetcherGetDownloadUrlFailTests.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == false, ("Should have failed as download URL is missing.")); + assert(tr.stdout.indexOf("DownloadUrlForMatchingOsNotFound") > 0, ("Should have thrown the error message as download URL is not present.")) + }, tr, done); + }); + + it("[VersionFetcher.DotNetCoreVersionFetcher] getDownloadUrl should throw if error encountered while detecting machine os", (done) => { + process.env["__ostype__"] = "win"; + process.env["__getmachineosfail__"] = "true"; + process.env["__versioninfo__"] = `{"version":"2.2.104", "files": [{"name": "linux.tar.gz", "rid":"linux-x64", "url": ""}, {"name":"winpackage.zip", "rid":"win-x86", "url": ""}]}`; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionFetcherGetDownloadUrlFailTests.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == false, ("Should have failed as machine os could not be detected.")); + assert(tr.stdout.indexOf("getMachinePlatformFailed") > 0, ("Should have thrown the error message as getMachineOs script execution was not successful.")) + }, tr, done); + }); + + it("[VersionFetcher.DotNetCoreVersionFetcher] getDownloadUrl should throw if zip package is not found for windows os", (done) => { + process.env["__ostype__"] = "win"; + process.env["__getmachineosfail__"] = "false"; + process.env["__versioninfo__"] = `{"version":"2.2.104", "files": [{"name": "winpacakage.exe", "rid":"win-x64", "url": "https://path.to/file.exe"}, {"name": "winpacakage2.exe", "rid":"win-x86", "url": "https://path.to/file.exe"}]}`; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionFetcherGetDownloadUrlFailTests.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == false, ("Should have failed as download URL is missing.")); + assert(tr.stdout.indexOf("DownloadUrlForMatchingOsNotFound") > 0, ("Should have thrown the error message as download url of zip could not be found for windows.")) + }, tr, done); + }); + + it("[VersionFetcher.DotNetCoreVersionFetcher] getDownloadUrl should throw if tar.gz package is not found for non windows os", (done) => { + process.env["__ostype__"] = "osx"; + process.env["__getmachineosfail__"] = "false"; + process.env["__versioninfo__"] = `{"version":"2.2.104", "files": [{"name": "linux.tar", "rid":"linux-x64", "url": "https://path.to/file.pkg"}, {"name": "osx.pkg", "rid":"osx-x64", "url": "https://path.to/file.pkg"}]}`; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionFetcherGetDownloadUrlFailTests.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == false, ("Should have failed as download URL is missing.")); + assert(tr.stdout.indexOf("DownloadUrlForMatchingOsNotFound") > 0, ("Should have thrown the error message as download url of tar file could not be found for mac os.")) + }, tr, done); + }); + + it("[VersionFetcher.DotNetCoreVersionFetcher] getDownloadUrl should return correct download URL for matching OS", (done) => { + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionFetcherGetDownloadUrlPassTests.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should have passed as download URL for all windows, linux and osx are available for correct rid.")); + assert(tr.stdout.indexOf("CorrectDownloadUrlsSuccessfullyReturnedForAllOs") > 0, ("Should have printed success message on receiving correct urls for all os's.")) + }, tr, done); + }); + + it("[VersionInstaller] constructor should throw if installationPath doesn't exist and cannot be created", (done) => { + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionInstallerTests.js")) + tr.run(); + runValidations(() => { + assert(tr.succeeded == false, ("Should have failed as the installation path doesn't exist and cannot be created or the process doesn't have permission over it.")) + }, tr, done); + }); + + it("[VersionInstaller] downloadAndInstall should throw if passed arguments are empty or doesn't contain version or downloadUrl is malformed", (done) => { + process.env["__case__"] = "urlerror"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionInstallerDownloadAndInstallTests.js")) + tr.run(); + runValidations(() => { + assert(tr.succeeded == false, ("Should have failed as the arguments passed are not correct.")); + assert(tr.stdout.indexOf("VersionCanNotBeDownloadedFromUrl") > -1, "Should have thrown this error: VersionCanNotBeDownloadedFromUrl"); + assert(tr.stdout.lastIndexOf("VersionCanNotBeDownloadedFromUrl") > tr.stdout.indexOf("VersionCanNotBeDownloadedFromUrl"), "Should have thrown this error: VersionCanNotBeDownloadedFromUrl"); + }, tr, done); + }); + + it("[VersionInstaller] downloadAndInstall should throw if downloading version from URL fails", (done) => { + process.env["__case__"] = "downloaderror"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionInstallerDownloadAndInstallTests.js")) + tr.run(); + runValidations(() => { + assert(tr.succeeded == false, ("Should have failed as downloading the package from url did not complete.")); + assert(tr.stdout.indexOf("CouldNotDownload") > -1, "Should have thrown this error: CouldNotDownload"); + }, tr, done); + }); + + it("[VersionInstaller] downloadAndInstall should throw if extracting downloaded package or copying folders into installation path fails.", (done) => { + process.env["__case__"] = "extracterror"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionInstallerDownloadAndInstallTests.js")) + tr.run(); + runValidations(() => { + assert(tr.succeeded == false, ("Should have failed as extraction of package was not successfull.")); + assert(tr.stdout.indexOf("FailedWhileExtractingPacakge") > -1, "Should have thrown this error: FailedWhileExtractingPacakge"); + }, tr, done); + }); + + it("[VersionInstaller] downloadAndInstall should not throw if root folders were successfully copied but copying root files from package into installationPath failed", (done) => { + process.env["__case__"] = "filecopyerror"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionInstallerDownloadAndInstallTests.js")) + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should have passed.")); + assert(tr.stdout.indexOf("FailedToCopyTopLevelFiles") > -1, "Should not have caused function failure when root file's copying failed."); + assert(tr.stdout.indexOf("SuccessfullyInstalled") > -1, "Function should have completed successfully."); + }, tr, done); + }); + + it("[VersionInstaller] downloadAndInstall should not copy files from root folder if version being installed in the path is not greater than all other already present or runtime is being installed", (done) => { + process.env["__case__"] = "conditionalfilecopy"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionInstallerDownloadAndInstallTests.js")) + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should have passed.")); + assert(tr.stdout.lastIndexOf("CopyingFilesIntoPath [ 'installationPath' ]") == tr.stdout.indexOf("CopyingFilesIntoPath [ 'installationPath' ]"), "Should have copied root files in only one case where the version being installed is latest among already installed ones."); + }, tr, done); + }); + + it("[VersionInstaller] downloadAndInstall should throw if creating version.complete file fails.", (done) => { + process.env["__case__"] = "versioncompletefileerror"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionInstallerDownloadAndInstallTests.js")) + tr.run(); + runValidations(() => { + assert(tr.succeeded == false, ("Should have failed as creating completion markup file failed for package.")); + assert(tr.stdout.indexOf("CreatingInstallationCompeleteFile") > -1, "Should have tried creating the file."); + assert(tr.stdout.indexOf("FailedWhileInstallingVersionAtPath") > -1, "Should have thrown this error as the parent error."); + }, tr, done); + }); + + it("[VersionInstaller] downloadAndInstall should complete successfully on complete installation and create complete file in both sdk and runtime when sdk is installed and in runtime when only runtime is installed.", (done) => { + process.env["__case__"] = "successfullinstall"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionInstallerDownloadAndInstallTests.js")) + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should have passed.")); + assert(tr.stdout.indexOf("SuccessfullyInstalled") > -1, "Should have SuccessfullyInstalled.") + }, tr, done); + }); + + it("[VersionInstaller] isVersionInstalled should throw if version being checked is not explicit.", (done) => { + process.env["__case__"] = "nonexplicit"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionInstallerIsVersionInstalledTests.js")) + tr.run(); + runValidations(() => { + assert(tr.succeeded == false, ("Should have failed.")); + assert(tr.stdout.indexOf("ExplicitVersionRequired") > -1, "Should have printed ExplicitVersionRequired.") + }, tr, done); + }); + + it("[VersionInstaller] isVersionInstalled should return false if either folder or file with name as version is not present inside sdk/runtime folder.", (done) => { + process.env["__case__"] = "folderorfilemissing"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionInstallerIsVersionInstalledTests.js")) + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should have returned false without failure.")); + assert(tr.stdout.indexOf("VersionFoundInCache") <= -1, "Should not have found any version in cache as either file or folder for that version were missing"); + }, tr, done); + }); + + it("[VersionInstaller] isVersionInstalled should return true if both folder or file with name as version is present inside sdk/runtime path.", (done) => { + process.env["__case__"] = "success"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionInstallerIsVersionInstalledTests.js")) + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should have returned false without failure.")); + assert(tr.stdout.indexOf("VersionFoundInCache") > -1, "Should not have found any version in cache as either file or folder for that version were missing"); + }, tr, done); + }); + + it("[usedotnet] run should throw if versionSpec is invalid.", (done) => { + process.env["__case__"] = "matchingversionnotfound"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "usedotnetTests.js")) + tr.run(); + runValidations(() => { + assert(tr.succeeded == false, ("Should have failed.")); + assert(tr.stdout.indexOf("MatchingVersionNotFound") > -1, "Should not have thrown this message as versionInfo for a matching version could not be found."); + }, tr, done); + }); + + it("[usedotnet] run should skip installation if version found in cache but should prepend all the required paths and should also use $(Agent.ToolsDirectory)/dotnet as installation when input is missing.", (done) => { + process.env["__case__"] = "skipinstallation"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "usedotnetTests.js")) + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should have passed.")); + assert(tr.stdout.indexOf("PrependingInstallationPath") > -1, "Should have prepended installation path"); + assert(tr.stdout.indexOf("PrependGlobalToolPath") > -1, "Should have printed this message as addDotNetCoreToolPath function should have been called."); + assert(tr.stdout.indexOf("PrependingGlobalToolPath") > -1, "Should have prepended global tool path"); + assert(tr.stdout.indexOf("DownloadAndInstallCalled") == -1, "Should not have printed this message as DownloadAndInstall function should not have been called."); + }, tr, done); + }); + + it("[usedotnet] run should install if version is not found in cache and prepend the required paths.", (done) => { + process.env["__case__"] = "installversion"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "usedotnetTests.js")) + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should have passed.")); + assert(tr.stdout.indexOf("PrependingInstallationPath") > -1, "Should have prepended installation path"); + assert(tr.stdout.indexOf("PrependGlobalToolPath") > -1, "Should have printed this message as addDotNetCoreToolPath function should have been called."); + assert(tr.stdout.indexOf("PrependingGlobalToolPath") > -1, "Should have prepended global tool path"); + assert(tr.stdout.indexOf("DownloadAndInstallCalled") > -1, "Should have printed this message as DownloadAndInstall function should have been called."); + }, tr, done); + }); + + it("[usedotnet] run should not fail if globalToolPath could not be created or set.", (done) => { + process.env["__case__"] = "globaltoolpathfailure"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "usedotnetTests.js")) + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should have passed.")); + assert(tr.stdout.indexOf("PrependingInstallationPath") > -1, "Should have prepended installation path"); + assert(tr.stdout.indexOf("PrependGlobalToolPath") > -1, "Should have printed this message as addDotNetCoreToolPath function should have been called."); + assert(tr.stdout.indexOf("ErrorWhileSettingDotNetToolPath") > -1, "Should have printed this message as error must have been encountered while setting GlobalToolPath."); + }, tr, done); + }); + + it("[globaljsonfetcher] run should not fail if one global.json with a valid version was found.", (done) => { + process.env["__case__"] = "subdirAsRoot"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "globaljsonfetcherTest.js")) + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should have passed.")); + assert(tr.stdout.indexOf("GlobalJsonFound") > -1, "should found a global.json file"); + }, tr, done); + }); + it("[globaljsonfetcher] run should not fail if two global.json with a valid version was found.", (done) => { + process.env["__case__"] = "rootAsRoot"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "globaljsonfetcherTest.js")) + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should have passed.")); + assert(tr.stdout.indexOf("GlobalJsonFound") > -1, "should found a global.json file"); + }, tr, done); + }); + it("[globaljsonfetcher] run should fail if no global.json is found.", (done) => { + process.env["__case__"] = "invalidDir"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "globaljsonfetcherTest.js")) + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should't have passed.")); + assert(tr.stdout.indexOf("FailedToFindGlobalJson") > -1, "should throw an error that no file was found."); + }, tr, done); + }); + it("[globaljsonfetcher] run shouldn't fail if the global.json is empty.", (done) => { + process.env["__case__"] = "emptyGlobalJson"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "globaljsonfetcherTest.js")) + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should passed.")); + assert(tr.stdout.indexOf("GlobalJsonIsEmpty") > -1, "should throw an error that no file was found."); + }, tr, done); + }) +}); + diff --git a/Tasks/UseDotNetV2/_buildConfigs/Node16/Tests/globaljsonfetcherTest.ts b/Tasks/UseDotNetV2/_buildConfigs/Node16/Tests/globaljsonfetcherTest.ts new file mode 100644 index 000000000000..8a0a7d49bb0b --- /dev/null +++ b/Tasks/UseDotNetV2/_buildConfigs/Node16/Tests/globaljsonfetcherTest.ts @@ -0,0 +1,136 @@ +"use strict"; +import * as tl from 'azure-pipelines-task-lib/task'; +import { GlobalJson } from "../globaljsonfetcher"; +import { Buffer } from "buffer"; +import { VersionInfo } from '../models'; +import { Promise } from 'q'; +import fs = require('fs'); +var mockery = require('mockery'); + +const workingDir: string = "work/"; +const validRootGlobalJson = workingDir + "global.json"; +const rootVersionNumber = "2.2.2"; +const workingSubDir = workingDir + "testdir/"; +const validSubDirGlobalJson = workingSubDir + "global.json"; +const subDirVersionNumber = "3.0.0-pre285754637"; +const pathToEmptyGlobalJsonDir = workingDir + "empty/"; +const pathToEmptyGlobalJson = pathToEmptyGlobalJsonDir + "global.json"; + +//setup mocks +mockery.enable({ + useCleanCache: true, + warnOnReplace: false, + warnOnUnregistered: false +}); + +mockery.registerMock('azure-pipelines-task-lib/task', { + findMatch: function (path: string, searchPattern: string): string[] { + if (searchPattern != "**/global.json") { + return []; + } + if (path == workingDir) { + // If it's working dir subdir is included, because it is a child; + return [validRootGlobalJson, validSubDirGlobalJson]; + } + if (path == workingSubDir) { + return [validSubDirGlobalJson]; + } + if (path == pathToEmptyGlobalJsonDir) { + return [pathToEmptyGlobalJson]; + } + return []; + }, + loc: function (locString, ...param: string[]) { return tl.loc(locString, param); }, + debug: function (message) { return tl.debug(message); } +}); + +mockery.registerMock('fs', { + ...fs, + readFileSync: function (path: string): Buffer { + if (path == validRootGlobalJson) { + var globalJson = new GlobalJson(rootVersionNumber); + return Buffer.from(JSON.stringify(globalJson)); + } + if (path == validSubDirGlobalJson) { + var globalJson = new GlobalJson(subDirVersionNumber); + return Buffer.from(JSON.stringify(globalJson)); + } + if (path == pathToEmptyGlobalJson) { + return Buffer.from(""); + } + return Buffer.from(null); + } +}); + +mockery.registerMock('./versionfetcher', { + DotNetCoreVersionFetcher: function (explicitVersioning: boolean = false) { + return { + getVersionInfo: function (versionSpec: string, vsVersionSpec: string, packageType: string, includePreviewVersions: boolean): Promise { + return Promise((resolve, reject) => { + resolve(new VersionInfo({ + version: versionSpec, + files: [{ + name: 'testfile.json', + hash: 'testhash', + url: 'testurl', + rid: 'testrid' + }], + "runtime-version": versionSpec, + "vs-version": vsVersionSpec + }, packageType)); + }); + } + } + } + +}); + +// start test +import { globalJsonFetcher } from "../globaljsonfetcher"; +if (process.env["__case__"] == "subdirAsRoot") { + let fetcher = new globalJsonFetcher(workingSubDir); + fetcher.GetVersions().then(versionInfos => { + if (versionInfos.length != 1) { + throw "GetVersions should return one result if one global.json is found."; + } + if (versionInfos[0].getVersion() != subDirVersionNumber) { + throw `GetVersions should return the version number that was inside the global.json. Expected: ${subDirVersionNumber} Actual: ${versionInfos[0].getVersion()}`; + } + if (versionInfos[0].getPackageType() != 'sdk') { + throw `GetVersions return always 'sdk' as package type. Actual: ${versionInfos[0].getPackageType()}`; + } + }); +} + +if (process.env["__case__"] == "rootAsRoot") { + let fetcher = new globalJsonFetcher(workingDir); + fetcher.GetVersions().then(versionInfos => { + if (versionInfos.length != 2) { + throw "GetVersions should return all global.json in a folder hierarchy result if multiple global.json are found."; + } + }); +} + +if (process.env["__case__"] == "invalidDir") { + let fetcher = new globalJsonFetcher("invalidDir"); + fetcher.GetVersions().then(versionInfos => { + throw "GetVersions shouldn't success if no matching version was found."; + }, err => { + // here we are good because the getVersion throw an error. + return; + }); +} + +if (process.env["__case__"] == "emptyGlobalJson") { + let fetcher = new globalJsonFetcher(pathToEmptyGlobalJsonDir); + fetcher.GetVersions().then(versionInfos => { + if (versionInfos == null) { + throw "GetVersions shouldn't return null if the global.json is empty."; + } + if (versionInfos.length != 0) { + throw "GetVersions shouldn't return a arry with 0 elements if global.json is empty."; + } + }, err => { + throw "GetVersions shouldn't throw an error if global.json is empty."; + }); +} \ No newline at end of file diff --git a/Tasks/UseDotNetV2/_buildConfigs/Node16/globaljsonfetcher.ts b/Tasks/UseDotNetV2/_buildConfigs/Node16/globaljsonfetcher.ts new file mode 100644 index 000000000000..aaa3fe5ccb86 --- /dev/null +++ b/Tasks/UseDotNetV2/_buildConfigs/Node16/globaljsonfetcher.ts @@ -0,0 +1,94 @@ +"use strict"; +import * as fileSystem from "fs"; +import * as tl from 'azure-pipelines-task-lib/task'; +import { DotNetCoreVersionFetcher } from "./versionfetcher"; +import { VersionInfo } from "./models"; + +export class globalJsonFetcher { + + private workingDirectory: string; + private versionFetcher: DotNetCoreVersionFetcher = new DotNetCoreVersionFetcher(true); + /** + * The global json fetcher provider functionality to extract the version information from all global json in the working directory. + * @param workingDirectory + */ + constructor(workingDirectory: string) { + this.workingDirectory = workingDirectory; + } + + /** + * Get all version information from all global.json starting from the working directory without duplicates. + */ + public async GetVersions(): Promise { + var versionInformation: VersionInfo[] = new Array(); + var versionStrings = this.getVersionStrings(); + for (let index = 0; index < versionStrings.length; index++) { + const version = versionStrings[index]; + if (version != null) { + var versionInfo = await this.versionFetcher.getVersionInfo(version, null, "sdk", false); + versionInformation.push(versionInfo); + } + } + + return Array.from(new Set(versionInformation)); // this remove all not unique values. + } + + private getVersionStrings(): Array { + let filePathsToGlobalJson = tl.findMatch(this.workingDirectory, "**/global.json"); + if (filePathsToGlobalJson == null || filePathsToGlobalJson.length == 0) { + throw tl.loc("FailedToFindGlobalJson", this.workingDirectory); + } + + return filePathsToGlobalJson.map(path => { + var content = this.readGlobalJson(path); + if (content != null) { + tl.loc("GlobalJsonSdkVersion", content.sdk.version, path); + return content.sdk.version; + } + + return null; + }) + .filter(d => d != null); // remove all global.json that can't read + } + + private readGlobalJson(path: string): GlobalJson | null { + let globalJson: GlobalJson | null = null; + tl.loc("GlobalJsonFound", path); + try { + let fileContent = fileSystem.readFileSync(path); + // Since here is a buffer, we need to check length property to determine if it is empty. + if (!fileContent.length) { + // do not throw if globa.json is empty, task need not install any version in such case. + tl.loc("GlobalJsonIsEmpty", path); + return null; + } + + globalJson = (JSON.parse(fileContent.toString())) as { sdk: { version: string } }; + } catch (error) { + // we throw if the global.json is invalid + throw tl.loc("FailedToReadGlobalJson", path, error); // We don't throw if a global.json is invalid. + } + + if (globalJson == null || globalJson.sdk == null || globalJson.sdk.version == null) { + tl.loc("FailedToReadGlobalJson", path); + return null; + } + + return globalJson; + } + +} + +export class GlobalJson { + constructor(version: string | null = null) { + if (version != null) { + this.sdk = new sdk(); + this.sdk.version = version; + } + } + public sdk: sdk; +} + +class sdk { + public version: string; +} \ No newline at end of file diff --git a/Tasks/UseDotNetV2/_buildConfigs/Node16/package-lock.json b/Tasks/UseDotNetV2/_buildConfigs/Node16/package-lock.json new file mode 100644 index 000000000000..395475bb37f1 --- /dev/null +++ b/Tasks/UseDotNetV2/_buildConfigs/Node16/package-lock.json @@ -0,0 +1,877 @@ +{ + "name": "usedotnet", + "version": "2.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@types/concat-stream": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@types/concat-stream/-/concat-stream-1.6.0.tgz", + "integrity": "sha1-OU2+C7X+5Gs42JZzXoto7yOQ0A0=", + "requires": { + "@types/node": "*" + } + }, + "@types/form-data": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/@types/form-data/-/form-data-0.0.33.tgz", + "integrity": "sha1-yayFsqX9GENbjIXZ7LUObWyJP/g=", + "requires": { + "@types/node": "*" + } + }, + "@types/ini": { + "version": "1.3.30", + "resolved": "https://registry.npmjs.org/@types/ini/-/ini-1.3.30.tgz", + "integrity": "sha512-2+iF8zPSbpU83UKE+PNd4r/MhwNAdyGpk3H+VMgEH3EhjFZq1kouLgRoZrmIcmoGX97xFvqdS44DkICR5Nz3tQ==" + }, + "@types/ltx": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/@types/ltx/-/ltx-2.8.0.tgz", + "integrity": "sha512-qHnPVD0FFquypl7Yy8qqvDjhnX3c7toUYjjALK+bug7MfR2WCRTIjw+GUMfehRi/Mbhj5rLAQerPTnTCUzSCWg==", + "requires": { + "@types/node": "*" + } + }, + "@types/mocha": { + "version": "5.2.6", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-5.2.6.tgz", + "integrity": "sha512-1axi39YdtBI7z957vdqXI4Ac25e7YihYQtJa+Clnxg1zTJEaIRbndt71O3sP4GAMgiAm0pY26/b9BrY4MR/PMw==" + }, + "@types/mockery": { + "version": "1.4.29", + "resolved": "https://registry.npmjs.org/@types/mockery/-/mockery-1.4.29.tgz", + "integrity": "sha1-m6It838H43gP/4Ux0aOOYz+UV6U=" + }, + "@types/node": { + "version": "16.18.38", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.38.tgz", + "integrity": "sha512-6sfo1qTulpVbkxECP+AVrHV9OoJqhzCsfTNp5NIG+enM4HyM3HvZCO798WShIXBN0+QtDIcutJCjsVYnQP5rIQ==" + }, + "@types/q": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/@types/q/-/q-1.5.2.tgz", + "integrity": "sha512-ce5d3q03Ex0sy4R14722Rmt6MT07Ua+k4FwDfdcToYJcMKNtRVQvJ6JCAPdAmAnbRb6CsX6aYb9m96NGod9uTw==" + }, + "@types/qs": { + "version": "6.9.5", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.5.tgz", + "integrity": "sha512-/JHkVHtx/REVG0VVToGRGH2+23hsYLHdyG+GrvoUGlGAd0ErauXDyvHtRI/7H7mzLm+tBCKA7pfcpkQ1lf58iQ==" + }, + "@types/semver": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-6.0.0.tgz", + "integrity": "sha512-OO0srjOGH99a4LUN2its3+r6CBYcplhJ466yLqs+zvAWgphCpS8hYZEZ797tRDP/QKcqTdb/YCN6ifASoAWkrQ==" + }, + "@types/uuid": { + "version": "3.4.9", + "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-3.4.9.tgz", + "integrity": "sha512-XDwyIlt/47l2kWLTzw/mtrpLdB+GPSskR2n/PIcPn+VYhVO77rGhRncIR5GPU0KRzXuqkDO+J5qqrG0Y8P6jzQ==" + }, + "adm-zip": { + "version": "0.4.16", + "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.4.16.tgz", + "integrity": "sha512-TFi4HBKSGfIKsK5YCkKaaFG2m4PEDyViZmEwof3MTIgzimHLto6muaHVpbrljdIvIrFZzEq/p4nafOeLcYegrg==" + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "requires": { + "sprintf-js": "~1.0.2" + }, + "dependencies": { + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" + } + } + }, + "asap": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", + "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=" + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + }, + "azure-devops-node-api": { + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/azure-devops-node-api/-/azure-devops-node-api-10.2.2.tgz", + "integrity": "sha512-4TVv2X7oNStT0vLaEfExmy3J4/CzfuXolEcQl/BRUmvGySqKStTG2O55/hUQ0kM7UJlZBLgniM0SBq4d/WkKow==", + "requires": { + "tunnel": "0.0.6", + "typed-rest-client": "^1.8.4" + } + }, + "azure-pipelines-task-lib": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/azure-pipelines-task-lib/-/azure-pipelines-task-lib-4.4.0.tgz", + "integrity": "sha512-JgtxfjxjRA+KWY0Q5UC1fo48nkbVxFHgKEuasKdJMSNxHydOyNlB5MNw4UTiTXp9b0nnqKeOQOBn5RN3go3aPg==", + "requires": { + "minimatch": "3.0.5", + "mockery": "^2.1.0", + "q": "^1.5.1", + "semver": "^5.1.0", + "shelljs": "^0.8.5", + "sync-request": "6.1.0", + "uuid": "^3.0.1" + }, + "dependencies": { + "mockery": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mockery/-/mockery-2.1.0.tgz", + "integrity": "sha512-9VkOmxKlWXoDO/h1jDZaS4lH33aWfRiJiNT/tKj+8OGzrcFDLo8d0syGdbsc3Bc4GvRXPb+NMMvojotmuGJTvA==" + }, + "semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==" + } + } + }, + "azure-pipelines-tasks-packaging-common": { + "version": "2.198.1", + "resolved": "https://registry.npmjs.org/azure-pipelines-tasks-packaging-common/-/azure-pipelines-tasks-packaging-common-2.198.1.tgz", + "integrity": "sha512-iApnFFlGy8oGo2wacMExApsFqPeElcL1dRj8mxOHLrFVw2XzncJ5zl0tEskLcQoN25heWySxU5lQ1AMMvpmSXA==", + "requires": { + "@types/ini": "1.3.30", + "@types/ltx": "2.8.0", + "@types/mocha": "^5.2.6", + "@types/mockery": "1.4.29", + "@types/node": "^10.17.0", + "@types/q": "1.5.2", + "adm-zip": "^0.4.11", + "azure-devops-node-api": "10.2.2", + "azure-pipelines-task-lib": "^3.1.0", + "azure-pipelines-tool-lib": "^1.0.2", + "ini": "^1.3.4", + "ip-address": "^5.8.9", + "ltx": "^2.6.2", + "q": "^1.5.0", + "semver": "^5.5.0", + "typed-rest-client": "1.8.4" + }, + "dependencies": { + "@types/node": { + "version": "10.17.60", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.60.tgz", + "integrity": "sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw==" + }, + "@types/semver": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-5.5.0.tgz", + "integrity": "sha512-41qEJgBH/TWgo5NFSvBCJ1qkoi3Q6ONSF2avrHq1LVEZfYpdHmj0y9SuTK+u9ZhG1sYQKBL1AWXKyLWP4RaUoQ==" + }, + "azure-pipelines-task-lib": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/azure-pipelines-task-lib/-/azure-pipelines-task-lib-3.4.0.tgz", + "integrity": "sha512-3eC4OTFw+7xD7A2aUhxR/j+jRlTI+vVfS0CGxt1pCLs4c/KmY0tQWgbqjD3157kmiucWxELBvgZHaD2gCBe9fg==", + "requires": { + "minimatch": "3.0.5", + "mockery": "^2.1.0", + "q": "^1.5.1", + "semver": "^5.1.0", + "shelljs": "^0.8.5", + "sync-request": "6.1.0", + "uuid": "^3.0.1" + }, + "dependencies": { + "mockery": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mockery/-/mockery-2.1.0.tgz", + "integrity": "sha512-9VkOmxKlWXoDO/h1jDZaS4lH33aWfRiJiNT/tKj+8OGzrcFDLo8d0syGdbsc3Bc4GvRXPb+NMMvojotmuGJTvA==" + } + } + }, + "azure-pipelines-tool-lib": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/azure-pipelines-tool-lib/-/azure-pipelines-tool-lib-1.3.1.tgz", + "integrity": "sha512-6XrjayeYI7QeL2tGP3FPgHggWHAYe4opESnZ9a3UsbtWYdZu3dldBbOlJZpkAxfKCpjRDYMuq6SP1MUsOOm0kA==", + "requires": { + "@types/semver": "^5.3.0", + "@types/uuid": "^3.4.5", + "azure-pipelines-task-lib": "^3.1.10", + "semver": "^5.7.0", + "semver-compare": "^1.0.0", + "typed-rest-client": "^1.8.6", + "uuid": "^3.3.2" + }, + "dependencies": { + "azure-pipelines-task-lib": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/azure-pipelines-task-lib/-/azure-pipelines-task-lib-3.3.1.tgz", + "integrity": "sha512-56ZAr4MHIoa24VNVuwPL4iUQ5MKaigPoYXkBG8E8fiVmh8yZdatUo25meNoQwg77vDY22F63Q44UzXoMWmy7ag==", + "requires": { + "minimatch": "3.0.5", + "mockery": "^1.7.0", + "q": "^1.5.1", + "semver": "^5.1.0", + "shelljs": "^0.8.5", + "sync-request": "6.1.0", + "uuid": "^3.0.1" + } + }, + "typed-rest-client": { + "version": "1.8.9", + "resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-1.8.9.tgz", + "integrity": "sha512-uSmjE38B80wjL85UFX3sTYEUlvZ1JgCRhsWj/fJ4rZ0FqDUFoIuodtiVeE+cUqiVTOKPdKrp/sdftD15MDek6g==", + "requires": { + "qs": "^6.9.1", + "tunnel": "0.0.6", + "underscore": "^1.12.1" + } + } + } + }, + "minimatch": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.5.tgz", + "integrity": "sha512-tUpxzX0VAzJHjLu0xUfFv1gwVp9ba3IOuRAVH2EGuRW8a5emA2FlACLqiT/lDVtS1W+TGNwqz3sWaNyLgDJWuw==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + }, + "typed-rest-client": { + "version": "1.8.4", + "resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-1.8.4.tgz", + "integrity": "sha512-MyfKKYzk3I6/QQp6e1T50py4qg+c+9BzOEl2rBmQIpStwNUoqQ73An+Tkfy9YuV7O+o2mpVVJpe+fH//POZkbg==", + "requires": { + "qs": "^6.9.1", + "tunnel": "0.0.6", + "underscore": "^1.12.1" + }, + "dependencies": { + "qs": { + "version": "6.11.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.1.tgz", + "integrity": "sha512-0wsrzgTz/kAVIeuxSjnpGC56rzYtr6JT/2BwEvMaPhFIoYa1aGO8LbzuU1R0uUYQkLpWBTOj0l/CLAJB64J6nQ==", + "requires": { + "side-channel": "^1.0.4" + } + } + } + } + } + }, + "azure-pipelines-tasks-utility-common": { + "version": "3.198.1", + "resolved": "https://registry.npmjs.org/azure-pipelines-tasks-utility-common/-/azure-pipelines-tasks-utility-common-3.198.1.tgz", + "integrity": "sha512-XxXLwrz06lSXP31JGCcgp2DCuVwcKLCjma55DtsjDe8L8sngKfmTBIiSuZe41aP+KlRtqo8n1I/FBQNPWxGw9w==", + "requires": { + "@types/node": "^10.17.0", + "azure-pipelines-task-lib": "^3.1.0", + "azure-pipelines-tool-lib": "^1.0.2", + "js-yaml": "3.13.1", + "semver": "^5.4.1" + }, + "dependencies": { + "@types/node": { + "version": "10.17.60", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.60.tgz", + "integrity": "sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw==" + }, + "@types/semver": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-5.5.0.tgz", + "integrity": "sha512-41qEJgBH/TWgo5NFSvBCJ1qkoi3Q6ONSF2avrHq1LVEZfYpdHmj0y9SuTK+u9ZhG1sYQKBL1AWXKyLWP4RaUoQ==" + }, + "azure-pipelines-task-lib": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/azure-pipelines-task-lib/-/azure-pipelines-task-lib-3.4.0.tgz", + "integrity": "sha512-3eC4OTFw+7xD7A2aUhxR/j+jRlTI+vVfS0CGxt1pCLs4c/KmY0tQWgbqjD3157kmiucWxELBvgZHaD2gCBe9fg==", + "requires": { + "minimatch": "3.0.5", + "mockery": "^2.1.0", + "q": "^1.5.1", + "semver": "^5.1.0", + "shelljs": "^0.8.5", + "sync-request": "6.1.0", + "uuid": "^3.0.1" + }, + "dependencies": { + "mockery": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mockery/-/mockery-2.1.0.tgz", + "integrity": "sha512-9VkOmxKlWXoDO/h1jDZaS4lH33aWfRiJiNT/tKj+8OGzrcFDLo8d0syGdbsc3Bc4GvRXPb+NMMvojotmuGJTvA==" + } + } + }, + "azure-pipelines-tool-lib": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/azure-pipelines-tool-lib/-/azure-pipelines-tool-lib-1.3.1.tgz", + "integrity": "sha512-6XrjayeYI7QeL2tGP3FPgHggWHAYe4opESnZ9a3UsbtWYdZu3dldBbOlJZpkAxfKCpjRDYMuq6SP1MUsOOm0kA==", + "requires": { + "@types/semver": "^5.3.0", + "@types/uuid": "^3.4.5", + "azure-pipelines-task-lib": "^3.1.10", + "semver": "^5.7.0", + "semver-compare": "^1.0.0", + "typed-rest-client": "^1.8.6", + "uuid": "^3.3.2" + }, + "dependencies": { + "azure-pipelines-task-lib": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/azure-pipelines-task-lib/-/azure-pipelines-task-lib-3.3.1.tgz", + "integrity": "sha512-56ZAr4MHIoa24VNVuwPL4iUQ5MKaigPoYXkBG8E8fiVmh8yZdatUo25meNoQwg77vDY22F63Q44UzXoMWmy7ag==", + "requires": { + "minimatch": "3.0.5", + "mockery": "^1.7.0", + "q": "^1.5.1", + "semver": "^5.1.0", + "shelljs": "^0.8.5", + "sync-request": "6.1.0", + "uuid": "^3.0.1" + } + } + } + }, + "minimatch": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.5.tgz", + "integrity": "sha512-tUpxzX0VAzJHjLu0xUfFv1gwVp9ba3IOuRAVH2EGuRW8a5emA2FlACLqiT/lDVtS1W+TGNwqz3sWaNyLgDJWuw==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + } + } + }, + "azure-pipelines-tool-lib": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/azure-pipelines-tool-lib/-/azure-pipelines-tool-lib-2.0.4.tgz", + "integrity": "sha512-LgAelZKJe3k/t3NsKSKzjeRviphns0w0p5tgwz8uHN70I9m2TToiOKl+fogrdXcM6+jiLBk5KTqrcRBqPpv/XA==", + "requires": { + "@types/semver": "^5.3.0", + "@types/uuid": "^3.4.5", + "azure-pipelines-task-lib": "^4.1.0", + "semver": "^5.7.0", + "semver-compare": "^1.0.0", + "typed-rest-client": "^1.8.6", + "uuid": "^3.3.2" + }, + "dependencies": { + "@types/semver": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-5.5.0.tgz", + "integrity": "sha512-41qEJgBH/TWgo5NFSvBCJ1qkoi3Q6ONSF2avrHq1LVEZfYpdHmj0y9SuTK+u9ZhG1sYQKBL1AWXKyLWP4RaUoQ==" + }, + "semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==" + } + } + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "buffer-from": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==" + }, + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" + }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "concat-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "requires": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + } + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" + }, + "form-data": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.1.tgz", + "integrity": "sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, + "get-intrinsic": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.0.tgz", + "integrity": "sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q==", + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.3" + } + }, + "get-port": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/get-port/-/get-port-3.2.0.tgz", + "integrity": "sha1-3Xzn3hh8Bsi/NTeWrHHgmfCYDrw=" + }, + "glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "dependencies": { + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "requires": { + "brace-expansion": "^1.1.7" + } + } + } + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==" + }, + "http-basic": { + "version": "8.1.3", + "resolved": "https://registry.npmjs.org/http-basic/-/http-basic-8.1.3.tgz", + "integrity": "sha512-/EcDMwJZh3mABI2NhGfHOGOeOZITqfkEO4p/xK+l3NpyncIHUQBoMvCSF/b5GqvKtySC2srL/GGG3+EtlqlmCw==", + "requires": { + "caseless": "^0.12.0", + "concat-stream": "^1.6.2", + "http-response-object": "^3.0.1", + "parse-cache-control": "^1.0.1" + } + }, + "http-response-object": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/http-response-object/-/http-response-object-3.0.2.tgz", + "integrity": "sha512-bqX0XTF6fnXSQcEJ2Iuyr75yVakyjIDCqroJQ/aHfSdlM743Cwqoi2nDYMzLGWUcuTWGWy8AAvOKXTfiv6q9RA==", + "requires": { + "@types/node": "^10.0.3" + }, + "dependencies": { + "@types/node": { + "version": "10.17.60", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.60.tgz", + "integrity": "sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw==" + } + } + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" + }, + "interpret": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", + "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==" + }, + "ip-address": { + "version": "5.9.4", + "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-5.9.4.tgz", + "integrity": "sha512-dHkI3/YNJq4b/qQaz+c8LuarD3pY24JqZWfjB8aZx1gtpc2MDILu9L9jpZe1sHpzo/yWFweQVn+U//FhazUxmw==", + "requires": { + "jsbn": "1.1.0", + "lodash": "^4.17.15", + "sprintf-js": "1.1.2" + } + }, + "is-core-module": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.9.0.tgz", + "integrity": "sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A==", + "requires": { + "has": "^1.0.3" + } + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "js-yaml": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "jsbn": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz", + "integrity": "sha1-sBMHyym2GKHtJux56RH4A8TaAEA=" + }, + "lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + }, + "ltx": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/ltx/-/ltx-2.10.0.tgz", + "integrity": "sha512-RB4zR6Mrp/0wTNS9WxMvpgfht/7u/8QAC9DpPD19opL/4OASPa28uoliFqeDkLUU8pQ4aeAfATBZmz1aSAHkMw==", + "requires": { + "inherits": "^2.0.4" + } + }, + "mime-db": { + "version": "1.44.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz", + "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==" + }, + "mime-types": { + "version": "2.1.27", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz", + "integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==", + "requires": { + "mime-db": "1.44.0" + } + }, + "minimatch": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.5.tgz", + "integrity": "sha512-tUpxzX0VAzJHjLu0xUfFv1gwVp9ba3IOuRAVH2EGuRW8a5emA2FlACLqiT/lDVtS1W+TGNwqz3sWaNyLgDJWuw==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "mockery": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/mockery/-/mockery-1.7.0.tgz", + "integrity": "sha1-9O3g2HUMHJcnwnLqLGBiniyaHE8=" + }, + "object-inspect": { + "version": "1.12.3", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", + "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==" + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "requires": { + "wrappy": "1" + } + }, + "parse-cache-control": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parse-cache-control/-/parse-cache-control-1.0.1.tgz", + "integrity": "sha1-juqz5U+laSD+Fro493+iGqzC104=" + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==" + }, + "path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" + }, + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + }, + "promise": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/promise/-/promise-8.1.0.tgz", + "integrity": "sha512-W04AqnILOL/sPRXziNicCjSNRruLAuIHEOVBazepu0545DDNGYHz7ar9ZgZ1fMU8/MA4mVxp5rkBWRi6OXIy3Q==", + "requires": { + "asap": "~2.0.6" + } + }, + "q": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", + "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=" + }, + "qs": { + "version": "6.11.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.1.tgz", + "integrity": "sha512-0wsrzgTz/kAVIeuxSjnpGC56rzYtr6JT/2BwEvMaPhFIoYa1aGO8LbzuU1R0uUYQkLpWBTOj0l/CLAJB64J6nQ==", + "requires": { + "side-channel": "^1.0.4" + } + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "rechoir": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==", + "requires": { + "resolve": "^1.1.6" + } + }, + "resolve": { + "version": "1.22.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", + "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", + "requires": { + "is-core-module": "^2.9.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + }, + "semver-compare": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz", + "integrity": "sha1-De4hahyUGrN+nvsXiPavxf9VN/w=" + }, + "shelljs": { + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz", + "integrity": "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==", + "requires": { + "glob": "^7.0.0", + "interpret": "^1.0.0", + "rechoir": "^0.6.2" + } + }, + "side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "requires": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + } + }, + "sprintf-js": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.2.tgz", + "integrity": "sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug==" + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==" + }, + "sync-request": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/sync-request/-/sync-request-6.1.0.tgz", + "integrity": "sha512-8fjNkrNlNCrVc/av+Jn+xxqfCjYaBoHqCsDz6mt030UMxJGr+GSfCV1dQt2gRtlL63+VPidwDVLr7V2OcTSdRw==", + "requires": { + "http-response-object": "^3.0.1", + "sync-rpc": "^1.2.1", + "then-request": "^6.0.0" + } + }, + "sync-rpc": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/sync-rpc/-/sync-rpc-1.3.6.tgz", + "integrity": "sha512-J8jTXuZzRlvU7HemDgHi3pGnh/rkoqR/OZSjhTyyZrEkkYQbk7Z33AXp37mkPfPpfdOuj7Ex3H/TJM1z48uPQw==", + "requires": { + "get-port": "^3.1.0" + } + }, + "then-request": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/then-request/-/then-request-6.0.2.tgz", + "integrity": "sha512-3ZBiG7JvP3wbDzA9iNY5zJQcHL4jn/0BWtXIkagfz7QgOL/LqjCEOBQuJNZfu0XYnv5JhKh+cDxCPM4ILrqruA==", + "requires": { + "@types/concat-stream": "^1.6.0", + "@types/form-data": "0.0.33", + "@types/node": "^8.0.0", + "@types/qs": "^6.2.31", + "caseless": "~0.12.0", + "concat-stream": "^1.6.0", + "form-data": "^2.2.0", + "http-basic": "^8.1.1", + "http-response-object": "^3.0.1", + "promise": "^8.0.0", + "qs": "^6.4.0" + }, + "dependencies": { + "@types/node": { + "version": "8.10.66", + "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.66.tgz", + "integrity": "sha512-tktOkFUA4kXx2hhhrB8bIFb5TbwzS4uOhKEmwiD+NoiL0qtP2OQ9mFldbgD4dV1djrlBYP6eBuQZiWjuHUpqFw==" + } + } + }, + "tunnel": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", + "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==" + }, + "typed-rest-client": { + "version": "1.8.9", + "resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-1.8.9.tgz", + "integrity": "sha512-uSmjE38B80wjL85UFX3sTYEUlvZ1JgCRhsWj/fJ4rZ0FqDUFoIuodtiVeE+cUqiVTOKPdKrp/sdftD15MDek6g==", + "requires": { + "qs": "^6.9.1", + "tunnel": "0.0.6", + "underscore": "^1.12.1" + } + }, + "typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" + }, + "typescript": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.0.2.tgz", + "integrity": "sha512-e4ERvRV2wb+rRZ/IQeb3jm2VxBsirQLpQhdxplZ2MEzGvDkkMmPglecnNDfSUBivMjP93vRbngYYDQqQ/78bcQ==", + "dev": true + }, + "underscore": { + "version": "1.13.4", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.4.tgz", + "integrity": "sha512-BQFnUDuAQ4Yf/cYY5LNrK9NCJFKriaRbD9uR1fTeXnBeoa97W0i41qkZfGO9pSo8I5KzjAcSY2XYtdf0oKd7KQ==" + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "uuid": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", + "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==" + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" + } + } +} diff --git a/Tasks/UseDotNetV2/_buildConfigs/Node16/package.json b/Tasks/UseDotNetV2/_buildConfigs/Node16/package.json new file mode 100644 index 000000000000..f9d3991b0174 --- /dev/null +++ b/Tasks/UseDotNetV2/_buildConfigs/Node16/package.json @@ -0,0 +1,40 @@ +{ + "name": "usedotnet", + "version": "2.0.0", + "description": "Use .Net Core", + "main": "usedotnet.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/Microsoft/azure-pipelines-tasks.git" + }, + "keywords": [ + "Azure", + "Pipelines", + "Tasks", + "DotNetCore", + "Use" + ], + "author": "Microsoft Corporation", + "license": "MIT", + "bugs": { + "url": "https://github.com/Microsoft/azure-pipelines-tasks/issues" + }, + "homepage": "https://github.com/Microsoft/azure-pipelines-tasks#readme", + "dependencies": { + "@types/mocha": "^5.2.6", + "@types/node": "^16.11.39", + "@types/semver": "6.0.0", + "azure-pipelines-task-lib": "^4.4.0", + "azure-pipelines-tasks-packaging-common": "^2.198.1", + "azure-pipelines-tasks-utility-common": "^3.198.1", + "azure-pipelines-tool-lib": "^2.0.4", + "semver": "6.3.0", + "typed-rest-client": "^1.8.9" + }, + "devDependencies": { + "typescript": "4.0.2" + } +} diff --git a/Tasks/UseDotNetV2/globaljsonfetcher.ts b/Tasks/UseDotNetV2/globaljsonfetcher.ts index 771e39efd78d..0a894f44bd25 100644 --- a/Tasks/UseDotNetV2/globaljsonfetcher.ts +++ b/Tasks/UseDotNetV2/globaljsonfetcher.ts @@ -57,7 +57,7 @@ export class globalJsonFetcher { try { let fileContent = fileSystem.readFileSync(path); if (!fileContent) { - // do not throw if globa.json is empty, task need not install any version in such case. + // do not throw if globa.json is empty, task need not install any version in such case. tl.loc("GlobalJsonIsEmpty", path); return null; } diff --git a/Tasks/UseDotNetV2/make.json b/Tasks/UseDotNetV2/make.json index 11743530c028..5f5e63059fd8 100644 --- a/Tasks/UseDotNetV2/make.json +++ b/Tasks/UseDotNetV2/make.json @@ -5,5 +5,17 @@ "source": "externals", "options": "-R" } - ] + ], + "rm": [ + { + "items": [ + "node_modules/azure-pipelines-tasks-packaging-common/node_modules/azure-pipelines-task-lib", + "node_modules/azure-pipelines-tasks-packaging-common/node_modules/azure-pipelines-tool-lib", + "node_modules/azure-pipelines-tasks-utility-common/node_modules/azure-pipelines-task-lib", + "node_modules/azure-pipelines-tasks-utility-common/node_modules/azure-pipelines-tool-lib", + "node_modules/azure-pipelines-tool-lib/node_modules/azure-pipelines-task-lib" + ], + "options": "-Rf" + } + ] } \ No newline at end of file diff --git a/Tasks/UseDotNetV2/task.json b/Tasks/UseDotNetV2/task.json index 1e9d072269ca..cc97485f68cd 100644 --- a/Tasks/UseDotNetV2/task.json +++ b/Tasks/UseDotNetV2/task.json @@ -1,193 +1,193 @@ { - "id": "B0CE7256-7898-45D3-9CB5-176B752BFEA6", - "name": "UseDotNet", - "friendlyName": "Use .NET Core", - "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.", - "category": "Tool", - "helpUrl": "https://aka.ms/AA4xgy0", - "helpMarkDown": "[Learn more about this task](https://aka.ms/AA4xgy0)", - "runsOn": [ - "Agent", - "DeploymentGroup" - ], - "author": "Microsoft Corporation", - "version": { - "Major": 2, - "Minor": 222, - "Patch": 0 + "id": "B0CE7256-7898-45D3-9CB5-176B752BFEA6", + "name": "UseDotNet", + "friendlyName": "Use .NET Core", + "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.", + "category": "Tool", + "helpUrl": "https://aka.ms/AA4xgy0", + "helpMarkDown": "[Learn more about this task](https://aka.ms/AA4xgy0)", + "runsOn": [ + "Agent", + "DeploymentGroup" + ], + "author": "Microsoft Corporation", + "version": { + "Major": 2, + "Minor": 226, + "Patch": 1 + }, + "satisfies": [ + "DotNetCore" + ], + "demands": [], + "minimumAgentVersion": "2.144.0", + "ecosystem": "dotnet", + "instanceNameFormat": "Use .NET Core $(packageType) $(version)", + "releaseNotes": "
  • Support for installing multiple versions side by side.
  • Support for patterns in version to fetch latest in minor/major version.
  • Restrict Multi-level lookup
  • Installs NuGet and provides proxy support.
  • Installs sdk versions from `global.json` file(s)
  • ", + "groups": [ + { + "name": "advanced", + "displayName": "Advanced", + "isExpanded": true + } + ], + "inputs": [ + { + "name": "packageType", + "type": "pickList", + "label": "Package to install", + "defaultValue": "sdk", + "required": false, + "helpMarkDown": "Please select whether to install only runtime or SDK.", + "options": { + "runtime": "Runtime", + "sdk": "SDK (contains runtime)" + } + }, + { + "name": "useGlobalJson", + "type": "boolean", + "label": "Use global json", + "defaultValue": false, + "required": false, + "helpMarkDown": "Select this option to install all SDKs from global.json files. These files are searched from system.DefaultWorkingDirectory. You can change the search root path by setting working directory input.", + "visibleRule": "packageType = sdk" + }, + { + "name": "workingDirectory", + "type": "filePath", + "label": "Working Directory", + "helpMarkDown": "Specify path from where global.json files should be searched when using `Use global json`. If empty, `system.DefaultWorkingDirectory` will be considered as the root path.", + "required": "false", + "visibleRule": "useGlobalJson = true" + }, + { + "name": "version", + "type": "string", + "label": "Version", + "defaultValue": "", + "required": false, + "helpMarkDown": "Specify version of .NET Core SDK or runtime to install.
    Versions can be given in the following formats
  • 2.x => Install latest in major version.
  • 2.2.x => Install latest in major and minor version
  • 2.2.104 => Install exact version

  • 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://dotnetcli.blob.core.windows.net/dotnet/release-metadata/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", + "visibleRule": "useGlobalJson = false || packageType = runtime" }, - "satisfies": [ - "DotNetCore" - ], - "demands": [], - "minimumAgentVersion": "2.144.0", - "ecosystem": "dotnet", - "instanceNameFormat": "Use .NET Core $(packageType) $(version)", - "releaseNotes": "
  • Support for installing multiple versions side by side.
  • Support for patterns in version to fetch latest in minor/major version.
  • Restrict Multi-level lookup
  • Installs NuGet and provides proxy support.
  • Installs sdk versions from `global.json` file(s)
  • ", - "groups": [ - { - "name": "advanced", - "displayName": "Advanced", - "isExpanded": true - } - ], - "inputs": [ - { - "name": "packageType", - "type": "pickList", - "label": "Package to install", - "defaultValue": "sdk", - "required": false, - "helpMarkDown": "Please select whether to install only runtime or SDK.", - "options": { - "runtime": "Runtime", - "sdk": "SDK (contains runtime)" - } - }, - { - "name": "useGlobalJson", - "type": "boolean", - "label": "Use global json", - "defaultValue": false, - "required": false, - "helpMarkDown": "Select this option to install all SDKs from global.json files. These files are searched from system.DefaultWorkingDirectory. You can change the search root path by setting working directory input.", - "visibleRule": "packageType = sdk" - }, - { - "name": "workingDirectory", - "type": "filePath", - "label": "Working Directory", - "helpMarkDown": "Specify path from where global.json files should be searched when using `Use global json`. If empty, `system.DefaultWorkingDirectory` will be considered as the root path.", - "required": "false", - "visibleRule": "useGlobalJson = true" - }, - { - "name": "version", - "type": "string", - "label": "Version", - "defaultValue": "", - "required": false, - "helpMarkDown": "Specify version of .NET Core SDK or runtime to install.
    Versions can be given in the following formats
  • 2.x => Install latest in major version.
  • 2.2.x => Install latest in major and minor version
  • 2.2.104 => Install exact version

  • 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://dotnetcli.blob.core.windows.net/dotnet/release-metadata/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", - "visibleRule": "useGlobalJson = false || packageType = runtime" - }, - { - "name": "vsVersion", - "type": "string", - "label": "Compatible Visual Studio version", - "defaultValue": "", - "required": false, - "groupName": "advanced", - "helpMarkDown": "Specify version of compatible visual studio for which .NET core sdk to install. Specifiy complete vs-version like 16.6.4 containing major version, minor version and patch number.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://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json)" - }, - { - "name": "includePreviewVersions", - "type": "boolean", - "label": "Include Preview Versions", - "defaultValue": "false", - "required": false, - "helpMarkDown": "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", - "visibleRule": "useGlobalJson = false || packageType = runtime" - }, - { - "name": "installationPath", - "type": "string", - "label": "Path To Install .Net Core", - "defaultValue": "$(Agent.ToolsDirectory)/dotnet", - "required": false, - "groupName": "advanced", - "helpMarkDown": "Specify where .Net Core SDK/Runtime should be installed. Different paths can have the following impact on .Net's behavior.
  • $(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.
  • $(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.
  • 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.
    Note that you can also configure Multi-Level Lookup setting which can configure .Net host's probing for a suitable version." - }, - { - "name": "performMultiLevelLookup", - "type": "boolean", - "label": "Perform Multi Level Lookup", - "groupName": "advanced", - "defaultValue": false, - "required": false, - "helpMarkDown": "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:
    C:\\Program Files\\dotnet (64-bit processes)
    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).
    " - } - ], - "execution": { - "Node10": { - "target": "usedotnet.js" - } + { + "name": "vsVersion", + "type": "string", + "label": "Compatible Visual Studio version", + "defaultValue": "", + "required": false, + "groupName": "advanced", + "helpMarkDown": "Specify version of compatible visual studio for which .NET core sdk to install. Specifiy complete vs-version like 16.6.4 containing major version, minor version and patch number.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://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json)" }, - "messages": { - "ToolFailed": "Tool install failed: %s", - "ImplicitVersionNotSupported": "Version should be a valid and explicit version: %s", - "getMachinePlatformFailed": "Failed to get machine platform details. Error: %s.", - "getDownloadUrlsFailed": "Failed to get download URLS. Error: %s.", - "UsingCachedTool": "Cached copy of .NET Core exists. No need to install afresh. Cached tool location: %s.", - "CheckingToolCache": "Checking if a cached copy exists for this version...", - "InstallingAfresh": "The cache does not contain the requested version of .NET Core. Downloading and installing it now.", - "GettingDownloadUrl": "Getting URL to download .NET Core %s version: %s.", - "CouldNotDetectPlatform": "Could not detect the machine's OS", - "NullDownloadUrls": "Could not construct download URL. Please ensure that specified version %s is valid.", - "DownloadingUrl": "Downloading .NET Core package from URL: %s", - "ExtractingPackage": "Extracting downloaded package %s.", - "CachingTool": "Caching this installed tool.", - "SuccessfullyInstalled": "Successfully installed .NET Core %s version %s.", - "ToolToInstall": "Tool to install: .NET Core %s version %s.", - "PrimaryPlatform": "Detected platform (Primary): %s", - "LegacyPlatform": "Detected platform (Legacy): %s", - "CouldNotDownload": "Could not download installation package from this URL: %s Error: %s", - "FailedToDownloadPackage": "Failed to download package for installation", - "PrependGlobalToolPath": "Creating global tool path and pre-pending to PATH.", - "VersionsFileMalformed": "The specified version's download links are not correctly formed in the supported versions document => %s/", - "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.", - "UnableToAccessPath": "Unable to access path: %s. Error: %s. Please make sure that agent process has access to the path.", - "VersionCanNotBeDownloadedFromUrl": "Version: %s cannot be downloaded from URL: %s. Either the URL or version is incorrect.", - "CopyingFoldersIntoPath": "Copying all root folders into installation path: %s", - "CopyingFilesIntoPath": "Copying root files (such as dotnet.exe) into installation path: %s", - "FailedToCopyTopLevelFiles": "Failed to copy root files into installation path: %s. Error: %s", - "FailedWhileInstallingVersionAtPath": "Failed while installing version: %s at path: %s with error: %s", - "ExplicitVersionRequired": "Version: %s is not allowed. Versions to be installed should be of format: major.minor.patchversion. For example: 2.2.1", - "VersionFoundInCache": "Version: %s was found in cache.", - "VersionNotFoundInCache": "Version %s was not found in cache.", - "CreatingInstallationCompeleteFile": "Creating installation complete marker file for .Net core %s version %s", - "CannotFindRuntimeVersionForCompletingInstallation": "Cannot find runtime version for package type: %s with version: %s", - "PathNotFoundException": "Path: %s could not be located/found. Make sure the path exists.", - "VersionIsLocalLatest": "Version: %s is the latest among the versions present at path: %s", - "VersionIsNotLocalLatest": "Version: %s is not the latest among the versions present at %s", - "DownloadUrlForMatchingOsNotFound": "Download URL for .Net Core %s version %s could not be found for the following OS platforms (rid): %s", - "ExceptionWhileDownloadOrReadReleasesIndex": "Failed to download or parse releases-index.json with error: %s", - "MatchingVersionForUserInputVersion": "Found version %s in channel %s for user specified version spec: %s", - "UrlForReleaseChannelNotFound": "Could not find URL for releases.json of channel version: %s", - "NoSuitableChannelWereFound": "Channel corresponding to version %s could not be found.", - "DetectingPlatform": "Detecting OS platform to find correct download package for the OS.", - "FailedInDetectingMachineArch": "Failed while detecting machine OS platform with error: %s", - "runtimeVersionPropertyNotFound": "runtime-version property could not be found for .Net Core %s version %s.", - "VersionNotFound": "%s version matching: %s could not be found", - "VersionNotAllowed": "Version %s is not allowed. Allowed version types are: majorVersion.x, majorVersion.minorVersion.x, majorVersion.minorVersion.patchVersion. More details: %s", - "VersionsCanNotBeCompared": "Versions %s and %s cannot be compared. Both versions should be explicit.", - "FileNameNotCorrectCompleteFileName": "File name %s is not a correct '.complete' file.", - "ChannelVersionsNotComparable": "Channel versions %s and %s can not be compared. They both must have numeric major and minor versions.", - "LookingForVersionInChannel": "Searching for version in channel %s", - "FallingBackToAdjacentChannels": "Version %s could not be found in its channel, will now search in adjacent channels.", - "ErrorWhileSettingDotNetToolPath": "Failed while prepending .Net Core Tool path to PATH envrionment variable. Error: %s", - "RequiredChannelVersionForSpec": "Finding channel %s for version %s", - "ErrorWhileGettingVersionFromChannel": "Failed while getting version %s from channel %s with error: %s", - "ComparingInstalledFolderVersions": "Comparing if version being installed %s is greater than already installed version with folder name %s", - "ComparingInstalledFileVersions": "Comparing if version being installed %s is greater than already installed version with version complete file name %s", - "InvalidChannelObject": "Object cannot be used as Channel, required properties such as channel-version, releases.json is missing.", - "ReleasesIndexBodyIncorrect": "Parsed releases index body is not correct. Kindly see if the releases-index section is not empty in the file.", - "InvalidVersionObject": "Releases.json has a release with invalid %s object: %s", - "InvalidVersion": "Invalid version specified %s", - "FilesDataIsIncorrectInVersion": "In release %s for version %s, File data is incorrect (might have missing required fields, such as name, rid and url): %s", - "VersionFilesDataIncorrect": "Version's files data is missing or has missing required fields.", - "VersionInformationNotComplete": "Version: %s required information is not complete in releases.json file. Error: %s", - "FailedWhileExtractingPacakge": "Failed while extracting downloaded package with error: %s", - "InstallingNuGetVersion": "Installing NuGet version %s", - "FailureWhileInstallingNuGetVersion": "Failed while installing NuGet version. Error: %s", - "SettingUpNugetProxySettings": "Setting up proxy configuration for NuGet.", - "GlobalJsonFound": "Found a global.json at path: %s", - "GlobalJsonSdkVersion": "SDK version: %s is specified by global.json at path: %s", - "GlobalJsonIsEmpty": "global.json at path: %s is empty. No version is specified.", - "FailedToFindGlobalJson": "Failed to find global.json at and inside path: %s", - "FailedToReadGlobalJson": "The global.json at path: '%s' has the wrong format. For information about global.json, visit here: https://docs.microsoft.com/en-us/dotnet/core/tools/global-json. Error while trying to read: %s", - "VersionNumberHasTheWrongFormat": "The version number: %s doesn't have the correct format. Versions can be given in the following formats: 2.x => Install latest in major version. 2.2.x => Install latest in major and minor version. 2.2.104 => Install exact version. 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://dotnetcli.blob.core.windows.net/dotnet/release-metadata/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", - "OnlyExplicitVersionAllowed": "Only explicit versions and accepted, such as: 2.2.301. Version: %s is not valid.", - "SupportPhaseNotPresentInChannel": "support-phase is not present in the channel with channel-version %s.", - "DepricatedVersionNetCore": "NET Core version you specfied %s is out of support and will be removed from hosted agents soon. Please refer to https://aka.ms/dotnet-core-support for more information about the .NET support policy." + { + "name": "includePreviewVersions", + "type": "boolean", + "label": "Include Preview Versions", + "defaultValue": "false", + "required": false, + "helpMarkDown": "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", + "visibleRule": "useGlobalJson = false || packageType = runtime" + }, + { + "name": "installationPath", + "type": "string", + "label": "Path To Install .Net Core", + "defaultValue": "$(Agent.ToolsDirectory)/dotnet", + "required": false, + "groupName": "advanced", + "helpMarkDown": "Specify where .Net Core SDK/Runtime should be installed. Different paths can have the following impact on .Net's behavior.
  • $(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.
  • $(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.
  • 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.
    Note that you can also configure Multi-Level Lookup setting which can configure .Net host's probing for a suitable version." + }, + { + "name": "performMultiLevelLookup", + "type": "boolean", + "label": "Perform Multi Level Lookup", + "groupName": "advanced", + "defaultValue": false, + "required": false, + "helpMarkDown": "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:
    C:\\Program Files\\dotnet (64-bit processes)
    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).
    " + } + ], + "execution": { + "Node10": { + "target": "usedotnet.js" } -} + }, + "messages": { + "ToolFailed": "Tool install failed: %s", + "ImplicitVersionNotSupported": "Version should be a valid and explicit version: %s", + "getMachinePlatformFailed": "Failed to get machine platform details. Error: %s.", + "getDownloadUrlsFailed": "Failed to get download URLS. Error: %s.", + "UsingCachedTool": "Cached copy of .NET Core exists. No need to install afresh. Cached tool location: %s.", + "CheckingToolCache": "Checking if a cached copy exists for this version...", + "InstallingAfresh": "The cache does not contain the requested version of .NET Core. Downloading and installing it now.", + "GettingDownloadUrl": "Getting URL to download .NET Core %s version: %s.", + "CouldNotDetectPlatform": "Could not detect the machine's OS", + "NullDownloadUrls": "Could not construct download URL. Please ensure that specified version %s is valid.", + "DownloadingUrl": "Downloading .NET Core package from URL: %s", + "ExtractingPackage": "Extracting downloaded package %s.", + "CachingTool": "Caching this installed tool.", + "SuccessfullyInstalled": "Successfully installed .NET Core %s version %s.", + "ToolToInstall": "Tool to install: .NET Core %s version %s.", + "PrimaryPlatform": "Detected platform (Primary): %s", + "LegacyPlatform": "Detected platform (Legacy): %s", + "CouldNotDownload": "Could not download installation package from this URL: %s Error: %s", + "FailedToDownloadPackage": "Failed to download package for installation", + "PrependGlobalToolPath": "Creating global tool path and pre-pending to PATH.", + "VersionsFileMalformed": "The specified version's download links are not correctly formed in the supported versions document => %s/", + "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.", + "UnableToAccessPath": "Unable to access path: %s. Error: %s. Please make sure that agent process has access to the path.", + "VersionCanNotBeDownloadedFromUrl": "Version: %s cannot be downloaded from URL: %s. Either the URL or version is incorrect.", + "CopyingFoldersIntoPath": "Copying all root folders into installation path: %s", + "CopyingFilesIntoPath": "Copying root files (such as dotnet.exe) into installation path: %s", + "FailedToCopyTopLevelFiles": "Failed to copy root files into installation path: %s. Error: %s", + "FailedWhileInstallingVersionAtPath": "Failed while installing version: %s at path: %s with error: %s", + "ExplicitVersionRequired": "Version: %s is not allowed. Versions to be installed should be of format: major.minor.patchversion. For example: 2.2.1", + "VersionFoundInCache": "Version: %s was found in cache.", + "VersionNotFoundInCache": "Version %s was not found in cache.", + "CreatingInstallationCompeleteFile": "Creating installation complete marker file for .Net core %s version %s", + "CannotFindRuntimeVersionForCompletingInstallation": "Cannot find runtime version for package type: %s with version: %s", + "PathNotFoundException": "Path: %s could not be located/found. Make sure the path exists.", + "VersionIsLocalLatest": "Version: %s is the latest among the versions present at path: %s", + "VersionIsNotLocalLatest": "Version: %s is not the latest among the versions present at %s", + "DownloadUrlForMatchingOsNotFound": "Download URL for .Net Core %s version %s could not be found for the following OS platforms (rid): %s", + "ExceptionWhileDownloadOrReadReleasesIndex": "Failed to download or parse releases-index.json with error: %s", + "MatchingVersionForUserInputVersion": "Found version %s in channel %s for user specified version spec: %s", + "UrlForReleaseChannelNotFound": "Could not find URL for releases.json of channel version: %s", + "NoSuitableChannelWereFound": "Channel corresponding to version %s could not be found.", + "DetectingPlatform": "Detecting OS platform to find correct download package for the OS.", + "FailedInDetectingMachineArch": "Failed while detecting machine OS platform with error: %s", + "runtimeVersionPropertyNotFound": "runtime-version property could not be found for .Net Core %s version %s.", + "VersionNotFound": "%s version matching: %s could not be found", + "VersionNotAllowed": "Version %s is not allowed. Allowed version types are: majorVersion.x, majorVersion.minorVersion.x, majorVersion.minorVersion.patchVersion. More details: %s", + "VersionsCanNotBeCompared": "Versions %s and %s cannot be compared. Both versions should be explicit.", + "FileNameNotCorrectCompleteFileName": "File name %s is not a correct '.complete' file.", + "ChannelVersionsNotComparable": "Channel versions %s and %s can not be compared. They both must have numeric major and minor versions.", + "LookingForVersionInChannel": "Searching for version in channel %s", + "FallingBackToAdjacentChannels": "Version %s could not be found in its channel, will now search in adjacent channels.", + "ErrorWhileSettingDotNetToolPath": "Failed while prepending .Net Core Tool path to PATH envrionment variable. Error: %s", + "RequiredChannelVersionForSpec": "Finding channel %s for version %s", + "ErrorWhileGettingVersionFromChannel": "Failed while getting version %s from channel %s with error: %s", + "ComparingInstalledFolderVersions": "Comparing if version being installed %s is greater than already installed version with folder name %s", + "ComparingInstalledFileVersions": "Comparing if version being installed %s is greater than already installed version with version complete file name %s", + "InvalidChannelObject": "Object cannot be used as Channel, required properties such as channel-version, releases.json is missing.", + "ReleasesIndexBodyIncorrect": "Parsed releases index body is not correct. Kindly see if the releases-index section is not empty in the file.", + "InvalidVersionObject": "Releases.json has a release with invalid %s object: %s", + "InvalidVersion": "Invalid version specified %s", + "FilesDataIsIncorrectInVersion": "In release %s for version %s, File data is incorrect (might have missing required fields, such as name, rid and url): %s", + "VersionFilesDataIncorrect": "Version's files data is missing or has missing required fields.", + "VersionInformationNotComplete": "Version: %s required information is not complete in releases.json file. Error: %s", + "FailedWhileExtractingPacakge": "Failed while extracting downloaded package with error: %s", + "InstallingNuGetVersion": "Installing NuGet version %s", + "FailureWhileInstallingNuGetVersion": "Failed while installing NuGet version. Error: %s", + "SettingUpNugetProxySettings": "Setting up proxy configuration for NuGet.", + "GlobalJsonFound": "Found a global.json at path: %s", + "GlobalJsonSdkVersion": "SDK version: %s is specified by global.json at path: %s", + "GlobalJsonIsEmpty": "global.json at path: %s is empty. No version is specified.", + "FailedToFindGlobalJson": "Failed to find global.json at and inside path: %s", + "FailedToReadGlobalJson": "The global.json at path: '%s' has the wrong format. For information about global.json, visit here: https://docs.microsoft.com/en-us/dotnet/core/tools/global-json. Error while trying to read: %s", + "VersionNumberHasTheWrongFormat": "The version number: %s doesn't have the correct format. Versions can be given in the following formats: 2.x => Install latest in major version. 2.2.x => Install latest in major and minor version. 2.2.104 => Install exact version. 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://dotnetcli.blob.core.windows.net/dotnet/release-metadata/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", + "OnlyExplicitVersionAllowed": "Only explicit versions and accepted, such as: 2.2.301. Version: %s is not valid.", + "SupportPhaseNotPresentInChannel": "support-phase is not present in the channel with channel-version %s.", + "DepricatedVersionNetCore": "NET Core version you specfied %s is out of support and will be removed from hosted agents soon. Please refer to https://aka.ms/dotnet-core-support for more information about the .NET support policy." + } +} \ No newline at end of file diff --git a/Tasks/UseDotNetV2/task.loc.json b/Tasks/UseDotNetV2/task.loc.json index a7035dbfa192..6111e04ae2b9 100644 --- a/Tasks/UseDotNetV2/task.loc.json +++ b/Tasks/UseDotNetV2/task.loc.json @@ -13,8 +13,8 @@ "author": "Microsoft Corporation", "version": { "Major": 2, - "Minor": 222, - "Patch": 0 + "Minor": 226, + "Patch": 1 }, "satisfies": [ "DotNetCore" diff --git a/Tasks/UseDotNetV2/usedotnet.ts b/Tasks/UseDotNetV2/usedotnet.ts index 835371f63d31..32b12e21fa7a 100644 --- a/Tasks/UseDotNetV2/usedotnet.ts +++ b/Tasks/UseDotNetV2/usedotnet.ts @@ -8,7 +8,6 @@ import { VersionInstaller } from "./versioninstaller"; import { Constants } from "./versionutilities"; import { VersionInfo, VersionParts } from "./models" import { NuGetInstaller } from "./nugetinstaller"; -import { error } from 'util'; function checkVersionForDeprecationAndNotify(versionSpec: string | null): void { @@ -96,7 +95,7 @@ async function installDotNet( checkVersionForDeprecationAndNotify(versionSpec); } } else { - throw new error("Hey developer you have called the method `installDotNet` without a `versionSpec` or without `useGlobalJson`. that is impossible."); + throw new Error("Hey developer you have called the method `installDotNet` without a `versionSpec` or without `useGlobalJson`. that is impossible."); } } diff --git a/_generated/UseDotNetV2.versionmap.txt b/_generated/UseDotNetV2.versionmap.txt new file mode 100644 index 000000000000..ca07d3f67a43 --- /dev/null +++ b/_generated/UseDotNetV2.versionmap.txt @@ -0,0 +1,2 @@ +Default|2.226.1 +Node16-225|2.226.0 diff --git a/_generated/UseDotNetV2/README.md b/_generated/UseDotNetV2/README.md new file mode 100644 index 000000000000..9da172ab0504 --- /dev/null +++ b/_generated/UseDotNetV2/README.md @@ -0,0 +1,56 @@ +# 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.9.6 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. + +* **Use global json**: This checkbox indicates that all versions from all `global.json` files will be used to install the sdk versions. You can set the search root path with `Working Directory`. + +* **Working Directory**: This path can only be set if the option `Use global json` is selected. Specify path from where global.json files should be searched when using `Use global json`. If empty, `system.DefaultWorkingDirectory` will be considered as the root path. + +* **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
    For getting more details about exact version, refer [this link](https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json). + +* **Compatible Visual Studio Version**: Specify a compatible Visual Studio version. If a version is specified, then only those versions of .Net Core SDK/runtime will be considered for installation which are compatible with this Visual Studio version. Specify complete Visual Studio version containing major version, minor version and patch number. e.g. 16.6.4. Compatibility of Visual Studio is checked by looking at vs-version property specified in the release manifest from the releases.json files. The link to releases.json of that major.minor version can be found in [**releases-index file.**](https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/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**: +
    C:\\Program Files\\dotnet (64-bit processes) +
    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).
    diff --git a/_generated/UseDotNetV2/Strings/resources.resjson/de-DE/resources.resjson b/_generated/UseDotNetV2/Strings/resources.resjson/de-DE/resources.resjson new file mode 100644 index 000000000000..f27d4d1a8806 --- /dev/null +++ b/_generated/UseDotNetV2/Strings/resources.resjson/de-DE/resources.resjson @@ -0,0 +1,100 @@ +{ + "loc.friendlyName": ".NET Core verwenden", + "loc.helpMarkDown": "[Weitere Informationen zu dieser Aufgabe](https://aka.ms/AA4xgy0)", + "loc.description": "Ruft eine bestimmte Version für das .NET Core SDK aus dem Internet oder dem lokalen Cache ab und fügt sie PATH hinzu. Verwenden Sie diese Aufgabe, um die in nachfolgenden Aufgaben verwendete .NET Core-Version zu ändern. Bietet zusätzlich Proxyunterstützung.", + "loc.instanceNameFormat": "Verwenden Sie .NET Core $(packageType) $(version).", + "loc.releaseNotes": "
  • Unterstützung für die parallele Installation mehrerer Versionen
  • Unterstützung für Versionsmuster, um die neueste Nebenversion/Hauptversion abzurufen
  • Einschränkung der Suche auf mehreren Ebenen
  • Installation von NuGet und Bereitstellung von Proxyunterstützung
  • Installation von SDK-Versionen aus global.json-Dateien
  • ", + "loc.group.displayName.advanced": "Erweitert", + "loc.input.label.packageType": "Zu installierendes Paket", + "loc.input.help.packageType": "Wählen Sie aus, ob nur die Runtime oder das SDK installiert werden soll.", + "loc.input.label.useGlobalJson": "\"global.json\" verwenden", + "loc.input.help.useGlobalJson": "Wählen Sie diese Option aus, um alle SDKs aus global.json-Dateien zu installieren. Diese Dateien werden in \"system.DefaultWorkingDirectory\" gesucht. Sie können den Stammpfad für die Suche ändern, indem Sie die Arbeitsverzeichniseingabe festlegen.", + "loc.input.label.workingDirectory": "Arbeitsverzeichnis", + "loc.input.help.workingDirectory": "Geben Sie den Pfad an, von dem aus nach global.json-Dateien gesucht werden soll, wenn \"global.json verwenden\" verwendet wird. Wird dieser Wert leer gelassen, wird \"system.DefaultWorkingDirectory\" als Stammpfad angenommen.", + "loc.input.label.version": "Version", + "loc.input.help.version": "Geben Sie die Version von .NET Core SDK oder Runtime an, die installiert werden soll.
    Versionen können in den folgenden Formaten angegeben werden:
  • 2.x: Installation der aktuellen Hauptversion
  • 2.2.x: Installation der aktuellen Haupt- und Nebenversion
  • 2.2.104: Installation der genauen Version

  • Suchen Sie in der Datei \"releases.json\" nach dem Wert \"version\" zur Installation von SDK/Runtime. Den Link zu \"releases.json\" dieser Hauptversion.Nebenversion finden Sie in der [**releases-index-Datei**](https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json). Der Link zu \"releases.json\" für Version 2.2 version lautet https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/2.2/releases.json.", + "loc.input.label.vsVersion": "Kompatible Visual Studio-Version", + "loc.input.help.vsVersion": "Geben Sie eine kompatible Version von Visual Studio an, für die das .NET Core SDK installiert werden soll. Die Angabe muss die vollständige VS-Version mit Hauptversion, Nebenversion und Patchnummer enthalten, z. B. \"16.6.4\". Suchen Sie in der Datei \"releases.json\" nach dem Wert von \"version\" für die Installation von SDK/Runtime. Den Link zu \"releases.json\" für die jeweilige \"Hauptversion.Nebenversion\" finden Sie in der [**Datei \"releases-index\"**](https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json).", + "loc.input.label.includePreviewVersions": "Vorschauversionen einschließen", + "loc.input.help.includePreviewVersions": "Wählen Sie aus, ob die Vorschauversionen bei der Suche nach aktuellen Versionen einbezogen werden sollen, etwa bei der Suche nach Version 2.2.x. Diese Einstellung wird ignoriert, wenn Sie eine genaue Version angeben, z. B. 3.0.100-preview3-010431.", + "loc.input.label.installationPath": "Pfad zur Installation von .NET Core", + "loc.input.help.installationPath": "Geben Sie an, wo das .NET Core SDK/die Runtime installiert werden soll. Verschiedene Pfade können sich folgendermaßen auf das .NET-Verhalten auswirken.
  • $(Agent.ToolsDirectory): Hiermit wird die Version auf dem Agent zwischengespeichert, weil dieses Verzeichnis nicht pipelineübergreifend bereinigt wird. Alle auf dem Agent ausgeführten Pipelines würden Zugriff auf die Versionen erhalten, die zuvor über den Agent installiert wurden.
  • $(Agent.TempDirectory): Auf diese Weise kann sichergestellt werden, dass eine Pipeline keine zwischengespeicherte Version von .NET Core verwendet, weil dieser Ordner nach jeder Pipeline bereinigt wird.
  • Jeder andere Pfad: Sie können einen beliebigen anderen Pfad konfigurieren, solange der Agentprozess Zugriff auf den Pfad besitzt. Dies ändert den Status des Computers und wirkt sich auf alle darauf ausgeführten Prozesse aus.
    Beachten Sie, dass Sie auch die Einstellung zur Suche auf mehreren Ebenen konfigurieren können, um die Suche des .NET-Hosts nach einer geeigneten Version zu konfigurieren.", + "loc.input.label.performMultiLevelLookup": "Suche auf mehreren Ebenen ausführen", + "loc.input.help.performMultiLevelLookup": "Diese Eingabe gilt nur für Windows-basierte Agents. Hiermit wird das Verhalten des .NET-Hostprozesses für die Suche nach einem geeigneten freigegebenen Framework konfiguriert.
  • Deaktiviert: Der Hostprozess sucht nur Versionen, die in dem in dieser Aufgabe angegebenen Ordner vorhanden sind.
  • Aktiviert: Der Host versucht, über eine Suche auf mehreren Ebenen in vordefinierten globalen Speicherorten zu suchen.
    Die globalen Standardspeicherorte lauten:
    Für Windows:
    C:\\Programme\\dotnet (64-Bit-Prozess)
    C:\\Programme (x86)\\dotnet (32-Bit-Prozess)
  • Weitere Informationen finden Sie [**HIER**](https://github.com/dotnet/core-setup/blob/master/Documentation/design-docs/multilevel-sharedfx-lookup.md).
    ", + "loc.messages.ToolFailed": "Fehler bei der Toolinstallation: %s", + "loc.messages.ImplicitVersionNotSupported": "Die Version muss eine gültige und bestimmte Version sein: %s.", + "loc.messages.getMachinePlatformFailed": "Fehler beim Abrufen der Details zur Computerplattform. Fehler: %s.", + "loc.messages.getDownloadUrlsFailed": "Fehler beim Abrufen der Download-URLs. Fehler: %s.", + "loc.messages.UsingCachedTool": "Es ist eine zwischengespeicherte Kopie von .NET Core vorhanden. Eine Neuinstallation ist nicht erforderlich. Speicherort des zwischengespeicherten Tools: %s.", + "loc.messages.CheckingToolCache": "Es wird überprüft, ob eine zwischengespeicherte Kopie für diese Version vorhanden ist...", + "loc.messages.InstallingAfresh": "Der Cache enthält nicht die angeforderte Version von .NET Core. Laden Sie die Version jetzt herunter, und installieren Sie sie.", + "loc.messages.GettingDownloadUrl": "URL zum Herunterladen von .NET Core %s, Version %s wird abgerufen.", + "loc.messages.CouldNotDetectPlatform": "Das Betriebssystem des Computers konnte nicht ermittelt werden.", + "loc.messages.NullDownloadUrls": "Die Download-URL konnte nicht erstellt werden. Stellen Sie sicher, dass die angegebene Version %s gültig ist.", + "loc.messages.DownloadingUrl": ".NET Core-Paket wird von URL %s heruntergeladen.", + "loc.messages.ExtractingPackage": "Das heruntergeladene Paket %s wird extrahiert.", + "loc.messages.CachingTool": "Dieses installierte Tool wird zwischengespeichert.", + "loc.messages.SuccessfullyInstalled": ".NET Core %s Version %s wurde erfolgreich installiert.", + "loc.messages.ToolToInstall": "Zu installierendes Tool: .NET Core %s Version %s.", + "loc.messages.PrimaryPlatform": "Erkannte Plattform (primär): %s", + "loc.messages.LegacyPlatform": "Erkannte Plattform (Legacy): %s", + "loc.messages.CouldNotDownload": "Das Installationspaket konnte nicht von dieser URL heruntergeladen werden: %s. Fehler: %s", + "loc.messages.FailedToDownloadPackage": "Fehler beim Herunterladen des Pakets für die Installation.", + "loc.messages.PrependGlobalToolPath": "Der globale Toolpfad wird erstellt und PATH vorangestellt.", + "loc.messages.VersionsFileMalformed": "Die Downloadlinks der angegebenen Version sind im Dokument mit unterstützten Versionen nicht ordnungsgemäß formatiert: => %s/", + "loc.messages.MatchingVersionNotFound": "Für die angegebene Version wurde keine übereinstimmende %s-Version gefunden: %s. Beachten Sie, dass die Vorschauversionen nur in den letzten Versionssuchen berücksichtigt werden, wenn das Kontrollkästchen \"Vorschauversionen einschließen\" aktiviert ist.", + "loc.messages.UnableToAccessPath": "Auf den Pfad kann nicht zugegriffen werden: %s. Fehler: %s. Stellen Sie sicher, dass der Agentprozess Zugriff auf den Pfad besitzt.", + "loc.messages.VersionCanNotBeDownloadedFromUrl": "Version %s kann nicht über die URL %s heruntergeladen werden. Entweder ist die URL oder die Version falsch.", + "loc.messages.CopyingFoldersIntoPath": "Alle Stammordner werden in den Installationspfad kopiert: %s", + "loc.messages.CopyingFilesIntoPath": "Stammdateien (z. B. \"dotnet.exe\") werden in den Installationspfad kopiert: %s", + "loc.messages.FailedToCopyTopLevelFiles": "Fehler beim Kopieren der Stammdateien in den Installationspfad: %s. Fehler: %s", + "loc.messages.FailedWhileInstallingVersionAtPath": "Fehler beim Installieren der Version %s in Pfad \"%s\". Fehler: %s", + "loc.messages.ExplicitVersionRequired": "Version %s ist nicht zulässig. Die zu installierenden Versionen müssen das folgende Format aufweisen: Hauptversion.Nebenversion.Patchversion. Beispiel: 2.2.1", + "loc.messages.VersionFoundInCache": "Version %s wurde im Cache gefunden.", + "loc.messages.VersionNotFoundInCache": "Die Version %s wurde nicht im Cache gefunden.", + "loc.messages.CreatingInstallationCompeleteFile": "Die Markerdatei für \"Installation abgeschlossen\" von .NET Core %s, Version %s, wird erstellt.", + "loc.messages.CannotFindRuntimeVersionForCompletingInstallation": "Die Runtimeversion für den Pakettyp \"%s\" mit Version %s wurde nicht gefunden.", + "loc.messages.PathNotFoundException": "Der Pfad \"%s\" wurde nicht gefunden. Stellen Sie sicher, dass der Pfad vorhanden ist.", + "loc.messages.VersionIsLocalLatest": "Version %s ist die neueste Version, die im Pfad \"%s\" vorhanden ist.", + "loc.messages.VersionIsNotLocalLatest": "Version %s ist nicht die neueste Version, die unter \"%s\" vorhanden ist.", + "loc.messages.DownloadUrlForMatchingOsNotFound": "Die Download-URL für .NET Core %s, Version %s wurde für die folgenden Betriebssystemplattformen (RID) nicht gefunden: %s", + "loc.messages.ExceptionWhileDownloadOrReadReleasesIndex": "Fehler beim Herunterladen oder Analysieren von \"release-index.json\" mit folgendem Fehler: %s", + "loc.messages.MatchingVersionForUserInputVersion": "Version %s in Kanal \"%s\" für benutzerseitig angegebene Versionsspezifikation gefunden: %s", + "loc.messages.UrlForReleaseChannelNotFound": "Die URL für \"releases.json\" der Kanalversion %s wurde nicht gefunden.", + "loc.messages.NoSuitableChannelWereFound": "Der zugehörige Kanal zu Version %s wurde nicht gefunden.", + "loc.messages.DetectingPlatform": "Die Betriebssystemplattform wird ermittelt, um das richtige Downloadpaket für das Betriebssystem zu finden.", + "loc.messages.FailedInDetectingMachineArch": "Fehler beim Ermitteln der Betriebssystemplattform für den Computer. Fehler: %s", + "loc.messages.runtimeVersionPropertyNotFound": "Die runtime-version-Eigenschaft für .NET Core %s, Version %s wurde nicht gefunden.", + "loc.messages.VersionNotFound": "%s-Versionsabgleich: \"%s\" wurde nicht gefunden.", + "loc.messages.VersionNotAllowed": "Die Version %s ist nicht zulässig. Zulässige Versionstypen: Hauptversion.x, Hauptversion.Nebenversion.x, Hauptversion.Nebenversion.Patchversion. Weitere Informationen: %s", + "loc.messages.VersionsCanNotBeCompared": "Die Versionen %s und %s können nicht verglichen werden. Es muss sich in beiden Fällen um explizite Versionen handeln.", + "loc.messages.FileNameNotCorrectCompleteFileName": "Der Dateiname \"%s\" entspricht keiner gültigen COMPLETE-Datei.", + "loc.messages.ChannelVersionsNotComparable": "Die Kanalversionen %s und %s können nicht verglichen werden. Beide müssen Haupt- und Nebenversionen enthalten.", + "loc.messages.LookingForVersionInChannel": "Die Version wird im Kanal \"%s\" gesucht.", + "loc.messages.FallingBackToAdjacentChannels": "Die Version %s wurde nicht im Kanal gefunden. Es wird in benachbarten Kanälen gesucht.", + "loc.messages.ErrorWhileSettingDotNetToolPath": "Fehler beim Voranstellen der .NET Core-Toolpfads an die PATH-Umgebungsvariable. Fehler: %s", + "loc.messages.RequiredChannelVersionForSpec": "Der Kanal \"%s\" für Version %s wird gesucht.", + "loc.messages.ErrorWhileGettingVersionFromChannel": "Fehler beim Abrufen der Version %s aus Kanal \"%s\". Fehler: %s", + "loc.messages.ComparingInstalledFolderVersions": "Es wird verglichen, ob die zu installierende Version %s höher ist als die bereits installierte Version mit dem Ordnernamen \"%s\".", + "loc.messages.ComparingInstalledFileVersions": "Es wird verglichen, ob die zu installierende Version %s höher ist als die bereits installierte Version mit version.complete-Datei \"%s\".", + "loc.messages.InvalidChannelObject": "Das Objekt kann nicht als Kanal verwendet werden, erforderliche Eigenschaften wie z. B. die Kanalversion und \"releases.json\" fehlen.", + "loc.messages.ReleasesIndexBodyIncorrect": "Der analysierte Indextext für das Release ist nicht korrekt. Stellen Sie sicher, dass der Abschnitt \"releases-index\" in der Datei nicht leer ist.", + "loc.messages.InvalidVersionObject": "\"releases.json\" weist ein Release mit ungültigem %s-Objekt auf: %s", + "loc.messages.InvalidVersion": "Ungültige Version angegeben: %s", + "loc.messages.FilesDataIsIncorrectInVersion": "In Release %s für Version %s sind die Dateidaten falsch (möglicherweise fehlen erforderliche Felder wie Name, RID und URL): %s", + "loc.messages.VersionFilesDataIncorrect": "Die Dateidaten der Version fehlen, oder es fehlen erforderliche Felder.", + "loc.messages.VersionInformationNotComplete": "Für Version %s erforderliche Informationen sind in der Datei \"releases.json\" nicht vollständig. Fehler: %s", + "loc.messages.FailedWhileExtractingPacakge": "Fehler beim Extrahieren des heruntergeladenen Pakets. Fehler: %s", + "loc.messages.InstallingNuGetVersion": "NuGet-Version %s wird installiert.", + "loc.messages.FailureWhileInstallingNuGetVersion": "Fehler beim Installieren der NuGet-Version. Fehler: %s", + "loc.messages.SettingUpNugetProxySettings": "Die Proxykonfiguration für NuGet wird eingerichtet.", + "loc.messages.GlobalJsonFound": "\"global.json\" im folgenden Pfad gefunden: %s", + "loc.messages.GlobalJsonSdkVersion": "SDK-Version %s wird durch \"global.json\" im Pfad \"%s\" angegeben.", + "loc.messages.GlobalJsonIsEmpty": "Die Datei \"global.json\" im Pfad \"%s\" ist leer. Es wurde keine Version angegeben.", + "loc.messages.FailedToFindGlobalJson": "Fehler bei der Suche nach \"global.json\" im folgenden Pfad: %s", + "loc.messages.FailedToReadGlobalJson": "Die Datei \"global.json\" im Pfad \"%s\" weist das falsche Format auf. Informationen zu \"global.json\" finden Sie hier: https://docs.microsoft.com/de-de/dotnet/core/tools/global-json. Fehler beim Lesen: %s", + "loc.messages.VersionNumberHasTheWrongFormat": "Die Versionsnummer %s weist nicht das korrekte Format auf. Versionen können in den folgenden Formaten angegeben werden: 2.x: Installation der aktuellen Hauptversion. 2.2.x: Installation der aktuellen Haupt- und Nebenversion. 2.2.104: Installation der genauen Version. Suchen Sie in der Datei \"releases.json\" nach dem Wert \"version\" zur Installation von SDK/Runtime. Den Link zu \"releases.json\" dieser Hauptversion.Nebenversion finden Sie in der [**releases-index-Datei**](https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json). Der Link zu \"releases.json\" für Version 2.2 version lautet https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/2.2/releases.json.", + "loc.messages.OnlyExplicitVersionAllowed": "Es werden nur explizite Versionen akzeptiert, z. B. 2.2.301. Version %s ist ungültig.", + "loc.messages.SupportPhaseNotPresentInChannel": "Die Supportphase ist im Kanal mit Kanalversion %s nicht vorhanden.", + "loc.messages.DepricatedVersionNetCore": "Die von Ihnen angegebene NET Core-Version %s wird nicht mehr unterstützt und in Kürze von gehosteten Agents entfernt. Weitere Informationen zur .NET-Supportrichtlinie finden Sie unter https://aka.ms/dotnet-core-support." +} \ No newline at end of file diff --git a/_generated/UseDotNetV2/Strings/resources.resjson/en-US/resources.resjson b/_generated/UseDotNetV2/Strings/resources.resjson/en-US/resources.resjson new file mode 100644 index 000000000000..cb0a286383d3 --- /dev/null +++ b/_generated/UseDotNetV2/Strings/resources.resjson/en-US/resources.resjson @@ -0,0 +1,100 @@ +{ + "loc.friendlyName": "Use .NET Core", + "loc.helpMarkDown": "[Learn more about this task](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 .NET Core $(packageType) $(version)", + "loc.releaseNotes": "
  • Support for installing multiple versions side by side.
  • Support for patterns in version to fetch latest in minor/major version.
  • Restrict Multi-level lookup
  • Installs NuGet and provides proxy support.
  • Installs sdk versions from `global.json` file(s)
  • ", + "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.useGlobalJson": "Use global json", + "loc.input.help.useGlobalJson": "Select this option to install all SDKs from global.json files. These files are searched from system.DefaultWorkingDirectory. You can change the search root path by setting working directory input.", + "loc.input.label.workingDirectory": "Working Directory", + "loc.input.help.workingDirectory": "Specify path from where global.json files should be searched when using `Use global json`. If empty, `system.DefaultWorkingDirectory` will be considered as the root path.", + "loc.input.label.version": "Version", + "loc.input.help.version": "Specify version of .NET Core SDK or runtime to install.
    Versions can be given in the following formats
  • 2.x => Install latest in major version.
  • 2.2.x => Install latest in major and minor version
  • 2.2.104 => Install exact version

  • 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://dotnetcli.blob.core.windows.net/dotnet/release-metadata/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.vsVersion": "Compatible Visual Studio version", + "loc.input.help.vsVersion": "Specify version of compatible visual studio for which .NET core sdk to install. Specifiy complete vs-version like 16.6.4 containing major version, minor version and patch number.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://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.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.
  • $(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.
  • $(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.
  • 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.
    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.
  • 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:
    C:\\Program Files\\dotnet (64-bit processes)
    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).
    ", + "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.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. Please make sure that agent process has access 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 marker 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 releases-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. More details: %s", + "loc.messages.VersionsCanNotBeCompared": "Versions %s and %s cannot be compared. Both versions should be explicit.", + "loc.messages.FileNameNotCorrectCompleteFileName": "File name %s is not a correct '.complete' file.", + "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.InvalidVersion": "Invalid version specified %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.", + "loc.messages.GlobalJsonFound": "Found a global.json at path: %s", + "loc.messages.GlobalJsonSdkVersion": "SDK version: %s is specified by global.json at path: %s", + "loc.messages.GlobalJsonIsEmpty": "global.json at path: %s is empty. No version is specified.", + "loc.messages.FailedToFindGlobalJson": "Failed to find global.json at and inside path: %s", + "loc.messages.FailedToReadGlobalJson": "The global.json at path: '%s' has the wrong format. For information about global.json, visit here: https://docs.microsoft.com/en-us/dotnet/core/tools/global-json. Error while trying to read: %s", + "loc.messages.VersionNumberHasTheWrongFormat": "The version number: %s doesn't have the correct format. Versions can be given in the following formats: 2.x => Install latest in major version. 2.2.x => Install latest in major and minor version. 2.2.104 => Install exact version. 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://dotnetcli.blob.core.windows.net/dotnet/release-metadata/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.messages.OnlyExplicitVersionAllowed": "Only explicit versions and accepted, such as: 2.2.301. Version: %s is not valid.", + "loc.messages.SupportPhaseNotPresentInChannel": "support-phase is not present in the channel with channel-version %s.", + "loc.messages.DepricatedVersionNetCore": "NET Core version you specfied %s is out of support and will be removed from hosted agents soon. Please refer to https://aka.ms/dotnet-core-support for more information about the .NET support policy." +} \ No newline at end of file diff --git a/_generated/UseDotNetV2/Strings/resources.resjson/es-ES/resources.resjson b/_generated/UseDotNetV2/Strings/resources.resjson/es-ES/resources.resjson new file mode 100644 index 000000000000..dc10cf281171 --- /dev/null +++ b/_generated/UseDotNetV2/Strings/resources.resjson/es-ES/resources.resjson @@ -0,0 +1,100 @@ +{ + "loc.friendlyName": "Usar .NET Core", + "loc.helpMarkDown": "[Obtener más información acerca de esta tarea](https://aka.ms/AA4xgy0)", + "loc.description": "Adquiere una versión específica del SDK de .NET Core de Internet o de la memoria caché local y la agrega a PATH. Use esta tarea para cambiar la versión de .NET Core que se usa en las tareas siguientes. También proporciona compatibilidad con el proxy.", + "loc.instanceNameFormat": "Usar $(packageType) $(version) de .NET Core", + "loc.releaseNotes": "
  • Compatibilidad para instalar varias versiones en paralelo.
  • Compatibilidad con los patrones de versión para capturar la última versión secundaria o principal.
  • Restringe la búsqueda de varios niveles.
  • Instala NuGet y proporciona compatibilidad con el proxy.
  • Instala versiones del SDK desde los archivos \"global.json\".
  • ", + "loc.group.displayName.advanced": "Avanzado", + "loc.input.label.packageType": "Paquete para instalar", + "loc.input.help.packageType": "Seleccione si debe instalarse solo el entorno de ejecución o el SDK.", + "loc.input.label.useGlobalJson": "Usar JSON global", + "loc.input.help.useGlobalJson": "Seleccione esta opción para instalar todos los SDK de los archivos global.json. Estos archivos se buscan desde system.DefaultWorkingDirectory. Establezca la entrada del directorio de trabajo para cambiar la ruta de acceso raíz de búsqueda.", + "loc.input.label.workingDirectory": "Directorio de trabajo", + "loc.input.help.workingDirectory": "Especifique la ruta de acceso desde la que deben buscarse los archivos global.json cuando se utilice \"Usar JSON global\". Si está vacío, \"system.DefaultWorkingDirectory\" se considerará como la ruta de acceso raíz.", + "loc.input.label.version": "Versión", + "loc.input.help.version": "Especifique la versión del entorno de ejecución o del SDK de .NET Core que debe instalarse.
    Las versiones pueden proporcionarse con los formatos siguientes
  • 2.x => Instalar la última versión principal.
  • 2.2.x => Instalar la última versión principal y secundaria.
  • 2.2.104 => Instalar la versión exacta.

  • Busque el valor de \"versión\" para instalar el SDK o el entorno de ejecución en releases.json. El vínculo a releases.json de dicha versión principal.secundaria puede encontrarse en el [**archivo releases-index.**](https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json). Asimismo, el vínculo a releases.json para la versión 2.2 es https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/2.2/releases.json", + "loc.input.label.vsVersion": "Versión de Visual Studio compatible", + "loc.input.help.vsVersion": "Especifique la versión compatible de Visual Studio para la que se va a instalar el SDK de .NET Core. Especifique una versión de VS completa (por ejemplo, 16.6.4), que contenga la versión principal, la versión secundaria y el número de revisión. Busque el valor de \"version\" para instalar el runtime o el SDK desde releases.json. El vínculo a releases.json de esa versión principal.secundaria puede encontrarse en el [**archivo releases-index.**](https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json)", + "loc.input.label.includePreviewVersions": "Incluir versiones preliminares", + "loc.input.help.includePreviewVersions": "Seleccione si quiere que las versiones preliminares se incluyan en la búsqueda de las últimas versiones, por ejemplo, al buscar 2.2.x. Esta configuración se ignora si se especifica una versión exacta, como 3.0.100-preview3-010431", + "loc.input.label.installationPath": "Ruta de acceso para instalar .Net Core", + "loc.input.help.installationPath": "Especifique dónde debe instalarse el entorno de ejecución o el SDK de .Net Core. Las distintas rutas de acceso pueden tener el efecto siguiente en el comportamiento de .Net.
  • $(Agent.ToolsDirectory): con esta opción, la versión se almacena en la memoria caché del agente, ya que el directorio no se limpia entre canalizaciones. Todas las canalizaciones que se ejecutan en el agente tienen acceso a las versiones instaladas anteriormente con este.
  • $(Agent.TempDirectory): esta opción garantiza que una canalización no use ninguna versión de .Net Core almacenada en caché, ya que la carpeta se limpia después de cada canalización.
  • Cualquier otra ruta de acceso: puede configurar cualquier otra ruta de acceso siempre que el proceso del agente tenga acceso a la ruta. Esto cambiará el estado de la máquina y afectará a todos los procesos que se estén ejecutando en ella.
    Tenga en cuenta que también puede configurar la opción de búsqueda en varios niveles para establecer el sondeo del host de .Net a fin de obtener una versión adecuada.", + "loc.input.label.performMultiLevelLookup": "Realizar búsqueda en varios niveles", + "loc.input.help.performMultiLevelLookup": "Esta entrada solo es aplicable a los agentes basados en Windows. Configura el comportamiento del proceso de host de .Net para buscar un marco de trabajo compartido adecuado.
  • Sin seleccionar: el proceso de host solo busca las versiones presentes en la carpeta que se especifica en esta tarea.
  • Seleccionada: el host intentará buscar en ubicaciones globales predefinidas mediante la búsqueda en varios niveles.
    Las ubicaciones globales predeterminadas son:
    Para Windows:
    C:\\Program Files\\dotnet (procesos de 64 bits)
    C:\\Program Files (x86)\\dotnet (procesos de 32 bits)
  • Puede leer más al respecto [**AQUÍ**](https://github.com/dotnet/core-setup/blob/master/Documentation/design-docs/multilevel-sharedfx-lookup.md).
    ", + "loc.messages.ToolFailed": "No se pudo instalar la herramienta: %s", + "loc.messages.ImplicitVersionNotSupported": "La versión debe ser válida y explícita: %s", + "loc.messages.getMachinePlatformFailed": "Error al obtener los detalles de la plataforma de máquina. Error: %s.", + "loc.messages.getDownloadUrlsFailed": "No se pudieron obtener direcciones URL de descarga. Error: %s.", + "loc.messages.UsingCachedTool": "Existe una copia en caché de .NET Core. No es necesario instalarlo desde cero. Ubicación de la herramienta en caché: %s.", + "loc.messages.CheckingToolCache": "Comprobando si existe una copia en caché de esta versión...", + "loc.messages.InstallingAfresh": "La memoria caché no contiene la versión solicitada de .NET Core. Descargándola e instalándola ahora.", + "loc.messages.GettingDownloadUrl": "Obteniendo direcciones URL para descargar el %s de .NET Core de la versión: %s.", + "loc.messages.CouldNotDetectPlatform": "No se pudo detectar el sistema operativo de la máquina", + "loc.messages.NullDownloadUrls": "No se pueden construir direcciones URL de descarga. Asegúrese de que la versión especificada %s es válida.", + "loc.messages.DownloadingUrl": "Descargando el paquete de .NET Core de la dirección URL: %s", + "loc.messages.ExtractingPackage": "Extrayendo el paquete %s descargado.", + "loc.messages.CachingTool": "Almacenando en caché esta herramienta instalada.", + "loc.messages.SuccessfullyInstalled": ".NET Core %s versión %s se ha instalado correctamente.", + "loc.messages.ToolToInstall": "Herramienta para instalar: .NET Core %s versión %s.", + "loc.messages.PrimaryPlatform": "Se ha detectado la plataforma (principal): %s", + "loc.messages.LegacyPlatform": "Se ha detectado la plataforma (heredada): %s", + "loc.messages.CouldNotDownload": "No se pudo descargar el paquete de instalación desde esta dirección URL: %s Error: %s", + "loc.messages.FailedToDownloadPackage": "No se pudo descargar el paquete de instalación", + "loc.messages.PrependGlobalToolPath": "Creando la ruta de acceso de herramientas global y anteponiéndola a PATH.", + "loc.messages.VersionsFileMalformed": "Los vínculos de descarga de la versión especificada no tienen un formato correcto en el documento de versiones admitidas => %s/", + "loc.messages.MatchingVersionNotFound": "No se encontró ninguna versión de %s coincidente para la versión %s especificada. Tenga en cuenta que las versiones preliminares solo se toman en consideración en las búsquedas de la última versión si la casilla Incluir versiones preliminares está seleccionada.", + "loc.messages.UnableToAccessPath": "No se puede acceder a la ruta de acceso %s. Error: %s. Asegúrese de que el proceso del agente tiene acceso a la ruta correspondiente.", + "loc.messages.VersionCanNotBeDownloadedFromUrl": "No se puede descargar la versión %s de la dirección URL %s. La dirección URL o la versión es incorrecta.", + "loc.messages.CopyingFoldersIntoPath": "Copiando todas las carpetas raíz en la ruta de acceso de instalación: %s", + "loc.messages.CopyingFilesIntoPath": "Copiando archivos raíz (como dotnet.exe) en la ruta de acceso de instalación: %s", + "loc.messages.FailedToCopyTopLevelFiles": "No se pudieron copiar los archivos raíz en la ruta de acceso de la instalación: %s. Error: %s", + "loc.messages.FailedWhileInstallingVersionAtPath": "Error al instalar la versión %s en la ruta de acceso %s: %s", + "loc.messages.ExplicitVersionRequired": "No se admite la versión %s. Las versiones que se van a instalar deben tener el formato principal.secundaria.revisión. Por ejemplo, 2.2.1", + "loc.messages.VersionFoundInCache": "Se ha encontrado la versión %s en la memoria caché.", + "loc.messages.VersionNotFoundInCache": "No se encontró la versión %s en la memoria caché.", + "loc.messages.CreatingInstallationCompeleteFile": "Creando el archivo marcador de instalación completo para .NET Core %s, versión %s", + "loc.messages.CannotFindRuntimeVersionForCompletingInstallation": "No se encuentra la versión del entorno de ejecución para el tipo de paquete %s con la versión %s", + "loc.messages.PathNotFoundException": "No se encontró la ruta de acceso %s. Asegúrese de que existe.", + "loc.messages.VersionIsLocalLatest": "La versión %s es la última de las versiones presentes en la ruta de acceso %s", + "loc.messages.VersionIsNotLocalLatest": "La versión %s no es la última de las versiones presentes en %s", + "loc.messages.DownloadUrlForMatchingOsNotFound": "No se encontró la dirección URL de descarga de .Net Core %s versión %s para las plataformas de sistema operativo siguientes (RID): %s", + "loc.messages.ExceptionWhileDownloadOrReadReleasesIndex": "No se pudo descargar ni analizar el archivo releases-index.json con el error %s.", + "loc.messages.MatchingVersionForUserInputVersion": "Se encontró la versión %s en el canal %s para la especificación de versión determinada por el usuario: %s", + "loc.messages.UrlForReleaseChannelNotFound": "No se encontró la dirección URL para el archivo releases.json de la versión del canal: %s", + "loc.messages.NoSuitableChannelWereFound": "No se encuentra el canal correspondiente a la versión %s.", + "loc.messages.DetectingPlatform": "Detección de la plataforma del sistema operativo para encontrar un paquete de descarga correcto para dicho sistema.", + "loc.messages.FailedInDetectingMachineArch": "Error al detectar la plataforma del sistema operativo de la máquina: %s", + "loc.messages.runtimeVersionPropertyNotFound": "No se encontró la propiedad runtime-version para .Net Core %s versión %s.", + "loc.messages.VersionNotFound": "Coincidencia de versión de %s: no se encontró %s", + "loc.messages.VersionNotAllowed": "No se admite la versión %s. Los tipos de versión admitidos son: majorVersion.x, majorVersion.minorVersion.x, majorVersion.minorVersion.patchVersion. Más detalles: %s", + "loc.messages.VersionsCanNotBeCompared": "No se pueden comparar las versiones %s y %s. Ambas versiones deben ser explícitas.", + "loc.messages.FileNameNotCorrectCompleteFileName": "El nombre de archivo %s no es un archivo \".complete\" correcto.", + "loc.messages.ChannelVersionsNotComparable": "No se pueden comparar las versiones %s y %s del canal. Ambas deben tener versiones principales y secundarias numéricas.", + "loc.messages.LookingForVersionInChannel": "Buscando la versión en canal %s", + "loc.messages.FallingBackToAdjacentChannels": "No se encontró la versión %s en su canal y se va a buscar en los canales adyacentes.", + "loc.messages.ErrorWhileSettingDotNetToolPath": "Error al anteponer la ruta de acceso de la herramienta de .Net Core a la variable de entorno PATH: %s", + "loc.messages.RequiredChannelVersionForSpec": "Buscando el canal %s para la versión %s", + "loc.messages.ErrorWhileGettingVersionFromChannel": "Error al obtener la versión %s del canal %s: %s", + "loc.messages.ComparingInstalledFolderVersions": "Comparando si la versión %s que se va a instalar es posterior a la versión ya instalada con el nombre de carpeta %s", + "loc.messages.ComparingInstalledFileVersions": "Comparando si la versión %s que se va a instalar es posterior a la versión ya instalada con el nombre de archivo de versión completo %s", + "loc.messages.InvalidChannelObject": "El objeto no se puede usar como canal porque faltan propiedades requeridas, como channel-version o releases.json.", + "loc.messages.ReleasesIndexBodyIncorrect": "El cuerpo del índice de versiones analizadas no es correcto. Compruebe que la sección releases-index no está vacía en el archivo.", + "loc.messages.InvalidVersionObject": "La versión del archivo releases.json tiene un objeto %s no válido: %s", + "loc.messages.InvalidVersion": "Se ha especificado una versión %s no válida.", + "loc.messages.FilesDataIsIncorrectInVersion": "En la versión %s (%s), los datos del archivo son incorrectos (puede que falten campos obligatorios, como el nombre, RID y dirección URL): %s", + "loc.messages.VersionFilesDataIncorrect": "Faltan datos de los archivos de la versión o faltan campos obligatorios.", + "loc.messages.VersionInformationNotComplete": "La información necesaria de la versión %s no está completa en el archivo releases.json. Error: %s", + "loc.messages.FailedWhileExtractingPacakge": "No se pudo extraer el paquete descargado. Error: %s", + "loc.messages.InstallingNuGetVersion": "Instalando la versión %s de NuGet", + "loc.messages.FailureWhileInstallingNuGetVersion": "No se pudo instalar la versión de NuGet. Error: %s", + "loc.messages.SettingUpNugetProxySettings": "Configurando el proxy para NuGet.", + "loc.messages.GlobalJsonFound": "Se encontró un archivo global.json en la ruta de acceso: %s", + "loc.messages.GlobalJsonSdkVersion": "El archivo global.json especifica la versión del SDK %s en la ruta de acceso %s", + "loc.messages.GlobalJsonIsEmpty": "El archivo global.json en la ruta de acceso %s está vacío. No se ha especificado ninguna versión.", + "loc.messages.FailedToFindGlobalJson": "No se encontró el archivo global.json en la ruta de acceso ni dentro de ella: %s", + "loc.messages.FailedToReadGlobalJson": "El archivo global.json en la ruta de acceso \"%s\" tiene un formato incorrecto. Para obtener información sobre global.json, visite esta página: https://docs.microsoft.com/en-us/dotnet/core/tools/global-json. Error al intentar leer: %s", + "loc.messages.VersionNumberHasTheWrongFormat": "El número de versión %s no tiene el formato correcto. Las versiones pueden proporcionarse con los formatos siguientes: 2.x => Instalar la última versión principal. 2.2.x => Instalar la última versión principal y secundaria. 2.2.104 => Instalar la versión exacta. Busque el valor de \"versión\" para instalar el SDK o el entorno de ejecución en releases.json. El vínculo a releases.json de dicha versión principal.secundaria puede encontrarse en el [**archivo releases-index.**](https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json). Asimismo, el vínculo a releases.json para la versión 2.2 es https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/2.2/releases.json", + "loc.messages.OnlyExplicitVersionAllowed": "Solo se aceptan las versiones explícitas, por ejemplo, 2.2.301. La versión %s no es válida.", + "loc.messages.SupportPhaseNotPresentInChannel": "La fase de soporte no está presente en el canal con la versión %s.", + "loc.messages.DepricatedVersionNetCore": "La versión de NET Core que especificó %s no es compatible y pronto se quitará de los agentes hospedados. Consulte https://aka.ms/dotnet-core-support para obtener más información sobre la directiva de soporte técnico de .NET." +} \ No newline at end of file diff --git a/_generated/UseDotNetV2/Strings/resources.resjson/fr-FR/resources.resjson b/_generated/UseDotNetV2/Strings/resources.resjson/fr-FR/resources.resjson new file mode 100644 index 000000000000..a0af318f250d --- /dev/null +++ b/_generated/UseDotNetV2/Strings/resources.resjson/fr-FR/resources.resjson @@ -0,0 +1,100 @@ +{ + "loc.friendlyName": "Utiliser .NET Core", + "loc.helpMarkDown": "[En savoir plus sur cette tâche](https://aka.ms/AA4xgy0)", + "loc.description": "Acquiert une version spécifique du kit SDK .NET Core à partir d'Internet ou du cache local, et l'ajoute à PATH. Utilisez cette tâche pour changer la version de .NET Core utilisée dans les tâches suivantes. Fournit également une prise en charge du proxy.", + "loc.instanceNameFormat": "Utilisez .NET Core $(packageType) $(version)", + "loc.releaseNotes": "
  • Prise en charge de l'installation de plusieurs versions côte à côte.
  • Prise en charge des modèles de version pour la récupération (fetch) de la dernière version mineure/principale.
  • Restriction de la recherche multiniveau
  • Installation de NuGet et prise en charge du proxy.
  • Installation des versions du kit SDK à partir des fichiers 'global.json'
  • ", + "loc.group.displayName.advanced": "Avancé", + "loc.input.label.packageType": "Package à installer", + "loc.input.help.packageType": "Choisissez d'installer le runtime uniquement ou le kit SDK.", + "loc.input.label.useGlobalJson": "Utiliser le fichier global json", + "loc.input.help.useGlobalJson": "Sélectionnez cette option pour installer tous les kits SDK à partir des fichiers global.json. Ces fichiers sont recherchés à partir de system.DefaultWorkingDirectory. Vous pouvez changer le chemin racine de recherche en définissant l'entrée du répertoire de travail.", + "loc.input.label.workingDirectory": "Répertoire de travail", + "loc.input.help.workingDirectory": "Spécifiez le chemin de recherche des fichiers global.json quand vous accédez à 'Utiliser le fichier global json'. Si aucune valeur n'est spécifiée, 'system.DefaultWorkingDirectory' est utilisé en tant que chemin racine.", + "loc.input.label.version": "Version", + "loc.input.help.version": "Spécifiez la version du kit SDK ou du runtime .NET Core à installer.
    Vous pouvez spécifier les versions aux formats suivants :
  • 2.x => Installe la dernière version dans la version principale.
  • 2.2.x => Installe la dernière version dans la version principale et la version mineure
  • 2.2.104 => Installe la version exacte

  • Recherchez la valeur de 'version' pour l'installation du kit SDK/runtime dans le fichier releases.json. Le lien vers le fichier releases.json de cette version principale.mineure se trouve dans le [**fichier releases-index.**](https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json). De même, le lien vers releases.json pour la version 2.2 est https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/2.2/releases.json", + "loc.input.label.vsVersion": "Version compatible de Visual Studio", + "loc.input.help.vsVersion": "Spécifiez la version compatible de Visual Studio pour laquelle le kit SDK .NET Core doit être installé. Spécifiez la version complète de Visual Studio, par exemple 16.6.4, qui contient la version principale, la version mineure et le numéro de patch. Recherchez la valeur de 'version' dans releases.json pour l'installation du kit SDK/runtime. Le lien vers le fichier releases.json de cette version principale.mineure se trouve dans le [**fichier releases-index.**](https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json)", + "loc.input.label.includePreviewVersions": "Inclure les préversions", + "loc.input.help.includePreviewVersions": "Sélectionnez cette option si vous souhaitez inclure des préversions durant la recherche des dernières versions, par exemple durant la recherche de la version 2.2.x. Ce paramètre est ignoré si vous spécifiez une version précise, par exemple 3.0.100-preview3-010431", + "loc.input.label.installationPath": "Chemin d'installation de .Net Core", + "loc.input.help.installationPath": "Spécifiez l'emplacement où le kit SDK/Runtime .Net Core doit être installé. Selon les différents chemins, l'impact est le suivant sur le comportement de .Net.
  • $(Agent.ToolsDirectory) : la version est mise en cache sur l'agent, car ce répertoire n'est pas nettoyé entre les pipelines. Tous les pipelines qui s'exécutent sur l'agent ont accès aux versions installées à l'aide de l'agent.
  • $(Agent.TempDirectory) : le pipeline ne peut pas utiliser de version mise en cache de .Net Core, car le dossier est nettoyé après chaque pipeline.
  • Tout autre chemin : vous pouvez configurer un autre chemin dans la mesure où le processus de l'agent a accès au chemin. Cela entraîne un changement d'état de la machine et impacte tous les processus qui s'exécutent sur celle-ci.
    Notez que vous pouvez également configurer le paramètre de recherche multiniveau, qui permet de configurer la détection de l'hôte .Net en fonction de la version appropriée.", + "loc.input.label.performMultiLevelLookup": "Effectuer une recherche multiniveau", + "loc.input.help.performMultiLevelLookup": "Cette entrée est applicable uniquement aux agents Windows. Ceci permet de configurer le comportement du processus hôte .Net pour la recherche d'un framework partagé approprié.
  • Option décochée : seules les versions présentes dans le dossier spécifié de cette tâche sont recherchées par le processus hôte.
  • Option cochée : l'hôte tente d'effectuer des recherches multiniveaux dans les emplacements globaux prédéfinis.
    Emplacements globaux par défaut :
    Pour Windows :
    C:\\Program Files\\dotnet (processus 64 bits)
    C:\\Program Files (x86)\\dotnet (processus 32 bits)
  • Vous trouverez plus d'informations sur le sujet [**ICI**](https://github.com/dotnet/core-setup/blob/master/Documentation/design-docs/multilevel-sharedfx-lookup.md).
    ", + "loc.messages.ToolFailed": "Échec de l'installation de l'outil : %s", + "loc.messages.ImplicitVersionNotSupported": "La version doit être une version valide et explicite : %s", + "loc.messages.getMachinePlatformFailed": "Échec de l'obtention des détails relatifs à la plateforme de la machine. Erreur : %s.", + "loc.messages.getDownloadUrlsFailed": "Échec de l'obtention des URL de téléchargement. Erreur : %s.", + "loc.messages.UsingCachedTool": "Une copie mise en cache de .NET Core existe. Vous devez effectuer une nouvelle installation. Emplacement de l'outil mis en cache : %s.", + "loc.messages.CheckingToolCache": "Vérification de l'existence d'une copie mise en cache pour cette version...", + "loc.messages.InstallingAfresh": "Le cache ne contient pas la version demandée de .NET Core. Téléchargement et installation en cours.", + "loc.messages.GettingDownloadUrl": "Obtention de l'URL de téléchargement de .NET Core %s version %s.", + "loc.messages.CouldNotDetectPlatform": "Impossible de détecter l'OS de la machine", + "loc.messages.NullDownloadUrls": "Impossible de construire l'URL de téléchargement. Vérifiez que la version %s spécifiée est valide.", + "loc.messages.DownloadingUrl": "Téléchargement du package .NET Core à partir de l'URL : %s", + "loc.messages.ExtractingPackage": "Extraction du package téléchargé %s.", + "loc.messages.CachingTool": "Mise en cache de l'outil installé.", + "loc.messages.SuccessfullyInstalled": "Installation réussie de .NET Core %s version %s.", + "loc.messages.ToolToInstall": "Outil à installer : .NET Core %s version %s.", + "loc.messages.PrimaryPlatform": "Plateforme détectée (principal) : %s", + "loc.messages.LegacyPlatform": "Plateforme détectée (héritée) : %s", + "loc.messages.CouldNotDownload": "Impossible de télécharger le package d'installation à partir de cette URL : %s. Erreur : %s", + "loc.messages.FailedToDownloadPackage": "Échec du téléchargement du package pour l'installation", + "loc.messages.PrependGlobalToolPath": "Création d'un chemin d'outil global, et ajout de la valeur correspondante au début de PATH.", + "loc.messages.VersionsFileMalformed": "Les liens de téléchargement de la version spécifiée ne sont pas correctement formés dans le document des versions prises en charge => %s/", + "loc.messages.MatchingVersionNotFound": "La version %s correspondante est introuvable pour la version spécifiée : %s. Notez que les versions de préversion sont prises en compte uniquement dans les recherches de dernières versions, si la case Inclure les préversions est cochée.", + "loc.messages.UnableToAccessPath": "Impossible d'accéder au chemin : %s. Erreur : %s. Vérifiez que le processus de l'agent a accès au chemin.", + "loc.messages.VersionCanNotBeDownloadedFromUrl": "Impossible de télécharger la version %s à partir de l'URL %s. L'URL ou la version est incorrecte.", + "loc.messages.CopyingFoldersIntoPath": "Copie de tous les dossiers racine dans le chemin d'installation : %s", + "loc.messages.CopyingFilesIntoPath": "Copie des fichiers racine (tels que dotnet. exe) dans le chemin d'installation : %s", + "loc.messages.FailedToCopyTopLevelFiles": "Échec de la copie des fichiers racine dans le chemin d'installation : %s. Erreur : %s", + "loc.messages.FailedWhileInstallingVersionAtPath": "Échec de l'installation de la version %s dans le chemin %s. Erreur : %s", + "loc.messages.ExplicitVersionRequired": "La version %s n'est pas autorisée. Les versions à installer doivent être au format suivant : versionprincipale.versionmineure.versioncorrectif. Exemple : 2.2.1", + "loc.messages.VersionFoundInCache": "La version %s a été trouvée dans le cache.", + "loc.messages.VersionNotFoundInCache": "La version %s est introuvable dans le cache.", + "loc.messages.CreatingInstallationCompeleteFile": "Création du fichier marqueur de fin d'installation pour .Net Core %s version %s", + "loc.messages.CannotFindRuntimeVersionForCompletingInstallation": "Version du runtime introuvable pour le package de type %s, version %s", + "loc.messages.PathNotFoundException": "Chemin %s introuvable. Vérifiez que le chemin existe.", + "loc.messages.VersionIsLocalLatest": "La version %s est la plus récente des versions présentes dans le chemin %s", + "loc.messages.VersionIsNotLocalLatest": "La version %s n'est pas la plus récente des versions présentes dans %s", + "loc.messages.DownloadUrlForMatchingOsNotFound": "L'URL de téléchargement de .Net Core %s version %s est introuvable pour les plateformes de système d'exploitation suivantes (RID) : %s", + "loc.messages.ExceptionWhileDownloadOrReadReleasesIndex": "Échec du téléchargement ou de l'analyse de releases-index.json. Erreur : %s", + "loc.messages.MatchingVersionForUserInputVersion": "Version %s trouvée dans le canal %s pour la spécification de version spécifiée par l'utilisateur : %s", + "loc.messages.UrlForReleaseChannelNotFound": "Impossible de localiser l'URL du fichier releases.json de la version de canal : %s", + "loc.messages.NoSuitableChannelWereFound": "Le canal correspondant à la version %s est introuvable.", + "loc.messages.DetectingPlatform": "Détection de la plateforme du système d'exploitation afin de trouver le package de téléchargement approprié pour le système d'exploitation.", + "loc.messages.FailedInDetectingMachineArch": "Échec de la détection de la plateforme de système d'exploitation de la machine. Erreur : %s", + "loc.messages.runtimeVersionPropertyNotFound": "La propriété runtime-version est introuvable pour .Net Core %s version %s.", + "loc.messages.VersionNotFound": "La version %s correspondant à la version %s est introuvable", + "loc.messages.VersionNotAllowed": "La version %s n'est pas autorisée. Types de version autorisés : versionPrincipale.x, versionPrincipale.versionMineure.x, versionPrincipale.versionMineure.versionCorrectif. Plus de détails : %s", + "loc.messages.VersionsCanNotBeCompared": "Impossible de comparer les versions %s et %s. Les deux versions doivent être explicites.", + "loc.messages.FileNameNotCorrectCompleteFileName": "Le nom de fichier %s n'est pas un fichier '.complete' correct.", + "loc.messages.ChannelVersionsNotComparable": "Impossible de comparer les versions de canal %s et %s. Elles doivent comporter toutes les deux des numéros de version principale et mineure.", + "loc.messages.LookingForVersionInChannel": "Recherche de version dans le canal %s", + "loc.messages.FallingBackToAdjacentChannels": "La version %s est introuvable dans son canal. Exécution de la recherche dans les canaux adjacents.", + "loc.messages.ErrorWhileSettingDotNetToolPath": "Échec de l'ajout du chemin d'outils .Net Core au début de la variable d'environnement PATH. Erreur : %s", + "loc.messages.RequiredChannelVersionForSpec": "Recherche du canal %s pour la version %s", + "loc.messages.ErrorWhileGettingVersionFromChannel": "Échec de l'obtention de la version %s à partir du canal %s. Erreur : %s", + "loc.messages.ComparingInstalledFolderVersions": "Comparaison visant à déterminer si la version en cours d'installation (%s) est postérieure à la version installée pour le nom de dossier %s", + "loc.messages.ComparingInstalledFileVersions": "Comparaison visant à déterminer si la version en cours d'installation (%s) est postérieure à la version installée pour le nom de fichier complet %s", + "loc.messages.InvalidChannelObject": "Impossible d'utiliser l'objet en tant que canal. Des propriétés obligatoires telles que channel-version, releases.json sont manquantes.", + "loc.messages.ReleasesIndexBodyIncorrect": "Le corps de l'index des versions release analysées est incorrect. Vérifiez si la section releases-index n'est pas vide dans le fichier.", + "loc.messages.InvalidVersionObject": "Releases.json comporte une version release ayant un objet %s non valide : %s", + "loc.messages.InvalidVersion": "Version non valide spécifiée %s", + "loc.messages.FilesDataIsIncorrectInVersion": "Dans la version release %s de la version %s, des données de fichiers sont incorrectes (des champs obligatoires tels que nom, RID et URL sont peut-être manquants) : %s", + "loc.messages.VersionFilesDataIncorrect": "Des données de fichiers ou des champs obligatoires sont manquants pour la version.", + "loc.messages.VersionInformationNotComplete": "Les informations obligatoires de la version %s sont incomplètes dans le fichier releases.json. Erreur : %s", + "loc.messages.FailedWhileExtractingPacakge": "Échec de l'extraction du package téléchargé. Erreur : %s", + "loc.messages.InstallingNuGetVersion": "Installation de NuGet version %s", + "loc.messages.FailureWhileInstallingNuGetVersion": "Échec de l'installation de la version de NuGet. Erreur : %s", + "loc.messages.SettingUpNugetProxySettings": "Configuration du proxy pour NuGet.", + "loc.messages.GlobalJsonFound": "Fichier global.json trouvé dans le chemin %s", + "loc.messages.GlobalJsonSdkVersion": "Le kit SDK version %s est spécifié par global.json dans le chemin %s", + "loc.messages.GlobalJsonIsEmpty": "global.json dans le chemin %s est vide. Aucune version n'est spécifiée.", + "loc.messages.FailedToFindGlobalJson": "Échec de la localisation de global.json dans le chemin %s", + "loc.messages.FailedToReadGlobalJson": "Le fichier global.json situé dans le chemin '%s' n'est pas au format approprié. Pour plus d'informations sur global.json, accédez à l'adresse suivante : https://docs.microsoft.com/fr-fr/dotnet/core/tools/global-json. Erreur durant la tentative de lecture de %s", + "loc.messages.VersionNumberHasTheWrongFormat": "Le numéro de version %s n'est pas au format approprié. Vous pouvez spécifier les versions aux formats suivants : 2.x => Installe la dernière version dans la version principale. 2.2.x => Installe la dernière version dans la version principale et mineure. 2.2.104 => Installe la version exacte. Recherchez la valeur de 'version' pour l'installation du kit SDK/runtime dans le fichier releases.json. Le lien vers le fichier releases.json de cette version principale.mineure se trouve dans le [**fichier releases-index.**](https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json). De même, le lien vers releases.json pour la version 2.2 est https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/2.2/releases.json", + "loc.messages.OnlyExplicitVersionAllowed": "Seules les versions explicites et acceptées, par exemple 2.2.301. La version %s est non valide.", + "loc.messages.SupportPhaseNotPresentInChannel": "support-phase n'est pas présent dans le canal avec le channel-version %s.", + "loc.messages.DepricatedVersionNetCore": "La version de NET Core que vous avez spécifiée %s n’est pas prise en charge et sera bientôt supprimée des agents hébergés. Pour plus d’informations sur la stratégie de support .NET, consultez https://aka.ms/dotnet-core-support." +} \ No newline at end of file diff --git a/_generated/UseDotNetV2/Strings/resources.resjson/it-IT/resources.resjson b/_generated/UseDotNetV2/Strings/resources.resjson/it-IT/resources.resjson new file mode 100644 index 000000000000..a7ff7c22002a --- /dev/null +++ b/_generated/UseDotNetV2/Strings/resources.resjson/it-IT/resources.resjson @@ -0,0 +1,100 @@ +{ + "loc.friendlyName": "Usa .NET Core", + "loc.helpMarkDown": "[Altre informazioni su questa attività](https://aka.ms/AA4xgy0)", + "loc.description": "Acquisisce una versione specifica di .NET Core SDK da Internet o dalla cache locale e la aggiunge a PATH. Usare questa attività per cambiare la versione di .NET Core usata nelle attività successive. Fornisce anche il supporto per proxy.", + "loc.instanceNameFormat": "Usa .NET Core $(packageType) $(version)", + "loc.releaseNotes": "
  • Supporto per l'installazione di più versioni side-by-side.
  • Supporto per i criteri di recupero dell'ultima versione principale/secondaria.
  • Limitazione della ricerca multilivello
  • Installazione di NuGet e aggiunta del supporto per proxy.
  • Installa le versioni dell'SDK da file `global.json`
  • ", + "loc.group.displayName.advanced": "Avanzate", + "loc.input.label.packageType": "Pacchetto da installare", + "loc.input.help.packageType": "Scegliere se installare solo il runtime o l'SDK.", + "loc.input.label.useGlobalJson": "Usa JSON globale", + "loc.input.help.useGlobalJson": "Selezionare questa opzione per installare tutti gli SDK dai file global.json. Questi file vengono cercati da system.DefaultWorkingDirectory. È possibile modificare il percorso radice della ricerca impostando il valore di input della directory di lavoro.", + "loc.input.label.workingDirectory": "Directory di lavoro", + "loc.input.help.workingDirectory": "Consente di specificare il percorso da cui cercare i file global.json quando si usa l'attività `Usa JSON globale`. Se è vuoto, come percorso radice verrà usato `system.DefaultWorkingDirectory`.", + "loc.input.label.version": "Versione", + "loc.input.help.version": "Consente di specificare la versione di .NET Core SDK o il runtime da installare.
    È possibile specificare le versioni nei formati seguenti:
  • 2.x => Installa la versione principale più recente.
  • 2.2.x => Installa la versione principale e secondaria più recente
  • 2.2.104 => Installa la versione esatta

  • Individuare il valore di `version` per l'installazione di SDK/Runtime in releases.json. Il collegamento a releases.json della versione principale.secondaria è disponibile nel [**file releases-index**](https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json). Ad esempio, il collegamento a releases.json per la versione 2.2 è https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/2.2/releases.json", + "loc.input.label.vsVersion": "Versione di Visual Studio compatibile", + "loc.input.help.vsVersion": "Consente di specificare la versione di Visual Studio compatibile per cui installare .NET Core SDK. Specificare la versione di Visual Studio completa, ad esempio 16.6.4 che contiene il numero di versione principale, quello secondario e quello di patch. Trovare il valore di `version` per l'installazione di SDK/Runtime in releases.json. Il collegamento a releases.json di tale versione principale.secondaria è disponibile nel [**file releases-index**].(https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json)", + "loc.input.label.includePreviewVersions": "Includi versioni in anteprima", + "loc.input.help.includePreviewVersions": "Selezionare questa impostazione se si vuole che le versioni in anteprima vengano incluse durante la ricerca delle versioni più recenti, ad esempio durante la ricerca della versione 2.2.x. Questa impostazione viene ignorata se si specifica una versione esatta, ad esempio: 3.0.100-preview3-010431", + "loc.input.label.installationPath": "Percorso per l'installazione di .NET Core", + "loc.input.help.installationPath": "Specificare la posizione in cui installare .NET Core SDK/Runtime. I diversi percorsi diversi possono avere l'impatto seguente sul comportamento di .NET.
  • $(Agent.ToolsDirectory): con questo percorso la versione viene memorizzata nella cache dell'agente perché questa directory non viene pulita nelle pipeline. Tutte le pipeline in esecuzione nell'agente avranno accesso alle versioni installate in precedenza con l'agente.
  • $(Agent.TempDirectory): questo percorso garantisce che una pipeline non utilizzi alcuna versione memorizzata nella cache di .NET Core perché questa cartella viene pulita dopo ogni pipeline.
  • Qualsiasi altro percorso: è possibile configurare qualsiasi altro percorso purché accessibile al processo dell'agente. Questa impostazione comporterà la modifica dello stato del computer e influirà su tutti i processi in esecuzione.
    È anche possibile configurare l'impostazione per la ricerca multilivello, che consente di configurare l'esecuzione del probe dell'host .NET per una versione appropriata.", + "loc.input.label.performMultiLevelLookup": "Esegui ricerca multilivello", + "loc.input.help.performMultiLevelLookup": "Questo input è applicabile solo agli agenti basati su Windows. Consente di configurare il comportamento del processo host .NET per la ricerca di un framework condiviso appropriato.
  • impostazione deselezionata: il processo host potrà visualizzare solo le versioni presenti nella cartella specificata in questa attività.
  • impostazione selezionata: l'host proverà a cercare nei percorsi globali predefiniti usando la ricerca multilivello.
    I percorsi globali predefiniti sono:
    Per Windows:
    C:\\Program Files\\dotnet (processi a 64 bit)
    C:\\Program Files (x86)\\dotnet (processo a 32 bit)
  • Per altre informazioni, vedere [**QUI**](https://github.com/dotnet/core-setup/blob/master/Documentation/design-docs/multilevel-sharedfx-lookup.md).
    ", + "loc.messages.ToolFailed": "L'installazione dello strumento non è riuscita: %s", + "loc.messages.ImplicitVersionNotSupported": "La versione deve essere valida ed esplicita: %s", + "loc.messages.getMachinePlatformFailed": "Non è stato possibile ottenere i dettagli della piattaforma del computer. Errore: %s.", + "loc.messages.getDownloadUrlsFailed": "Non è stato possibile recuperare gli URL di download. Errore: %s.", + "loc.messages.UsingCachedTool": "Esiste una copia di .NET Core memorizzata nella cache. Non è necessario installarla di nuovo. Percorso dello strumento memorizzato nella cache: %s.", + "loc.messages.CheckingToolCache": "Verifica dell'esistenza di una copia memorizzata nella cache per questa versione...", + "loc.messages.InstallingAfresh": "La cache non contiene la versione richiesta di .NET Core. Verrà scaricata e installata ora.", + "loc.messages.GettingDownloadUrl": "Recupero dell'URL per scaricare .NET Core %s versione %s.", + "loc.messages.CouldNotDetectPlatform": "Non è stato possibile rilevare il sistema operativo del computer", + "loc.messages.NullDownloadUrls": "Non è stato possibile costruire l'URL di download. Assicurarsi che la versione specificata %s sia valida.", + "loc.messages.DownloadingUrl": "Download del pacchetto .NET Core dall'URL %s", + "loc.messages.ExtractingPackage": "Estrazione del pacchetto scaricato %s.", + "loc.messages.CachingTool": "Questo strumento installato verrà memorizzato nella cache.", + "loc.messages.SuccessfullyInstalled": ".NET Core %s versione %s è stato installato.", + "loc.messages.ToolToInstall": "Strumento da installare: .NET Core %s versione %s.", + "loc.messages.PrimaryPlatform": "Piattaforma rilevata (primaria): %s", + "loc.messages.LegacyPlatform": "Piattaforma rilevata (legacy): %s", + "loc.messages.CouldNotDownload": "Non è stato possibile scaricare il pacchetto di installazione da questo URL: %s Errore: %s", + "loc.messages.FailedToDownloadPackage": "Non è stato possibile scaricare il pacchetto per l'installazione", + "loc.messages.PrependGlobalToolPath": "Creazione del percorso strumenti globale e aggiunta del percorso prima di PATH.", + "loc.messages.VersionsFileMalformed": "Il formato dei collegamenti di download della versione specificata non è corretto nel documento delle versioni supportate => %s/", + "loc.messages.MatchingVersionNotFound": "Non è stata trovata alcuna versione %s corrispondente per la versione specificata %s. Tenere presente che le versioni in anteprima vengono considerate nelle ricerche delle versioni più recenti solo se la casella di controllo Includi versioni in anteprima è selezionata.", + "loc.messages.UnableToAccessPath": "Non è possibile accedere al percorso %s. Errore: %s. Assicurarsi che il processo dell'agente possa accedere al percorso.", + "loc.messages.VersionCanNotBeDownloadedFromUrl": "Non è possibile scaricare la versione %s dall'URL %s. Il valore dell'URL o della versione non è corretto.", + "loc.messages.CopyingFoldersIntoPath": "Copia di tutte le cartelle radice nel percorso di installazione: %s", + "loc.messages.CopyingFilesIntoPath": "Copia dei file radice (ad esempio dotnet.exe) nel percorso di installazione: %s", + "loc.messages.FailedToCopyTopLevelFiles": "Non è stato possibile copiare i file radice nel percorso di installazione: %s. Errore: %s", + "loc.messages.FailedWhileInstallingVersionAtPath": "Si è verificato un errore durante l'installazione della versione %s nel percorso %s. Errore: %s", + "loc.messages.ExplicitVersionRequired": "La versione %s non è consentita. Le versioni da installare devono essere specificate nel formato principale.secondaria.versionepatch. Ad esempio: 2.2.1", + "loc.messages.VersionFoundInCache": "La versione %s è stata trovata nella cache.", + "loc.messages.VersionNotFoundInCache": "La versione %s non è stata trovata nella cache.", + "loc.messages.CreatingInstallationCompeleteFile": "Creazione del file indicatore di installazione completato per .NET Core %s versione %s", + "loc.messages.CannotFindRuntimeVersionForCompletingInstallation": "Non è possibile trovare la versione del runtime per il tipo di pacchetto %s con versione %s", + "loc.messages.PathNotFoundException": "Non è stato possibile individuare/trovare il percorso %s. Assicurarsi che sia esistente.", + "loc.messages.VersionIsLocalLatest": "La versione %s è l'ultima tra le versioni presenti nel percorso %s", + "loc.messages.VersionIsNotLocalLatest": "La versione %s non è l'ultima tra le versioni presenti in %s", + "loc.messages.DownloadUrlForMatchingOsNotFound": "Non è stato possibile trovare l'URL di download di .NET Core %s versione %s per le piattaforme del sistema operativo seguenti (RID): %s", + "loc.messages.ExceptionWhileDownloadOrReadReleasesIndex": "Non è stato possibile scaricare o analizzare releases-index.json. Errore: %s", + "loc.messages.MatchingVersionForUserInputVersion": "La versione %s per l'identificatore di versione specificato dall'utente è stata trovata nel canale %s: %s", + "loc.messages.UrlForReleaseChannelNotFound": "Non è stato possibile trovare l'URL del file releases.json della versione del canale: %s", + "loc.messages.NoSuitableChannelWereFound": "Non è stato possibile trovare il canale corrispondente alla versione %s.", + "loc.messages.DetectingPlatform": "Rilevamento della piattaforma del sistema operativo per individuare il pacchetto di download corretto per il sistema operativo.", + "loc.messages.FailedInDetectingMachineArch": "Si è verificato un errore durante il rilevamento della piattaforma del sistema operativo del computer. Errore: %s", + "loc.messages.runtimeVersionPropertyNotFound": "Non è stato possibile trovare la proprietà runtime-version per .NET Core %s versione %s.", + "loc.messages.VersionNotFound": "Non è stato possibile trovare la versione %s corrispondente a %s", + "loc.messages.VersionNotAllowed": "La versione %s non è consentita. I tipi di versione consentiti sono: versionePrincipale.x, versionePrincipale.versioneSecondaria.x, versionePrincipale.versioneSecondaria.versionePatch. Maggiori dettagli: %s", + "loc.messages.VersionsCanNotBeCompared": "Non è possibile confrontare le versioni %s e %s. Entrambe le versioni devono essere esplicite.", + "loc.messages.FileNameNotCorrectCompleteFileName": "Il nome file %s non corrisponde a un file '.complete' corretto.", + "loc.messages.ChannelVersionsNotComparable": "Non è possibile confrontare le versioni %s e %s del canale. Devono includere entrambe versioni numeriche principali e secondarie.", + "loc.messages.LookingForVersionInChannel": "Ricerca della versione nel canale %s", + "loc.messages.FallingBackToAdjacentChannels": "Non è stato possibile trovare la versione %s nel relativo canale. Verrà eseguita la ricerca nei canali adiacenti.", + "loc.messages.ErrorWhileSettingDotNetToolPath": "Si è verificato un errore durante l'aggiunta del percorso dello strumento .NET Core alla variabile di ambiente PATH. Errore: %s", + "loc.messages.RequiredChannelVersionForSpec": "Ricerca del canale %s per la versione %s", + "loc.messages.ErrorWhileGettingVersionFromChannel": "Si è verificato un errore durante il recupero della versione %s dal canale %s. Errore: %s", + "loc.messages.ComparingInstalledFolderVersions": "Verrà eseguito un confronto per verificare se la versione %s da installare è successiva a una versione già installata con nome di cartella %s", + "loc.messages.ComparingInstalledFileVersions": "Verrà eseguito un confronto per verificare se la versione %s da installare è successiva a una versione già installata con nome file completo %s", + "loc.messages.InvalidChannelObject": "Non è possibile usare l'oggetto come canale. Mancano proprietà obbligatorie, come channel-version in releases.json.", + "loc.messages.ReleasesIndexBodyIncorrect": "Il corpo dell'indice delle versioni analizzato non è corretto. Verificare se la sezione releases-index non è vuota nel file.", + "loc.messages.InvalidVersionObject": "Il file releases.json contiene una versione con oggetto %s non valido: %s", + "loc.messages.InvalidVersion": "La versione specificata %s non è valida", + "loc.messages.FilesDataIsIncorrectInVersion": "Nella versione %s per la versione %s i dati dei file non sono corretti (potrebbero mancare campi obbligatori, come nome, RID e URL): %s", + "loc.messages.VersionFilesDataIncorrect": "I dati dei file della versione non sono presenti o non includono campi obbligatori.", + "loc.messages.VersionInformationNotComplete": "Le informazioni obbligatorie della versione %s non sono complete nel file releases.json. Errore: %s", + "loc.messages.FailedWhileExtractingPacakge": "Si è verificato un errore durante l'estrazione del pacchetto scaricato. Errore: %s", + "loc.messages.InstallingNuGetVersion": "Installazione della versione %s di NuGet", + "loc.messages.FailureWhileInstallingNuGetVersion": "Si è verificato un errore durante l'installazione della versione di NuGet. Errore: %s", + "loc.messages.SettingUpNugetProxySettings": "Impostazione della configurazione proxy per NuGet.", + "loc.messages.GlobalJsonFound": "È stato trovato un file global.json nel percorso %s", + "loc.messages.GlobalJsonSdkVersion": "La versione %s dell'SDK è specificata dal file global.json nel percorso %s", + "loc.messages.GlobalJsonIsEmpty": "Il file global.json nel percorso %s è vuoto. Non è stata specificata alcuna versione.", + "loc.messages.FailedToFindGlobalJson": "Non è stato possibile trovare il file global.json nel percorso: %s", + "loc.messages.FailedToReadGlobalJson": "Il formato del file global.json nel percorso '%s' non è corretto. Per informazioni su global.json, vedere https://docs.microsoft.com/it-it/dotnet/core/tools/global-json. Si è verificato un errore durante il tentativo di lettura di %s", + "loc.messages.VersionNumberHasTheWrongFormat": "Il formato del numero di versione %s non è corretto. È possibile specificare le versioni nei formati seguenti: 2.x => Installa la versione principale più recente. 2.2.x => Installa la versione principale e secondaria più recente. 2.2.104 => Installa la versione esatta. Individuare il valore di `version` per l'installazione di SDK/Runtime in releases.json. Il collegamento a releases.json della versione principale.secondaria è disponibile nel [**file releases-index**](https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json). Ad esempio, il collegamento a releases.json per la versione 2.2 è https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/2.2/releases.json", + "loc.messages.OnlyExplicitVersionAllowed": "Sono accettate solo versioni esplicite, ad esempio 2.2.301. La versione %s non è valida.", + "loc.messages.SupportPhaseNotPresentInChannel": "support-phase non è presente nel canale con channel-version %s.", + "loc.messages.DepricatedVersionNetCore": "La versione NET Core specificata %s non è supportata e verrà rimossa a breve dagli agenti ospitati. Per altre informazioni sui criteri di supporto .NET, vedere https://aka.ms/dotnet-core-support." +} \ No newline at end of file diff --git a/_generated/UseDotNetV2/Strings/resources.resjson/ja-JP/resources.resjson b/_generated/UseDotNetV2/Strings/resources.resjson/ja-JP/resources.resjson new file mode 100644 index 000000000000..3ce9a6b657dc --- /dev/null +++ b/_generated/UseDotNetV2/Strings/resources.resjson/ja-JP/resources.resjson @@ -0,0 +1,100 @@ +{ + "loc.friendlyName": ".Net Core の使用", + "loc.helpMarkDown": "[このタスクの詳細を表示](https://aka.ms/AA4xgy0)", + "loc.description": ".NET Core SDK の特定のバージョンをインターネットまたはローカル キャッシュから取得し、PATH に追加します。このタスクを使用して、後続のタスクで使用されている .NET Core のバージョンを変更します。さらに、プロキシのサポートも提供します。", + "loc.instanceNameFormat": ".NET Core $(packageType) $(version) の使用", + "loc.releaseNotes": "
  • 複数のバージョンを同時にインストールするためのサポート。
  • 最新のマイナーまたはメジャー バージョンをフェッチするためのバージョンのパターンのサポート。
  • マルチレベル検索を制限する
  • NuGet をインストールしてプロキシ サポートを制限する。
  • `global.json` ファイルから SDK のバージョンをインストールする
  • ", + "loc.group.displayName.advanced": "詳細設定", + "loc.input.label.packageType": "インストールするパッケージ", + "loc.input.help.packageType": "ランタイムのみをインストールするか、SDK をインストールするかを選択してください。", + "loc.input.label.useGlobalJson": "グローバル JSON を使用する", + "loc.input.help.useGlobalJson": "すべての SDK を global.json ファイルからインストールするには、このオプションを選択します。これらのファイルは system.DefaultWorkingDirectory から検索されます。検索ルート パスを変更するには、作業ディレクトリの入力を設定します。", + "loc.input.label.workingDirectory": "作業ディレクトリ", + "loc.input.help.workingDirectory": "`Use global json` を使用する際に、global.json ファイルを検索するパスを指定します。空の場合、`system.DefaultWorkingDirectory` がルート パスと見なされます。", + "loc.input.label.version": "バージョン", + "loc.input.help.version": "インストールする .NET Core SDK またはランタイムのバージョンを指定します。
    バージョンは以下の形式で指定できます
  • 2.x => メジャー バージョンが最新のものをインストールします。
  • 2.2.x => メジャー バージョンとマイナー バージョンが最新のものをインストールします
  • 2.2.104 => バージョンが正確に一致するものをインストールします

  • SDK またはランタイムをインストールするために release.json で `version` の値を探します。その major.minor バージョンの releases.json へのリンクは [**releases-index ファイル**](https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json) からわかります。たとえば、2.2 バージョンの releases.json へのリンクは https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/2.2/releases.json です", + "loc.input.label.vsVersion": "互換性のある Visual Studio バージョン", + "loc.input.help.vsVersion": ".NET Core SDK をインストールする、互換性のある Visual Studio のバージョンを指定します。メジャー バージョン、マイナー バージョン、パッチ番号を含む 16.6.4 などの完全な VS バージョンを指定します。releases.jsから SDK またはランタイムをインストールするための 'version' の値を検索します。この major.minor バージョンの releases.js へのリンクは、[**releases-index ファイル**](https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json)にあります。", + "loc.input.label.includePreviewVersions": "プレビュー バージョンを含める", + "loc.input.help.includePreviewVersions": "2.2.x を検索するときのように最新バージョンを検索するときにプレビュー バージョンを含める場合に選択します。次のように正確なバージョンを指定する場合、この設定は無視されます: 3.0.100-preview3-010431", + "loc.input.label.installationPath": ".Net Core をインストールするパス", + "loc.input.help.installationPath": ".NET Core SDK/ランタイムのインストール場所を指定します。各パスは、.Net の動作に次のような影響を与える可能性があります。
  • $(Agent.ToolsDirectory): このディレクトリはパイプライン間でクリーンアップされないため、この場合、バージョンがエージェントにキャッシュされます。エージェントで実行されるパイプラインはすべて、エージェントを使用して既にインストールされているバージョンにアクセスすることができます。
  • $(Agent.TempDirectory): このフォルダーは各パイプラインの後にクリーンアップされるので、この場合、キャッシュされた .Net Core バージョンがパイプラインで使用されないようにすることができます。
  • それ以外のすべてのパス: エージェント プロセスで他のいずれかのパスにアクセスできる場合は、そのパスを構成できます。これによってマシンの状態が変更され、それを実行しているすべてのプロセスに影響を与えます。
    適切なバージョンの .Net ホストの調査を構成できる複数レベルのルックアップ設定を構成することもできます。", + "loc.input.label.performMultiLevelLookup": "複数レベルの検索を実行", + "loc.input.help.performMultiLevelLookup": "この入力は、Windows ベースのエージェントにのみ適用されます。これは、適切な共有フレームワークを検索するための .NET ホスト プロセスの動作を構成します。
  • オフ: このタスクで指定されたフォルダーに存在するバージョンのみがホスト プロセスによって検索されます。
  • オン: ホストは、複数レベルのルックアップを使用した事前定義されたグローバルな場所の検索を試みます。
    既定のグローバルな場所は、次のとおりです:
    Windows の場合:
    C:\\Program Files\\dotnet (64 ビット プロセス)
    C:\\Program Files (x86)\\dotnet (32 ビット プロセス)
  • これについて詳しくは、[**こちら**](https://github.com/dotnet/core-setup/blob/master/Documentation/design-docs/multilevel-sharedfx-lookup.md)をご覧ください。
    ", + "loc.messages.ToolFailed": "ツールをインストールできませんでした: %s", + "loc.messages.ImplicitVersionNotSupported": "バージョンは、有効で明示的なバージョンである必要があります: %s", + "loc.messages.getMachinePlatformFailed": "マシンのプラットフォームの詳細を取得できませんでした。エラー: %s。", + "loc.messages.getDownloadUrlsFailed": "ダウンロード URL を取得できませんでした。エラー: %s。", + "loc.messages.UsingCachedTool": ".NET Core のキャッシュ済みのコピーが存在します。新しくインストールする必要はありません。キャッシュされたツールの場所は %s です。", + "loc.messages.CheckingToolCache": "このバージョンのキャッシュ済みコピーが存在するかどうか確認しています...", + "loc.messages.InstallingAfresh": "キャッシュに要求されたバージョンの .NET Core が含まれていません。ダウンロードしてインストールしています。", + "loc.messages.GettingDownloadUrl": ".NET Core %s バージョンをダウンロードする URL を取得しています: %s。", + "loc.messages.CouldNotDetectPlatform": "マシンの OS を検出できませんでした", + "loc.messages.NullDownloadUrls": "ダウンロード URL を作成できませんでした。指定されたバージョン %s が有効であることをご確認ください。", + "loc.messages.DownloadingUrl": "URL から .NET Core パッケージをダウンロードしています: %s", + "loc.messages.ExtractingPackage": "ダウンロードされたパッケージ %s を抽出しています。", + "loc.messages.CachingTool": "このインストール済みのツールをキャッシュしています。", + "loc.messages.SuccessfullyInstalled": ".NET Core %s バージョン %s が正常にインストールされました。", + "loc.messages.ToolToInstall": "インストールするツール: .NET Core %s バージョン %s。", + "loc.messages.PrimaryPlatform": "検出されたプラットフォーム (プライマリ): %s", + "loc.messages.LegacyPlatform": "検出されたプラットフォーム (レガシ): %s", + "loc.messages.CouldNotDownload": "次の URL からインストール パッケージをダウンロードできませんでした: %s。エラー: %s", + "loc.messages.FailedToDownloadPackage": "インストール用のパッケージをダウンロードできませんでした", + "loc.messages.PrependGlobalToolPath": "グローバル ツール パスを作成し、パスの先頭に追加しています。", + "loc.messages.VersionsFileMalformed": "指定されたバージョンのダウンロード リンクが、サポートされているバージョンのドキュメントの正しい形式ではありません => %s/ ", + "loc.messages.MatchingVersionNotFound": "次の指定バージョンと一致する %s バージョンが見つかりませんでした: %s。[プレビュー バージョンを含める] チェック ボックスがオンの場合、プレビュー バージョンは最新バージョンの検索でのみ考慮されます。", + "loc.messages.UnableToAccessPath": "パス %s にアクセスできません。エラー: %s。エージェント プロセスにそのパスへのアクセス権があることを確認してください。", + "loc.messages.VersionCanNotBeDownloadedFromUrl": "バージョン: %s を URL: %s からダウンロードできません。URL またはバージョンのいずれかが正しくありません。", + "loc.messages.CopyingFoldersIntoPath": "すべてのルート フォルダーを次のインストール パスにコピーしています: %s", + "loc.messages.CopyingFilesIntoPath": "ルート ファイル (dotnet.exe など) を次のインストール パスにコピーしています: %s", + "loc.messages.FailedToCopyTopLevelFiles": "ルート ファイルを次のインストール パスにコピーできませんでした: %s。エラー: %s", + "loc.messages.FailedWhileInstallingVersionAtPath": "パス: %s のバージョン: %s のインストール中、次のエラーで失敗しました: %s", + "loc.messages.ExplicitVersionRequired": "バージョン: %s は許可されていません。インストールするバージョンは、次の形式にする必要があります: major.minor.patchversion。例: 2.2.1", + "loc.messages.VersionFoundInCache": "バージョン: %s がキャッシュに見つかりました。", + "loc.messages.VersionNotFoundInCache": "バージョン %s がキャッシュに見つかりませんでした。", + "loc.messages.CreatingInstallationCompeleteFile": ".Net Core %s バージョン %s のインストールの完了マーカー ファイルを作成しています", + "loc.messages.CannotFindRuntimeVersionForCompletingInstallation": "パッケージの種類: %s、バージョン: %s のランタイム バージョンが見つかりません", + "loc.messages.PathNotFoundException": "パス: %s が見つかりませんでした。パスが存在することを確認してください。", + "loc.messages.VersionIsLocalLatest": "バージョン: %s は、パス: %s に存在するバージョン間で最新です。", + "loc.messages.VersionIsNotLocalLatest": "バージョン: %s は、%s に存在する最新のバージョンではありません", + "loc.messages.DownloadUrlForMatchingOsNotFound": "次の OS プラットフォーム (rid) の .Net Core %s バージョン %s のダウンロード URL が見つかりませんでした: %s", + "loc.messages.ExceptionWhileDownloadOrReadReleasesIndex": "releases-index.json のダウンロードまたは解析に失敗しました。エラー: %s", + "loc.messages.MatchingVersionForUserInputVersion": "次のユーザー指定バージョン仕様のチャネル %s でバージョン %s が見つかりました: %s", + "loc.messages.UrlForReleaseChannelNotFound": "次のチャネル バージョンの release.json の URL が見つかりませんでした: %s", + "loc.messages.NoSuitableChannelWereFound": "バージョン %s に対応するチャネルが見つかりませんでした。", + "loc.messages.DetectingPlatform": "OS に対して正しいダウンロード パッケージを見つけるために OS プラットフォームを検出しています。", + "loc.messages.FailedInDetectingMachineArch": "マシン OS プラットフォームの検出中、次のエラーで失敗しました: %s", + "loc.messages.runtimeVersionPropertyNotFound": ".Net Core %s バージョン %s の runtime-version プロパティが見つかりませんでした。", + "loc.messages.VersionNotFound": "%s バージョンの一致: %s が見つかりませんでした", + "loc.messages.VersionNotAllowed": "バージョン %s は許可されていません。許可されているバージョンの種類は、majorVersion.x、majorVersion.minorVersion.x、majorVersion.minorVersion.patchVersion です。詳細情報: %s", + "loc.messages.VersionsCanNotBeCompared": "バージョン %s と %s を比較できません。両方のバージョンを明示的に指定する必要があります。", + "loc.messages.FileNameNotCorrectCompleteFileName": "ファイル名 %s は正しい '.complete' ファイルではありません。", + "loc.messages.ChannelVersionsNotComparable": "チャネルのバージョン %s と %s を比較できません。両方とも数値のメジャー バージョンとマイナー バージョンが必要です。", + "loc.messages.LookingForVersionInChannel": "チャネル %s のバージョンを検索しています", + "loc.messages.FallingBackToAdjacentChannels": "バージョン %s がそのチャネルで見つかりませんでした。隣接するチャネルを検索します。", + "loc.messages.ErrorWhileSettingDotNetToolPath": ".Net Core Tool パスを PATH 環境変数の先頭に追加しているときに失敗しました。エラー: %s", + "loc.messages.RequiredChannelVersionForSpec": "バージョン %s のチャネル %s を検索しています", + "loc.messages.ErrorWhileGettingVersionFromChannel": "チャネル %s からのバージョン %s の取得中、次のエラーで失敗しました: %s", + "loc.messages.ComparingInstalledFolderVersions": "インストールされるバージョン %s が、フォルダー名 %s の既にインストールされているバージョンより後のものかどうかを比較しています", + "loc.messages.ComparingInstalledFileVersions": "インストールされるバージョン %s が、version complete ファイル名 %s の既にインストールされているバージョンより後のものかどうかを比較しています", + "loc.messages.InvalidChannelObject": "オブジェクトをチャネルとして使用することはできません。channel-version、release. json などの必須プロパティがありません。", + "loc.messages.ReleasesIndexBodyIncorrect": "解析されたリリース インデックス本体が正しくありません。ファイルの releases-index セクションが空でないかどうかを確認してください。", + "loc.messages.InvalidVersionObject": "releases.json には、無効な %s オブジェクトを含むリリースが含まれています: %s", + "loc.messages.InvalidVersion": "指定されたバージョン %s が無効です", + "loc.messages.FilesDataIsIncorrectInVersion": "リリース %s (バージョン %s) のファイル データが正しくありません (name、rid、および url などの必須フィールドが存在していない可能性があります): %s", + "loc.messages.VersionFilesDataIncorrect": "バージョンのファイル データがないか、必須フィールドがありません。", + "loc.messages.VersionInformationNotComplete": "バージョン: %s で必要な情報が releases.json ファイルで不足しています。エラー: %s", + "loc.messages.FailedWhileExtractingPacakge": "ダウンロードされたパッケージの抽出中、次のエラーで失敗しました: %s", + "loc.messages.InstallingNuGetVersion": "NuGet バージョン %s をインストールしています", + "loc.messages.FailureWhileInstallingNuGetVersion": "NuGet バージョンのインストール中にエラーが発生しました。エラー: %s", + "loc.messages.SettingUpNugetProxySettings": "NuGet のプロキシ構成を設定しています。", + "loc.messages.GlobalJsonFound": "パス %s に global.json が見つかりました", + "loc.messages.GlobalJsonSdkVersion": "SDK バージョン %s が、パス %s の global.json で指定されています", + "loc.messages.GlobalJsonIsEmpty": "パス %s にある global.json が空です。バージョンが指定されていません。", + "loc.messages.FailedToFindGlobalJson": "パス %s およびその内部に global.json が見つかりませんでした", + "loc.messages.FailedToReadGlobalJson": "パス '%s' にある global.json の形式が正しくありません。global.json の詳細については、https://docs.microsoft.com/ja-jp/dotnet/core/tools/global-json をご覧ください。%s の読み取り中にエラーが発生しました", + "loc.messages.VersionNumberHasTheWrongFormat": "バージョン番号 %s の形式が正しくありません。バージョンは次の形式で指定できます。2.x => メジャー バージョンが最新のものをインストールします。2.2.x => メジャー バージョンとマイナー バージョンが最新のものをインストールします。2.2.104 => バージョンが正確に一致するものをインストールします。SDK またはランタイムのインストール用の 'version' の値を release.json で探します。その major.minor バージョンの releases.json へのリンクは [**releases-index ファイル**](https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json) からわかります。たとえば、2.2 バージョンの releases.json へのリンクは https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/2.2/releases.json です", + "loc.messages.OnlyExplicitVersionAllowed": "2.2.301 など、明示的なバージョンのみが許可されます。バージョン %s は有効ではありません。", + "loc.messages.SupportPhaseNotPresentInChannel": "サポート フェーズがチャネル バージョン %s のチャネルにありません。", + "loc.messages.DepricatedVersionNetCore": "指定された %s の .NET Core バージョンはサポートが終了しており、ホストされているエージェントからまもなく削除される予定です。.NET サポート ポリシーの詳細については、https://aka.ms/dotnet-core-support を参照してください。" +} \ No newline at end of file diff --git a/_generated/UseDotNetV2/Strings/resources.resjson/ko-KR/resources.resjson b/_generated/UseDotNetV2/Strings/resources.resjson/ko-KR/resources.resjson new file mode 100644 index 000000000000..bd184723da88 --- /dev/null +++ b/_generated/UseDotNetV2/Strings/resources.resjson/ko-KR/resources.resjson @@ -0,0 +1,100 @@ +{ + "loc.friendlyName": ".NET Core 사용", + "loc.helpMarkDown": "[이 작업에 대한 자세한 정보](https://aka.ms/AA4xgy0)", + "loc.description": "인터넷 또는 로컬 캐시에서 특정 버전의 .NET Core SDK를 가져와 PATH에 추가합니다. 이 작업을 사용하여 후속 작업에 사용되는 .NET Core 버전을 변경할 수 있습니다. 프록시 지원도 제공합니다.", + "loc.instanceNameFormat": ".NET Core $(packageType) $(version) 사용", + "loc.releaseNotes": "
  • 여러 버전을 나란히 설치할 수 있습니다.
  • 부/주 버전에서 최신 패턴을 가져오도록 버전의 패턴을 지원합니다.
  • 다단계 조회 제한
  • NuGet을 설치하고 프록시 지원을 제공합니다.
  • 'global.json' 파일에서 sdk 버전을 설치합니다.
  • ", + "loc.group.displayName.advanced": "고급", + "loc.input.label.packageType": "설치할 패키지", + "loc.input.help.packageType": "런타임만 설치할지 또는 SDK를 설치할지 선택합니다.", + "loc.input.label.useGlobalJson": "전역 json 사용", + "loc.input.help.useGlobalJson": "global.json 파일에서 모든 SDK를 설치하려면 이 옵션을 선택합니다. 이러한 파일은 system.DefaultWorkingDirectory에서 검색됩니다. 작업 디렉터리 입력을 설정하여 검색 루트 경로를 변경할 수 있습니다.", + "loc.input.label.workingDirectory": "작업 디렉터리", + "loc.input.help.workingDirectory": "'전역 json 사용'을 사용할 때 global.json 파일을 검색할 경로를 지정합니다. 비워 두면 `system.DefaultWorkingDirectory`가 루트 경로로 간주됩니다.", + "loc.input.label.version": "버전", + "loc.input.help.version": "설치할 .NET Core SDK 또는 런타임 버전을 지정합니다.
    다음 형식으로 버전을 지정할 수 있습니다.
  • 2.x => 주 버전으로 최신 버전을 설치합니다.
  • 2.2.x => 주 버전과 부 버전으로 최신 버전을 설치합니다.
  • 2.2.104 => 정확한 버전을 설치합니다.

  • releases.json에서 SDK/런타임을 설치할 '버전' 값을 찾습니다. 해당 major.minor 버전의 releases.json 링크는 [**releases-index 파일**](https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json)에서 확인할 수 있습니다. 예를 들어 2.2 버전의 releases.json 링크는 https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/2.2/releases.json입니다.", + "loc.input.label.vsVersion": "호환되는 Visual Studio 버전", + "loc.input.help.vsVersion": ".NET Core SDK를 설치할 호환되는 Visual Studio의 버전을 지정합니다. 16.6.4처럼 주 버전, 부 버전 및 패치 번호가 포함된 전체 VS 버전을 지정합니다. releases.json에서 SDK/런타임을 설치하기 위해 '버전' 값을 찾으세요. 해당 주.부 버전의 releases.json 링크는 [**releases-index 파일**](https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json)에서 찾을 수 있습니다.", + "loc.input.label.includePreviewVersions": "미리 보기 버전 포함", + "loc.input.help.includePreviewVersions": "최신 버전을 검색할 때(예: 2.2.x 검색) 미리 보기 버전을 포함하려면 선택합니다. 정확한 버전(예: 3.0.100-preview3-010431)을 지정하는 경우 이 설정은 무시됩니다.", + "loc.input.label.installationPath": ".NET Core 설치 경로", + "loc.input.help.installationPath": ".NET Core SDK/런타임을 설치할 위치를 지정합니다. 경로에 따라 .NET의 동작에 다음과 같은 영향을 줄 수 있습니다.
  • $(Agent.ToolsDirectory): 이 디렉터리는 파이프라인 간에 정리되지 않으므로 버전이 에이전트에 캐시되도록 합니다. 에이전트에서 실행되는 모든 파이프라인이 이전에 해당 에이전트를 사용하여 설치된 버전에 액세스할 수 있습니다.
  • $(Agent.TempDirectory): 이 폴더는 각 파이프라인 후에 정리되므로 파이프라인에서 캐시된 .NET Core 버전을 사용하지 않도록 할 수 있습니다.
  • 다른 모든 경로: 에이전트 프로세스에서 경로에 액세스할 수 있기만 하면 다른 경로를 구성할 수 있습니다. 이렇게 하면 머신의 상태가 변경되고 머신에서 실행되는 모든 프로세스에 영향을 줍니다.
    적합한 버전에 대해 .NET 호스트 프로빙을 구성할 수 있는 다단계 조회 설정을 구성할 수도 있습니다.", + "loc.input.label.performMultiLevelLookup": "다단계 조회 수행", + "loc.input.help.performMultiLevelLookup": "이 입력은 Windows 기반 에이전트에만 해당합니다. 적합한 공유 프레임워크를 찾기 위한 .NET 호스트 프로세스의 동작을 구성합니다.
  • 선택 취소됨: 호스트 프로세스에서 이 작업에 지정된 폴더에 있는 버전만 확인합니다.
  • 선택됨: 호스트가 다단계 조회를 사용하여 미리 정의된 전역 위치에서 찾습니다.
    기본 전역 위치는 다음과 같습니다.
    Windows:
    C:\\Program Files\\dotnet(64비트 프로세스)
    C:\\Program Files (x86)\\dotnet(32비트 프로세스)
  • [**여기**](https://github.com/dotnet/core-setup/blob/master/Documentation/design-docs/multilevel-sharedfx-lookup.md)에서 자세한 정보를 확인할 수 있습니다.
    ", + "loc.messages.ToolFailed": "도구 설치 실패: %s", + "loc.messages.ImplicitVersionNotSupported": "버전은 유효하고 명시적인 버전(%s)이어야 합니다.", + "loc.messages.getMachinePlatformFailed": "머신 플랫폼 정보를 가져오지 못했습니다. 오류: %s.", + "loc.messages.getDownloadUrlsFailed": "다운로드 URL을 가져오지 못했습니다. 오류: %s.", + "loc.messages.UsingCachedTool": ".NET Core의 캐시된 복사본이 있습니다. 새로 설치하지 않아도 됩니다. 캐시된 도구 위치: %s.", + "loc.messages.CheckingToolCache": "이 버전에 대해 캐시된 복사본이 있는지 확인 중...", + "loc.messages.InstallingAfresh": "캐시에 요청된 .NET Core 버전이 없습니다. 지금 다운로드하여 설치합니다.", + "loc.messages.GettingDownloadUrl": ".NET Core %s 버전, %s을(를) 다운로드할 URL을 가져오는 중입니다.", + "loc.messages.CouldNotDetectPlatform": "머신의 OS를 검색할 수 없습니다.", + "loc.messages.NullDownloadUrls": "다운로드 URL을 생성할 수 없습니다. 지정한 버전 %s이(가) 유효한지 확인하세요.", + "loc.messages.DownloadingUrl": "URL %s에서 .NET Core 패키지를 다운로드하는 중", + "loc.messages.ExtractingPackage": "다운로드한 패키지 %s의 압축을 푸는 중입니다.", + "loc.messages.CachingTool": "설치된 이 도구를 캐싱하는 중입니다.", + "loc.messages.SuccessfullyInstalled": ".NET Core %s 버전 %s을(를) 설치했습니다.", + "loc.messages.ToolToInstall": "설치할 도구: .NET Core %s 버전 %s.", + "loc.messages.PrimaryPlatform": "검색된 플랫폼(기본): %s", + "loc.messages.LegacyPlatform": "검색된 플랫폼(레거시): %s", + "loc.messages.CouldNotDownload": "이 URL %s에서 설치 패키지를 다운로드할 수 없습니다. 오류: %s", + "loc.messages.FailedToDownloadPackage": "설치할 패키지를 다운로드하지 못했습니다.", + "loc.messages.PrependGlobalToolPath": "전역 도구 경로를 만들어 PATH 앞에 추가하는 중입니다.", + "loc.messages.VersionsFileMalformed": "지정한 버전의 다운로드 링크가 지원되는 버전 문서에서 올바르게 구성되지 않았습니다. => %s/", + "loc.messages.MatchingVersionNotFound": "일치하는 %s 버전을 찾을 수 없습니다. 지정한 버전은 %s입니다. [미리 보기 버전 포함] 확인란을 선택한 경우에만 최신 버전 검색에서 미리 보기 버전이 고려됩니다.", + "loc.messages.UnableToAccessPath": "%s 경로에 액세스할 수 없습니다. 오류: %s \n 에이전트 프로세스에 경로에 대한 액세스 권한이 있는지 확인하세요.", + "loc.messages.VersionCanNotBeDownloadedFromUrl": "%s 버전을 URL %s에서 다운로드할 수 없습니다. URL 또는 버전이 잘못되었습니다.", + "loc.messages.CopyingFoldersIntoPath": "모든 루트 폴더를 설치 경로 %s에 복사하는 중", + "loc.messages.CopyingFilesIntoPath": "루트 파일(예: dotnet.exe)을 설치 경로 %s에 복사하는 중", + "loc.messages.FailedToCopyTopLevelFiles": "루트 파일을 설치 경로 %s에 복사하지 못했습니다. 오류: %s", + "loc.messages.FailedWhileInstallingVersionAtPath": "%s 버전을 %s 경로에 설치하지 못했습니다. 오류: %s", + "loc.messages.ExplicitVersionRequired": "%s 버전은 허용되지 않습니다. 설치할 버전은 major.minor.patchversion 형식이어야 합니다. 예: 2.2.1", + "loc.messages.VersionFoundInCache": "캐시에서 %s 버전을 찾았습니다.", + "loc.messages.VersionNotFoundInCache": "캐시에서 %s 버전을 찾을 수 없습니다.", + "loc.messages.CreatingInstallationCompeleteFile": ".NET Core %s 버전 %s의 설치 완료 표시 파일을 만드는 중", + "loc.messages.CannotFindRuntimeVersionForCompletingInstallation": "패키지 형식 %s 버전 %s의 런타임 버전을 찾을 수 없습니다.", + "loc.messages.PathNotFoundException": "%s 경로를 찾을 수 없습니다. 경로가 있는지 확인하세요.", + "loc.messages.VersionIsLocalLatest": "%s 버전이 %s 경로에 있는 버전 중 최신 버전입니다.", + "loc.messages.VersionIsNotLocalLatest": "%s 버전은 %s에 있는 버전 중 최신 버전이 아닙니다.", + "loc.messages.DownloadUrlForMatchingOsNotFound": "다음 OS 플랫폼(RID)용 .NET Core %s 버전 %s의 다운로드 URL을 찾을 수 없음: %s", + "loc.messages.ExceptionWhileDownloadOrReadReleasesIndex": "releases-index.json을 다운로드하거나 구문 분석하지 못했습니다. 오류: %s", + "loc.messages.MatchingVersionForUserInputVersion": "%s 버전을 %s 채널(사용자 지정 버전 사양 %s)에서 찾았습니다.", + "loc.messages.UrlForReleaseChannelNotFound": "채널 버전 %s의 releases.json URL을 찾을 수 없습니다.", + "loc.messages.NoSuitableChannelWereFound": "%s 버전에 해당하는 채널을 찾을 수 없습니다.", + "loc.messages.DetectingPlatform": "OS에 맞는 다운로드 패키지를 찾기 위해 OS 플랫폼을 검색하는 중입니다.", + "loc.messages.FailedInDetectingMachineArch": "머신 OS 플랫폼을 검색하지 못했습니다. 오류: %s", + "loc.messages.runtimeVersionPropertyNotFound": ".NET Core %s 버전 %s의 runtime-version 속성을 찾을 수 없습니다.", + "loc.messages.VersionNotFound": "%s 버전 일치: %s을(를) 찾을 수 없습니다.", + "loc.messages.VersionNotAllowed": "%s 버전은 허용되지 않습니다. 허용되는 버전 유형은 majorVersion.x, majorVersion.minorVersion.x, majorVersion.minorVersion.patchVersion입니다. 자세한 내용: %s", + "loc.messages.VersionsCanNotBeCompared": "%s 버전과 %s 버전을 비교할 수 없습니다. 둘 다 명시적 버전이어야 합니다.", + "loc.messages.FileNameNotCorrectCompleteFileName": "파일 이름 %s이(가) 올바른 '.complete' 파일이 아닙니다.", + "loc.messages.ChannelVersionsNotComparable": "채널 버전 %s과(와) %s을(를) 비교할 수 없습니다. 둘 다 주 버전과 부 버전이 숫자여야 합니다.", + "loc.messages.LookingForVersionInChannel": "%s 채널에서 버전을 검색하는 중", + "loc.messages.FallingBackToAdjacentChannels": "해당 채널에서 %s 버전을 찾을 수 없습니다. 이제 인접한 채널에서 검색합니다.", + "loc.messages.ErrorWhileSettingDotNetToolPath": ".NET Core 도구 경로를 PATH 환경 변수 앞에 추가하지 못했습니다. 오류: %s", + "loc.messages.RequiredChannelVersionForSpec": "%s 채널(%s 버전)을 찾는 중", + "loc.messages.ErrorWhileGettingVersionFromChannel": "%s 버전을 %s 채널에서 가져오지 못했습니다. 오류: %s", + "loc.messages.ComparingInstalledFolderVersions": "설치되는 버전 %s이(가) 폴더 이름 %s(으)로 설치된 기존 버전보다 이후 버전인지 비교하는 중", + "loc.messages.ComparingInstalledFileVersions": "설치되는 버전 %s이(가) version.complete 파일 이름 %s(으)로 설치된 기존 버전보다 이후 버전인지 비교하는 중", + "loc.messages.InvalidChannelObject": "개체를 채널로 사용할 수 없습니다. channel-version, releases.json 등의 필수 속성이 누락되었습니다.", + "loc.messages.ReleasesIndexBodyIncorrect": "구문 분석된 릴리스 인덱스 본문이 잘못되었습니다. 파일에서 releases-index 섹션이 비어 있지 않은지 확인하세요.", + "loc.messages.InvalidVersionObject": "Releases.json에 잘못된 %s 개체가 포함된 릴리스가 있음: %s", + "loc.messages.InvalidVersion": "잘못된 버전 %s이(가) 지정되었습니다.", + "loc.messages.FilesDataIsIncorrectInVersion": "%s 릴리스(%s 버전)의 파일 데이터가 잘못됨(이름, RID, URL 등의 필수 필드가 누락되었을 수 있음): %s", + "loc.messages.VersionFilesDataIncorrect": "버전의 파일 데이터가 없거나 필수 필드가 누락되었습니다.", + "loc.messages.VersionInformationNotComplete": "releases.json 파일에 있는 %s 버전의 필수 정보가 불완전합니다. 오류: %s", + "loc.messages.FailedWhileExtractingPacakge": "다운로드한 패키지를 추출하지 못했습니다. 오류: %s", + "loc.messages.InstallingNuGetVersion": "NuGet 버전 %s을(를) 설치하는 중", + "loc.messages.FailureWhileInstallingNuGetVersion": "NuGet 버전을 설치하지 못했습니다. 오류: %s", + "loc.messages.SettingUpNugetProxySettings": "NuGet의 프록시 구성을 설정하는 중입니다.", + "loc.messages.GlobalJsonFound": "경로 %s에서 global.json을 찾았습니다.", + "loc.messages.GlobalJsonSdkVersion": "global.json이 SDK 버전 %s을(를) 경로 %s에 지정했습니다.", + "loc.messages.GlobalJsonIsEmpty": "경로 %s의 global.json이 비어 있습니다. 버전을 지정하지 않았습니다.", + "loc.messages.FailedToFindGlobalJson": "%s 경로에서 global.json을 찾지 못했습니다.", + "loc.messages.FailedToReadGlobalJson": "경로 '%s'의 global.json 형식이 잘못되었습니다. global.json에 대한 내용은 https://docs.microsoft.com/en-us/dotnet/core/tools/global-json을 참조하세요. %s을(를) 읽는 동안 오류가 발생했습니다.", + "loc.messages.VersionNumberHasTheWrongFormat": "버전 번호 %s이(가) 올바른 형식이 아닙니다. 다음 형식으로 버전을 지정할 수 있습니다. 2.x => 주 버전으로 최신 버전을 설치합니다. 2.2.x => 주 버전과 부 버전으로 최신 버전을 설치합니다. 2.2.104 => 정확한 버전을 설치합니다. releases.json에서 SDK/런타임을 설치할 '버전' 값을 찾습니다. 해당 major.minor 버전의 releases.json 링크는 [**releases-index 파일**](https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json)에서 확인할 수 있습니다. 예를 들어 2.2 버전의 releases.json 링크는 https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/2.2/releases.json입니다.", + "loc.messages.OnlyExplicitVersionAllowed": "명시적 버전(예: 2.2.301)만 허용됩니다. 버전 %s은(는) 잘못되었습니다.", + "loc.messages.SupportPhaseNotPresentInChannel": "채널 버전이 %s인 채널에 지원 단계가 없습니다.", + "loc.messages.DepricatedVersionNetCore": "%s을(를) 지정한 NET Core 버전이 지원되지 않으며 곧 호스트된 에이전트에서 제거될 예정입니다. .NET 지원 정책에 대한 자세한 내용은 https://aka.ms/dotnet-core-support를 참조하세요." +} \ No newline at end of file diff --git a/_generated/UseDotNetV2/Strings/resources.resjson/ru-RU/resources.resjson b/_generated/UseDotNetV2/Strings/resources.resjson/ru-RU/resources.resjson new file mode 100644 index 000000000000..862b3b301e34 --- /dev/null +++ b/_generated/UseDotNetV2/Strings/resources.resjson/ru-RU/resources.resjson @@ -0,0 +1,100 @@ +{ + "loc.friendlyName": "Использовать .NET Core", + "loc.helpMarkDown": "[См. дополнительные сведения об этой задаче](https://aka.ms/AA4xgy0)", + "loc.description": "Получает определенную версию пакета SDK для .NET Core из Интернета или локального кэша и добавляет ее в PATH. Эта задача служит для изменения версии .NET Core, используемой в последующих задачах. Дополнительно обеспечивает поддержку прокси.", + "loc.instanceNameFormat": "Использовать .NET Core $(packageType) $(version)", + "loc.releaseNotes": "
  • Поддержка параллельной установки нескольких версий.
  • Поддержка шаблонов в версии для получения последнего дополнительного или основного номера версии.
  • Ограничение многоуровневого поиска.
  • Установка NuGet и обеспечение поддержки прокси.
  • Установка версии пакета SDK из файлов global.json.
  • ", + "loc.group.displayName.advanced": "Дополнительно", + "loc.input.label.packageType": "Пакет для установки", + "loc.input.help.packageType": "Выберите, следует ли устанавливать только среду выполнения или пакет SDK.", + "loc.input.label.useGlobalJson": "Использовать глобальную JSON", + "loc.input.help.useGlobalJson": "Выберите этот параметр, чтобы установить все пакеты SDK из файлов global.json. Поиск этих файлов осуществляется из system.DefaultWorkingDirectory. Вы можете изменить корневой путь поиска, задав входные данные для рабочего каталога.", + "loc.input.label.workingDirectory": "Рабочий каталог", + "loc.input.help.workingDirectory": "Укажите путь, по которому следует искать файлы global.json при применении команды \"Использовать глобальную JSON\". Если значение пусто, в качестве корневого пути будет использоваться system.DefaultWorkingDirectory.", + "loc.input.label.version": "Версия", + "loc.input.help.version": "Укажите версию пакета SDK для .NET Core или среды выполнения для установки.
    Версии можно задать в следующих форматах
  • 2.x => установка последнего основного номера версии
  • 2.2.x => установка последнего основного и дополнительного номеров версии
  • 2.2.104 => установка точной версии

  • Найдите значение version для установки пакета SDK или среды выполнения в releases.json. Ссылку на releases.json для версии основной_номер.дополнительный_номер можно найти в [**файле releases-index.**](https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json). Ссылка на releases.json для версии 2.2: https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/2.2/releases.json", + "loc.input.label.vsVersion": "Совместимая версия Visual Studio", + "loc.input.help.vsVersion": "Укажите совместимую версию Visual Studio, для которой будет установлен пакет SDK .NET Core. Укажите полную версию vs-version, содержащую основную версию, дополнительную версию и номер исправления, например 16.6.4. Значение параметра \"version\" для установки пакета SDK или среды выполнения можно найти в файле releases.json. Ссылку на файл releases.json для этого сочетания основной и дополнительной версии можно найти в [**файле releases-index.**] (https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json)", + "loc.input.label.includePreviewVersions": "Включить предварительные версии", + "loc.input.help.includePreviewVersions": "Выберите, нужно ли включать предварительные версии при поиске последних версий, например 2.2.x. Этот параметр игнорируется, если указана точная версия, например 3.0.100-preview3-010431", + "loc.input.label.installationPath": "Путь для установки .NET Core", + "loc.input.help.installationPath": "Укажите, где следует установить пакет SDK для .NET Core или среду выполнения. Различные пути могут оказывать соответствующее воздействие на поведение .NET.
  • $(Agent.ToolsDirectory): приведет к кэшированию версии на агенте, так как этот каталог не очищается между конвейерами. Все конвейеры, выполняющиеся на агенте, имеют доступ к версиям, ранее установленным с помощью этого агента.
  • $(Agent.TempDirectory): гарантирует, что конвейер не использует кэшированную версию .NET Core, так как эта папка очищается после каждого конвейера.
  • Любой другой путь: вы можете настроить любой другой путь, при условии, что процесс агента имеет доступ к нему. Это приведет к изменению состояния компьютера и повлияет на все выполняющиеся там процессы.
    Обратите внимание, что можно также использовать параметр многоуровневого поиска, который позволяет настроить проверку подходящей версии узлом .NET.", + "loc.input.label.performMultiLevelLookup": "Выполнить многоуровневый поиск", + "loc.input.help.performMultiLevelLookup": "Эти входные данные применимы только для агентов на основе Windows. Этот параметр настраивает поведение хост-процесса .NET для поиска подходящей общей платформы.
  • Флажок снят: хост-процесс будет просматривать только версии в папке, указанной в этой задаче.
  • Флажок установлен: хост-процесс попытается искать в предварительно определенных глобальных расположениях с использованием многоуровневого поиска.
    Глобальные расположения по умолчанию:
    Для Windows:
    C:\\Program Files\\dotnet (64-разрядные процессы)
    C:\\Program Files (x86)\\dotnet (32-разрядные процессы)
  • Дополнительные сведения см. [**здесь**](https://github.com/dotnet/core-setup/blob/master/Documentation/design-docs/multilevel-sharedfx-lookup.md).
    ", + "loc.messages.ToolFailed": "Сбой установки инструмента: %s", + "loc.messages.ImplicitVersionNotSupported": "Следует указать допустимую и явную версию: %s", + "loc.messages.getMachinePlatformFailed": "Не удалось получить сведения о платформе компьютера. Ошибка: %s.", + "loc.messages.getDownloadUrlsFailed": "Не удалось получить URL-адреса для скачивания. Ошибка: %s.", + "loc.messages.UsingCachedTool": "Есть кэшированная копия пакета .NET Core. Устанавливать пакет заново не нужно. Расположение кэшированного пакета: %s.", + "loc.messages.CheckingToolCache": "Проверка наличия кэшированной копии для этой версии...", + "loc.messages.InstallingAfresh": "Кэш не содержит запрошенной версии .NET Core. Идет ее скачивание и установка.", + "loc.messages.GettingDownloadUrl": "Идет получение URL-адреса для скачивания версии %s .NET Core: %s.", + "loc.messages.CouldNotDetectPlatform": "Не удалось определить ОС компьютера", + "loc.messages.NullDownloadUrls": "Не удалось сформировать URL-адрес для скачивания. Убедитесь в том, что указанная версия %s допустима.", + "loc.messages.DownloadingUrl": "Скачивается пакет .NET Core с URL-адреса: %s", + "loc.messages.ExtractingPackage": "Распаковка скачанного пакета %s.", + "loc.messages.CachingTool": "Кэширование установленного инструмента.", + "loc.messages.SuccessfullyInstalled": "Пакет .NET Core %s версии %s успешно установлен.", + "loc.messages.ToolToInstall": "Инструмент для установки: .NET Core %s версии %s.", + "loc.messages.PrimaryPlatform": "Обнаружена платформа (основная): %s", + "loc.messages.LegacyPlatform": "Обнаружена платформа (прежней версии): %s", + "loc.messages.CouldNotDownload": "Не удалось скачать пакет установки с этого URL-адреса: %s. Ошибка: %s", + "loc.messages.FailedToDownloadPackage": "Не удалось скачать пакет для установки", + "loc.messages.PrependGlobalToolPath": "Создание глобального пути к средству и добавление его в начало PATH.", + "loc.messages.VersionsFileMalformed": "Ссылки на скачивание для указанной версии неправильно сформированы в документе поддерживаемых версий => %s/", + "loc.messages.MatchingVersionNotFound": "Не удалось найти соответствующую версию %s для указанной версии: %s. Обратите внимание, что предварительные версии учитываются при поиске последней версии, только если установлен флажок \"Включить предварительные версии\".", + "loc.messages.UnableToAccessPath": "Не удалось получить доступ к пути: %s. Ошибка: %s. Убедитесь, что процесс агента имеет доступ к этому пути.", + "loc.messages.VersionCanNotBeDownloadedFromUrl": "Версию %s не удается скачать по URL-адресу %s. Неверное значение URL-адреса или версии.", + "loc.messages.CopyingFoldersIntoPath": "Копирование всех корневых папок в путь установки: %s", + "loc.messages.CopyingFilesIntoPath": "Копирование корневых файлов (например, dotnet.exe) в путь установки: %s", + "loc.messages.FailedToCopyTopLevelFiles": "Не удалось скопировать корневые файлы в путь установки: %s. Ошибка: %s", + "loc.messages.FailedWhileInstallingVersionAtPath": "Сбой при установке версии: %s по пути: %s, ошибка: %s", + "loc.messages.ExplicitVersionRequired": "Версия %s не разрешена. Устанавливаемые версии должны иметь формат: основной_номер.дополнительный_номер.версия_исправления. Например: 2.2.1", + "loc.messages.VersionFoundInCache": "Версия %s найдена в кэше.", + "loc.messages.VersionNotFoundInCache": "Версия %s не найдена в кэше.", + "loc.messages.CreatingInstallationCompeleteFile": "Создание файла маркера завершения установки для .NET Core %s версии %s", + "loc.messages.CannotFindRuntimeVersionForCompletingInstallation": "Не удается найти версию среды выполнения для типа пакета: %s с версией: %s", + "loc.messages.PathNotFoundException": "Не удалось найти путь: %s. Убедитесь, что он существует.", + "loc.messages.VersionIsLocalLatest": "Версия %s является последней из версий, представленных по пути %s", + "loc.messages.VersionIsNotLocalLatest": "Версия %s не является последней из версий, представленных в %s", + "loc.messages.DownloadUrlForMatchingOsNotFound": "Не удалось найти URL-адрес скачивания для .NET Core %s версии %s для следующих платформ ОС (относительный идентификатор): %s", + "loc.messages.ExceptionWhileDownloadOrReadReleasesIndex": "Не удалось скачать или проанализировать releases-index.json, ошибка: %s", + "loc.messages.MatchingVersionForUserInputVersion": "Найдена версия %s в канале %s для указанной пользователем спецификации версии: %s", + "loc.messages.UrlForReleaseChannelNotFound": "Не удалось найти URL-адрес для releases.json версии канала: %s", + "loc.messages.NoSuitableChannelWereFound": "Не удалось найти канал, соответствующий версии %s.", + "loc.messages.DetectingPlatform": "Определение платформы ОС для поиска правильного загружаемого пакета ОС.", + "loc.messages.FailedInDetectingMachineArch": "Сбой при определении платформы ОС компьютера, ошибка: %s", + "loc.messages.runtimeVersionPropertyNotFound": "Не удалось найти свойство runtime-version для .NET Core %s версии %s.", + "loc.messages.VersionNotFound": "Сопоставление версий %s: не удалось найти %s", + "loc.messages.VersionNotAllowed": "Версия %s не разрешена. Разрешенные типы версий: основной_номер_версии.x, основной_номер_версии.дополнительный_номер_версии.x, основной_номер_версии.дополнительный_номер_версии.версия_исправления. Дополнительные сведения: %s", + "loc.messages.VersionsCanNotBeCompared": "Версии %s и %s невозможно сравнить. Обе версии должны быть явными.", + "loc.messages.FileNameNotCorrectCompleteFileName": "Имя файла %s не является правильным файлом COMPLETE.", + "loc.messages.ChannelVersionsNotComparable": "Версии канала %s и %s невозможно сравнить. Они должны иметь числовые основной и дополнительный номера версии.", + "loc.messages.LookingForVersionInChannel": "Поиск версии в канале %s", + "loc.messages.FallingBackToAdjacentChannels": "Не удалось найти версию %s в ее канале, сейчас будет выполнен поиск в смежных каналах.", + "loc.messages.ErrorWhileSettingDotNetToolPath": "Сбой при добавлении пути к средствам .NET Core в начало переменной среды PATH. Ошибка: %s", + "loc.messages.RequiredChannelVersionForSpec": "Поиск канала %s для версии %s", + "loc.messages.ErrorWhileGettingVersionFromChannel": "Сбой при получении %s версии из канала %s, ошибка: %s", + "loc.messages.ComparingInstalledFolderVersions": "Сравнение того, является ли устанавливаемая версия %s старше установленной версии с именем папки %s", + "loc.messages.ComparingInstalledFileVersions": "Сравнение того, является ли устанавливаемая версия %s старше установленной версии с полным именем файла версии %s", + "loc.messages.InvalidChannelObject": "Объект не может быть использован в качестве канала; отсутствуют обязательные свойства, такие как channel-version в releases.json.", + "loc.messages.ReleasesIndexBodyIncorrect": "Неверный проанализированный текст индекса выпусков. Убедитесь, что раздел releases-index в файле не пуст.", + "loc.messages.InvalidVersionObject": "Releases.json имеет выпуск с недопустимым объектом %s: %s", + "loc.messages.InvalidVersion": "Указана недопустимая версия %s", + "loc.messages.FilesDataIsIncorrectInVersion": "В выпуске %s для версии %s приведены неправильные данные файла (возможно, отсутствуют обязательные поля, такие как name, rid и url): %s", + "loc.messages.VersionFilesDataIncorrect": "Данные файлов версии отсутствуют или не содержат обязательные поля.", + "loc.messages.VersionInformationNotComplete": "В файле releases.json указаны неполные обязательные сведения для версии %s. Ошибка: %s", + "loc.messages.FailedWhileExtractingPacakge": "Сбой при извлечении скачанного пакета, ошибка: %s", + "loc.messages.InstallingNuGetVersion": "Установка версии NuGet %s", + "loc.messages.FailureWhileInstallingNuGetVersion": "Не удалось установить версию NuGet. Ошибка: %s", + "loc.messages.SettingUpNugetProxySettings": "Настройка конфигурации прокси-сервера для NuGet.", + "loc.messages.GlobalJsonFound": "Обнаружен global.json по пути: %s", + "loc.messages.GlobalJsonSdkVersion": "Версия пакета SDK %s указана в global.json по пути: %s", + "loc.messages.GlobalJsonIsEmpty": "Файл global.json по пути %s пуст. Версия не указана.", + "loc.messages.FailedToFindGlobalJson": "Не удалось найти файл global.json по следующему пути и внутри него: %s", + "loc.messages.FailedToReadGlobalJson": "Недопустимый формат файла global.json по пути: \"%s\". Дополнительные сведения о файле global.json см. по адресу https://docs.microsoft.com/en-us/dotnet/core/tools/global-json. Ошибка при попытке чтения: %s", + "loc.messages.VersionNumberHasTheWrongFormat": "Номер версии %s имеет неправильный формат. Версии можно задать в следующих форматах: 2.x => установка последнего основного номера версии, 2.2.x => установка последнего основного и дополнительного номеров версии, 2.2.104 => установка точной версии. Найдите значение version для установки пакета SDK или среды выполнения в releases.json. Ссылку на releases.json для версии основной_номер.дополнительный_номер можно найти в [**файле releases-index.**](https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json). Ссылка на releases.json для версии 2.2: https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/2.2/releases.json", + "loc.messages.OnlyExplicitVersionAllowed": "Принимаются только явные версии, например: 2.2.301. Недопустимая версия: %s.", + "loc.messages.SupportPhaseNotPresentInChannel": "этап поддержки отсутствует в канале с версией %s.", + "loc.messages.DepricatedVersionNetCore": "Указанная вами версия NET Core %s не поддерживается и скоро будет удалена из размещенных агентов. Дополнительные сведения о политике поддержки .NET см. по адресу https://aka.ms/dotnet-core-support." +} \ No newline at end of file diff --git a/_generated/UseDotNetV2/Strings/resources.resjson/zh-CN/resources.resjson b/_generated/UseDotNetV2/Strings/resources.resjson/zh-CN/resources.resjson new file mode 100644 index 000000000000..74ef38822e1b --- /dev/null +++ b/_generated/UseDotNetV2/Strings/resources.resjson/zh-CN/resources.resjson @@ -0,0 +1,100 @@ +{ + "loc.friendlyName": "使用 .NET Core", + "loc.helpMarkDown": "[详细了解此任务](https://aka.ms/AA4xgy0)", + "loc.description": "从 Internet 或本地缓存获取特定版本的 .NET Core SDK,并将其添加到 PATH。使用此任务更改后续任务中使用的 .NET Core 版本。另外还提供代理支持。", + "loc.instanceNameFormat": "使用 .NET Core $(packageType) $(version)", + "loc.releaseNotes": "
  • 支持并行安装多个版本。
  • 支持版本模式,以获取最新的次要/主要版本。
  • 限制多级查找
  • 安装 NuGet 并提供代理支持。
  • 从 \"global.json\" 文件安装 sdk 版本
  • ", + "loc.group.displayName.advanced": "高级", + "loc.input.label.packageType": "要安装的包", + "loc.input.help.packageType": "请选择仅安装运行时还是安装 SDK。", + "loc.input.label.useGlobalJson": "使用全局 json", + "loc.input.help.useGlobalJson": "选择此选项以安装 global.json 文件中的所有 SDK。可从 system.DefaultWorkingDirectory 中搜索这些文件。可通过设置工作目录输入来更改搜索根路径。", + "loc.input.label.workingDirectory": "工作目录", + "loc.input.help.workingDirectory": "指定在使用 `Use global json` 时应从其中搜索 global.json 文件的路径。如果为空,则 `system.DefaultWorkingDirectory` 将被视为根路径。", + "loc.input.label.version": "版本", + "loc.input.help.version": "指定要安装的 .NET Core SDK 或运行时的版本。
    可按以下格式提供版本
  • 2.x => 安装最新主要版本。
  • 2.2.x => 安装最新主要版本和次要版本
  • 2.2.104 => 安装确切版本

  • 从 releases.json 中查找 `version` 的值,以安装 SDK/运行时。指向该 major.minor 版本的 releases.json 的链接可在[版本索引文件****](https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json)中找到。例如指向 releases.json 2.2 版本的链接为 https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/2.2/releases.json", + "loc.input.label.vsVersion": "兼容 Visual Studio 版本", + "loc.input.help.vsVersion": "指定要安装 .NET Core SDK 的兼容 Visual Studio 的版本。请指定完整的 VS 版本(如 16.6.4),其中包含主要版本、次要版本和补丁号。从 releases.json 查找用于安装 SDK/运行时的“版本”值。在 [releases-index 文件](https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json)中可以找到该 major.minor 版本的 releases.json 的链接 ", + "loc.input.label.includePreviewVersions": "包括预览版本", + "loc.input.help.includePreviewVersions": "选择在搜索最新版本时(例如在搜索 2.2.x 时),是否希望包括预览版本。如果指定了确切版本(例如 3.0.100-preview3-010431),则忽略此设置", + "loc.input.label.installationPath": "安装 .Net Core 的路径", + "loc.input.help.installationPath": "指定应在何处安装 .Net Core SDK/运行时。不同的路径可能会对 .Net 的行为产生以下影响。
  • $(Agent.ToolsDirectory): 这会在代理上缓存版本,因为未在多个管道之间清理此目录。在代理上运行的所有管道都有权访问以前使用代理安装的版本。
  • $(Agent.TempDirectory): 这可以确保管道不使用任何缓存版本的 .Net core,因为会在每个管道之后清理此文件夹。
  • 任何其他路径: 可以配置任何其他路径,前提是代理进程有权访问该路径。这将更改计算机的状态并影响在其上运行的所有进程。
    请注意,还可以配置多级查找设置,该设置可以配置 .Net 主机对适当版本的探测。", + "loc.input.label.performMultiLevelLookup": "执行多级查找", + "loc.input.help.performMultiLevelLookup": "此输入仅适用于基于 Windows 的代理。这将配置 .Net 主机进程的行为以查找合适的共享框架。
  • 未选中: 主机进程将仅查看在此任务中指定的文件夹中存在的版本。
  • 选中: 主机将尝试使用多级查找查看预定义的全局位置。
    默认全局位置为:
    对于 Windows:
    C:\\Program Files\\dotnet (64 位进程)
    C:\\Program Files (x86)\\dotnet (32 位进程)
  • 可在[**此处**](https://github.com/dotnet/core-setup/blob/master/Documentation/design-docs/multilevel-sharedfx-lookup.md)阅读其详细信息。
    ", + "loc.messages.ToolFailed": "工具安装失败: %s", + "loc.messages.ImplicitVersionNotSupported": "版本应为有效的显式版本: %s", + "loc.messages.getMachinePlatformFailed": "无法获取计算机平台详细信息。错误: %s。", + "loc.messages.getDownloadUrlsFailed": "未能获取下载 URL。错误: %s。", + "loc.messages.UsingCachedTool": "存在 .NET Core 的缓存副本。不需要重新安装。缓存工具位置: %s。", + "loc.messages.CheckingToolCache": "正在检查是否存在此版本的缓存副本...", + "loc.messages.InstallingAfresh": "缓存未包含 .NET Core 的请求版本。立即下载并安装。", + "loc.messages.GettingDownloadUrl": "正在获取用于下载 .NET Core %s 版本 %s 的 URL。", + "loc.messages.CouldNotDetectPlatform": "无法检测计算机的操作系统", + "loc.messages.NullDownloadUrls": "无法构造下载 URL。请确保指定的版本 %s 有效。", + "loc.messages.DownloadingUrl": "正在从 URL 下载 .NET Core 包: %s", + "loc.messages.ExtractingPackage": "正在解压已下载的包 %s。", + "loc.messages.CachingTool": "正在缓存已安装的此工具。", + "loc.messages.SuccessfullyInstalled": "已成功安装 .NET Core %s 版本 %s。", + "loc.messages.ToolToInstall": "要安装的工具: .NET Core %s 版本 %s。", + "loc.messages.PrimaryPlatform": "检测到的平台(主要): %s", + "loc.messages.LegacyPlatform": "检测到的平台(旧版): %s", + "loc.messages.CouldNotDownload": "无法从该 URL 下载安装包: %s 错误: %s", + "loc.messages.FailedToDownloadPackage": "无法下载用于安装的包", + "loc.messages.PrependGlobalToolPath": "正在创建全局工具路径并预附加到 PATH。", + "loc.messages.VersionsFileMalformed": "在支持的版本文档中,指定版本的下载链接格式不正确 => %s/", + "loc.messages.MatchingVersionNotFound": "针对以下指定的版本找不到匹配的 %s 版本: %s 请注意,如果选中“包括预览版本”复选框,则仅在最新版本搜索中考虑预览版本。", + "loc.messages.UnableToAccessPath": "无法访问路径: %s。错误: %s。请确保代理进程有权访问该路径。", + "loc.messages.VersionCanNotBeDownloadedFromUrl": "版本 %s 无法从 URL %s 中下载。URL 或版本不正确。", + "loc.messages.CopyingFoldersIntoPath": "正在将所有根文件夹复制到安装路径: %s", + "loc.messages.CopyingFilesIntoPath": "正在将根文件(如 dotnet.exe)复制到安装路径: %s", + "loc.messages.FailedToCopyTopLevelFiles": "未能将根文件复制到安装路径: %s。错误: %s", + "loc.messages.FailedWhileInstallingVersionAtPath": "安装版本 %s(位于路径 %s 下)时失败,出现错误: %s", + "loc.messages.ExplicitVersionRequired": "不允许使用版本: %s。要安装的版本应为以下格式: major.minor.patchversion。例如: 2.2.1", + "loc.messages.VersionFoundInCache": "已在缓存中找到版本 %s。", + "loc.messages.VersionNotFoundInCache": "未在缓存中找到版本 %s。", + "loc.messages.CreatingInstallationCompeleteFile": "正在创建 .Net Core %s 版本 %s 的安装完成标记文件", + "loc.messages.CannotFindRuntimeVersionForCompletingInstallation": "找不到包类型 %s (版本为 %s)的运行时版本", + "loc.messages.PathNotFoundException": "未能找到路径: %s。请确保该路径存在。", + "loc.messages.VersionIsLocalLatest": "版本 %s 是路径 %s 中存在的版本之中的最新版本", + "loc.messages.VersionIsNotLocalLatest": "版本 %s 不是 %s 中存在的版本之中的最新版本", + "loc.messages.DownloadUrlForMatchingOsNotFound": "对于以下操作系统平台(rid),找不到 .Net Core %s 版本 %s 的下载 URL: %s", + "loc.messages.ExceptionWhileDownloadOrReadReleasesIndex": "未能下载或分析 releases-index.json,出现错误: %s", + "loc.messages.MatchingVersionForUserInputVersion": "针对以下用户指定的版本规范找到版本 %s (位于通道 %s 中): %s", + "loc.messages.UrlForReleaseChannelNotFound": "找不到通道版本为 %s 的 releases.json 的 URL", + "loc.messages.NoSuitableChannelWereFound": "找不到与版本 %s 对应的通道。", + "loc.messages.DetectingPlatform": "正在检测操作系统平台以查找操作系统的正确下载包。", + "loc.messages.FailedInDetectingMachineArch": "检测计算机操作系统平台时失败,出现错误: %s", + "loc.messages.runtimeVersionPropertyNotFound": "找不到 .Net Core %s 版本 %s 的 runtime-version 属性。", + "loc.messages.VersionNotFound": "找不到与以下内容匹配的 %s 版本: %s", + "loc.messages.VersionNotAllowed": "不允许使用版本 %s。允许的版本类型为: majorVersion.x、majorVersion.minorVersion.x、majorVersion.minorVersion.patchVersion。更多详细信息: %s", + "loc.messages.VersionsCanNotBeCompared": "无法比较版本 %s 和 %s。这两个版本都应是显式的。", + "loc.messages.FileNameNotCorrectCompleteFileName": "文件名 %s 不是正确的 \".complete\" 文件。", + "loc.messages.ChannelVersionsNotComparable": "无法比较通道版本 %s 和 %s。它们都必须具有数字主要版本和次要版本。", + "loc.messages.LookingForVersionInChannel": "正在通道 %s 中搜索版本", + "loc.messages.FallingBackToAdjacentChannels": "无法在版本 %s 的通道中找到该版本,现在将在邻近通道中搜索。", + "loc.messages.ErrorWhileSettingDotNetToolPath": "将 .Net Core 工具路径预附加到 PATH 环境变量时失败。错误: %s", + "loc.messages.RequiredChannelVersionForSpec": "正在查找通道 %s (针对版本 %s)", + "loc.messages.ErrorWhileGettingVersionFromChannel": "获取版本 %s(从通道 %s 获取)时失败,出现错误: %s", + "loc.messages.ComparingInstalledFolderVersions": "正在比较正在安装的版本 %s 是否高于具有文件夹名称 %s 的已安装版本", + "loc.messages.ComparingInstalledFileVersions": "正在比较正在安装的版本 %s 是否高于具有版本完整文件名 %s 的已安装版本", + "loc.messages.InvalidChannelObject": "对象不能用作通道,缺少必需的属性,如 channel-version、releases.json。", + "loc.messages.ReleasesIndexBodyIncorrect": "已分析的版本索引正文不正确。请确保文件中的版本索引部分为非空。", + "loc.messages.InvalidVersionObject": "Releases.json 具有一个包含无效 %s 对象的版本: %s", + "loc.messages.InvalidVersion": "指定的版本无效 %s", + "loc.messages.FilesDataIsIncorrectInVersion": "在发布 %s 中(针对版本 %s),文件数据不正确(可能缺少必填字段,如 name、rid 和 url): %s", + "loc.messages.VersionFilesDataIncorrect": "版本的文件数据缺失或缺少必填字段。", + "loc.messages.VersionInformationNotComplete": "版本 %s 所需的信息在 releases.json 文件中不完整。错误: %s", + "loc.messages.FailedWhileExtractingPacakge": "提取下载的包时失败,出现错误: %s", + "loc.messages.InstallingNuGetVersion": "正在安装 NuGet 版本 %s", + "loc.messages.FailureWhileInstallingNuGetVersion": "安装 NuGet 版本时失败。错误: %s", + "loc.messages.SettingUpNugetProxySettings": "正在设置 NuGet 的代理配置。", + "loc.messages.GlobalJsonFound": "在路径 %s 中找到了 global.json", + "loc.messages.GlobalJsonSdkVersion": "SDK 版本 %s 由路径 %s 中的 global.json 指定", + "loc.messages.GlobalJsonIsEmpty": "路径 %s 中的 global.json 为空。未指定任何版本。", + "loc.messages.FailedToFindGlobalJson": "未能在路径 %s 中找到 global.json", + "loc.messages.FailedToReadGlobalJson": "路径 \"%s\" 中的 global.json 的格式不正确。有关 global.json 的信息,请访问此处: https://docs.microsoft.com/zh-cn/dotnet/core/tools/global-json。尝试读取时出错: %s", + "loc.messages.VersionNumberHasTheWrongFormat": "版本号 %s 的格式不正确。可按以下格式提供版本: 2.x => 安装最新主要版本。2.2.x => 安装最新主要版本和次要版本。2.2.104 => 安装确切版本。从 releases.json 中查找 `version` 值,以安装 SDK/运行时。指向该 major.minor 版本的 releases.json 的链接可在[版本索引文件****](https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json)中找到。例如指向 releases.json 2.2 版本的链接为 https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/2.2/releases.json", + "loc.messages.OnlyExplicitVersionAllowed": "仅接受显式版本,例如: 2.2.301。版本 %s 无效。", + "loc.messages.SupportPhaseNotPresentInChannel": "通道版本为 %s 的通道中不存在支持阶段。", + "loc.messages.DepricatedVersionNetCore": "你指定的 NET Core 版本 %s 不受支持,并且即将从托管代理中删除。有关 .NET 支持策略的详细信息,请参阅 https://aka.ms/dotnet-core-support。" +} \ No newline at end of file diff --git a/_generated/UseDotNetV2/Strings/resources.resjson/zh-TW/resources.resjson b/_generated/UseDotNetV2/Strings/resources.resjson/zh-TW/resources.resjson new file mode 100644 index 000000000000..ed7b0eec2a83 --- /dev/null +++ b/_generated/UseDotNetV2/Strings/resources.resjson/zh-TW/resources.resjson @@ -0,0 +1,100 @@ +{ + "loc.friendlyName": "使用 .NET Core", + "loc.helpMarkDown": "[深入了解此工作](https://aka.ms/AA4xgy0)", + "loc.description": "從網際網路或本機快取取得特定 .NET Core SDK 版本,然後將其新增至 PATH。使用此工作可變更後續工作中使用的 .NET Core 版本。另提供 Proxy 支援。", + "loc.instanceNameFormat": "使用 .NET Core $(packageType) $(version)", + "loc.releaseNotes": "
  • 並存安裝多個版本的支援。
  • 版本模式支援,可擷取最新的次要/主要版本。
  • 限制多重層級查閱
  • 安裝 NuGet,並提供 Proxy 支援。
  • 從 `global.json` 檔案安裝 sdk 版本
  • ", + "loc.group.displayName.advanced": "進階", + "loc.input.label.packageType": "要安裝的套件", + "loc.input.help.packageType": "請選取要僅安裝執行階段或 SDK。", + "loc.input.label.useGlobalJson": "使用全域 json", + "loc.input.help.useGlobalJson": "選取此選項以從 global.json 檔案安裝所有 SDK。系統會從 system.DefaultWorkingDirectory 中搜尋這些檔案。您可以設定工作目錄輸入來變更搜尋根路徑。", + "loc.input.label.workingDirectory": "工作目錄", + "loc.input.help.workingDirectory": "指定使用 `Use global json` 時,要從哪個路徑搜尋 global.json 檔案。如果保留空白,會將 `system.DefaultWorkingDirectory` 視為根路徑。", + "loc.input.label.version": "版本", + "loc.input.help.version": "指定要安裝的 .NET Core SDK 或執行階段版本。
    您可以使用下列格式指定版本
  • 2.x => 安裝最新的主要版本。
  • 2.2.x => 安裝最新的主要和次要版本
  • 2.2.104 => 安裝完全相符的版本

  • 您可從 releases.json 中尋找 `version` 的值來安裝 SDK/執行階段。如需該 major.minor 版本的 releases.json 連結,請參閱 [**releases-index 檔案**](https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json)。例如 2.2 版的 releases.json 連結為 https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/2.2/releases.json", + "loc.input.label.vsVersion": "相容的 Visual Studio 版本", + "loc.input.help.vsVersion": "指定 .NET Core SDK 要安裝的相容 Visual Studio 版本。指定包含主要版本、次要版本和修補程式編號的完整 vs 版本,例如 16.6.4。在 releases.json 中尋找安裝 SDK/執行階段所需要的 `version` 值。該 major.minor 版本的 releases.json 連結位於 [**releases-index 檔案。**](https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json)", + "loc.input.label.includePreviewVersions": "包含預覽版本", + "loc.input.help.includePreviewVersions": "如果您希望在搜尋最新版本 (例如搜尋 2.2.x) 時包含預覽版本,請選取此項目。如果您指定完全符合版本 (例如 3.0.100-preview3-010431),則會忽略此設定", + "loc.input.label.installationPath": "要安裝 .Net Core 的路徑", + "loc.input.help.installationPath": "請指定應安裝 .Net Core SDK/執行階段的位置。路徑如果不同,則可能會對 .Net 的行為造成後續影響。
  • $(Agent.ToolsDirectory): 因為此目錄未於各管線間清除,所以這會使版本快取至代理程式。在代理程式上執行的所有管線,都能存取先前使用代理程式安裝的版本。
  • $(Agent.TempDirectory): 因為此資料夾未於各管線後清除,所以這能確保管線不會使用 .Net 核心的任何快取版本。
  • 任何其他路徑: 假如代理程式處理序有路徑的存取權,您就可以設定任何其他路徑。這會變更電腦的狀態,並影響在其上執行的所有處理序。
    請注意,您也可以進行多層次查閱設定,該設定可針對適合的版本設定 .Net 主機的探查。", + "loc.input.label.performMultiLevelLookup": "執行多層級查閱", + "loc.input.help.performMultiLevelLookup": "此輸入只適用於以 Windows 為基礎的代理程式。這會設定查閱適當共用架構的 .Net 主機處理序行為。
  • 取消選取: 主機處理序只會查閱此工作中所指定資料夾內的版本。
  • 選取: 主機會嘗試使用多重層級查閱在預先定義的全域位置中查閱。
    預設全域位置為:
    若為 Windows:
    C:\\Program Files\\dotnet (64 位元處理序)
    C:\\Program Files (x86)\\dotnet (32 位元處理序)
  • 若要閱讀更多內容,請前往 [**這裡**](https://github.com/dotnet/core-setup/blob/master/Documentation/design-docs/multilevel-sharedfx-lookup.md)。
    ", + "loc.messages.ToolFailed": "工具安裝失敗: %s", + "loc.messages.ImplicitVersionNotSupported": "版本應為有效的明確版本: %s", + "loc.messages.getMachinePlatformFailed": "無法取得機器平台詳細資料。錯誤: %s。", + "loc.messages.getDownloadUrlsFailed": "無法取得下載 URL。錯誤: %s。", + "loc.messages.UsingCachedTool": ".NET Core 的快取複本已存在。不需要重新安裝。快取的工具位置: %s。", + "loc.messages.CheckingToolCache": "正在檢查此版本是否有快取複本...", + "loc.messages.InstallingAfresh": "快取未包含所要求版本的 .NET Core。正在下載該版本的 .NET Core 以立即安裝。", + "loc.messages.GettingDownloadUrl": "正在取得 URL 以下載 .NET Core %s 版: %s。", + "loc.messages.CouldNotDetectPlatform": "偵測不到機器的 OS", + "loc.messages.NullDownloadUrls": "無法建構下載 URL。請確認指定的版本 %s 有效。", + "loc.messages.DownloadingUrl": "正在從 URL 下載 .NET Core 套件: %s", + "loc.messages.ExtractingPackage": "正在將下載的套件 %s 解壓縮。", + "loc.messages.CachingTool": "正在快取這個安裝的工具。", + "loc.messages.SuccessfullyInstalled": "已成功安裝 .NET Core %s 版本 %s。", + "loc.messages.ToolToInstall": "要安裝的工具: .NET Core %s 版本 %s。", + "loc.messages.PrimaryPlatform": "偵測到的平台 (主要): %s", + "loc.messages.LegacyPlatform": "偵測到的平台 (舊版): %s", + "loc.messages.CouldNotDownload": "無法從此 URL %s 下載安裝套件,錯誤: %s", + "loc.messages.FailedToDownloadPackage": "無法下載套件以進行安裝", + "loc.messages.PrependGlobalToolPath": "正在建立全域工具路徑並加到 PATH 前面。", + "loc.messages.VersionsFileMalformed": "指定版本的下載連結,在支援的版本文件中語式錯誤 => %s/", + "loc.messages.MatchingVersionNotFound": "無法為指定的版本找到符合的 %s 版本: %s 敬請注意,只有在已選取 [包含預覽版本] 核取方塊的情況下,才會將預覽版本視作在最新版本搜尋內。", + "loc.messages.UnableToAccessPath": "無法存取路徑: %s。錯誤: %s。請確認代理程式處理序有權存取路徑。", + "loc.messages.VersionCanNotBeDownloadedFromUrl": "版本: 無法從 URL 下載 %s: %s。URL 或版本錯誤。", + "loc.messages.CopyingFoldersIntoPath": "正在將所有根資料夾複製到路徑: %s", + "loc.messages.CopyingFilesIntoPath": "正在將根檔案 (例如 dotnet.exe) 複製到安裝路徑: %s", + "loc.messages.FailedToCopyTopLevelFiles": "無法將根檔案複製到安裝路徑: %s。錯誤: %s。", + "loc.messages.FailedWhileInstallingVersionAtPath": "安裝版本時失敗: %s。路徑: %s。錯誤: %s", + "loc.messages.ExplicitVersionRequired": "版本: 不允許 %s。欲安裝版本的格式應為: major.minor.patchversion。例如: 2.2.1", + "loc.messages.VersionFoundInCache": "版本: 於快取中找到了 %s。", + "loc.messages.VersionNotFoundInCache": "未在快取中找到版本 %s。", + "loc.messages.CreatingInstallationCompeleteFile": "正在建立 .Net Core %s 版本 %s 的安裝完成標記檔案", + "loc.messages.CannotFindRuntimeVersionForCompletingInstallation": "找不到套件類型的執行階段版本: %s,版本: %s", + "loc.messages.PathNotFoundException": "路徑: 找不到 %s。請確認路徑存在。", + "loc.messages.VersionIsLocalLatest": "版本: %s 在路徑出現的版本間是最新的: %s", + "loc.messages.VersionIsNotLocalLatest": "版本: %s 在 %s 出現的版本間不是最新的", + "loc.messages.DownloadUrlForMatchingOsNotFound": "無法為以下 OS 平台 (RID) 找到 .Net Core %s 版本 %s 的下載 URL: %s", + "loc.messages.ExceptionWhileDownloadOrReadReleasesIndex": "無法下載或剖析 release-index.json。錯誤: %s", + "loc.messages.MatchingVersionForUserInputVersion": "找到的版本: %s。所在通道: %s。使用者指定的版本規格: %s", + "loc.messages.UrlForReleaseChannelNotFound": "無法為通道版本的 releases.json 找到 URL: %s", + "loc.messages.NoSuitableChannelWereFound": "找不到對應至 %s 版的通道。", + "loc.messages.DetectingPlatform": "正在偵測 OS 平台以為此 OS 尋找正確的下載套件。", + "loc.messages.FailedInDetectingMachineArch": "偵測機器 OS 平台時失敗。錯誤: %s", + "loc.messages.runtimeVersionPropertyNotFound": "找不到 .Net Core %s 版本 %s 的 runtime-version 屬性", + "loc.messages.VersionNotFound": "找不到符合以下項目的 %s 版本: %s", + "loc.messages.VersionNotAllowed": "不允許版本 %s。允許的版本類型為: majorVersion.x、majorVersion.minorVersion.x、majorVersion.minorVersion.patchVersion。詳細資料: %s", + "loc.messages.VersionsCanNotBeCompared": "無法比較版本 %s 與 %s。這兩個版本都必須為明確版本。", + "loc.messages.FileNameNotCorrectCompleteFileName": "檔案名稱 %s 不是正確的 '.complete' 檔案。", + "loc.messages.ChannelVersionsNotComparable": "無法比較通道版本 %s 與 %s。這兩個版本都必須有數字的主要和次要版本。", + "loc.messages.LookingForVersionInChannel": "正於通道 %s 中尋找版本", + "loc.messages.FallingBackToAdjacentChannels": "無法在版本 %s 的通道中找到該版本,將於相鄰通道進行搜尋。", + "loc.messages.ErrorWhileSettingDotNetToolPath": "將 .Net Core 工具路徑加至 PATH 環境變數前時失敗。錯誤: %s", + "loc.messages.RequiredChannelVersionForSpec": "正在尋找以下版本的通道 %s: %s", + "loc.messages.ErrorWhileGettingVersionFromChannel": "從以下頻道取得版本 %s 時失敗: %s。錯誤: %s", + "loc.messages.ComparingInstalledFolderVersions": "正在比較正在安裝的版本 %s 是否大於資料夾名稱為 %s 的已安裝版本", + "loc.messages.ComparingInstalledFileVersions": "正在比較正在安裝的版本 %s 是否大於版本完整檔案名稱為 %s 的已安裝版本", + "loc.messages.InvalidChannelObject": "物件不得當作通道使用,需要 channel-version 之類的屬性,缺少 releases.json。", + "loc.messages.ReleasesIndexBodyIncorrect": "剖析的版本索引主體錯誤。請您查看檔案中的 releases-index 區段是否不為空白。", + "loc.messages.InvalidVersionObject": "Releases.json 有 %s 物件無效的版本: %s", + "loc.messages.InvalidVersion": "指定的版本 %s 無效", + "loc.messages.FilesDataIsIncorrectInVersion": "版本 (release) %s (位於版本 (version) %s) 中的檔案資料錯誤 (可能缺少名稱、rid 或 URL 等必要欄位): %s", + "loc.messages.VersionFilesDataIncorrect": "版本的檔案資料遺失,或缺少必要欄位。", + "loc.messages.VersionInformationNotComplete": "版本: releases.json 檔案中的 %s 必要資訊不完整。錯誤: %s", + "loc.messages.FailedWhileExtractingPacakge": "擷取已下載套件時失敗。錯誤: %s", + "loc.messages.InstallingNuGetVersion": "正在安裝 NuGet 版本 %s", + "loc.messages.FailureWhileInstallingNuGetVersion": "安裝 NuGet 版本時失敗。錯誤: %s", + "loc.messages.SettingUpNugetProxySettings": "正在進行 NuGet 的 Proxy 設定。", + "loc.messages.GlobalJsonFound": "在路徑 %s 中找到 global.json", + "loc.messages.GlobalJsonSdkVersion": "SDK 版本 %s 由路徑 %s 中的 global.json 指定", + "loc.messages.GlobalJsonIsEmpty": "路徑 %s 的 global.json 是空白的。未指定任何版本。", + "loc.messages.FailedToFindGlobalJson": "在此路徑中找不到 global.json: %s", + "loc.messages.FailedToReadGlobalJson": "位於路徑: '%s' 的 global.json 格式錯誤。如需 global.json 的相關資訊,請參閱這裡: https://docs.microsoft.com/zh-tw/dotnet/core/tools/global-json (機器翻譯)。嘗試讀取時發生錯誤: %s", + "loc.messages.VersionNumberHasTheWrongFormat": "版本號碼 %s 格式錯誤。您可以使用下列格式指定版本: 2.x => 安裝最新的主要版本。2.2.x => 安裝最新的主要和次要版本。2.2.104 => 安裝完全相符的版本。您可從 releases.json 中尋找 `version` 的值來安裝 SDK/執行階段。如需該 major.minor 版本的 releases.json 連結,請參閱 [**releases-index 檔案**](https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json)。例如 2.2 版的 releases.json 連結為 https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/2.2/releases.json", + "loc.messages.OnlyExplicitVersionAllowed": "僅接受明確的版本,例如: 2.2.301。版本 %s 無效。", + "loc.messages.SupportPhaseNotPresentInChannel": "channel-version 為 %s 的通道中沒有 support-phase。", + "loc.messages.DepricatedVersionNetCore": "您指定的 NET Core 版本 %s 不受支援,即將從代管代理程式中移除。如需 .NET 支援原則的詳細資訊,請參閱 https://aka.ms/dotnet-core-support。" +} \ No newline at end of file diff --git a/_generated/UseDotNetV2/Task Design.md b/_generated/UseDotNetV2/Task Design.md new file mode 100644 index 000000000000..630d82a21eb6 --- /dev/null +++ b/_generated/UseDotNetV2/Task Design.md @@ -0,0 +1,103 @@ +# **Use dotnet Task V2** + +The task installs user specified version of .NET Core SDK/Runtime. This can be consumed to supply a particular version of .Net Core SDK/runtime to the subsequent tasks in pipeline. + +### **A new major version of the task is created because of the following breaking changes:** +- **Installing multiple sdk/runtime versions side by side:** Users had asked for the feature where multiple versions of sdk/runtime can be installed and then be used in subsequent tasks in a pipeline.(one project may require multiple .Net Core sdks to build different applications), for more information about user's ask, [refer here](https://github.com/Microsoft/azure-pipelines-tasks/issues/8306). This is a breaking change, as previously the V0 task always provided only one version of sdk/runtime. + +## New features added in V1 task: + +## **- Support for fetching latest version for a given major or major.minor version** +This feature was being asked by users who wanted to install the latest version as soon as it becomes available, without manually changing the version in the task. For information about user's asks, refer [here](https://github.com/Microsoft/azure-pipelines-tasks/issues/9171). + +This feature is implemented by supporting patterns in version input: `version`. This input now accepts .Net sdk/runtime versions in the following patterns +- `Major.Minor.PatchVersion :` complete version as present in releases.json for the Major.Minor Version channel. Example: 2.2.104 +- `Major.Minor.x :` Latest version in the Major.Minor version channel release. It can also be the latest preview version if `includePreviewVersions` input is enabled/true. This can be used to get all latest bug fixes automatically in a major.minor version. As back-compat is maintained in major.minor version, thus ensuring applications being built will not break. +- `Major.x :` Latest version released in the Major version channel. It can also be the latest preview version if `includePreviewVersions` input is enabled/true. This can be used by tools or library developers who need to test with every latest version for compatibility. + +### How it works: +The correct version needs to be identified in case user enters pattern based version such as 2.2.x. This is how the exact needed version and its information is extracted: + +- [releases-index.json](https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json) The file containing links to all .Net Core release channels is download and read into a JSON object `releasesIndex`. This is used to find all available release channels and links to their releases.json. + +- The `version` input is divided into three sections: + - Major + - Minor + - Patch + +- Based on Minor versions value, the following can happen + - Numeric : we get the corresponding channel's (Major.Minor) releases.json link from `releasesIndex`. Then the releases.json is downloaded and parsed into an object: `channelInformation`. + - NOTE: in case exact version is not found, the function logs error and task will fail. + - x : in this case, we find the latest channel with `support-phase` != `preview` (unless `includePreviewVersions` is true). The releases.json for the selected channel is then downloaded and parsed into json object `releaseInformation`. + - The version with highest `release.sdk/runtime.version` is then returned. (preview version will only be selected if `includePreviewVersions` is true) + - Empty: the function will log error as version needs to be given till at least minor version. As a result the task will fail. + + +- Based on Patch version value, the following can happen + - Empty : the function logs error and task will fail as it expects either a value or x. + - Exact Version (alpha numeric): a release with exact release.sdk/runtime.version will be searched in `channelInformation`. + - `version found:` the version information is returned + - `version not found:` function logs error and task will fail. + - x : The latest sdk/runtime version among all releases in that channel will be searched. The latest version information is then returned. + +## **- Support for multiple versions to be installed side by side** +This feature was asked by users so that multiple versions can be installed using the task and they all will be available to subsequent tasks in pipeline. It is required in applications where multiple versions of SDK/runtime are required to build/run different projects. + +Advantages of this feature: +- User can build all applications in a project using a single build task and need not create different pipelines or add multiple build task. + +### How it works: +This feature is implemented, by asking user a new input: `installationPath`, the path where .Net core SDK/runtime should be installed. The Agent process should have write access on the path. +There are multiple benefits of asking `installationPath` from user: +- User can choose to install a particular version in isolation of all other version already installed, by specifying a path which is cleaned up after each release/build. +- User can augment existing set of versions installed with another version by specifying a path where a set of .Net core versions might already be installed, such as: $(Agent.ToolsDirectory) +- User can also install it at any other location, such as: C:\user\username\temp. This will lead to changing the machine configuration and may affect all processes running on the machine. + +The way a version is installed at the `installationPath` is now as follows: +- We extract all folders from dotnetVersions.zip/tgz into the `installationPath`, just like install-dotnet.ps1/sh. +- The files in root directory of archive are only copied/overridden if + - The .Net core version being installed at `installationPath` is later than all other versions already installed at the path. + +The advantage of the above installation approach are: +- Time is saved by not copying unneeded files. +- Failures which might occur while overriding existing files are avoided. + +Also to further optimize and save time while installation, we do not install a version if it is already cached at that path. Below described are different approaches to find out if a version is cached, + +1. **`Folder based approach`** + - `Installation process:` While installing a version, we will extract the files from downloaded archive and then copy paste the files into the installationPath folder. + - `Caching process:` Existence of folder with name = version inside sdk or host/fxr folder will be considered as proof that sdk/runtime version is cached. Algorithm to find if version is cached or not will be like this: + - `installationPath` should contains a folder called `sdk or host/fxr`. If it + - `exists:` check if sdk or host/fxr folder contains a folder with name = version to be downloaded. + - `exists:` Version is cached, nothing more needs to be done. + - `doesn't exist:` Version needs to be installed. + - `doesn't exist:` Version needs to be installed + +2. **`version.completed file based approach`** + - `Installation process:` Once all the files are successfully extracted, copied and pasted into installationPath, we will create a **`version.completed`** file in sdk/runtime folder. The version.completed file will exist at the same level as the version folder and will be considered as a stamp of successful installation. + - If installation is not complete/successfull, we will not create the version.completed file. + - `Caching Process:` So, the algorithm will be same as in Approach 1, but with an additional required check for `version.completed` file to be present in sdk or host/fxr folder along with folder with name = version. Based on version.completed's existance, the following will be concluded + - `Exists`: version will be considered as cached + - `Doesn't exist`: version will be installed. (overwriting if the files already exist) + + +There are a few advantages of `version.completed` based approach over `folder only` based approach: +- Handles failed installation attempts: in case the last installation was left incomplete, the version.completed file would not exist and thus in next try, the version will be installed. + + +## **- Inbuilt option to perform Multi-Level lookup** +This feature is introduced as users had asked for an option to configure Multi-Level lookup, to know more about user's ask, refer [here](https://github.com/Microsoft/azure-pipelines-tasks/issues/9608). This is applicable to Windows based agents only. + +Multi-level lookup configures the .Net core host to probe several locations to find a suitable shared framework. If a folder is not found in folder containing dotnet.exe, it will attempt to look in pre-defined global locations using multi-level lookup. The default global locations are: + +**For Windows:** +- C:/Program Files/dotnet (64-bit) +- C:/Program Files (x86)/dotnet (32-bit) + +It's value will be set as an environment variable: `DOTNET_MULTILEVEL_LOOKUP` with values +- `0` : Disabled +- `1` : Enabled + +For more information on Multi-Level Lookup refer [HERE](https://github.com/dotnet/core-setup/blob/master/Documentation/design-docs/multilevel-sharedfx-lookup.md). + +## **- Installs NuGet and sets up NuGet proxy configuration** \ No newline at end of file diff --git a/_generated/UseDotNetV2/Tests/L0.ts b/_generated/UseDotNetV2/Tests/L0.ts new file mode 100644 index 000000000000..3fef7cb80dd5 --- /dev/null +++ b/_generated/UseDotNetV2/Tests/L0.ts @@ -0,0 +1,536 @@ +"use strict"; +const assert = require('assert'); +const ttm = require('azure-pipelines-task-lib/mock-test'); +const os = require('os'); +const path = require('path'); + +function setResponseFile(name) { + process.env['MOCK_RESPONSES'] = path.join(__dirname, name); +} + +function runValidations(validator: () => void, tr, done) { + try { + validator(); + done(); + } + catch (error) { + console.log("STDERR", tr.stderr); + console.log("STDOUT", tr.stdout); + done(error); + } +} + +describe('UseDotNet', function () { + this.timeout(30000); + before((done) => { + done(); + }); + after(function () { + }); + + it("[VersionUtilities] versionCompareFunction should throw for non explicit versions or empty version strings", (done) => { + process.env["__non_explicit__"] = "true" + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionUtilityVersionCompareTests.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == false, ("should have thrown and failed")); + assert(tr.stdout.indexOf("FunctionThrewAsExpected") > -1, "Should have thrown as versions are not explicit and are empty strings."); + }, tr, done); + }); + + it("[VersionUtilities] versionCompareFunction should return 1, 0 or -1 when versionA is gt, eq or lt versionB", (done) => { + process.env["__non_explicit__"] = "false"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionUtilityVersionCompareTests.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should have succeeded")); + assert(tr.stdout.indexOf("FunctionGaveRightResult") > -1, "Should have given right results for all cases."); + }, tr, done); + }); + + it("[VersionUtilities] compareChannelVersion function should throw when either or both channel versions are empty or are non numeric", (done) => { + process.env["__non_explicit__"] = "true" + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionUtilityVersionCompareTests.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == false, ("should have thrown and failed")); + assert(tr.stdout.indexOf("FunctionThrewAsExpected") > -1, "Should have thrown as versions are not explicit and are empty strings."); + }, tr, done); + }); + + it("[VersionUtilities] compareChannelVersion function should return 1, 0 or -1 when channelVersionA is gt, eq or lt channelVersionB", (done) => { + process.env["__non_explicit__"] = "false"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionUtilityChannelVersionCompareTests.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should have succeeded")); + assert(tr.stdout.indexOf("FunctionGaveRightResult") > -1, "Should have given right results for all cases."); + }, tr, done); + }); + + it("[VersionUtilities] getMatchingVersionFromList should return null for empty versionInfoList, versionInfoList elements having empty version or no matching version found in list while toggling includePreviewVersionsValue", (done) => { + process.env["__empty__"] = "true" + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionUtilityGetMatchingVersionFromListTests.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should have succeeded")); + assert(tr.stdout.indexOf("FunctionReturnedNull") > -1, "Should have returned null for all cases and print the message."); + }, tr, done); + }); + + it("[VersionUtilities] getMatchingVersionFromList should return heighest version for the spec when versionSpec is not exact version", (done) => { + process.env["__empty__"] = "false" + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionUtilityGetMatchingVersionFromListTests.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should have succeeded")); + assert(tr.stdout.indexOf("FuctionReturnedCorrectVersion") > -1, "Should have returned null for all cases and print the message."); + }, tr, done); + }); + + it("[Models.VersionParts] constructor should throw when version fails validation", (done) => { + process.env["__invalid_versionparts__"] = "true"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "modelsVersionPartsTests.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == false, ("Should have failed")); + assert(tr.stdout.indexOf("FunctionThrewAsExpected") > -1, "Should have thrown for all invalid version specs."); + }, tr, done); + }); + + it("[Models.VersionParts] constructor return object instance with correct major, minor and patch version", (done) => { + process.env["__invalid_versionparts__"] = "false"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "modelsVersionPartsTests.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should have returned right objects")); + assert(tr.stdout.indexOf("VersionPartsCreatedSuccessfully") > -1, "Should have returned the correct objects and print the statement."); + }, tr, done); + }); + + it("[Models.Channel] constructor should throw if object passed doesn't contain channel-version or releasesJsonUrl, or contains invalid releasesJsonUrl", (done) => { + process.env["__invalid_channelobject__"] = "true"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "modelsChannelTests.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == false, ("Should have failed for incorrect objects.")); + assert(tr.stdout.indexOf("FunctionThrewAsExpected") > -1, "Should have thrown error in all cases."); + }, tr, done); + }); + + it("[Models.Channel] constructor should pass if object contains channel-version and valid releasesJsonUrl", (done) => { + process.env["__invalid_channelobject__"] = "false"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "modelsChannelTests.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should have successfully created channel objects.")); + assert(tr.stdout.indexOf("ChannelCreatedSuccessfully") > -1, "Should have returned the correct objects and print the statement."); + }, tr, done); + }); + + it("[Models.VersionInfo] getRuntimeVersion should return correct runtime-version from sdk versionInfo object", (done) => { + process.env["__sdk_runtime__"] = "true"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "modelsGetRuntimeVersionTests.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should have successfully returned runtime versions for sdk package type.")); + assert(tr.stdout.indexOf("RuntimeVersionsReturnedForSdkAreCorrect") > -1, "Should have returned correct runtime versions for all cases of packageType sdk."); + }, tr, done); + }); + + it("[Models.VersionInfo] getRuntimeVersion should return version for runtime versionInfo object", (done) => { + process.env["__sdk_runtime__"] = "false"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "modelsGetRuntimeVersionTests.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should have successfully returned runtime versions for runtime package type.")); + assert(tr.stdout.indexOf("RuntimeVersionsReturnedAreCorrect") > -1, "Should have returned correct runtime versions for all cases of packageType runtime."); + }, tr, done); + }); + + it("[VersionFetcher.DotNetCoreVersionFetcher] getVersionInfo should throw if version for pacakge type can not be found, and error message should contain the package type", (done) => { + process.env["__failat__"] = "versionnotfound"; + process.env["__versionspec__"] = "2.2.999-cantbefound-234"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionFetcherGetVersionInfoFailTests.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == false, ("Should have failed as the wanted version of package type can not be found.")); + assert(tr.stdout.indexOf("VersionNotFound") > -1, "Should have thrown version not found exception."); + }, tr, done); + }); + + it("[VersionFetcher.DotNetCoreVersionFetcher] getVersionInfo should throw if getting channel fails", (done) => { + process.env["__failat__"] = "channelfetch"; + process.env["__versionspec__"] = "2.2.999-cantbefound-234"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionFetcherGetVersionInfoFailTests.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == false, ("Should have failed as channels could not be fetched.")); + assert(tr.stdout.indexOf("ExceptionWhileDownloadOrReadReleasesIndex") > -1, "Should have thrown exception and returned."); + }, tr, done); + }); + + it("[VersionFetcher.DotNetCoreVersionFetcher] getVersionInfo should throw if preview versions included and version not found", (done) => { + process.env["__failat__"] = "versionnotfound"; + process.env["__versionspec__"] = "4.40.x"; + process.env["__inlcudepreviewversion__"] = "true"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionFetcherGetVersionInfoFailTests.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == false, ("Should have failed as channels could not be fetched.")); + assert(tr.stdout.indexOf("MatchingVersionNotFound") > -1, "Should not have found a matching version."); + assert(tr.stdout.indexOf("VersionNotFound") > -1, "Should have thrown with VersionNotFound error."); + }, tr, done); + }); + + it("[VersionFetcher.DotNetCoreVersionFetcher] getVersionInfo should return correct version info for a correct version spec", (done) => { + process.env["__versionspec__"] = "2.2.103"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionFetcherGetVersionInfoTestsCorrect.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should have returned the correct version info.")); + }, tr, done); + }); + + it("[VersionFetcher.DotNetCoreVersionFetcher] getVersionInfo should be able to return versionInfo for sdk present in sdks property of a release object.", (done) => { + process.env["__versionspec__"] = "2.2.104"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionFetcherGetVersionInfoTestsCorrect.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should have returned the correct version info.")); + }, tr, done); + }); + + it("[VersionFetcher.DotNetCoreVersionFetcher] getVersionInfo should return correct version info for a version which exists in a different channel of the same major version", (done) => { + process.env["__versionspec__"] = "2.1.104"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionFetcherGetVersionInfoTestsCorrect.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should have returned the correct version info.")); + }, tr, done); + }); + + it("[VersionFetcher.DotNetCoreVersionFetcher] getVersionInfo should return latest version info in a major version for a versionSpec of type majorVersion.x", (done) => { + process.env["__versionspec__"] = "2.x"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionFetcherGetVersionInfoTestsCorrect.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should have returned the correct version info.")); + }, tr, done); + }); + + it("[VersionFetcher.DotNetCoreVersionFetcher] getVersionInfo should return latest version info in a major.minor version for a versionSpec of type majorVersion.minorVersion.x", (done) => { + process.env["__versionspec__"] = "2.2.x"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionFetcherGetVersionInfoTestsCorrect.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should have returned the correct version info.")); + }, tr, done); + }); + + it("[VersionFetcher.DotNetCoreVersionFetcher] getVersionInfo should return latest preview version info if includePreviewVersion is true and latest version is a preview version", (done) => { + process.env["__versionspec__"] = "2.2.x"; + process.env["__inlcudepreviewversion__"] = "true"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionFetcherGetVersionInfoTestsCorrect.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should have returned the correct version info.")); + }, tr, done); + }); + + it("[VersionFetcher.DotNetCoreVersionFetcher] getVersionInfo should return latest version info even if includePreviewVersion is true but latest version is non preview", (done) => { + process.env["__versionspec__"] = "2.3.x"; + process.env["__inlcudepreviewversion__"] = "true"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionFetcherGetVersionInfoTestsCorrect.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should have returned the correct version info.")); + }, tr, done); + }); + + it("[VersionFetcher.DotNetCoreVersionFetcher] getVersionInfo should return latest version info if includePreviewVersion is true and only 1 channel and is preview", (done) => { + process.env["__versionspec__"] = "3.x"; + process.env["__inlcudepreviewversion__"] = "true"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionFetcherGetVersionInfoTestsCorrect.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should have returned the correct version info.")); + }, tr, done); + }); + + it("[VersionFetcher.DotNetCoreVersionFetcher] getVersionInfo should return latest version info if includePreviewVersion is false and latest version is preview", (done) => { + process.env["__versionspec__"] = "4.x"; + process.env["__inlcudepreviewversion__"] = "false"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionFetcherGetVersionInfoTestsCorrect.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should have returned the correct version info.")); + }, tr, done); + }); + + it("[VersionFetcher.DotNetCoreVersionFetcher] getDownloadUrl should throw if VersionFilesData doesn't contain download URL", (done) => { + process.env["__ostype__"] = "win"; + process.env["__getmachineosfail__"] = "false"; + process.env["__versioninfo__"] = `{"version":"2.2.104", "files": [{"name":"winpackage.zip", "rid":"win-x64", "url": ""}]}`; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionFetcherGetDownloadUrlFailTests.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == false, ("Should have failed as download URL is missing.")); + assert(tr.stdout.indexOf("DownloadUrlForMatchingOsNotFound") > 0, ("Should have thrown the error message as download URL is not present.")) + }, tr, done); + }); + + it("[VersionFetcher.DotNetCoreVersionFetcher] getDownloadUrl should throw if download information object with RID matching OS, could not be found", (done) => { + process.env["__ostype__"] = "win"; + process.env["__getmachineosfail__"] = "false"; + process.env["__versioninfo__"] = `{"version":"2.2.104", "files": [{"name": "linux.tar.gz", "rid":"linux-x64", "url": ""}, {"name": "win.zip", "rid":"win-x86", "url": ""}]}`; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionFetcherGetDownloadUrlFailTests.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == false, ("Should have failed as download URL is missing.")); + assert(tr.stdout.indexOf("DownloadUrlForMatchingOsNotFound") > 0, ("Should have thrown the error message as download URL is not present.")) + }, tr, done); + }); + + it("[VersionFetcher.DotNetCoreVersionFetcher] getDownloadUrl should throw if error encountered while detecting machine os", (done) => { + process.env["__ostype__"] = "win"; + process.env["__getmachineosfail__"] = "true"; + process.env["__versioninfo__"] = `{"version":"2.2.104", "files": [{"name": "linux.tar.gz", "rid":"linux-x64", "url": ""}, {"name":"winpackage.zip", "rid":"win-x86", "url": ""}]}`; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionFetcherGetDownloadUrlFailTests.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == false, ("Should have failed as machine os could not be detected.")); + assert(tr.stdout.indexOf("getMachinePlatformFailed") > 0, ("Should have thrown the error message as getMachineOs script execution was not successful.")) + }, tr, done); + }); + + it("[VersionFetcher.DotNetCoreVersionFetcher] getDownloadUrl should throw if zip package is not found for windows os", (done) => { + process.env["__ostype__"] = "win"; + process.env["__getmachineosfail__"] = "false"; + process.env["__versioninfo__"] = `{"version":"2.2.104", "files": [{"name": "winpacakage.exe", "rid":"win-x64", "url": "https://path.to/file.exe"}, {"name": "winpacakage2.exe", "rid":"win-x86", "url": "https://path.to/file.exe"}]}`; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionFetcherGetDownloadUrlFailTests.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == false, ("Should have failed as download URL is missing.")); + assert(tr.stdout.indexOf("DownloadUrlForMatchingOsNotFound") > 0, ("Should have thrown the error message as download url of zip could not be found for windows.")) + }, tr, done); + }); + + it("[VersionFetcher.DotNetCoreVersionFetcher] getDownloadUrl should throw if tar.gz package is not found for non windows os", (done) => { + process.env["__ostype__"] = "osx"; + process.env["__getmachineosfail__"] = "false"; + process.env["__versioninfo__"] = `{"version":"2.2.104", "files": [{"name": "linux.tar", "rid":"linux-x64", "url": "https://path.to/file.pkg"}, {"name": "osx.pkg", "rid":"osx-x64", "url": "https://path.to/file.pkg"}]}`; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionFetcherGetDownloadUrlFailTests.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == false, ("Should have failed as download URL is missing.")); + assert(tr.stdout.indexOf("DownloadUrlForMatchingOsNotFound") > 0, ("Should have thrown the error message as download url of tar file could not be found for mac os.")) + }, tr, done); + }); + + it("[VersionFetcher.DotNetCoreVersionFetcher] getDownloadUrl should return correct download URL for matching OS", (done) => { + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionFetcherGetDownloadUrlPassTests.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should have passed as download URL for all windows, linux and osx are available for correct rid.")); + assert(tr.stdout.indexOf("CorrectDownloadUrlsSuccessfullyReturnedForAllOs") > 0, ("Should have printed success message on receiving correct urls for all os's.")) + }, tr, done); + }); + + it("[VersionInstaller] constructor should throw if installationPath doesn't exist and cannot be created", (done) => { + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionInstallerTests.js")) + tr.run(); + runValidations(() => { + assert(tr.succeeded == false, ("Should have failed as the installation path doesn't exist and cannot be created or the process doesn't have permission over it.")) + }, tr, done); + }); + + it("[VersionInstaller] downloadAndInstall should throw if passed arguments are empty or doesn't contain version or downloadUrl is malformed", (done) => { + process.env["__case__"] = "urlerror"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionInstallerDownloadAndInstallTests.js")) + tr.run(); + runValidations(() => { + assert(tr.succeeded == false, ("Should have failed as the arguments passed are not correct.")); + assert(tr.stdout.indexOf("VersionCanNotBeDownloadedFromUrl") > -1, "Should have thrown this error: VersionCanNotBeDownloadedFromUrl"); + assert(tr.stdout.lastIndexOf("VersionCanNotBeDownloadedFromUrl") > tr.stdout.indexOf("VersionCanNotBeDownloadedFromUrl"), "Should have thrown this error: VersionCanNotBeDownloadedFromUrl"); + }, tr, done); + }); + + it("[VersionInstaller] downloadAndInstall should throw if downloading version from URL fails", (done) => { + process.env["__case__"] = "downloaderror"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionInstallerDownloadAndInstallTests.js")) + tr.run(); + runValidations(() => { + assert(tr.succeeded == false, ("Should have failed as downloading the package from url did not complete.")); + assert(tr.stdout.indexOf("CouldNotDownload") > -1, "Should have thrown this error: CouldNotDownload"); + }, tr, done); + }); + + it("[VersionInstaller] downloadAndInstall should throw if extracting downloaded package or copying folders into installation path fails.", (done) => { + process.env["__case__"] = "extracterror"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionInstallerDownloadAndInstallTests.js")) + tr.run(); + runValidations(() => { + assert(tr.succeeded == false, ("Should have failed as extraction of package was not successfull.")); + assert(tr.stdout.indexOf("FailedWhileExtractingPacakge") > -1, "Should have thrown this error: FailedWhileExtractingPacakge"); + }, tr, done); + }); + + it("[VersionInstaller] downloadAndInstall should not throw if root folders were successfully copied but copying root files from package into installationPath failed", (done) => { + process.env["__case__"] = "filecopyerror"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionInstallerDownloadAndInstallTests.js")) + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should have passed.")); + assert(tr.stdout.indexOf("FailedToCopyTopLevelFiles") > -1, "Should not have caused function failure when root file's copying failed."); + assert(tr.stdout.indexOf("SuccessfullyInstalled") > -1, "Function should have completed successfully."); + }, tr, done); + }); + + it("[VersionInstaller] downloadAndInstall should not copy files from root folder if version being installed in the path is not greater than all other already present or runtime is being installed", (done) => { + process.env["__case__"] = "conditionalfilecopy"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionInstallerDownloadAndInstallTests.js")) + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should have passed.")); + assert(tr.stdout.lastIndexOf("CopyingFilesIntoPath [ 'installationPath' ]") == tr.stdout.indexOf("CopyingFilesIntoPath [ 'installationPath' ]"), "Should have copied root files in only one case where the version being installed is latest among already installed ones."); + }, tr, done); + }); + + it("[VersionInstaller] downloadAndInstall should throw if creating version.complete file fails.", (done) => { + process.env["__case__"] = "versioncompletefileerror"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionInstallerDownloadAndInstallTests.js")) + tr.run(); + runValidations(() => { + assert(tr.succeeded == false, ("Should have failed as creating completion markup file failed for package.")); + assert(tr.stdout.indexOf("CreatingInstallationCompeleteFile") > -1, "Should have tried creating the file."); + assert(tr.stdout.indexOf("FailedWhileInstallingVersionAtPath") > -1, "Should have thrown this error as the parent error."); + }, tr, done); + }); + + it("[VersionInstaller] downloadAndInstall should complete successfully on complete installation and create complete file in both sdk and runtime when sdk is installed and in runtime when only runtime is installed.", (done) => { + process.env["__case__"] = "successfullinstall"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionInstallerDownloadAndInstallTests.js")) + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should have passed.")); + assert(tr.stdout.indexOf("SuccessfullyInstalled") > -1, "Should have SuccessfullyInstalled.") + }, tr, done); + }); + + it("[VersionInstaller] isVersionInstalled should throw if version being checked is not explicit.", (done) => { + process.env["__case__"] = "nonexplicit"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionInstallerIsVersionInstalledTests.js")) + tr.run(); + runValidations(() => { + assert(tr.succeeded == false, ("Should have failed.")); + assert(tr.stdout.indexOf("ExplicitVersionRequired") > -1, "Should have printed ExplicitVersionRequired.") + }, tr, done); + }); + + it("[VersionInstaller] isVersionInstalled should return false if either folder or file with name as version is not present inside sdk/runtime folder.", (done) => { + process.env["__case__"] = "folderorfilemissing"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionInstallerIsVersionInstalledTests.js")) + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should have returned false without failure.")); + assert(tr.stdout.indexOf("VersionFoundInCache") <= -1, "Should not have found any version in cache as either file or folder for that version were missing"); + }, tr, done); + }); + + it("[VersionInstaller] isVersionInstalled should return true if both folder or file with name as version is present inside sdk/runtime path.", (done) => { + process.env["__case__"] = "success"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionInstallerIsVersionInstalledTests.js")) + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should have returned false without failure.")); + assert(tr.stdout.indexOf("VersionFoundInCache") > -1, "Should not have found any version in cache as either file or folder for that version were missing"); + }, tr, done); + }); + + it("[usedotnet] run should throw if versionSpec is invalid.", (done) => { + process.env["__case__"] = "matchingversionnotfound"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "usedotnetTests.js")) + tr.run(); + runValidations(() => { + assert(tr.succeeded == false, ("Should have failed.")); + assert(tr.stdout.indexOf("MatchingVersionNotFound") > -1, "Should not have thrown this message as versionInfo for a matching version could not be found."); + }, tr, done); + }); + + it("[usedotnet] run should skip installation if version found in cache but should prepend all the required paths and should also use $(Agent.ToolsDirectory)/dotnet as installation when input is missing.", (done) => { + process.env["__case__"] = "skipinstallation"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "usedotnetTests.js")) + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should have passed.")); + assert(tr.stdout.indexOf("PrependingInstallationPath") > -1, "Should have prepended installation path"); + assert(tr.stdout.indexOf("PrependGlobalToolPath") > -1, "Should have printed this message as addDotNetCoreToolPath function should have been called."); + assert(tr.stdout.indexOf("PrependingGlobalToolPath") > -1, "Should have prepended global tool path"); + assert(tr.stdout.indexOf("DownloadAndInstallCalled") == -1, "Should not have printed this message as DownloadAndInstall function should not have been called."); + }, tr, done); + }); + + it("[usedotnet] run should install if version is not found in cache and prepend the required paths.", (done) => { + process.env["__case__"] = "installversion"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "usedotnetTests.js")) + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should have passed.")); + assert(tr.stdout.indexOf("PrependingInstallationPath") > -1, "Should have prepended installation path"); + assert(tr.stdout.indexOf("PrependGlobalToolPath") > -1, "Should have printed this message as addDotNetCoreToolPath function should have been called."); + assert(tr.stdout.indexOf("PrependingGlobalToolPath") > -1, "Should have prepended global tool path"); + assert(tr.stdout.indexOf("DownloadAndInstallCalled") > -1, "Should have printed this message as DownloadAndInstall function should have been called."); + }, tr, done); + }); + + it("[usedotnet] run should not fail if globalToolPath could not be created or set.", (done) => { + process.env["__case__"] = "globaltoolpathfailure"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "usedotnetTests.js")) + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should have passed.")); + assert(tr.stdout.indexOf("PrependingInstallationPath") > -1, "Should have prepended installation path"); + assert(tr.stdout.indexOf("PrependGlobalToolPath") > -1, "Should have printed this message as addDotNetCoreToolPath function should have been called."); + assert(tr.stdout.indexOf("ErrorWhileSettingDotNetToolPath") > -1, "Should have printed this message as error must have been encountered while setting GlobalToolPath."); + }, tr, done); + }); + + it("[globaljsonfetcher] run should not fail if one global.json with a valid version was found.", (done) => { + process.env["__case__"] = "subdirAsRoot"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "globaljsonfetcherTest.js")) + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should have passed.")); + assert(tr.stdout.indexOf("GlobalJsonFound") > -1, "should found a global.json file"); + }, tr, done); + }); + it("[globaljsonfetcher] run should not fail if two global.json with a valid version was found.", (done) => { + process.env["__case__"] = "rootAsRoot"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "globaljsonfetcherTest.js")) + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should have passed.")); + assert(tr.stdout.indexOf("GlobalJsonFound") > -1, "should found a global.json file"); + }, tr, done); + }); + it("[globaljsonfetcher] run should fail if no global.json is found.", (done) => { + process.env["__case__"] = "invalidDir"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "globaljsonfetcherTest.js")) + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should't have passed.")); + assert(tr.stdout.indexOf("FailedToFindGlobalJson") > -1, "should throw an error that no file was found."); + }, tr, done); + }); + it("[globaljsonfetcher] run shouldn't fail if the global.json is empty.", (done) => { + process.env["__case__"] = "emptyGlobalJson"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "globaljsonfetcherTest.js")) + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should passed.")); + assert(tr.stdout.indexOf("FailedToReadGlobalJson") > -1, "should throw an error that no file was found."); + }, tr, done); + }) +}); + diff --git a/_generated/UseDotNetV2/Tests/globaljsonfetcherTest.ts b/_generated/UseDotNetV2/Tests/globaljsonfetcherTest.ts new file mode 100644 index 000000000000..d1bc1a2b178b --- /dev/null +++ b/_generated/UseDotNetV2/Tests/globaljsonfetcherTest.ts @@ -0,0 +1,126 @@ +"use strict"; +import * as tl from 'azure-pipelines-task-lib/task'; +import { GlobalJson } from "../globaljsonfetcher"; +import { Buffer } from "buffer"; +import { VersionInfo } from '../models'; +import { Promise } from 'q'; +import fs = require('fs'); +var mockery = require('mockery'); + +const workingDir: string = "work/"; +const validRootGlobalJson = workingDir + "global.json"; +const rootVersionNumber = "2.2.2"; +const workingSubDir = workingDir + "testdir/"; +const validSubDirGlobalJson = workingSubDir + "global.json"; +const subDirVersionNumber = "3.0.0-pre285754637"; +const pathToEmptyGlobalJsonDir = workingDir + "empty/"; +const pathToEmptyGlobalJson = pathToEmptyGlobalJsonDir + "global.json"; + +//setup mocks +mockery.enable({ + useCleanCache: true, + warnOnReplace: false, + warnOnUnregistered: false +}); + +mockery.registerMock('azure-pipelines-task-lib/task', { + findMatch: function (path: string, searchPattern: string): string[] { + if (searchPattern != "**/global.json") { + return []; + } + if (path == workingDir) { + // If it's working dir subdir is included, because it is a child; + return [validRootGlobalJson, validSubDirGlobalJson]; + } + if (path == workingSubDir) { + return [validSubDirGlobalJson]; + } + if (path == pathToEmptyGlobalJsonDir) { + return [pathToEmptyGlobalJson]; + } + return []; + }, + loc: function (locString, ...param: string[]) { return tl.loc(locString, param); }, + debug: function (message) { return tl.debug(message); } +}); + +mockery.registerMock('fs', { + ...fs, + readFileSync: function (path: string): Buffer { + if (path == validRootGlobalJson) { + var globalJson = new GlobalJson(rootVersionNumber); + return Buffer.from(JSON.stringify(globalJson)); + } + if (path == validSubDirGlobalJson) { + var globalJson = new GlobalJson(subDirVersionNumber); + return Buffer.from(JSON.stringify(globalJson)); + } + if (path == pathToEmptyGlobalJson) { + return Buffer.from(""); + } + return Buffer.from(null); + } +}); + +mockery.registerMock('./versionfetcher', { + DotNetCoreVersionFetcher: function (explicitVersioning: boolean = false) { + return { + getVersionInfo: function (versionSpec: string, vsVersionSpec: string, packageType: string, includePreviewVersions: boolean): Promise { + return Promise((resolve, reject) => { + resolve(new VersionInfo({ version: versionSpec, files: null, "runtime-version": versionSpec, "vs-version": vsVersionSpec }, packageType)); + }); + } + } + } + +}); + +// start test +import { globalJsonFetcher } from "../globaljsonfetcher"; +if (process.env["__case__"] == "subdirAsRoot") { + let fetcher = new globalJsonFetcher(workingSubDir); + fetcher.GetVersions().then(versionInfos => { + if (versionInfos.length != 1) { + throw "GetVersions should return one result if one global.json is found."; + } + if (versionInfos[0].getVersion() != subDirVersionNumber) { + throw `GetVersions should return the version number that was inside the global.json. Expected: ${subDirVersionNumber} Actual: ${versionInfos[0].getVersion()}`; + } + if (versionInfos[0].getPackageType() != 'sdk') { + throw `GetVersions return always 'sdk' as package type. Actual: ${versionInfos[0].getPackageType()}`; + } + }); +} + +if (process.env["__case__"] == "rootAsRoot") { + let fetcher = new globalJsonFetcher(workingDir); + fetcher.GetVersions().then(versionInfos => { + if (versionInfos.length != 2) { + throw "GetVersions should return all global.json in a folder hierarchy result if multiple global.json are found."; + } + }); +} + +if (process.env["__case__"] == "invalidDir") { + let fetcher = new globalJsonFetcher("invalidDir"); + fetcher.GetVersions().then(versionInfos => { + throw "GetVersions shouldn't success if no matching version was found."; + }, err => { + // here we are good because the getVersion throw an error. + return; + }); +} + +if (process.env["__case__"] == "emptyGlobalJson") { + let fetcher = new globalJsonFetcher(pathToEmptyGlobalJsonDir); + fetcher.GetVersions().then(versionInfos => { + if (versionInfos == null) { + throw "GetVersions shouldn't return null if the global.json is empty."; + } + if (versionInfos.length != 0) { + throw "GetVersions shouldn't return a arry with 0 elements if global.json is empty."; + } + }, err => { + throw "GetVersions shouldn't throw an error if global.json is empty."; + }); +} \ No newline at end of file diff --git a/_generated/UseDotNetV2/Tests/mocks/mockedModels.ts b/_generated/UseDotNetV2/Tests/mocks/mockedModels.ts new file mode 100644 index 000000000000..413e019c521c --- /dev/null +++ b/_generated/UseDotNetV2/Tests/mocks/mockedModels.ts @@ -0,0 +1,41 @@ +export class HttpClientResponse { + constructor(message) { + this.message = message; + } + public readBody() { + return new Promise((resolve, reject) => { + resolve(this.message); + }) + } + message: string = "" +} + +export class toolrunner { + constructor(toolPath, outputToReturn) { + this.toolPath = toolPath; + this.outputToReturn = outputToReturn; + } + public line (somearg) { + return this; + } + + public arg (args) { + return this; + } + + public execSync() { + if (this.outputToReturn) { + return this.outputToReturn; + } + + return { + code: 0, + error: null, + stdout: "", + stderr: "" + } + } + + private toolPath; + private outputToReturn; +} \ No newline at end of file diff --git a/_generated/UseDotNetV2/Tests/modelsChannelTests.ts b/_generated/UseDotNetV2/Tests/modelsChannelTests.ts new file mode 100644 index 000000000000..45846ab24910 --- /dev/null +++ b/_generated/UseDotNetV2/Tests/modelsChannelTests.ts @@ -0,0 +1,73 @@ +'use strict'; +import { Channel } from "../models"; +import * as tl from 'azure-pipelines-task-lib/task'; + +if (process.env["__invalid_channelobject__"] == "true") { + let throwCount: number = 0; + // try with non explicit version + try { + new Channel(null); + } + catch (ex) { + throwCount++; + } + + try { + new Channel(undefined); + } + catch (ex) { + throwCount++; + } + + try { + new Channel(""); + } + catch (ex) { + throwCount++; + } + + try { + new Channel({}); + } + catch (ex) { + throwCount++; + } + + try { + new Channel({"channel-version": undefined, "releases.json": ""}); + } + catch (ex) { + throwCount++; + } + + try { + new Channel({"channel-version": "2.2", "releases.json": null}); + } + catch (ex) { + throwCount++; + } + + try { + new Channel({"channel-version": "2.2", "releases.json": ""}); + } + catch (ex) { + throwCount++; + } + + if (throwCount == 7) { + throw tl.loc("FunctionThrewAsExpected"); + } +} +else { + let channel = new Channel({"channel-version": "2.2", "releases.json": "https://channelRelease.com"}); + if (channel.channelVersion != "2.2" || channel.releasesJsonUrl != "https://channelRelease.com") { + throw tl.loc("first") + } + + channel = new Channel({"channel-version": "3.x", "releases.json": "https://channelRelease.com/downloadreleases.json"}); + if (channel.channelVersion != "3.x" || channel.releasesJsonUrl != "https://channelRelease.com/downloadreleases.json") { + throw tl.loc("second") + } + + console.log("ChannelCreatedSuccessfully"); +} \ No newline at end of file diff --git a/_generated/UseDotNetV2/Tests/modelsGetRuntimeVersionTests.ts b/_generated/UseDotNetV2/Tests/modelsGetRuntimeVersionTests.ts new file mode 100644 index 000000000000..7e64c0d031d1 --- /dev/null +++ b/_generated/UseDotNetV2/Tests/modelsGetRuntimeVersionTests.ts @@ -0,0 +1,30 @@ +'use strict'; +import { VersionInfo } from "../models"; +import * as tl from 'azure-pipelines-task-lib/task'; + +if (process.env["__sdk_runtime__"] == "true") { + let versionInfo = new VersionInfo(JSON.parse(`{"version":"2.1.1", "files": []}`), "sdk"); + if (versionInfo.getRuntimeVersion() != "") { + throw ""; + } + + versionInfo = new VersionInfo(JSON.parse(`{"version":"2.1.1", "runtime-version":"2.2.4", "files": []}`), "sdk"); + if (versionInfo.getRuntimeVersion() != "2.2.4") { + throw ""; + } + + console.log(tl.loc("RuntimeVersionsReturnedForSdkAreCorrect")); +} +else { + let versionInfo = new VersionInfo(JSON.parse(`{"version":"2.1.1", "files": []}`), "runtime"); + if (versionInfo.getRuntimeVersion() != "2.1.1") { + throw ""; + } + + versionInfo = new VersionInfo(JSON.parse(`{"version":"2.1.1", "runtime-version": "2.2.4", "files": []}`), "runtime"); + if (versionInfo.getRuntimeVersion() != "2.1.1") { + throw ""; + } + + console.log(tl.loc("RuntimeVersionsReturnedAreCorrect")); +} \ No newline at end of file diff --git a/_generated/UseDotNetV2/Tests/modelsVersionPartsTests.ts b/_generated/UseDotNetV2/Tests/modelsVersionPartsTests.ts new file mode 100644 index 000000000000..b51c3f070c48 --- /dev/null +++ b/_generated/UseDotNetV2/Tests/modelsVersionPartsTests.ts @@ -0,0 +1,119 @@ +'use strict'; +import { VersionParts } from "../models"; +import * as tl from 'azure-pipelines-task-lib/task'; + +if (process.env["__invalid_versionparts__"] == "true") { + let throwCount: number = 0; + // try with non explicit version + try { + new VersionParts("2a.x"); + } + catch (ex) { + throwCount++; + } + + try { + new VersionParts("2.2x"); + } + catch (ex) { + throwCount++; + } + + try { + new VersionParts("2.x.2"); + } + catch (ex) { + throwCount++; + } + + try { + new VersionParts("2.2."); + } + catch (ex) { + throwCount++; + } + + try { + new VersionParts("2.2"); + } + catch (ex) { + throwCount++; + } + + try { + new VersionParts(""); + } + catch (ex) { + throwCount++; + } + + try { + new VersionParts(".."); + } + catch (ex) { + throwCount++; + } + + try { + new VersionParts("2.2.2fs"); + } + catch (ex) { + throwCount++; + } + try{ + new VersionParts("2.2.x", true); + } + catch(ex){ + throwCount++; + } + try{ + new VersionParts("2.x.x", true); + } + catch(ex){ + throwCount++; + } + try{ + new VersionParts("2.2.2.2", true); + } + catch(ex){ + throwCount++; + } + try{ + new VersionParts("2.2.2fs", true); + } + catch(ex){ + throwCount++; + } + + if (throwCount == 12) { + throw tl.loc("FunctionThrewAsExpected"); + } +} +else { + let versionParts = new VersionParts("2.x") + if (versionParts.majorVersion != "2" || versionParts.minorVersion != "x" || versionParts.patchVersion != "") { + throw tl.loc("first") + } + + versionParts = new VersionParts("2.100.x"); + if (versionParts.majorVersion != "2" || versionParts.minorVersion != "100" || versionParts.patchVersion != "x") { + throw tl.loc("second") + } + + versionParts = new VersionParts("2.100.1"); + if (versionParts.majorVersion != "2" || versionParts.minorVersion != "100" || versionParts.patchVersion != "1") { + throw tl.loc("third") + } + + versionParts = new VersionParts("2.100.13-preview"); + if (versionParts.majorVersion != "2" || versionParts.minorVersion != "100" || versionParts.patchVersion != "13-preview") { + throw tl.loc("fourth") + } + + versionParts = new VersionParts("2.100.14-rc1-431"); + if (versionParts.majorVersion != "2" || versionParts.minorVersion != "100" || versionParts.patchVersion != "14-rc1-431") { + throw tl.loc("fifth") + } + + console.log("VersionPartsCreatedSuccessfully"); +} \ No newline at end of file diff --git a/_generated/UseDotNetV2/Tests/usedotnetTests.ts b/_generated/UseDotNetV2/Tests/usedotnetTests.ts new file mode 100644 index 000000000000..46697968f6a3 --- /dev/null +++ b/_generated/UseDotNetV2/Tests/usedotnetTests.ts @@ -0,0 +1,178 @@ +"use strict"; +import * as os from 'os'; +import * as tl from 'azure-pipelines-task-lib/task'; +import { Constants } from '../versionutilities'; +import { VersionInfo } from '../models'; +import { setFlagsFromString } from 'v8'; +import fs = require('fs'); + +let mockery = require('mockery'); +let osType = "win"; + +//setup mocks +mockery.enable({ + useCleanCache: true, + warnOnReplace: false, + warnOnUnregistered: false +}); + +mockery.registerMock('fs', { + ...fs, + lstatSync: function (elementPath: string) { + if (elementPath.indexOf(".") > -1 && !elementPath.endsWith("1.0.0") && !elementPath.endsWith("2.0.0") && !elementPath.endsWith("2.1.0")) { + return { + isDirectory: function () { + return false; + } + }; + } + + return { + isDirectory: function () { + return true; + } + }; + } +}); + +mockery.registerMock('azure-pipelines-task-lib/task', { + getHttpProxyConfiguration: function () { return ""; }, + getHttpCertConfiguration: function () { return "" }, + setResourcePath: function (resourcePath) { return; }, + prependPath: function (toolPath: string): void { + if (process.env["__case__"] == "globaltoolpathfailure" && toolPath.includes(Constants.relativeGlobalToolPath)) { + throw tl.loc("ErrorWhileSettingDotNetToolPath"); + } + + if (toolPath.includes("installationPath") || toolPath.includes("agentstooldir")) { + console.log(tl.loc("PrependingInstallationPath")) + return; + } + + if (toolPath.includes(Constants.relativeGlobalToolPath)) { + console.log(tl.loc("PrependingGlobalToolPath")); + } + + throw ""; + }, + osType: function () { return os.type(); }, + mkdirP: function (directoryPath) { return; }, + loc: function (locString, ...param: string[]) { return tl.loc(locString, param); }, + debug: function (message) { return tl.debug(message); }, + getVariable: function (variableName) { + if (variableName == "Agent.ToolsDirectory") { + return "agentstooldir"; + } + + return tl.getVariable(variableName); + }, + getInput: function (inputName: string, required: boolean): string { + if (inputName == "packageType") { + return "sdk"; + } + else if (inputName == "version") { + return "2.2.1"; + } + else if (inputName == "installationPath") { + if (process.env["__case__"] == "skipinstallation") { + return ""; + } + + return "installationPath"; + } + }, + getBoolInput: function (inputName: string, required: boolean): boolean { + if (inputName == "includePreviewVersions") { + if (required) { + throw ""; + } + + return false; + } + else if (inputName == "performMultiLevelLookup") { + if (required) { + throw ""; + } + + return false; + } + }, + getPathInput: function (inputName: string, required: boolean): string { + if (inputName == "workingDirectory") { + + return ""; + } + return ""; + }, + setResult: function (result: tl.TaskResult, message: string): void { + tl.setResult(result, message); + }, + setVariable: function (name: string, value: string, secret?: boolean) { + tl.setVariable(name, value, secret ? true : false); + }, + TaskResult: { + Failed: tl.TaskResult.Failed, + Succeeded: tl.TaskResult.Succeeded + } +}); + +mockery.registerMock('./versionfetcher', { + DotNetCoreVersionFetcher: function () { + return { + getVersionInfo: function (versionSpec: string, vsVersionSpec: string, packageType: string, includePreviewVersions: boolean): Promise { + if (process.env["__case__"] == "matchingversionnotfound") { + return new Promise((resolve, reject) => { + resolve(null); + }); + } + + return new Promise((resolve, reject) => { + resolve(new VersionInfo(JSON.parse(`{"version":"2.1.0", "runtime-version":"2.1.100", "files":[{"name":"win-x64.zip", "url":"https://pathToWin/zip", "rid":"win-x64"}]}`), "sdk")); + }); + }, + getDownloadUrl: function (versionInfo: VersionInfo): string { + return versionInfo.getFiles()[0].url; + } + } + } +}); + +mockery.registerMock('./versioninstaller', { + VersionInstaller: function (pacakageType: string, receivedInstallationPath: string) { + console.log(tl.loc("installationPathValueIs", receivedInstallationPath)) + if (process.env["__case__"] == "skipinstallation" && !receivedInstallationPath.includes("agentstooldir") && !receivedInstallationPath.includes("dotnet")) { + throw ""; + } + + return { + isVersionInstalled: function (version: string): boolean { + if (process.env["__case__"] == "skipinstallation") { + return true; + } + + return false; + }, + downloadAndInstall: function (versionInfo: VersionInfo, downloadUrl: string): Promise { + console.log(tl.loc("DownloadAndInstallCalled")); + return new Promise((resolve, reject) => { + resolve(); + }); + } + } + } +}); + +mockery.registerMock('./nugetinstaller', { + NuGetInstaller: { + installNuGet: function (version) { + return new Promise((resolve, reject) => { + resolve(); + }) + } + } +}); + +process.env["USERPROFILE"] = "userprofile" +process.env.HOME = "home" + +require('../usedotnet'); \ No newline at end of file diff --git a/_generated/UseDotNetV2/Tests/versionFetcherGetDownloadUrlFailTests.ts b/_generated/UseDotNetV2/Tests/versionFetcherGetDownloadUrlFailTests.ts new file mode 100644 index 000000000000..c42f337dfd7c --- /dev/null +++ b/_generated/UseDotNetV2/Tests/versionFetcherGetDownloadUrlFailTests.ts @@ -0,0 +1,87 @@ +"use strict"; +import * as tl from 'azure-pipelines-task-lib/task'; +import * as os from 'os'; +import { toolrunner } from './mocks/mockedModels' +var mockery = require('mockery'); + +mockery.enable({ + useCleanCache: true, + warnOnReplace: false, + warnOnUnregistered: false +}); + +mockery.registerMock('typed-rest-client/HttpClient', { + HttpClient: function () { + return { + get: function (url: string, headers) { + return ""; + } + } + } +}); + +mockery.registerMock('azure-pipelines-task-lib/task', { + osType: function () { return process.env["__ostype__"]; }, + which: function (tool: string, check: boolean) { + if (tool == 'powershell') { + return "C:/Program Files/PowerShell"; + } + else if (tool.endsWith(".sh")) { + return "/temp/somefile.sh"; + } + }, + tool: function (pathToTool) { + if (process.env["__ostype__"].toLowerCase().includes("win")) { + if (process.env["__getmachineosfail__"] == "true") { + return new toolrunner(pathToTool, {code: 1, error: null, stderr: "failedWhileExecutingScript"}); + } + + return new toolrunner(pathToTool, { + code: 0, + error: null, + stderr: "", + stdout: `Primary:win-x64${os.EOL}Legacy:win-x64` + }); + } + else if (process.env["__ostype__"].toLowerCase().includes("linux")) { + return new toolrunner(pathToTool, { + code: 0, + error: null, + stderr: "", + stdout: `Primary:linux-x64${os.EOL}Legacy:ubuntu16.04` + }); + } + else if (process.env["__ostype__"].toLowerCase().includes("osx")) { + return new toolrunner(pathToTool, { + code: 0, + error: null, + stderr: "", + stdout: `Primary:osx-x64${os.EOL}Legacy:osx-x64` + }); + } + }, + loc: function (locString, param: string[]) { return tl.loc(locString, param); }, + debug: function (message) { return tl.debug(message); }, + error: function (errorMessage) { return tl.error(errorMessage); }, + getVariable: function (variableName) { return tl.getVariable(variableName); }, + getHttpProxyConfiguration: function () { return ""; }, + getHttpCertConfiguration: function () { return "" }, + setResourcePath: function (path) { return; } +}); + +import { DotNetCoreVersionFetcher } from "../versionfetcher"; +import { VersionInfo } from '../models'; + +let versionFetcher = new DotNetCoreVersionFetcher(); +try { + let versionInfo = new VersionInfo(JSON.parse(process.env["__versioninfo__"]), "sdk"); + let downloadUrl = versionFetcher.getDownloadUrl(versionInfo); + if (downloadUrl) { + tl.setResult(tl.TaskResult.Succeeded, "succeeded"); + } + + tl.setResult(tl.TaskResult.Failed, "DownloadUrlWasNotReturned"); +} +catch (ex) { + tl.setResult(tl.TaskResult.Failed, "TestThrewException" + ex); +} \ No newline at end of file diff --git a/_generated/UseDotNetV2/Tests/versionFetcherGetDownloadUrlPassTests.ts b/_generated/UseDotNetV2/Tests/versionFetcherGetDownloadUrlPassTests.ts new file mode 100644 index 000000000000..f10c0f0b2bfd --- /dev/null +++ b/_generated/UseDotNetV2/Tests/versionFetcherGetDownloadUrlPassTests.ts @@ -0,0 +1,103 @@ +"use strict"; +import * as tl from 'azure-pipelines-task-lib/task'; +import * as os from 'os'; +import { toolrunner } from './mocks/mockedModels' +var mockery = require('mockery'); +var osType = "win"; + +mockery.enable({ + useCleanCache: true, + warnOnReplace: false, + warnOnUnregistered: false +}); + +mockery.registerMock('typed-rest-client/HttpClient', { + HttpClient: function () { + return { + get: function (url: string, headers) { + return ""; + } + } + } +}); + +mockery.registerMock('azure-pipelines-task-lib/task', { + osType: function () { return osType; }, + which: function (tool: string, check: boolean) { + if (tool == 'powershell') { + return "C:/Program Files/PowerShell"; + } + else if (tool.endsWith(".sh")) { + return "/temp/somefile.sh"; + } + }, + tool: function (pathToTool) { + if (osType.toLowerCase().includes("win")) { + return new toolrunner(pathToTool, { + code: 0, + error: null, + stderr: "", + stdout: `Primary:win-x64${os.EOL}Legacy:win-x64` + }); + } + else if (osType.toLowerCase().includes("linux")) { + return new toolrunner(pathToTool, { + code: 0, + error: null, + stderr: "", + stdout: `Primary:linux-x64${os.EOL}Legacy:ubuntu16.04` + }); + } + else if (osType.toLowerCase().includes("osx")) { + return new toolrunner(pathToTool, { + code: 0, + error: null, + stderr: "", + stdout: `Primary:osx-x64${os.EOL}Legacy:osx-x64` + }); + } + }, + loc: function (locString, param: string[]) { return tl.loc(locString, param); }, + debug: function (message) { return tl.debug(message); }, + error: function (errorMessage) { return tl.error(errorMessage); }, + getVariable: function (variableName) { return tl.getVariable(variableName); }, + getHttpProxyConfiguration: function () { return ""; }, + getHttpCertConfiguration: function () { return "" }, + setResourcePath: function (path) { return; } +}); + + +import { DotNetCoreVersionFetcher } from "../versionfetcher"; +import { VersionInfo } from '../models'; +try { + let versionInfo = new VersionInfo(JSON.parse(`{"version":"2.2.104", "files": [{"name": "linux.tar.gz", "rid":"linux-x64", "url": "https://path.to/file.tar.gz"}, {"name": "osx.pkg", "rid":"osx-x64", "url": "https://path.to/file.pkg"}, {"name": "osx.tar.gz", "rid":"osx-x64", "url": "https://path.toMac/file.tar.gz"}, {"name": "win.exe", "rid":"win-x64", "url": "https://path.to/file.exe"}, {"name": "win.zip", "rid":"win-x64", "url": "https://path.to/file.zip"}]}`), "sdk"); + + // Test for windows + osType = "win"; + let versionFetcher = new DotNetCoreVersionFetcher(); + let downloadUrl = versionFetcher.getDownloadUrl(versionInfo); + if (downloadUrl != "https://path.to/file.zip") { + throw ""; + } + + // Test for linux + osType = "linux"; + versionFetcher = new DotNetCoreVersionFetcher(); + downloadUrl = versionFetcher.getDownloadUrl(versionInfo); + if (downloadUrl != "https://path.to/file.tar.gz") { + throw ""; + } + + // Test for mac os + osType = "osx"; + versionFetcher = new DotNetCoreVersionFetcher(); + downloadUrl = versionFetcher.getDownloadUrl(versionInfo); + if (downloadUrl != "https://path.toMac/file.tar.gz") { + throw ""; + } + + tl.setResult(tl.TaskResult.Succeeded, "CorrectDownloadUrlsSuccessfullyReturnedForAllOs"); +} +catch (ex) { + tl.setResult(tl.TaskResult.Failed, "TestThrewException" + ex); +} \ No newline at end of file diff --git a/_generated/UseDotNetV2/Tests/versionFetcherGetVersionInfoFailTests.ts b/_generated/UseDotNetV2/Tests/versionFetcherGetVersionInfoFailTests.ts new file mode 100644 index 000000000000..1daaabb562bd --- /dev/null +++ b/_generated/UseDotNetV2/Tests/versionFetcherGetVersionInfoFailTests.ts @@ -0,0 +1,135 @@ +"use strict"; +import * as tl from 'azure-pipelines-task-lib/task'; +import { HttpClientResponse } from "./mocks/mockedModels" +var mockery = require('mockery'); + +mockery.enable({ + useCleanCache: true, + warnOnReplace: false, + warnOnUnregistered: false +}); + +mockery.registerMock('typed-rest-client/HttpClient', { + HttpClient: function () { + return { + get: function (url: string, headers) { + if (url == DotNetCoreReleasesIndexUrl && process.env["__failat__"] == "versionnotfound") { + return new Promise((resolve, reject) => { + resolve(new HttpClientResponse(`{ + "releases-index": [ + { + "channel-version": "2.2", + "releases.json": "${ReleasesJsonUrl2}" + }, + { + "channel-version": "3.0", + "releases.json": "${ReleasesJsonUrl3}", + "support-phase": "preview" + }, + { + "channel-version": "4.0", + "releases.json": "${ReleasesJsonUrl4}" + }, + { + "channel-version": "4.1", + "releases.json": "${ReleasesJsonUrl5}", + "support-phase": "preview" + } + ] + }`)) + }); + } + else if (url == DotNetCoreReleasesIndexUrl && process.env["__failat__"] == "channelfetch") { + return new Promise((resolve, reject) => { + reject(""); + }); + } + else if (url == ReleasesJsonUrl2) { + return new Promise((resolve, reject) => { + resolve(new HttpClientResponse(`{ + "releases": [ + { + "version": "2.2.104", + "files": [ + "rid": "winx64", + "url": "https://dotnetWindowsDownloadUrl.com" + ] + } + ] + }`)); + }); + } + else if (url == ReleasesJsonUrl3) { + return new Promise((resolve, reject) => { + resolve(new HttpClientResponse(`{ + "releases": [ + { + "version": "3.0.104", + "files": [ + "rid": "winx64", + "url": "https://dotnetWindowsDownloadUrl.com" + ] + } + ] + }`)); + }); + } + else if (url == ReleasesJsonUrl4) { + return new Promise((resolve, reject) => { + resolve(new HttpClientResponse(`{ + "releases": [ + { + "version": "4.0.102", + "files": [ + "rid": "winx64", + "url": "https://dotnetWindowsDownloadUrl.com" + ] + } + ] + }`)); + }); + } + else if (url == ReleasesJsonUrl5) { + return new Promise((resolve, reject) => { + resolve(new HttpClientResponse(`{ + "releases": [ + { + "version": "4.1.100", + "files": [ + "rid": "winx64", + "url": "https://dotnetWindowsDownloadUrl.com" + ] + } + ] + }`)); + }); + } + } + } + } +}); + +import { DotNetCoreVersionFetcher } from "../versionfetcher"; + +const DotNetCoreReleasesIndexUrl: string = "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json"; +const ReleasesJsonUrl2: string = "https://releases.file.com/version2.2.json" +const ReleasesJsonUrl3: string = "https://releases.file.com/version3.0.json" +const ReleasesJsonUrl4: string = "https://releases.file.com/version4.0.json" +const ReleasesJsonUrl5: string = "https://releases.file.com/version4.1.json" + +let versionFetcher = new DotNetCoreVersionFetcher(); +versionFetcher.getVersionInfo(process.env["__versionspec__"], null, "sdk", process.env["__inlcudepreviewversion__"] == "true") + .catch((ex) => { + if (process.env["__versionspec__"] == "2.2.999-cantbefound-234") { + tl.setResult(tl.TaskResult.Failed, "FailedAsExpected"); + } + else if (process.env["__versionspec__"] == "3.x" && process.env["__inlcudepreviewversion__"] != "true") { + tl.setResult(tl.TaskResult.Failed, "FailedAsExpected"); + } + else if (process.env["__versionspec__"] == "4.40.x" && process.env["__inlcudepreviewversion__"] == "true") { + tl.setResult(tl.TaskResult.Failed, "FailedAsExpected"); + } + else { + tl.setResult(tl.TaskResult.Succeeded, "succeeded"); + } + }); \ No newline at end of file diff --git a/_generated/UseDotNetV2/Tests/versionFetcherGetVersionInfoTestsCorrect.ts b/_generated/UseDotNetV2/Tests/versionFetcherGetVersionInfoTestsCorrect.ts new file mode 100644 index 000000000000..9abdcb564352 --- /dev/null +++ b/_generated/UseDotNetV2/Tests/versionFetcherGetVersionInfoTestsCorrect.ts @@ -0,0 +1,234 @@ +"use strict"; +import * as tl from 'azure-pipelines-task-lib/task'; +import { HttpClientResponse } from "./mocks/mockedModels" +var mockery = require('mockery'); + +mockery.enable({ + useCleanCache: true, + warnOnReplace: false, + warnOnUnregistered: false +}); + +mockery.registerMock('typed-rest-client/HttpClient', { + HttpClient: function () { + return { + get: function (url: string, headers) { + if (url == DotNetCoreReleasesIndexUrl) { + return new Promise((resolve, reject) => { + resolve(new HttpClientResponse(`{ + "releases-index": [ + { + "channel-version": "2.0", + "releases.json": "${ReleasesJsonUrl0}" + }, + { + "channel-version": "2.1", + "releases.json": "${ReleasesJsonUrl1}" + }, + { + "channel-version": "2.2", + "releases.json": "${ReleasesJsonUrl2}" + }, + { + "channel-version": "2.3", + "releases.json": "${ReleasesJsonUrl3}" + }, + { + "channel-version": "3.0", + "releases.json": "${ReleasesJsonUrl4}", + "support-phase": "preview" + }, + { + "channel-version": "4.0", + "releases.json": "${ReleasesJsonUrl5}" + }, + { + "channel-version": "4.1", + "releases.json": "${ReleasesJsonUrl6}", + "support-phase": "preview" + } + ] + }`)); + }); + } + else if (url == ReleasesJsonUrl0) { + return new Promise((resolve, reject) => { + resolve(new HttpClientResponse(`{ + "releases": [ + { + "sdk": { + "version": "2.0.1", + "files": [] + } + }, + { + "sdk": { + "version": "2.1.104", + "files": [] + } + } + ] + }`)); + }); + } + else if (url == ReleasesJsonUrl1) { + return new Promise((resolve, reject) => { + resolve(new HttpClientResponse(`{ + "releases": [ + { + "sdk": { + "version": "2.1.103-preview-999", + "files": [] + } + } + ] + }`)); + }); + } + else if (url == ReleasesJsonUrl2) { + return new Promise((resolve, reject) => { + resolve(new HttpClientResponse(` + { + "releases": [ + { + "sdk": { + "version": "2.2.106-preview-1", + "files": [] + } + }, + { + "sdks": [ + { + "version": "2.2.104", + "files": [] + }, + { + "version": "2.2.105", + "files": [] + } + ] + }, + { + "sdk": { + "version": "2.2.103", + "files": [] + } + } + ] + }`)); + }); + } + else if (url == ReleasesJsonUrl3) { + return new Promise((resolve, reject) => { + resolve(new HttpClientResponse(`{ + "releases": [ + { + "sdk": { + "version": "2.3.105", + "files": [] + } + }, + { + "sdk": { + "version": "2.3.103-preview-999", + "files": [] + } + } + ] + }`)); + }); + } + else if (url == ReleasesJsonUrl4) { + return new Promise((resolve, reject) => { + resolve(new HttpClientResponse(`{ + "releases": [ + { + "sdk": { + "version": "3.0.10-preview-999", + "files": [] + } + } + ] + }`)); + }); + } + else if (url == ReleasesJsonUrl5) { + return new Promise((resolve, reject) => { + resolve(new HttpClientResponse(`{ + "releases": [ + { + "sdk": { + "version": "4.0.100", + "files": [] + } + } + ] + }`)); + }); + } + else if (url == ReleasesJsonUrl6) { + return new Promise((resolve, reject) => { + resolve(new HttpClientResponse(`{ + "releases": [ + { + "sdk": { + "version": "4.1.5-preview-999", + "files": [] + } + } + ] + }`)); + }); + } + } + } + } +}); + +import { DotNetCoreVersionFetcher } from "../versionfetcher"; + +const DotNetCoreReleasesIndexUrl: string = "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json"; +const ReleasesJsonUrl0: string = "https://releases.file.com/version2.0.json"; +const ReleasesJsonUrl1: string = "https://releases.file.com/version2.1.json"; +const ReleasesJsonUrl2: string = "https://releases.file.com/version2.2.json"; +const ReleasesJsonUrl3: string = "https://releases.file.com/version2.3.json"; +const ReleasesJsonUrl4: string = "https://releases.file.com/version3.0.json"; +const ReleasesJsonUrl5: string = "https://releases.file.com/version4.0.json"; +const ReleasesJsonUrl6: string = "https://releases.file.com/version4.1.json"; + +let versionFetcher = new DotNetCoreVersionFetcher(); +versionFetcher.getVersionInfo(process.env["__versionspec__"], null, "sdk", process.env["__inlcudepreviewversion__"] == "true") + .then((versionInfo) => { + if (process.env["__versionspec__"] == "2.2.103" && versionInfo.getVersion() != "2.2.103") { + throw ""; + } + else if (process.env["__versionspec__"] == "2.2.104" && versionInfo.getVersion() != "2.2.104") { + throw ""; + } + else if (process.env["__versionspec__"] == "2.1.104" && versionInfo.getVersion() != "2.1.104") { + throw ""; + } + else if (process.env["__versionspec__"] == "2.x" && versionInfo.getVersion() != "2.3.105") { + throw ""; + } + else if (process.env["__versionspec__"] == "2.2.x" && process.env["__inlcudepreviewversion__"] != "true" && versionInfo.getVersion() != "2.2.105") { + throw ""; + } + else if (process.env["__versionspec__"] == "2.2.x" && process.env["__inlcudepreviewversion__"] == "true" && versionInfo.getVersion() != "2.2.106-preview-1") { + throw ""; + } + else if (process.env["__versionspec__"] == "2.3.x" && process.env["__inlcudepreviewversion__"] == "true" && versionInfo.getVersion() != "2.3.105") { + throw ""; + } + else if (process.env["__versionspec__"] == "3.x" && process.env["__inlcudepreviewversion__"] == "true" && versionInfo.getVersion() != "3.0.10-preview-999") { + throw ""; + } + else if (process.env["__versionspec__"] == "4.x" && process.env["__inlcudepreviewversion__"] != "true" && versionInfo.getVersion() != "4.0.100") { + throw ""; + } + + tl.setResult(tl.TaskResult.Succeeded, "succeeded"); + }) + .catch((ex) => { + tl.setResult(tl.TaskResult.Failed, "FailedAsExpected"); + }); \ No newline at end of file diff --git a/_generated/UseDotNetV2/Tests/versionInstallerDownloadAndInstallTests.ts b/_generated/UseDotNetV2/Tests/versionInstallerDownloadAndInstallTests.ts new file mode 100644 index 000000000000..88032a5c2424 --- /dev/null +++ b/_generated/UseDotNetV2/Tests/versionInstallerDownloadAndInstallTests.ts @@ -0,0 +1,247 @@ +"use strict"; +import * as tl from 'azure-pipelines-task-lib/task'; +import * as os from 'os'; +import { toolrunner } from './mocks/mockedModels' +import { Constants } from "../versionutilities"; +import fs = require('fs'); +var mockery = require('mockery'); +var osType = "win"; + +const installationPath: string = "installationPath" + +//setup mocks +mockery.enable({ + useCleanCache: true, + warnOnReplace: false, + warnOnUnregistered: false +}); + +mockery.registerMock('typed-rest-client/HttpClient', { + HttpClient: function () { + return { + get: function (url: string, headers) { + return ""; + } + } + } +}); + +mockery.registerMock('azure-pipelines-tool-lib/tool', { + downloadTool: function (url: string, fileName?: string): Promise { + return Promise((resolve, reject) => { + if (process.env["__case__"] == "downloaderror") { + reject("downloaderror"); + } + + resolve("downloadPath"); + }); + }, + extractZip: function (file: string): Promise { + return Promise((resolve, reject) => { + if (process.env["__case__"] == "extracterror") { + reject("extractError"); + } + + resolve("extractPath"); + }) + }, + extractTar: function (file: string): Promise { + return Promise((resolve, reject) => { + if (process.env["__case__"] == "extracterror") { + reject("extractError"); + } + + resolve("extractPath"); + }) + } +}) + +mockery.registerMock('azure-pipelines-task-lib/task', { + exist: function (elementPath: string) { + if (elementPath.startsWith(installationPath)) { + return true; + } + + return false; + }, + osType: function () { return osType; }, + which: function (tool: string, check: boolean) { + if (tool == 'powershell') { + return "C:/Program Files/PowerShell"; + } + else if (tool.endsWith(".sh")) { + return "/temp/somefile.sh"; + } + }, + tool: function (pathToTool) { + if (osType.toLowerCase().includes("win")) { + return new toolrunner(pathToTool, { + code: 0, + error: null, + stderr: "", + stdout: `Primary:win-x64${os.EOL}Legacy:win-x64` + }); + } + else if (osType.toLowerCase().includes("linux")) { + return new toolrunner(pathToTool, { + code: 0, + error: null, + stderr: "", + stdout: `Primary:linux-x64${os.EOL}Legacy:ubuntu16.04` + }); + } + else if (osType.toLowerCase().includes("osx")) { + return new toolrunner(pathToTool, { + code: 0, + error: null, + stderr: "", + stdout: `Primary:osx-x64${os.EOL}Legacy:osx-x64` + }); + } + }, + ls: function (options: string, paths: string[]): string[] { + if (paths.length == 1 && paths[0] == "extractPath") { + return ["host", "sdk", "shared", "dotnet.exe", "ThirdPartyNotices.txt", "LICENSE"]; + } + else if (paths.length == 1 && paths[0].includes(Constants.relativeSdkPath)) { + return ["1.0.0", "1.0.0.complete", "2.0.0", "2.0.0.complete", "2.1.0", "2.1.0.complete", "nugetfallback"] + } + else if (paths.length == 1 && paths[0].includes(Constants.relativeRuntimePath)) { + return ["1.0.0", "1.0.0.complete", "2.0.0", "2.0.0.complete", "2.1.0", "2.1.0.complete", ""] + } + + return []; + }, + cp: function (source: string, dest: string, options?: string, continueOnError?: boolean): void { + if (source.indexOf(".") > -1 && process.env["__case__"] == "filecopyerror") { + throw "fileCopyError"; + } + + return; + }, + writeFile: function (file: string, data: string | Buffer, options?: string): void { + if (process.env["__case__"] == "versioncompletefileerror") { + throw "versioncompletefileerror"; + } + + tl.debug(tl.loc("creatingfile", file)); + return; + }, + loc: function (locString, ...param: string[]) { return tl.loc(locString, param); }, + debug: function (message) { return tl.debug(message); }, + warning: function (message) { return tl.warning(message); }, + error: function (errorMessage) { return tl.error(errorMessage); }, + getVariable: function (variableName) { return tl.getVariable(variableName); }, + getHttpProxyConfiguration: function () { return ""; }, + getHttpCertConfiguration: function () { return "" }, + setResourcePath: function (path) { return; } +}); + +mockery.registerMock('fs', { + ...fs, + lstatSync: function (path: string) { + if (path.indexOf(".") > -1 && !path.endsWith("1.0.0") && !path.endsWith("2.0.0") && !path.endsWith("2.1.0")) { + return { + isDirectory: function () { + return false; + } + }; + } + + return { + isDirectory: function () { + return true; + } + }; + } +}); + +//start tests +import { VersionInstaller } from "../versioninstaller"; +import { VersionInfo } from "../models"; +import { Promise } from 'q'; +let versionInstaller = new VersionInstaller("sdk", installationPath); + +let versionInfo = new VersionInfo(JSON.parse(`{"version":"2.2.104", "files": [{"name": "linux.tar.gz", "rid":"linux-x64", "url": "https://path.to/file.tar.gz"}, {"name": "osx.pkg", "rid":"osx-x64", "url": "https://path.to/file.pkg"}, {"name": "osx.tar.gz", "rid":"osx-x64", "url": "https://path.toMac/file.tar.gz"}, {"name": "win.exe", "rid":"win-x64", "url": "https://path.to/file.exe"}, {"name": "win.zip", "rid":"win-x64", "url": "https://path.to/file.zip"}]}`), "sdk"); +process.env["AGENT_TEMPDIRECTORY"] = process.cwd(); + +if (process.env["__case__"] == "urlerror") { + versionInstaller.downloadAndInstall(versionInfo, "") + .then(() => { + tl.setResult(tl.TaskResult.Succeeded, "DidNotThrowAsExpected"); + }, (ex) => { + versionInstaller.downloadAndInstall(null, "https://path.to/file.zip") + .then(() => { + tl.setResult(tl.TaskResult.Succeeded, "DidNotThrowAsExpected"); + }, (ex) => { + tl.setResult(tl.TaskResult.Failed, "ThrewAsExpected"); + }); + }); +} +else if (process.env["__case__"] == "downloaderror") { + versionInstaller.downloadAndInstall(versionInfo, "file") + .then(() => { + tl.setResult(tl.TaskResult.Succeeded, "DidNotThrowAsExpected"); + }, (ex) => { + tl.setResult(tl.TaskResult.Failed, "ThrewAsExpected"); + }); +} +else if (process.env["__case__"] == "extracterror") { + versionInstaller.downloadAndInstall(versionInfo, "file") + .then(() => { + tl.setResult(tl.TaskResult.Succeeded, "DidNotThrowAsExpected"); + }, (ex) => { + tl.setResult(tl.TaskResult.Failed, "ThrewAsExpected"); + }); +} +else if (process.env["__case__"] == "filecopyerror") { + versionInstaller.downloadAndInstall(versionInfo, "file") + .then(() => { + tl.setResult(tl.TaskResult.Succeeded, "SuccessfullyCompleted"); + }, (ex) => { + tl.setResult(tl.TaskResult.Failed, "TestThrewException"); + }); +} +else if (process.env["__case__"] == "conditionalfilecopy") { + // version being installed is the latest among already installed ones in the installation path and hence files should also be copied + versionInfo = new VersionInfo(JSON.parse(`{"version":"2.2.104", "runtime-version":"2.0.100", "files": [{"name": "linux.tar.gz", "rid":"linux-x64", "url": "https://path.to/file.tar.gz"}, {"name": "osx.pkg", "rid":"osx-x64", "url": "https://path.to/file.pkg"}, {"name": "osx.tar.gz", "rid":"osx-x64", "url": "https://path.toMac/file.tar.gz"}, {"name": "win.exe", "rid":"win-x64", "url": "https://path.to/file.exe"}, {"name": "win.zip", "rid":"win-x64", "url": "https://path.to/file.zip"}]}`), "sdk"); + versionInstaller.downloadAndInstall(versionInfo, "file") + .then(() => { + // version being installed is not the latest and hence root directory files should not be copied. + versionInfo = new VersionInfo(JSON.parse(`{"version":"2.0.1", "files": [{"name": "linux.tar.gz", "rid":"linux-x64", "url": "https://path.to/file.tar.gz"}, {"name": "osx.pkg", "rid":"osx-x64", "url": "https://path.to/file.pkg"}, {"name": "osx.tar.gz", "rid":"osx-x64", "url": "https://path.toMac/file.tar.gz"}, {"name": "win.exe", "rid":"win-x64", "url": "https://path.to/file.exe"}, {"name": "win.zip", "rid":"win-x64", "url": "https://path.to/file.zip"}]}`), "sdk"); + versionInstaller.downloadAndInstall(versionInfo, "file") + .then(() => { + versionInstaller = new VersionInstaller("runtime", installationPath); + + // version being installed is the latest but files will still no be copied as runtime is being installed. + versionInfo = new VersionInfo(JSON.parse(`{"version":"2.2.104", "files": [{"name": "linux.tar.gz", "rid":"linux-x64", "url": "https://path.to/file.tar.gz"}, {"name": "osx.pkg", "rid":"osx-x64", "url": "https://path.to/file.pkg"}, {"name": "osx.tar.gz", "rid":"osx-x64", "url": "https://path.toMac/file.tar.gz"}, {"name": "win.exe", "rid":"win-x64", "url": "https://path.to/file.exe"}, {"name": "win.zip", "rid":"win-x64", "url": "https://path.to/file.zip"}]}`), "runtime"); + versionInstaller.downloadAndInstall(versionInfo, "file") + .then(() => { + tl.setResult(tl.TaskResult.Succeeded, "CopiedFilesConditionally"); + }, (ex) => { + tl.setResult(tl.TaskResult.Failed, "ShouldNotHaveThrown"); + }) + }, (ex) => { + tl.setResult(tl.TaskResult.Failed, "ShouldNotHaveThrown"); + }); + }, (ex) => { + tl.setResult(tl.TaskResult.Failed, "ShouldNotHaveThrown"); + }); +} +else if (process.env["__case__"] == "versioncompletefileerror") { + versionInstaller.downloadAndInstall(versionInfo, "file") + .then(() => { + tl.setResult(tl.TaskResult.Succeeded, "ShouldHaveThrown"); + }, (ex) => { + tl.setResult(tl.TaskResult.Failed, "ThrewAsExpected"); + }); + +} +else if (process.env["__case__"] == "successfullinstall") { + versionInstaller.downloadAndInstall(versionInfo, "file") + .then(() => { + tl.setResult(tl.TaskResult.Succeeded, "SuccessfullyInstalled"); + }, (ex) => { + tl.setResult(tl.TaskResult.Failed, "ShouldNotHaveThrownException" + ex); + }); +} diff --git a/_generated/UseDotNetV2/Tests/versionInstallerIsVersionInstalledTests.ts b/_generated/UseDotNetV2/Tests/versionInstallerIsVersionInstalledTests.ts new file mode 100644 index 000000000000..eed98f6fba43 --- /dev/null +++ b/_generated/UseDotNetV2/Tests/versionInstallerIsVersionInstalledTests.ts @@ -0,0 +1,151 @@ +"use strict"; +import * as tl from 'azure-pipelines-task-lib/task'; +import * as path from 'path'; +import { Constants } from "../versionutilities"; +let mockery = require('mockery'); + +const version = "2.1.1"; +const installationPath: string = "installationPath" + +mockery.enable({ + useCleanCache: true, + warnOnReplace: false, + warnOnUnregistered: false +}); + +mockery.registerMock('typed-rest-client/HttpClient', { + HttpClient: function () { + return { + get: function (url: string, headers) { + return ""; + } + } + } +}); + +let sdkFolderExists = true; +let sdkFileExists = true; +let runtimeFolderExists = true; +let runtimeFileExists = true; +mockery.registerMock('azure-pipelines-task-lib/task', { + exist: function (elementPath: string) { + if (elementPath == path.join(installationPath, Constants.relativeSdkPath, version)) { + return sdkFolderExists; + } + else if (elementPath == path.join(installationPath, Constants.relativeSdkPath, `${version}.complete`)) { + return sdkFileExists; + } + else if (elementPath == path.join(installationPath, Constants.relativeRuntimePath, version)) { + return runtimeFolderExists; + } + else if (elementPath == path.join(installationPath, Constants.relativeRuntimePath, `${version}.complete`)) { + return runtimeFileExists; + } + else if (elementPath == installationPath) { + return true; + } + + return false; + }, + loc: function (locString, ...param: string[]) { return tl.loc(locString, param); }, + debug: function (message) { return tl.debug(message); }, + warning: function (message) { return tl.warning(message); }, + error: function (errorMessage) { return tl.error(errorMessage); }, + getVariable: function (variableName) { return tl.getVariable(variableName); }, + getHttpProxyConfiguration: function () { return ""; }, + getHttpCertConfiguration: function () { return "" }, + setResourcePath: function (path) { return; } +}); + +import { VersionInstaller } from "../versioninstaller"; +let versionInstaller = new VersionInstaller("sdk", installationPath); + +if (process.env["__case__"] == "nonexplicit") { + let throwcount = 0; + try { + versionInstaller.isVersionInstalled("") + } + catch (ex) { + throwcount++ + } + + try { + versionInstaller.isVersionInstalled("2.1") + } + catch (ex) { + throwcount++ + } + + try { + versionInstaller.isVersionInstalled("2.1.x") + } + catch (ex) { + throwcount++ + } + + if (throwcount == 3) { + tl.setResult(tl.TaskResult.Failed, "ThrewAsExpected"); + } + else { + tl.setResult(tl.TaskResult.Succeeded, "ShouldHaveThrownInAllCases"); + } +} +else if (process.env["__case__"] == "folderorfilemissing") { + sdkFolderExists = false; + if (versionInstaller.isVersionInstalled(version)) { + tl.setResult(tl.TaskResult.Failed, "ShouldHaveReturnedFalse"); + throw ""; + } + + sdkFolderExists = true; + sdkFileExists = false; + if (versionInstaller.isVersionInstalled(version)) { + tl.setResult(tl.TaskResult.Failed, "ShouldHaveReturnedFalse"); + throw ""; + } + + sdkFolderExists = false; + sdkFileExists = false; + if (versionInstaller.isVersionInstalled(version)) { + tl.setResult(tl.TaskResult.Failed, "ShouldHaveReturnedFalse"); + throw ""; + } + + versionInstaller = new VersionInstaller("runtime", installationPath); + runtimeFolderExists = true; + runtimeFileExists = false; + if (versionInstaller.isVersionInstalled(version)) { + tl.setResult(tl.TaskResult.Failed, "ShouldHaveReturnedFalse"); + throw ""; + } + + runtimeFolderExists = true; + runtimeFileExists = false; + if (versionInstaller.isVersionInstalled(version)) { + tl.setResult(tl.TaskResult.Failed, "ShouldHaveReturnedFalse"); + throw ""; + } + + runtimeFolderExists = true; + runtimeFileExists = false; + if (versionInstaller.isVersionInstalled(version)) { + tl.setResult(tl.TaskResult.Failed, "ShouldHaveReturnedFalse"); + throw ""; + } + + tl.setResult(tl.TaskResult.Succeeded, "ReturnedFalseForAll"); +} +else if (process.env["__case__"] == "success") { + if (!versionInstaller.isVersionInstalled(version)) { + tl.setResult(tl.TaskResult.Failed, "ShouldHaveReturnedTrue"); + throw ""; + } + + versionInstaller = new VersionInstaller("runtime", installationPath); + if (!versionInstaller.isVersionInstalled(version)) { + tl.setResult(tl.TaskResult.Failed, "ShouldHaveReturnedTrue"); + throw ""; + } + + tl.setResult(tl.TaskResult.Succeeded, "ReturnedTrue"); +} \ No newline at end of file diff --git a/_generated/UseDotNetV2/Tests/versionInstallerTests.ts b/_generated/UseDotNetV2/Tests/versionInstallerTests.ts new file mode 100644 index 000000000000..713607a5e03c --- /dev/null +++ b/_generated/UseDotNetV2/Tests/versionInstallerTests.ts @@ -0,0 +1,34 @@ +"use strict"; +import * as tl from 'azure-pipelines-task-lib/task'; +var mockery = require('mockery'); +mockery.enable({ + useCleanCache: true, + warnOnReplace: false, + warnOnUnregistered: false +}); + +mockery.registerMock('azure-pipelines-task-lib/task', { + exist: function (path: string) { tl.debug(tl.loc("inexist")); return false; }, + mkdirP: function (path: string) { + tl.debug(tl.loc("inmkdirp")) + throw ""; + }, + loc: function (locString, param: string[]) { return tl.loc(locString, param); }, + debug: function (message) { return tl.debug(message); }, + error: function (errorMessage) { return tl.error(errorMessage); }, + getVariable: function (variableName) { return tl.getVariable(variableName); }, + getHttpProxyConfiguration: function () { return ""; }, + getHttpCertConfiguration: function () { return "" }, + setResourcePath: function (path) { return; } +}); + +import { VersionInstaller } from "../versioninstaller"; + +try { + new VersionInstaller("sdk", "C:/unknownlocation"); +} +catch (ex) { + tl.setResult(tl.TaskResult.Failed, "ThrownAsExpected"); +} + +tl.setResult(tl.TaskResult.Succeeded, "DidNotThrowAsExpected"); \ No newline at end of file diff --git a/_generated/UseDotNetV2/Tests/versionUtilityChannelVersionCompareTests.ts b/_generated/UseDotNetV2/Tests/versionUtilityChannelVersionCompareTests.ts new file mode 100644 index 000000000000..522ef7a414fc --- /dev/null +++ b/_generated/UseDotNetV2/Tests/versionUtilityChannelVersionCompareTests.ts @@ -0,0 +1,54 @@ +'use strict'; +import * as versionutilities from "../versionutilities"; +import * as tl from 'azure-pipelines-task-lib/task'; + +if (process.env["__non_explicit__"] == "true") { + let throwCount: number = 0; + // try with non explicit version + try { + versionutilities.compareChannelVersion("2.2", "2.x"); + } + catch (ex) { + throwCount++; + } + + try { + versionutilities.compareChannelVersion("2.x", "2.1"); + } + catch (ex) { + throwCount++; + } + + try { + versionutilities.compareChannelVersion("", "3.14"); + } + catch (ex) { + throwCount++; + } + + try { + versionutilities.compareChannelVersion("1.127", ""); + } + catch (ex) { + throwCount++; + } + + if (throwCount == 4) { + throw tl.loc("FunctionThrewAsExpected"); + } +} +else { + if (versionutilities.compareChannelVersion("3.0", "2.999") < 1) { + throw ""; + } + + if (versionutilities.compareChannelVersion("3.547", "3.547") != 0) { + throw ""; + } + + if (versionutilities.compareChannelVersion("2.100", "2.200") > -1) { + throw ""; + } + + console.log("FunctionGaveRightResult"); +} \ No newline at end of file diff --git a/_generated/UseDotNetV2/Tests/versionUtilityGetMatchingVersionFromListTests.ts b/_generated/UseDotNetV2/Tests/versionUtilityGetMatchingVersionFromListTests.ts new file mode 100644 index 000000000000..5a763a94222b --- /dev/null +++ b/_generated/UseDotNetV2/Tests/versionUtilityGetMatchingVersionFromListTests.ts @@ -0,0 +1,82 @@ +'use strict'; +import * as versionutilities from "../versionutilities"; +import { VersionInfo } from "../models"; + +if (process.env["__empty__"] == "true") { + let throwCount: number = 0; + // empty version info list + + if (versionutilities.getMatchingVersionFromList([], "2.x") != null) { + throw "" + } + + // form the version info list with preview versions as well + let versionInfoList: VersionInfo[] = []; + ["3.0.100", "3.1.0-preview-850"].forEach((version) => { + var temp = new VersionInfo(JSON.parse(`{"version": "${version}", "files": []}`), "sdk"); + versionInfoList.push(temp); + }); + + // version info list with no version matching the version spec, with includePreviewVersion as false + if (versionutilities.getMatchingVersionFromList(versionInfoList, "3.1.x", false) != null) { + throw ""; + } + + + // version info list with no version matching the version spec, with includePreviewVersion as true + if (versionutilities.getMatchingVersionFromList(versionInfoList, "2.9.x", true) != null) { + throw ""; + } + + // version info list with version exactly equal to version not present (in this case version spec is an exact version), , with includePreviewVersion as false + if (versionutilities.getMatchingVersionFromList(versionInfoList, "3.1.0", false) != null) { + throw ""; + } + + // version info list with version exactly equal to version not present (in this case version spec is an exact version), with includePreviewVersion as true + if (versionutilities.getMatchingVersionFromList(versionInfoList, "3.1.0", true) != null) { + throw ""; + } + + console.log("FunctionReturnedNull") +} +else { + // form the version info list with preview versions as well + let versionInfoList: VersionInfo[] = []; + ["3.0.100", "3.0.200-preview-850", "3.1.100", "3.1.101-preview-850"].forEach((version) => { + var temp = new VersionInfo(JSON.parse(`{"version": "${version}", "files": []}`), "sdk"); + versionInfoList.push(temp); + }); + + // should return heighest non preview version in major version 3 + if (versionutilities.getMatchingVersionFromList(versionInfoList, "3.x", false).getVersion() != "3.1.100") { + throw ""; + } + + // should return heighest version (may be preview as well) in major version 3 + if (versionutilities.getMatchingVersionFromList(versionInfoList, "3.x", true).getVersion() != "3.1.101-preview-850") { + throw ""; + } + + // should return heighest non preview version in major version 3 and minor version 0 + if (versionutilities.getMatchingVersionFromList(versionInfoList, "3.0.x", false).getVersion() != "3.0.100") { + throw ""; + } + + // should return heighest version (may be preview as well) in major version 3 and minor version 0 + if (versionutilities.getMatchingVersionFromList(versionInfoList, "3.0.x", true).getVersion() != "3.0.200-preview-850") { + throw ""; + } + + // should return exact version from list + if (versionutilities.getMatchingVersionFromList(versionInfoList, "3.0.100", false).getVersion() != "3.0.100") { + throw ""; + } + + // should return exact version from list even if includePreviewVersion is false and the version spec is preview + if (versionutilities.getMatchingVersionFromList(versionInfoList, "3.0.200-preview-850", false).getVersion() != "3.0.200-preview-850") { + throw ""; + } + + console.log("FuctionReturnedCorrectVersion"); +} \ No newline at end of file diff --git a/_generated/UseDotNetV2/Tests/versionUtilityVersionCompareTests.ts b/_generated/UseDotNetV2/Tests/versionUtilityVersionCompareTests.ts new file mode 100644 index 000000000000..c842b19ce78a --- /dev/null +++ b/_generated/UseDotNetV2/Tests/versionUtilityVersionCompareTests.ts @@ -0,0 +1,66 @@ +'use strict'; +import * as versionutilities from "../versionutilities"; +import * as tl from 'azure-pipelines-task-lib/task'; + +if (process.env["__non_explicit__"] == "true") { + let throwCount: number = 0; + // try with non explicit version + try { + versionutilities.versionCompareFunction("2.2.104", "2.2.x"); + } + catch (ex) { + throwCount++; + } + + try { + versionutilities.versionCompareFunction("2.x", "2.2.2"); + } + catch (ex) { + throwCount++; + } + + try { + versionutilities.versionCompareFunction("", "2.2.104"); + } + catch (ex) { + throwCount++; + } + + try { + versionutilities.versionCompareFunction("3.0.3-preview-727", ""); + } + catch (ex) { + throwCount++; + } + + if (throwCount == 4) { + throw tl.loc("FunctionThrewAsExpected"); + } +} +else { + if (versionutilities.versionCompareFunction("2.2.104", "2.1.507") < 1) { + throw ""; + } + + if (versionutilities.versionCompareFunction("3.0.0-preview-1", "3.0.0-preview-0") < 1) { + throw ""; + } + + if (versionutilities.versionCompareFunction("2.2.104", "2.2.104") != 0) { + throw ""; + } + + if (versionutilities.versionCompareFunction("3.1.104-preview1-324", "3.1.104-preview1-324") != 0) { + throw ""; + } + + if (versionutilities.versionCompareFunction("2.1.400", "2.2.0") > -1) { + throw ""; + } + + if (versionutilities.versionCompareFunction("1.14.1", "1.15.0-preview-1") > -1) { + throw ""; + } + + console.log("FunctionGaveRightResult"); +} \ No newline at end of file diff --git a/_generated/UseDotNetV2/externals/get-os-distro.sh b/_generated/UseDotNetV2/externals/get-os-distro.sh new file mode 100644 index 000000000000..689da6d682cb --- /dev/null +++ b/_generated/UseDotNetV2/externals/get-os-distro.sh @@ -0,0 +1,192 @@ +#!/usr/bin/env bash +# Copyright (c) .NET Foundation and contributors. All rights reserved. +# Licensed under the MIT license. See LICENSE file in the project root for full license information. +# + +# Stop script on NZEC +set -e +# Stop script if unbound variable found (use ${var:-} if intentional) +set -u +# By default cmd1 | cmd2 returns exit code of cmd2 regardless of cmd1 success +# This is causing it to fail +set -o pipefail + +# Use in the the functions: eval $invocation +invocation='say_verbose "Calling: ${yellow:-}${FUNCNAME[0]} ${green:-}$*${normal:-}"' + +# standard output may be used as a return value in the functions +# we need a way to write text on the screen in the functions so that +# it won't interfere with the return value. +# Exposing stream 3 as a pipe to standard output of the script itself +exec 3>&1 + +say_err() { + printf "%b\n" "get-os-distro: Error: $1" >&2 +} + +# This platform list is finite - if the SDK/Runtime has supported Linux distribution-specific assets, +# then and only then should the Linux distribution appear in this list. +# Adding a Linux distribution to this list does not imply distribution-specific support. +get_legacy_os_name_from_platform() { + + platform="$1" + case "$platform" in + "centos.7") + echo "centos" + return 0 + ;; + "debian.8") + echo "debian" + return 0 + ;; + "fedora.23") + echo "fedora.23" + return 0 + ;; + "fedora.27") + echo "fedora.27" + return 0 + ;; + "fedora.24") + echo "fedora.24" + return 0 + ;; + "opensuse.13.2") + echo "opensuse.13.2" + return 0 + ;; + "opensuse.42.1") + echo "opensuse.42.1" + return 0 + ;; + "opensuse.42.3") + echo "opensuse.42.3" + return 0 + ;; + "rhel.7"*) + echo "rhel" + return 0 + ;; + "ubuntu.14.04") + echo "ubuntu" + return 0 + ;; + "ubuntu.16.04") + echo "ubuntu.16.04" + return 0 + ;; + "ubuntu.16.10") + echo "ubuntu.16.10" + return 0 + ;; + "ubuntu.18.04") + echo "ubuntu.18.04" + return 0 + ;; + "alpine.3.4.3") + echo "alpine" + return 0 + ;; + esac + return 1 +} + +get_linux_platform_name() { + + if [ -e /etc/os-release ]; then + . /etc/os-release + echo "$ID.$VERSION_ID" + return 0 + elif [ -e /etc/redhat-release ]; then + local redhatRelease=$( /dev/null; then + CPUName=$(uname -m) + case $CPUName in + armv7l) + echo "arm" + return 0 + ;; + aarch64) + echo "arm64" + return 0 + ;; + esac + fi + + # Always default to 'x64' + echo "x64" + return 0 +} + +osName=$(get_current_os_name || echo "") +legacyOsName=$(get_legacy_os_name || echo "") +arch=$(get_machine_architecture || echo "") + +primaryName="$osName-$arch" +legacyName="$legacyOsName-$arch" + +echo "Primary:$primaryName" +echo "Legacy:$legacyName" + +if [ -z "$osName" ] && [ -z "$legacyOsName" ];then + exit 1 +fi diff --git a/_generated/UseDotNetV2/externals/get-os-platform.ps1 b/_generated/UseDotNetV2/externals/get-os-platform.ps1 new file mode 100644 index 000000000000..4ac8d07f5ba4 --- /dev/null +++ b/_generated/UseDotNetV2/externals/get-os-platform.ps1 @@ -0,0 +1,18 @@ +function Get-Machine-Architecture() +{ + # possible values: AMD64, IA64, x86 + return $ENV:PROCESSOR_ARCHITECTURE +} + +function Get-CLIArchitecture-From-Architecture([string]$Architecture) +{ + switch ($Architecture.ToLower()) + { + { ($_ -eq "amd64") -or ($_ -eq "x64") } { return "x64" } + { $_ -eq "x86" } { return "x86" } + default { throw "Architecture not supported. If you think this is a bug, please report it at https://github.com/dotnet/cli/issues" } + } +} + +$CLIArchitecture = Get-CLIArchitecture-From-Architecture $(Get-Machine-Architecture) +Write-Output "Primary:win-$CLIArchitecture" \ No newline at end of file diff --git a/_generated/UseDotNetV2/globaljsonfetcher.ts b/_generated/UseDotNetV2/globaljsonfetcher.ts new file mode 100644 index 000000000000..0a894f44bd25 --- /dev/null +++ b/_generated/UseDotNetV2/globaljsonfetcher.ts @@ -0,0 +1,93 @@ +"use strict"; +import * as fileSystem from "fs"; +import * as tl from 'azure-pipelines-task-lib/task'; +import { DotNetCoreVersionFetcher } from "./versionfetcher"; +import { VersionInfo } from "./models"; + +export class globalJsonFetcher { + + private workingDirectory: string; + private versionFetcher: DotNetCoreVersionFetcher = new DotNetCoreVersionFetcher(true); + /** + * The global json fetcher provider functionality to extract the version information from all global json in the working directory. + * @param workingDirectory + */ + constructor(workingDirectory: string) { + this.workingDirectory = workingDirectory; + } + + /** + * Get all version information from all global.json starting from the working directory without duplicates. + */ + public async GetVersions(): Promise { + var versionInformation: VersionInfo[] = new Array(); + var versionStrings = this.getVersionStrings(); + for (let index = 0; index < versionStrings.length; index++) { + const version = versionStrings[index]; + if (version != null) { + var versionInfo = await this.versionFetcher.getVersionInfo(version, null, "sdk", false); + versionInformation.push(versionInfo); + } + } + + return Array.from(new Set(versionInformation)); // this remove all not unique values. + } + + private getVersionStrings(): Array { + let filePathsToGlobalJson = tl.findMatch(this.workingDirectory, "**/global.json"); + if (filePathsToGlobalJson == null || filePathsToGlobalJson.length == 0) { + throw tl.loc("FailedToFindGlobalJson", this.workingDirectory); + } + + return filePathsToGlobalJson.map(path => { + var content = this.readGlobalJson(path); + if (content != null) { + tl.loc("GlobalJsonSdkVersion", content.sdk.version, path); + return content.sdk.version; + } + + return null; + }) + .filter(d => d != null); // remove all global.json that can't read + } + + private readGlobalJson(path: string): GlobalJson | null { + let globalJson: GlobalJson | null = null; + tl.loc("GlobalJsonFound", path); + try { + let fileContent = fileSystem.readFileSync(path); + if (!fileContent) { + // do not throw if globa.json is empty, task need not install any version in such case. + tl.loc("GlobalJsonIsEmpty", path); + return null; + } + + globalJson = (JSON.parse(fileContent.toString())) as { sdk: { version: string } }; + } catch (error) { + // we throw if the global.json is invalid + throw tl.loc("FailedToReadGlobalJson", path, error); // We don't throw if a global.json is invalid. + } + + if (globalJson == null || globalJson.sdk == null || globalJson.sdk.version == null) { + tl.loc("FailedToReadGlobalJson", path); + return null; + } + + return globalJson; + } + +} + +export class GlobalJson { + constructor(version: string | null = null) { + if (version != null) { + this.sdk = new sdk(); + this.sdk.version = version; + } + } + public sdk: sdk; +} + +class sdk { + public version: string; +} \ No newline at end of file diff --git a/_generated/UseDotNetV2/icon.png b/_generated/UseDotNetV2/icon.png new file mode 100644 index 000000000000..3e954ccf8d28 Binary files /dev/null and b/_generated/UseDotNetV2/icon.png differ diff --git a/_generated/UseDotNetV2/icon.svg b/_generated/UseDotNetV2/icon.svg new file mode 100644 index 000000000000..8cc980aff2d1 --- /dev/null +++ b/_generated/UseDotNetV2/icon.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/_generated/UseDotNetV2/make.json b/_generated/UseDotNetV2/make.json new file mode 100644 index 000000000000..5f5e63059fd8 --- /dev/null +++ b/_generated/UseDotNetV2/make.json @@ -0,0 +1,21 @@ +{ + + "cp": [ + { + "source": "externals", + "options": "-R" + } + ], + "rm": [ + { + "items": [ + "node_modules/azure-pipelines-tasks-packaging-common/node_modules/azure-pipelines-task-lib", + "node_modules/azure-pipelines-tasks-packaging-common/node_modules/azure-pipelines-tool-lib", + "node_modules/azure-pipelines-tasks-utility-common/node_modules/azure-pipelines-task-lib", + "node_modules/azure-pipelines-tasks-utility-common/node_modules/azure-pipelines-tool-lib", + "node_modules/azure-pipelines-tool-lib/node_modules/azure-pipelines-task-lib" + ], + "options": "-Rf" + } + ] +} \ No newline at end of file diff --git a/_generated/UseDotNetV2/models.ts b/_generated/UseDotNetV2/models.ts new file mode 100644 index 000000000000..e17e07e3a52e --- /dev/null +++ b/_generated/UseDotNetV2/models.ts @@ -0,0 +1,192 @@ +"use strict"; +import * as semver from "semver"; +import * as url from "url"; + +import * as tl from 'azure-pipelines-task-lib/task'; + +import * as utils from "./versionutilities"; + +export class VersionInfo { + private version: string; + private files: VersionFilesData[]; + private packageType: string; + private runtimeVersion: string; + + private vsVersion: string; + + constructor(versionInfoObject: { version: string, files: { name: string, hash: string, url: string, rid: string }[], 'runtime-version': string, 'vs-version': string }, packageType: string) { + if (!versionInfoObject.version || !versionInfoObject.files) { + throw tl.loc("InvalidVersionObject", packageType, versionInfoObject) + } + + this.version = versionInfoObject.version; + this.packageType = packageType; + this.files = []; + versionInfoObject.files.forEach(fileData => { + try { + this.files.push(new VersionFilesData(fileData)); + } + catch (ex) { + tl.debug(tl.loc("FilesDataIsIncorrectInVersion", this.packageType, this.version, ex)); + } + }); + + if (this.packageType == utils.Constants.sdk) { + this.runtimeVersion = versionInfoObject["runtime-version"] || ""; + this.vsVersion = versionInfoObject["vs-version"] || ""; + } + else { + this.runtimeVersion = this.version; + } + } + + public getVersion(): string { + return this.version; + } + + public getFiles(): VersionFilesData[] { + return this.files; + } + + public getRuntimeVersion(): string { + return this.runtimeVersion; + } + + public getPackageType(): string { + return this.packageType; + } + + public getvsVersion(): string { + return this.vsVersion; + } +} + +export class VersionFilesData { + public name: string; + public url: string; + public rid: string; + public hash?: string; + + constructor(versionFilesData: any) { + if (!versionFilesData || !versionFilesData.name || !versionFilesData.url || !versionFilesData.rid) { + throw tl.loc("VersionFilesDataIncorrect"); + } + + this.name = versionFilesData.name; + this.url = versionFilesData.url; + this.rid = versionFilesData.rid; + this.hash = versionFilesData.hash; + } +} + +export class Channel { + constructor(channelRelease: any) { + if (!channelRelease || !channelRelease["channel-version"] || !channelRelease["releases.json"]) { + throw tl.loc("InvalidChannelObject"); + } + + this.channelVersion = channelRelease["channel-version"]; + this.releasesJsonUrl = channelRelease["releases.json"]; + + if (!channelRelease["support-phase"]) { + tl.debug(tl.loc("SupportPhaseNotPresentInChannel", this.channelVersion)); + } + else { + this.supportPhase = channelRelease["support-phase"]; + } + } + + public channelVersion: string; + public releasesJsonUrl: string; + public supportPhase: string; +} + +export class VersionParts { + constructor(version: string, explicitVersion: boolean = false) { + if (explicitVersion) { + VersionParts.ValidateExplicitVersionNumber(version); + } else { + VersionParts.ValidateVersionSpec(version); + } + this.versionSpec = version; + let parts: string[] = version.split("."); + this.majorVersion = parts[0]; + this.minorVersion = parts[1]; + this.patchVersion = ""; + if (this.minorVersion != "x") { + this.patchVersion = parts[2]; + } + } + + /** + * Validate the version if this string is a explicit version number. Returns an exception if the version number is not explicit. + * @param version the input version number as string + */ + private static ValidateExplicitVersionNumber(version: string): void { + try { + let parts = version.split('.'); + // validate version + if ((parts.length < 3) || // check if the version has at least 3 parts + !parts[0] || // The major version must always be set + !parts[1] || // The minor version must always be set + !parts[2] || // The patch version must always be set + Number.isNaN(Number.parseInt(parts[0])) || // the major version number must be a number + Number.isNaN(Number.parseInt(parts[1])) || // the minor version number must be a number + Number.isNaN(Number.parseInt(parts[2].split(/\-|\+/)[0])) // the patch version number must be a number. (the patch version can have a '-', or a '+' because of version numbers like: 1.0.0-beta-50) + ) { + throw tl.loc("OnlyExplicitVersionAllowed", version); + } + + if (!semver.valid(version)) { + throw tl.loc("InvalidVersion", version); + } + } + catch (ex) { + throw tl.loc("VersionNotAllowed", version, ex); + } + } + + /** + * Validate the version. Returns an exception if the version number is wrong. + * @param version the input version number as string + */ + private static ValidateVersionSpec(version: string): void { + try { + let parts = version.split('.'); + // validate version + if (parts.length < 2 || // check if the version has at least 3 parts + (parts[1] == "x" && parts.length > 2) || // a version number like `1.x` must have only major and minor version + (parts[1] != "x" && parts.length <= 2) || // a version number like `1.1` must have a patch version + !parts[0] || // The major version must always be set + !parts[1] || // The minor version must always be set + (parts.length == 3 && !parts[2]) || // a version number like `1.1.` is invalid because the patch version is missing + Number.isNaN(Number.parseInt(parts[0])) || // the major version number must be a number + ( + parts[1] != "x" && // if the minor version is not `x` + ( + Number.isNaN(Number.parseInt(parts[1])) || // the minor version number must be a number + ( + parts.length > 2 && parts[2] != "x" && // if the patch is not `x`, then its an explicit version + !semver.valid(version) // validate the explicit version + ) + ) + ) + ) { + throw tl.loc("VersionNumberHasTheWrongFormat", version); + } + + new semver.Range(version); + } + catch (ex) { + throw tl.loc("VersionNotAllowed", version, ex); + } + } + + public majorVersion: string; + public minorVersion: string; + public patchVersion: string; + /** + * the version number entered by the user + */ + public versionSpec: string; +} diff --git a/_generated/UseDotNetV2/nugetinstaller.ts b/_generated/UseDotNetV2/nugetinstaller.ts new file mode 100644 index 000000000000..e44f2e5d70db --- /dev/null +++ b/_generated/UseDotNetV2/nugetinstaller.ts @@ -0,0 +1,46 @@ +"use strict"; +import * as tl from 'azure-pipelines-task-lib/task'; +import * as trm from 'azure-pipelines-task-lib/toolrunner'; +import * as nuGetGetter from 'azure-pipelines-tasks-packaging-common/nuget/NuGetToolGetter'; + + export class NuGetInstaller { + public static async installNuGet(version: string) { + try { + const proxy: tl.ProxyConfiguration = tl.getHttpProxyConfiguration(); + if (proxy) { + console.log(tl.loc("InstallingNuGetVersion", version)); + await nuGetGetter.getNuGet(version, false, true); + NuGetInstaller.setProxy(proxy); + } + } + catch (error) { + console.warn(tl.loc("FailureWhileInstallingNuGetVersion", version, error.message)); + } + } + + private static setProxy(proxyConfig: tl.ProxyConfiguration) { + const nugetPath = tl.which('nuget'); + + console.log(tl.loc("SettingUpNugetProxySettings")); + // Set proxy url + let nuget = tl.tool(nugetPath); + nuget.arg('config'); + nuget.arg('-set'); + nuget.arg('http_proxy=' + proxyConfig.proxyUrl); + nuget.exec({} as trm.IExecOptions); + + // Set proxy username + nuget = tl.tool(nugetPath); + nuget.arg('config'); + nuget.arg('-set'); + nuget.arg('http_proxy.user=' + proxyConfig.proxyUsername); + nuget.exec({} as trm.IExecOptions); + + // Set proxy password + nuget = tl.tool(nugetPath); + nuget.arg('config'); + nuget.arg('-set'); + nuget.arg('http_proxy.password=' + proxyConfig.proxyPassword); + nuget.exec({} as trm.IExecOptions); + } +} \ No newline at end of file diff --git a/_generated/UseDotNetV2/package-lock.json b/_generated/UseDotNetV2/package-lock.json new file mode 100644 index 000000000000..b94e78e273d0 --- /dev/null +++ b/_generated/UseDotNetV2/package-lock.json @@ -0,0 +1,818 @@ +{ + "name": "usedotnet", + "version": "2.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@types/concat-stream": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@types/concat-stream/-/concat-stream-1.6.0.tgz", + "integrity": "sha1-OU2+C7X+5Gs42JZzXoto7yOQ0A0=", + "requires": { + "@types/node": "*" + } + }, + "@types/form-data": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/@types/form-data/-/form-data-0.0.33.tgz", + "integrity": "sha1-yayFsqX9GENbjIXZ7LUObWyJP/g=", + "requires": { + "@types/node": "*" + } + }, + "@types/ini": { + "version": "1.3.30", + "resolved": "https://registry.npmjs.org/@types/ini/-/ini-1.3.30.tgz", + "integrity": "sha512-2+iF8zPSbpU83UKE+PNd4r/MhwNAdyGpk3H+VMgEH3EhjFZq1kouLgRoZrmIcmoGX97xFvqdS44DkICR5Nz3tQ==" + }, + "@types/ltx": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/@types/ltx/-/ltx-2.8.0.tgz", + "integrity": "sha512-qHnPVD0FFquypl7Yy8qqvDjhnX3c7toUYjjALK+bug7MfR2WCRTIjw+GUMfehRi/Mbhj5rLAQerPTnTCUzSCWg==", + "requires": { + "@types/node": "*" + } + }, + "@types/mocha": { + "version": "5.2.6", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-5.2.6.tgz", + "integrity": "sha512-1axi39YdtBI7z957vdqXI4Ac25e7YihYQtJa+Clnxg1zTJEaIRbndt71O3sP4GAMgiAm0pY26/b9BrY4MR/PMw==" + }, + "@types/mockery": { + "version": "1.4.29", + "resolved": "https://registry.npmjs.org/@types/mockery/-/mockery-1.4.29.tgz", + "integrity": "sha1-m6It838H43gP/4Ux0aOOYz+UV6U=" + }, + "@types/node": { + "version": "10.17.48", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.48.tgz", + "integrity": "sha512-Agl6xbYP6FOMDeAsr3QVZ+g7Yzg0uhPHWx0j5g4LFdUBHVtqtU+gH660k/lCEe506jJLOGbEzsnqPDTZGJQLag==" + }, + "@types/q": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/@types/q/-/q-1.5.2.tgz", + "integrity": "sha512-ce5d3q03Ex0sy4R14722Rmt6MT07Ua+k4FwDfdcToYJcMKNtRVQvJ6JCAPdAmAnbRb6CsX6aYb9m96NGod9uTw==" + }, + "@types/qs": { + "version": "6.9.5", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.5.tgz", + "integrity": "sha512-/JHkVHtx/REVG0VVToGRGH2+23hsYLHdyG+GrvoUGlGAd0ErauXDyvHtRI/7H7mzLm+tBCKA7pfcpkQ1lf58iQ==" + }, + "@types/semver": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-6.0.0.tgz", + "integrity": "sha512-OO0srjOGH99a4LUN2its3+r6CBYcplhJ466yLqs+zvAWgphCpS8hYZEZ797tRDP/QKcqTdb/YCN6ifASoAWkrQ==" + }, + "@types/uuid": { + "version": "3.4.9", + "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-3.4.9.tgz", + "integrity": "sha512-XDwyIlt/47l2kWLTzw/mtrpLdB+GPSskR2n/PIcPn+VYhVO77rGhRncIR5GPU0KRzXuqkDO+J5qqrG0Y8P6jzQ==" + }, + "adm-zip": { + "version": "0.4.16", + "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.4.16.tgz", + "integrity": "sha512-TFi4HBKSGfIKsK5YCkKaaFG2m4PEDyViZmEwof3MTIgzimHLto6muaHVpbrljdIvIrFZzEq/p4nafOeLcYegrg==" + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "requires": { + "sprintf-js": "~1.0.2" + }, + "dependencies": { + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" + } + } + }, + "asap": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", + "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=" + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + }, + "azure-devops-node-api": { + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/azure-devops-node-api/-/azure-devops-node-api-10.2.2.tgz", + "integrity": "sha512-4TVv2X7oNStT0vLaEfExmy3J4/CzfuXolEcQl/BRUmvGySqKStTG2O55/hUQ0kM7UJlZBLgniM0SBq4d/WkKow==", + "requires": { + "tunnel": "0.0.6", + "typed-rest-client": "^1.8.4" + } + }, + "azure-pipelines-task-lib": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/azure-pipelines-task-lib/-/azure-pipelines-task-lib-3.4.0.tgz", + "integrity": "sha512-3eC4OTFw+7xD7A2aUhxR/j+jRlTI+vVfS0CGxt1pCLs4c/KmY0tQWgbqjD3157kmiucWxELBvgZHaD2gCBe9fg==", + "requires": { + "minimatch": "3.0.5", + "mockery": "^2.1.0", + "q": "^1.5.1", + "semver": "^5.1.0", + "shelljs": "^0.8.5", + "sync-request": "6.1.0", + "uuid": "^3.0.1" + }, + "dependencies": { + "mockery": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mockery/-/mockery-2.1.0.tgz", + "integrity": "sha512-9VkOmxKlWXoDO/h1jDZaS4lH33aWfRiJiNT/tKj+8OGzrcFDLo8d0syGdbsc3Bc4GvRXPb+NMMvojotmuGJTvA==" + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + } + } + }, + "azure-pipelines-tasks-packaging-common": { + "version": "2.198.1", + "resolved": "https://registry.npmjs.org/azure-pipelines-tasks-packaging-common/-/azure-pipelines-tasks-packaging-common-2.198.1.tgz", + "integrity": "sha512-iApnFFlGy8oGo2wacMExApsFqPeElcL1dRj8mxOHLrFVw2XzncJ5zl0tEskLcQoN25heWySxU5lQ1AMMvpmSXA==", + "requires": { + "@types/ini": "1.3.30", + "@types/ltx": "2.8.0", + "@types/mocha": "^5.2.6", + "@types/mockery": "1.4.29", + "@types/node": "^10.17.0", + "@types/q": "1.5.2", + "adm-zip": "^0.4.11", + "azure-devops-node-api": "10.2.2", + "azure-pipelines-task-lib": "^3.1.0", + "azure-pipelines-tool-lib": "^1.0.2", + "ini": "^1.3.4", + "ip-address": "^5.8.9", + "ltx": "^2.6.2", + "q": "^1.5.0", + "semver": "^5.5.0", + "typed-rest-client": "1.8.4" + }, + "dependencies": { + "@types/semver": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-5.5.0.tgz", + "integrity": "sha512-41qEJgBH/TWgo5NFSvBCJ1qkoi3Q6ONSF2avrHq1LVEZfYpdHmj0y9SuTK+u9ZhG1sYQKBL1AWXKyLWP4RaUoQ==" + }, + "azure-pipelines-tool-lib": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/azure-pipelines-tool-lib/-/azure-pipelines-tool-lib-1.3.1.tgz", + "integrity": "sha512-6XrjayeYI7QeL2tGP3FPgHggWHAYe4opESnZ9a3UsbtWYdZu3dldBbOlJZpkAxfKCpjRDYMuq6SP1MUsOOm0kA==", + "requires": { + "@types/semver": "^5.3.0", + "@types/uuid": "^3.4.5", + "azure-pipelines-task-lib": "^3.1.10", + "semver": "^5.7.0", + "semver-compare": "^1.0.0", + "typed-rest-client": "^1.8.6", + "uuid": "^3.3.2" + }, + "dependencies": { + "azure-pipelines-task-lib": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/azure-pipelines-task-lib/-/azure-pipelines-task-lib-3.3.1.tgz", + "integrity": "sha512-56ZAr4MHIoa24VNVuwPL4iUQ5MKaigPoYXkBG8E8fiVmh8yZdatUo25meNoQwg77vDY22F63Q44UzXoMWmy7ag==", + "requires": { + "minimatch": "3.0.5", + "mockery": "^1.7.0", + "q": "^1.5.1", + "semver": "^5.1.0", + "shelljs": "^0.8.5", + "sync-request": "6.1.0", + "uuid": "^3.0.1" + } + }, + "typed-rest-client": { + "version": "1.8.9", + "resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-1.8.9.tgz", + "integrity": "sha512-uSmjE38B80wjL85UFX3sTYEUlvZ1JgCRhsWj/fJ4rZ0FqDUFoIuodtiVeE+cUqiVTOKPdKrp/sdftD15MDek6g==", + "requires": { + "qs": "^6.9.1", + "tunnel": "0.0.6", + "underscore": "^1.12.1" + } + } + } + }, + "minimatch": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.5.tgz", + "integrity": "sha512-tUpxzX0VAzJHjLu0xUfFv1gwVp9ba3IOuRAVH2EGuRW8a5emA2FlACLqiT/lDVtS1W+TGNwqz3sWaNyLgDJWuw==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + }, + "typed-rest-client": { + "version": "1.8.4", + "resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-1.8.4.tgz", + "integrity": "sha512-MyfKKYzk3I6/QQp6e1T50py4qg+c+9BzOEl2rBmQIpStwNUoqQ73An+Tkfy9YuV7O+o2mpVVJpe+fH//POZkbg==", + "requires": { + "qs": "^6.9.1", + "tunnel": "0.0.6", + "underscore": "^1.12.1" + }, + "dependencies": { + "qs": { + "version": "6.11.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.1.tgz", + "integrity": "sha512-0wsrzgTz/kAVIeuxSjnpGC56rzYtr6JT/2BwEvMaPhFIoYa1aGO8LbzuU1R0uUYQkLpWBTOj0l/CLAJB64J6nQ==", + "requires": { + "side-channel": "^1.0.4" + } + } + } + } + } + }, + "azure-pipelines-tasks-utility-common": { + "version": "3.198.1", + "resolved": "https://registry.npmjs.org/azure-pipelines-tasks-utility-common/-/azure-pipelines-tasks-utility-common-3.198.1.tgz", + "integrity": "sha512-XxXLwrz06lSXP31JGCcgp2DCuVwcKLCjma55DtsjDe8L8sngKfmTBIiSuZe41aP+KlRtqo8n1I/FBQNPWxGw9w==", + "requires": { + "@types/node": "^10.17.0", + "azure-pipelines-task-lib": "^3.1.0", + "azure-pipelines-tool-lib": "^1.0.2", + "js-yaml": "3.13.1", + "semver": "^5.4.1" + }, + "dependencies": { + "@types/semver": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-5.5.0.tgz", + "integrity": "sha512-41qEJgBH/TWgo5NFSvBCJ1qkoi3Q6ONSF2avrHq1LVEZfYpdHmj0y9SuTK+u9ZhG1sYQKBL1AWXKyLWP4RaUoQ==" + }, + "azure-pipelines-tool-lib": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/azure-pipelines-tool-lib/-/azure-pipelines-tool-lib-1.3.1.tgz", + "integrity": "sha512-6XrjayeYI7QeL2tGP3FPgHggWHAYe4opESnZ9a3UsbtWYdZu3dldBbOlJZpkAxfKCpjRDYMuq6SP1MUsOOm0kA==", + "requires": { + "@types/semver": "^5.3.0", + "@types/uuid": "^3.4.5", + "azure-pipelines-task-lib": "^3.1.10", + "semver": "^5.7.0", + "semver-compare": "^1.0.0", + "typed-rest-client": "^1.8.6", + "uuid": "^3.3.2" + }, + "dependencies": { + "azure-pipelines-task-lib": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/azure-pipelines-task-lib/-/azure-pipelines-task-lib-3.3.1.tgz", + "integrity": "sha512-56ZAr4MHIoa24VNVuwPL4iUQ5MKaigPoYXkBG8E8fiVmh8yZdatUo25meNoQwg77vDY22F63Q44UzXoMWmy7ag==", + "requires": { + "minimatch": "3.0.5", + "mockery": "^1.7.0", + "q": "^1.5.1", + "semver": "^5.1.0", + "shelljs": "^0.8.5", + "sync-request": "6.1.0", + "uuid": "^3.0.1" + } + } + } + }, + "minimatch": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.5.tgz", + "integrity": "sha512-tUpxzX0VAzJHjLu0xUfFv1gwVp9ba3IOuRAVH2EGuRW8a5emA2FlACLqiT/lDVtS1W+TGNwqz3sWaNyLgDJWuw==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + } + } + }, + "azure-pipelines-tool-lib": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/azure-pipelines-tool-lib/-/azure-pipelines-tool-lib-1.0.1.tgz", + "integrity": "sha512-LonIQs/y0fDmrged2PDHMox8UHQuRrTs388gwBP1axgx4aU/vV/73e7v8tY/++kBF4sDCFea8ZrNxoYSSzRCtQ==", + "requires": { + "@types/semver": "^5.3.0", + "@types/uuid": "^3.4.5", + "azure-pipelines-task-lib": "^3.1.0", + "semver": "^5.7.0", + "semver-compare": "^1.0.0", + "typed-rest-client": "^1.7.3", + "uuid": "^3.3.2" + }, + "dependencies": { + "@types/semver": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-5.5.0.tgz", + "integrity": "sha512-41qEJgBH/TWgo5NFSvBCJ1qkoi3Q6ONSF2avrHq1LVEZfYpdHmj0y9SuTK+u9ZhG1sYQKBL1AWXKyLWP4RaUoQ==" + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + } + } + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "buffer-from": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==" + }, + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" + }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "concat-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "requires": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + } + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" + }, + "form-data": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.1.tgz", + "integrity": "sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, + "get-intrinsic": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.0.tgz", + "integrity": "sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q==", + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.3" + } + }, + "get-port": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/get-port/-/get-port-3.2.0.tgz", + "integrity": "sha1-3Xzn3hh8Bsi/NTeWrHHgmfCYDrw=" + }, + "glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "dependencies": { + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "requires": { + "brace-expansion": "^1.1.7" + } + } + } + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==" + }, + "http-basic": { + "version": "8.1.3", + "resolved": "https://registry.npmjs.org/http-basic/-/http-basic-8.1.3.tgz", + "integrity": "sha512-/EcDMwJZh3mABI2NhGfHOGOeOZITqfkEO4p/xK+l3NpyncIHUQBoMvCSF/b5GqvKtySC2srL/GGG3+EtlqlmCw==", + "requires": { + "caseless": "^0.12.0", + "concat-stream": "^1.6.2", + "http-response-object": "^3.0.1", + "parse-cache-control": "^1.0.1" + } + }, + "http-response-object": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/http-response-object/-/http-response-object-3.0.2.tgz", + "integrity": "sha512-bqX0XTF6fnXSQcEJ2Iuyr75yVakyjIDCqroJQ/aHfSdlM743Cwqoi2nDYMzLGWUcuTWGWy8AAvOKXTfiv6q9RA==", + "requires": { + "@types/node": "^10.0.3" + } + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" + }, + "interpret": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", + "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==" + }, + "ip-address": { + "version": "5.9.4", + "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-5.9.4.tgz", + "integrity": "sha512-dHkI3/YNJq4b/qQaz+c8LuarD3pY24JqZWfjB8aZx1gtpc2MDILu9L9jpZe1sHpzo/yWFweQVn+U//FhazUxmw==", + "requires": { + "jsbn": "1.1.0", + "lodash": "^4.17.15", + "sprintf-js": "1.1.2" + } + }, + "is-core-module": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.9.0.tgz", + "integrity": "sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A==", + "requires": { + "has": "^1.0.3" + } + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "js-yaml": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "jsbn": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz", + "integrity": "sha1-sBMHyym2GKHtJux56RH4A8TaAEA=" + }, + "lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + }, + "ltx": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/ltx/-/ltx-2.10.0.tgz", + "integrity": "sha512-RB4zR6Mrp/0wTNS9WxMvpgfht/7u/8QAC9DpPD19opL/4OASPa28uoliFqeDkLUU8pQ4aeAfATBZmz1aSAHkMw==", + "requires": { + "inherits": "^2.0.4" + } + }, + "mime-db": { + "version": "1.44.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz", + "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==" + }, + "mime-types": { + "version": "2.1.27", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz", + "integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==", + "requires": { + "mime-db": "1.44.0" + } + }, + "minimatch": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.5.tgz", + "integrity": "sha512-tUpxzX0VAzJHjLu0xUfFv1gwVp9ba3IOuRAVH2EGuRW8a5emA2FlACLqiT/lDVtS1W+TGNwqz3sWaNyLgDJWuw==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "mockery": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/mockery/-/mockery-1.7.0.tgz", + "integrity": "sha1-9O3g2HUMHJcnwnLqLGBiniyaHE8=" + }, + "object-inspect": { + "version": "1.12.3", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", + "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==" + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "requires": { + "wrappy": "1" + } + }, + "parse-cache-control": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parse-cache-control/-/parse-cache-control-1.0.1.tgz", + "integrity": "sha1-juqz5U+laSD+Fro493+iGqzC104=" + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==" + }, + "path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" + }, + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + }, + "promise": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/promise/-/promise-8.1.0.tgz", + "integrity": "sha512-W04AqnILOL/sPRXziNicCjSNRruLAuIHEOVBazepu0545DDNGYHz7ar9ZgZ1fMU8/MA4mVxp5rkBWRi6OXIy3Q==", + "requires": { + "asap": "~2.0.6" + } + }, + "q": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", + "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=" + }, + "qs": { + "version": "6.11.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.1.tgz", + "integrity": "sha512-0wsrzgTz/kAVIeuxSjnpGC56rzYtr6JT/2BwEvMaPhFIoYa1aGO8LbzuU1R0uUYQkLpWBTOj0l/CLAJB64J6nQ==", + "requires": { + "side-channel": "^1.0.4" + } + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "rechoir": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==", + "requires": { + "resolve": "^1.1.6" + } + }, + "resolve": { + "version": "1.22.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", + "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", + "requires": { + "is-core-module": "^2.9.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + }, + "semver-compare": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz", + "integrity": "sha1-De4hahyUGrN+nvsXiPavxf9VN/w=" + }, + "shelljs": { + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz", + "integrity": "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==", + "requires": { + "glob": "^7.0.0", + "interpret": "^1.0.0", + "rechoir": "^0.6.2" + } + }, + "side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "requires": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + } + }, + "sprintf-js": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.2.tgz", + "integrity": "sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug==" + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==" + }, + "sync-request": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/sync-request/-/sync-request-6.1.0.tgz", + "integrity": "sha512-8fjNkrNlNCrVc/av+Jn+xxqfCjYaBoHqCsDz6mt030UMxJGr+GSfCV1dQt2gRtlL63+VPidwDVLr7V2OcTSdRw==", + "requires": { + "http-response-object": "^3.0.1", + "sync-rpc": "^1.2.1", + "then-request": "^6.0.0" + } + }, + "sync-rpc": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/sync-rpc/-/sync-rpc-1.3.6.tgz", + "integrity": "sha512-J8jTXuZzRlvU7HemDgHi3pGnh/rkoqR/OZSjhTyyZrEkkYQbk7Z33AXp37mkPfPpfdOuj7Ex3H/TJM1z48uPQw==", + "requires": { + "get-port": "^3.1.0" + } + }, + "then-request": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/then-request/-/then-request-6.0.2.tgz", + "integrity": "sha512-3ZBiG7JvP3wbDzA9iNY5zJQcHL4jn/0BWtXIkagfz7QgOL/LqjCEOBQuJNZfu0XYnv5JhKh+cDxCPM4ILrqruA==", + "requires": { + "@types/concat-stream": "^1.6.0", + "@types/form-data": "0.0.33", + "@types/node": "^8.0.0", + "@types/qs": "^6.2.31", + "caseless": "~0.12.0", + "concat-stream": "^1.6.0", + "form-data": "^2.2.0", + "http-basic": "^8.1.1", + "http-response-object": "^3.0.1", + "promise": "^8.0.0", + "qs": "^6.4.0" + }, + "dependencies": { + "@types/node": { + "version": "8.10.66", + "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.66.tgz", + "integrity": "sha512-tktOkFUA4kXx2hhhrB8bIFb5TbwzS4uOhKEmwiD+NoiL0qtP2OQ9mFldbgD4dV1djrlBYP6eBuQZiWjuHUpqFw==" + } + } + }, + "tunnel": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", + "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==" + }, + "typed-rest-client": { + "version": "1.8.9", + "resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-1.8.9.tgz", + "integrity": "sha512-uSmjE38B80wjL85UFX3sTYEUlvZ1JgCRhsWj/fJ4rZ0FqDUFoIuodtiVeE+cUqiVTOKPdKrp/sdftD15MDek6g==", + "requires": { + "qs": "^6.9.1", + "tunnel": "0.0.6", + "underscore": "^1.12.1" + } + }, + "typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" + }, + "typescript": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.0.2.tgz", + "integrity": "sha512-e4ERvRV2wb+rRZ/IQeb3jm2VxBsirQLpQhdxplZ2MEzGvDkkMmPglecnNDfSUBivMjP93vRbngYYDQqQ/78bcQ==", + "dev": true + }, + "underscore": { + "version": "1.13.4", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.4.tgz", + "integrity": "sha512-BQFnUDuAQ4Yf/cYY5LNrK9NCJFKriaRbD9uR1fTeXnBeoa97W0i41qkZfGO9pSo8I5KzjAcSY2XYtdf0oKd7KQ==" + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "uuid": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", + "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==" + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" + } + } +} diff --git a/_generated/UseDotNetV2/package.json b/_generated/UseDotNetV2/package.json new file mode 100644 index 000000000000..ad91ad5cd2b6 --- /dev/null +++ b/_generated/UseDotNetV2/package.json @@ -0,0 +1,40 @@ +{ + "name": "usedotnet", + "version": "2.0.0", + "description": "Use .Net Core", + "main": "usedotnet.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/Microsoft/azure-pipelines-tasks.git" + }, + "keywords": [ + "Azure", + "Pipelines", + "Tasks", + "DotNetCore", + "Use" + ], + "author": "Microsoft Corporation", + "license": "MIT", + "bugs": { + "url": "https://github.com/Microsoft/azure-pipelines-tasks/issues" + }, + "homepage": "https://github.com/Microsoft/azure-pipelines-tasks#readme", + "dependencies": { + "@types/mocha": "^5.2.6", + "@types/node": "^10.17.0", + "@types/semver": "6.0.0", + "azure-pipelines-task-lib": "^3.0.0-preview", + "azure-pipelines-tasks-packaging-common": "^2.198.1", + "azure-pipelines-tasks-utility-common": "^3.198.1", + "azure-pipelines-tool-lib": "^1.0.1", + "semver": "6.3.0", + "typed-rest-client": "^1.8.9" + }, + "devDependencies": { + "typescript": "4.0.2" + } +} diff --git a/_generated/UseDotNetV2/task.json b/_generated/UseDotNetV2/task.json new file mode 100644 index 000000000000..864d57f218cf --- /dev/null +++ b/_generated/UseDotNetV2/task.json @@ -0,0 +1,197 @@ +{ + "id": "B0CE7256-7898-45D3-9CB5-176B752BFEA6", + "name": "UseDotNet", + "friendlyName": "Use .NET Core", + "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.", + "category": "Tool", + "helpUrl": "https://aka.ms/AA4xgy0", + "helpMarkDown": "[Learn more about this task](https://aka.ms/AA4xgy0)", + "runsOn": [ + "Agent", + "DeploymentGroup" + ], + "author": "Microsoft Corporation", + "version": { + "Major": 2, + "Minor": 226, + "Patch": 1 + }, + "satisfies": [ + "DotNetCore" + ], + "demands": [], + "minimumAgentVersion": "2.144.0", + "ecosystem": "dotnet", + "instanceNameFormat": "Use .NET Core $(packageType) $(version)", + "releaseNotes": "
  • Support for installing multiple versions side by side.
  • Support for patterns in version to fetch latest in minor/major version.
  • Restrict Multi-level lookup
  • Installs NuGet and provides proxy support.
  • Installs sdk versions from `global.json` file(s)
  • ", + "groups": [ + { + "name": "advanced", + "displayName": "Advanced", + "isExpanded": true + } + ], + "inputs": [ + { + "name": "packageType", + "type": "pickList", + "label": "Package to install", + "defaultValue": "sdk", + "required": false, + "helpMarkDown": "Please select whether to install only runtime or SDK.", + "options": { + "runtime": "Runtime", + "sdk": "SDK (contains runtime)" + } + }, + { + "name": "useGlobalJson", + "type": "boolean", + "label": "Use global json", + "defaultValue": false, + "required": false, + "helpMarkDown": "Select this option to install all SDKs from global.json files. These files are searched from system.DefaultWorkingDirectory. You can change the search root path by setting working directory input.", + "visibleRule": "packageType = sdk" + }, + { + "name": "workingDirectory", + "type": "filePath", + "label": "Working Directory", + "helpMarkDown": "Specify path from where global.json files should be searched when using `Use global json`. If empty, `system.DefaultWorkingDirectory` will be considered as the root path.", + "required": "false", + "visibleRule": "useGlobalJson = true" + }, + { + "name": "version", + "type": "string", + "label": "Version", + "defaultValue": "", + "required": false, + "helpMarkDown": "Specify version of .NET Core SDK or runtime to install.
    Versions can be given in the following formats
  • 2.x => Install latest in major version.
  • 2.2.x => Install latest in major and minor version
  • 2.2.104 => Install exact version

  • 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://dotnetcli.blob.core.windows.net/dotnet/release-metadata/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", + "visibleRule": "useGlobalJson = false || packageType = runtime" + }, + { + "name": "vsVersion", + "type": "string", + "label": "Compatible Visual Studio version", + "defaultValue": "", + "required": false, + "groupName": "advanced", + "helpMarkDown": "Specify version of compatible visual studio for which .NET core sdk to install. Specifiy complete vs-version like 16.6.4 containing major version, minor version and patch number.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://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json)" + }, + { + "name": "includePreviewVersions", + "type": "boolean", + "label": "Include Preview Versions", + "defaultValue": "false", + "required": false, + "helpMarkDown": "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", + "visibleRule": "useGlobalJson = false || packageType = runtime" + }, + { + "name": "installationPath", + "type": "string", + "label": "Path To Install .Net Core", + "defaultValue": "$(Agent.ToolsDirectory)/dotnet", + "required": false, + "groupName": "advanced", + "helpMarkDown": "Specify where .Net Core SDK/Runtime should be installed. Different paths can have the following impact on .Net's behavior.
  • $(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.
  • $(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.
  • 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.
    Note that you can also configure Multi-Level Lookup setting which can configure .Net host's probing for a suitable version." + }, + { + "name": "performMultiLevelLookup", + "type": "boolean", + "label": "Perform Multi Level Lookup", + "groupName": "advanced", + "defaultValue": false, + "required": false, + "helpMarkDown": "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:
    C:\\Program Files\\dotnet (64-bit processes)
    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).
    " + } + ], + "execution": { + "Node10": { + "target": "usedotnet.js" + } + }, + "messages": { + "ToolFailed": "Tool install failed: %s", + "ImplicitVersionNotSupported": "Version should be a valid and explicit version: %s", + "getMachinePlatformFailed": "Failed to get machine platform details. Error: %s.", + "getDownloadUrlsFailed": "Failed to get download URLS. Error: %s.", + "UsingCachedTool": "Cached copy of .NET Core exists. No need to install afresh. Cached tool location: %s.", + "CheckingToolCache": "Checking if a cached copy exists for this version...", + "InstallingAfresh": "The cache does not contain the requested version of .NET Core. Downloading and installing it now.", + "GettingDownloadUrl": "Getting URL to download .NET Core %s version: %s.", + "CouldNotDetectPlatform": "Could not detect the machine's OS", + "NullDownloadUrls": "Could not construct download URL. Please ensure that specified version %s is valid.", + "DownloadingUrl": "Downloading .NET Core package from URL: %s", + "ExtractingPackage": "Extracting downloaded package %s.", + "CachingTool": "Caching this installed tool.", + "SuccessfullyInstalled": "Successfully installed .NET Core %s version %s.", + "ToolToInstall": "Tool to install: .NET Core %s version %s.", + "PrimaryPlatform": "Detected platform (Primary): %s", + "LegacyPlatform": "Detected platform (Legacy): %s", + "CouldNotDownload": "Could not download installation package from this URL: %s Error: %s", + "FailedToDownloadPackage": "Failed to download package for installation", + "PrependGlobalToolPath": "Creating global tool path and pre-pending to PATH.", + "VersionsFileMalformed": "The specified version's download links are not correctly formed in the supported versions document => %s/", + "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.", + "UnableToAccessPath": "Unable to access path: %s. Error: %s. Please make sure that agent process has access to the path.", + "VersionCanNotBeDownloadedFromUrl": "Version: %s cannot be downloaded from URL: %s. Either the URL or version is incorrect.", + "CopyingFoldersIntoPath": "Copying all root folders into installation path: %s", + "CopyingFilesIntoPath": "Copying root files (such as dotnet.exe) into installation path: %s", + "FailedToCopyTopLevelFiles": "Failed to copy root files into installation path: %s. Error: %s", + "FailedWhileInstallingVersionAtPath": "Failed while installing version: %s at path: %s with error: %s", + "ExplicitVersionRequired": "Version: %s is not allowed. Versions to be installed should be of format: major.minor.patchversion. For example: 2.2.1", + "VersionFoundInCache": "Version: %s was found in cache.", + "VersionNotFoundInCache": "Version %s was not found in cache.", + "CreatingInstallationCompeleteFile": "Creating installation complete marker file for .Net core %s version %s", + "CannotFindRuntimeVersionForCompletingInstallation": "Cannot find runtime version for package type: %s with version: %s", + "PathNotFoundException": "Path: %s could not be located/found. Make sure the path exists.", + "VersionIsLocalLatest": "Version: %s is the latest among the versions present at path: %s", + "VersionIsNotLocalLatest": "Version: %s is not the latest among the versions present at %s", + "DownloadUrlForMatchingOsNotFound": "Download URL for .Net Core %s version %s could not be found for the following OS platforms (rid): %s", + "ExceptionWhileDownloadOrReadReleasesIndex": "Failed to download or parse releases-index.json with error: %s", + "MatchingVersionForUserInputVersion": "Found version %s in channel %s for user specified version spec: %s", + "UrlForReleaseChannelNotFound": "Could not find URL for releases.json of channel version: %s", + "NoSuitableChannelWereFound": "Channel corresponding to version %s could not be found.", + "DetectingPlatform": "Detecting OS platform to find correct download package for the OS.", + "FailedInDetectingMachineArch": "Failed while detecting machine OS platform with error: %s", + "runtimeVersionPropertyNotFound": "runtime-version property could not be found for .Net Core %s version %s.", + "VersionNotFound": "%s version matching: %s could not be found", + "VersionNotAllowed": "Version %s is not allowed. Allowed version types are: majorVersion.x, majorVersion.minorVersion.x, majorVersion.minorVersion.patchVersion. More details: %s", + "VersionsCanNotBeCompared": "Versions %s and %s cannot be compared. Both versions should be explicit.", + "FileNameNotCorrectCompleteFileName": "File name %s is not a correct '.complete' file.", + "ChannelVersionsNotComparable": "Channel versions %s and %s can not be compared. They both must have numeric major and minor versions.", + "LookingForVersionInChannel": "Searching for version in channel %s", + "FallingBackToAdjacentChannels": "Version %s could not be found in its channel, will now search in adjacent channels.", + "ErrorWhileSettingDotNetToolPath": "Failed while prepending .Net Core Tool path to PATH envrionment variable. Error: %s", + "RequiredChannelVersionForSpec": "Finding channel %s for version %s", + "ErrorWhileGettingVersionFromChannel": "Failed while getting version %s from channel %s with error: %s", + "ComparingInstalledFolderVersions": "Comparing if version being installed %s is greater than already installed version with folder name %s", + "ComparingInstalledFileVersions": "Comparing if version being installed %s is greater than already installed version with version complete file name %s", + "InvalidChannelObject": "Object cannot be used as Channel, required properties such as channel-version, releases.json is missing.", + "ReleasesIndexBodyIncorrect": "Parsed releases index body is not correct. Kindly see if the releases-index section is not empty in the file.", + "InvalidVersionObject": "Releases.json has a release with invalid %s object: %s", + "InvalidVersion": "Invalid version specified %s", + "FilesDataIsIncorrectInVersion": "In release %s for version %s, File data is incorrect (might have missing required fields, such as name, rid and url): %s", + "VersionFilesDataIncorrect": "Version's files data is missing or has missing required fields.", + "VersionInformationNotComplete": "Version: %s required information is not complete in releases.json file. Error: %s", + "FailedWhileExtractingPacakge": "Failed while extracting downloaded package with error: %s", + "InstallingNuGetVersion": "Installing NuGet version %s", + "FailureWhileInstallingNuGetVersion": "Failed while installing NuGet version. Error: %s", + "SettingUpNugetProxySettings": "Setting up proxy configuration for NuGet.", + "GlobalJsonFound": "Found a global.json at path: %s", + "GlobalJsonSdkVersion": "SDK version: %s is specified by global.json at path: %s", + "GlobalJsonIsEmpty": "global.json at path: %s is empty. No version is specified.", + "FailedToFindGlobalJson": "Failed to find global.json at and inside path: %s", + "FailedToReadGlobalJson": "The global.json at path: '%s' has the wrong format. For information about global.json, visit here: https://docs.microsoft.com/en-us/dotnet/core/tools/global-json. Error while trying to read: %s", + "VersionNumberHasTheWrongFormat": "The version number: %s doesn't have the correct format. Versions can be given in the following formats: 2.x => Install latest in major version. 2.2.x => Install latest in major and minor version. 2.2.104 => Install exact version. 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://dotnetcli.blob.core.windows.net/dotnet/release-metadata/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", + "OnlyExplicitVersionAllowed": "Only explicit versions and accepted, such as: 2.2.301. Version: %s is not valid.", + "SupportPhaseNotPresentInChannel": "support-phase is not present in the channel with channel-version %s.", + "DepricatedVersionNetCore": "NET Core version you specfied %s is out of support and will be removed from hosted agents soon. Please refer to https://aka.ms/dotnet-core-support for more information about the .NET support policy." + }, + "_buildConfigMapping": { + "Default": "2.226.1", + "Node16-225": "2.226.0" + } +} \ No newline at end of file diff --git a/_generated/UseDotNetV2/task.loc.json b/_generated/UseDotNetV2/task.loc.json new file mode 100644 index 000000000000..cb54ed5c3278 --- /dev/null +++ b/_generated/UseDotNetV2/task.loc.json @@ -0,0 +1,197 @@ +{ + "id": "B0CE7256-7898-45D3-9CB5-176B752BFEA6", + "name": "UseDotNet", + "friendlyName": "ms-resource:loc.friendlyName", + "description": "ms-resource:loc.description", + "category": "Tool", + "helpUrl": "https://aka.ms/AA4xgy0", + "helpMarkDown": "ms-resource:loc.helpMarkDown", + "runsOn": [ + "Agent", + "DeploymentGroup" + ], + "author": "Microsoft Corporation", + "version": { + "Major": 2, + "Minor": 226, + "Patch": 1 + }, + "satisfies": [ + "DotNetCore" + ], + "demands": [], + "minimumAgentVersion": "2.144.0", + "ecosystem": "dotnet", + "instanceNameFormat": "ms-resource:loc.instanceNameFormat", + "releaseNotes": "ms-resource:loc.releaseNotes", + "groups": [ + { + "name": "advanced", + "displayName": "ms-resource:loc.group.displayName.advanced", + "isExpanded": true + } + ], + "inputs": [ + { + "name": "packageType", + "type": "pickList", + "label": "ms-resource:loc.input.label.packageType", + "defaultValue": "sdk", + "required": false, + "helpMarkDown": "ms-resource:loc.input.help.packageType", + "options": { + "runtime": "Runtime", + "sdk": "SDK (contains runtime)" + } + }, + { + "name": "useGlobalJson", + "type": "boolean", + "label": "ms-resource:loc.input.label.useGlobalJson", + "defaultValue": false, + "required": false, + "helpMarkDown": "ms-resource:loc.input.help.useGlobalJson", + "visibleRule": "packageType = sdk" + }, + { + "name": "workingDirectory", + "type": "filePath", + "label": "ms-resource:loc.input.label.workingDirectory", + "helpMarkDown": "ms-resource:loc.input.help.workingDirectory", + "required": "false", + "visibleRule": "useGlobalJson = true" + }, + { + "name": "version", + "type": "string", + "label": "ms-resource:loc.input.label.version", + "defaultValue": "", + "required": false, + "helpMarkDown": "ms-resource:loc.input.help.version", + "visibleRule": "useGlobalJson = false || packageType = runtime" + }, + { + "name": "vsVersion", + "type": "string", + "label": "ms-resource:loc.input.label.vsVersion", + "defaultValue": "", + "required": false, + "groupName": "advanced", + "helpMarkDown": "ms-resource:loc.input.help.vsVersion" + }, + { + "name": "includePreviewVersions", + "type": "boolean", + "label": "ms-resource:loc.input.label.includePreviewVersions", + "defaultValue": "false", + "required": false, + "helpMarkDown": "ms-resource:loc.input.help.includePreviewVersions", + "visibleRule": "useGlobalJson = false || packageType = runtime" + }, + { + "name": "installationPath", + "type": "string", + "label": "ms-resource:loc.input.label.installationPath", + "defaultValue": "$(Agent.ToolsDirectory)/dotnet", + "required": false, + "groupName": "advanced", + "helpMarkDown": "ms-resource:loc.input.help.installationPath" + }, + { + "name": "performMultiLevelLookup", + "type": "boolean", + "label": "ms-resource:loc.input.label.performMultiLevelLookup", + "groupName": "advanced", + "defaultValue": false, + "required": false, + "helpMarkDown": "ms-resource:loc.input.help.performMultiLevelLookup" + } + ], + "execution": { + "Node10": { + "target": "usedotnet.js" + } + }, + "messages": { + "ToolFailed": "ms-resource:loc.messages.ToolFailed", + "ImplicitVersionNotSupported": "ms-resource:loc.messages.ImplicitVersionNotSupported", + "getMachinePlatformFailed": "ms-resource:loc.messages.getMachinePlatformFailed", + "getDownloadUrlsFailed": "ms-resource:loc.messages.getDownloadUrlsFailed", + "UsingCachedTool": "ms-resource:loc.messages.UsingCachedTool", + "CheckingToolCache": "ms-resource:loc.messages.CheckingToolCache", + "InstallingAfresh": "ms-resource:loc.messages.InstallingAfresh", + "GettingDownloadUrl": "ms-resource:loc.messages.GettingDownloadUrl", + "CouldNotDetectPlatform": "ms-resource:loc.messages.CouldNotDetectPlatform", + "NullDownloadUrls": "ms-resource:loc.messages.NullDownloadUrls", + "DownloadingUrl": "ms-resource:loc.messages.DownloadingUrl", + "ExtractingPackage": "ms-resource:loc.messages.ExtractingPackage", + "CachingTool": "ms-resource:loc.messages.CachingTool", + "SuccessfullyInstalled": "ms-resource:loc.messages.SuccessfullyInstalled", + "ToolToInstall": "ms-resource:loc.messages.ToolToInstall", + "PrimaryPlatform": "ms-resource:loc.messages.PrimaryPlatform", + "LegacyPlatform": "ms-resource:loc.messages.LegacyPlatform", + "CouldNotDownload": "ms-resource:loc.messages.CouldNotDownload", + "FailedToDownloadPackage": "ms-resource:loc.messages.FailedToDownloadPackage", + "PrependGlobalToolPath": "ms-resource:loc.messages.PrependGlobalToolPath", + "VersionsFileMalformed": "ms-resource:loc.messages.VersionsFileMalformed", + "MatchingVersionNotFound": "ms-resource:loc.messages.MatchingVersionNotFound", + "UnableToAccessPath": "ms-resource:loc.messages.UnableToAccessPath", + "VersionCanNotBeDownloadedFromUrl": "ms-resource:loc.messages.VersionCanNotBeDownloadedFromUrl", + "CopyingFoldersIntoPath": "ms-resource:loc.messages.CopyingFoldersIntoPath", + "CopyingFilesIntoPath": "ms-resource:loc.messages.CopyingFilesIntoPath", + "FailedToCopyTopLevelFiles": "ms-resource:loc.messages.FailedToCopyTopLevelFiles", + "FailedWhileInstallingVersionAtPath": "ms-resource:loc.messages.FailedWhileInstallingVersionAtPath", + "ExplicitVersionRequired": "ms-resource:loc.messages.ExplicitVersionRequired", + "VersionFoundInCache": "ms-resource:loc.messages.VersionFoundInCache", + "VersionNotFoundInCache": "ms-resource:loc.messages.VersionNotFoundInCache", + "CreatingInstallationCompeleteFile": "ms-resource:loc.messages.CreatingInstallationCompeleteFile", + "CannotFindRuntimeVersionForCompletingInstallation": "ms-resource:loc.messages.CannotFindRuntimeVersionForCompletingInstallation", + "PathNotFoundException": "ms-resource:loc.messages.PathNotFoundException", + "VersionIsLocalLatest": "ms-resource:loc.messages.VersionIsLocalLatest", + "VersionIsNotLocalLatest": "ms-resource:loc.messages.VersionIsNotLocalLatest", + "DownloadUrlForMatchingOsNotFound": "ms-resource:loc.messages.DownloadUrlForMatchingOsNotFound", + "ExceptionWhileDownloadOrReadReleasesIndex": "ms-resource:loc.messages.ExceptionWhileDownloadOrReadReleasesIndex", + "MatchingVersionForUserInputVersion": "ms-resource:loc.messages.MatchingVersionForUserInputVersion", + "UrlForReleaseChannelNotFound": "ms-resource:loc.messages.UrlForReleaseChannelNotFound", + "NoSuitableChannelWereFound": "ms-resource:loc.messages.NoSuitableChannelWereFound", + "DetectingPlatform": "ms-resource:loc.messages.DetectingPlatform", + "FailedInDetectingMachineArch": "ms-resource:loc.messages.FailedInDetectingMachineArch", + "runtimeVersionPropertyNotFound": "ms-resource:loc.messages.runtimeVersionPropertyNotFound", + "VersionNotFound": "ms-resource:loc.messages.VersionNotFound", + "VersionNotAllowed": "ms-resource:loc.messages.VersionNotAllowed", + "VersionsCanNotBeCompared": "ms-resource:loc.messages.VersionsCanNotBeCompared", + "FileNameNotCorrectCompleteFileName": "ms-resource:loc.messages.FileNameNotCorrectCompleteFileName", + "ChannelVersionsNotComparable": "ms-resource:loc.messages.ChannelVersionsNotComparable", + "LookingForVersionInChannel": "ms-resource:loc.messages.LookingForVersionInChannel", + "FallingBackToAdjacentChannels": "ms-resource:loc.messages.FallingBackToAdjacentChannels", + "ErrorWhileSettingDotNetToolPath": "ms-resource:loc.messages.ErrorWhileSettingDotNetToolPath", + "RequiredChannelVersionForSpec": "ms-resource:loc.messages.RequiredChannelVersionForSpec", + "ErrorWhileGettingVersionFromChannel": "ms-resource:loc.messages.ErrorWhileGettingVersionFromChannel", + "ComparingInstalledFolderVersions": "ms-resource:loc.messages.ComparingInstalledFolderVersions", + "ComparingInstalledFileVersions": "ms-resource:loc.messages.ComparingInstalledFileVersions", + "InvalidChannelObject": "ms-resource:loc.messages.InvalidChannelObject", + "ReleasesIndexBodyIncorrect": "ms-resource:loc.messages.ReleasesIndexBodyIncorrect", + "InvalidVersionObject": "ms-resource:loc.messages.InvalidVersionObject", + "InvalidVersion": "ms-resource:loc.messages.InvalidVersion", + "FilesDataIsIncorrectInVersion": "ms-resource:loc.messages.FilesDataIsIncorrectInVersion", + "VersionFilesDataIncorrect": "ms-resource:loc.messages.VersionFilesDataIncorrect", + "VersionInformationNotComplete": "ms-resource:loc.messages.VersionInformationNotComplete", + "FailedWhileExtractingPacakge": "ms-resource:loc.messages.FailedWhileExtractingPacakge", + "InstallingNuGetVersion": "ms-resource:loc.messages.InstallingNuGetVersion", + "FailureWhileInstallingNuGetVersion": "ms-resource:loc.messages.FailureWhileInstallingNuGetVersion", + "SettingUpNugetProxySettings": "ms-resource:loc.messages.SettingUpNugetProxySettings", + "GlobalJsonFound": "ms-resource:loc.messages.GlobalJsonFound", + "GlobalJsonSdkVersion": "ms-resource:loc.messages.GlobalJsonSdkVersion", + "GlobalJsonIsEmpty": "ms-resource:loc.messages.GlobalJsonIsEmpty", + "FailedToFindGlobalJson": "ms-resource:loc.messages.FailedToFindGlobalJson", + "FailedToReadGlobalJson": "ms-resource:loc.messages.FailedToReadGlobalJson", + "VersionNumberHasTheWrongFormat": "ms-resource:loc.messages.VersionNumberHasTheWrongFormat", + "OnlyExplicitVersionAllowed": "ms-resource:loc.messages.OnlyExplicitVersionAllowed", + "SupportPhaseNotPresentInChannel": "ms-resource:loc.messages.SupportPhaseNotPresentInChannel", + "DepricatedVersionNetCore": "ms-resource:loc.messages.DepricatedVersionNetCore" + }, + "_buildConfigMapping": { + "Default": "2.226.1", + "Node16-225": "2.226.0" + } +} \ No newline at end of file diff --git a/_generated/UseDotNetV2/tsconfig.json b/_generated/UseDotNetV2/tsconfig.json new file mode 100644 index 000000000000..0438b79f69ac --- /dev/null +++ b/_generated/UseDotNetV2/tsconfig.json @@ -0,0 +1,6 @@ +{ + "compilerOptions": { + "target": "ES6", + "module": "commonjs" + } +} \ No newline at end of file diff --git a/_generated/UseDotNetV2/usedotnet.ts b/_generated/UseDotNetV2/usedotnet.ts new file mode 100644 index 000000000000..32b12e21fa7a --- /dev/null +++ b/_generated/UseDotNetV2/usedotnet.ts @@ -0,0 +1,128 @@ +"use strict"; +import * as path from 'path'; + +import * as tl from 'azure-pipelines-task-lib/task'; +import { DotNetCoreVersionFetcher } from "./versionfetcher"; +import { globalJsonFetcher } from "./globaljsonfetcher"; +import { VersionInstaller } from "./versioninstaller"; +import { Constants } from "./versionutilities"; +import { VersionInfo, VersionParts } from "./models" +import { NuGetInstaller } from "./nugetinstaller"; + + +function checkVersionForDeprecationAndNotify(versionSpec: string | null): void { + if (versionSpec != null && versionSpec.startsWith("2.1")) { + tl.warning(tl.loc('DepricatedVersionNetCore',versionSpec)); + } +} + +async function run() { + let useGlobalJson: boolean = tl.getBoolInput('useGlobalJson'); + let packageType = (tl.getInput('packageType') || "sdk").toLowerCase();; + let versionSpec = tl.getInput('version'); + let vsVersionSpec = tl.getInput('vsVersion'); + const nugetVersion = tl.getInput('nugetVersion') || '4.9.6'; + + let installationPath = tl.getInput('installationPath'); + if (!installationPath || installationPath.length == 0) { + installationPath = path.join(tl.getVariable('Agent.ToolsDirectory'), "dotnet"); + } + + let performMultiLevelLookup = tl.getBoolInput("performMultiLevelLookup", false); + // Check if we want install dotnet + if (versionSpec || (useGlobalJson && packageType == "sdk")) { + let includePreviewVersions: boolean = tl.getBoolInput('includePreviewVersions'); + let workingDirectory: string | null = tl.getPathInput("workingDirectory", false) || null; + await installDotNet(installationPath, packageType, versionSpec, vsVersionSpec, useGlobalJson, workingDirectory, includePreviewVersions); + tl.prependPath(installationPath); + // Set DOTNET_ROOT for dotnet core Apphost to find runtime since it is installed to a non well-known location. + tl.setVariable('DOTNET_ROOT', installationPath); + // By default disable Multi Level Lookup unless user wants it enabled. + tl.setVariable("DOTNET_MULTILEVEL_LOOKUP", !performMultiLevelLookup ? "0" : "1"); + } + + // Add dot net tools path to "PATH" environment variables, so that tools can be used directly. + addDotNetCoreToolPath(); + // Install NuGet version specified by user or 4.9.6 in case none is specified + // Also sets up the proxy configuration settings. + await NuGetInstaller.installNuGet(nugetVersion); +} + +/** + * install dotnet to the installation path. + * @param installationPath The installation path. If this is empty it would use {Agent.ToolsDirectory}/dotnet/ + * @param packageType The installation type for the installation. Only `sdk` and `runtime` are valid options + * @param versionSpec The version the user want to install. + * @param useGlobalJson A switch so we know if the user have `global.json` files and want use that. If this is true only SDK is possible! + * @param workingDirectory This is only relevant if the `useGlobalJson` switch is `true`. It will set the root directory for the search of `global.json` + * @param includePreviewVersions Define if the installer also search for preview version + */ +async function installDotNet( + installationPath: string, + packageType: string, + versionSpec: string | null, + vsVersionSpec: string | null, + useGlobalJson: boolean, + workingDirectory: string | null, + includePreviewVersions: boolean) { + + let versionFetcher = new DotNetCoreVersionFetcher(); + let dotNetCoreInstaller = new VersionInstaller(packageType, installationPath); + // here we must check also the package type because if the user switch the packageType the useGlobalJson can be true, also if it will hidden. + if (useGlobalJson && packageType == "sdk") { + let globalJsonFetcherInstance = new globalJsonFetcher(workingDirectory); + let versionsToInstall: VersionInfo[] = await globalJsonFetcherInstance.GetVersions(); + for (let index = 0; index < versionsToInstall.length; index++) { + const version = versionsToInstall[index]; + let url = versionFetcher.getDownloadUrl(version); + if (!dotNetCoreInstaller.isVersionInstalled(version.getVersion())) { + await dotNetCoreInstaller.downloadAndInstall(version, url); + } else { + checkVersionForDeprecationAndNotify(versionSpec); + } + } + } else if (versionSpec) { + console.log(tl.loc("ToolToInstall", packageType, versionSpec)); + let versionSpecParts = new VersionParts(versionSpec); + let versionInfo: VersionInfo = await versionFetcher.getVersionInfo(versionSpecParts.versionSpec, vsVersionSpec, packageType, includePreviewVersions); + + if (!versionInfo) { + throw tl.loc("MatchingVersionNotFound", versionSpecParts.versionSpec); + } + if (!dotNetCoreInstaller.isVersionInstalled(versionInfo.getVersion())) { + await dotNetCoreInstaller.downloadAndInstall(versionInfo, versionFetcher.getDownloadUrl(versionInfo)); + } else { + checkVersionForDeprecationAndNotify(versionSpec); + } + } else { + throw new Error("Hey developer you have called the method `installDotNet` without a `versionSpec` or without `useGlobalJson`. that is impossible."); + } +} + +function addDotNetCoreToolPath() { + try { + let globalToolPath: string = ""; + if (tl.osType().match(/^Win/)) { + globalToolPath = path.join(process.env.USERPROFILE, Constants.relativeGlobalToolPath); + } else { + globalToolPath = path.join(process.env.HOME, Constants.relativeGlobalToolPath); + } + + console.log(tl.loc("PrependGlobalToolPath")); + tl.mkdirP(globalToolPath); + tl.prependPath(globalToolPath); + } catch (error) { + //nop + console.log(tl.loc("ErrorWhileSettingDotNetToolPath", JSON.stringify(error))); + } +} + +const taskManifestPath = path.join(__dirname, "task.json"); +const packagingCommonManifestPath = path.join(__dirname, "node_modules/azure-pipelines-tasks-packaging-common/module.json"); +tl.debug("Setting resource path to " + taskManifestPath); +tl.setResourcePath(taskManifestPath); +tl.setResourcePath(packagingCommonManifestPath); + +run() + .then(() => tl.setResult(tl.TaskResult.Succeeded, "")) + .catch((error) => tl.setResult(tl.TaskResult.Failed, !!error.message ? error.message : error)); \ No newline at end of file diff --git a/_generated/UseDotNetV2/versionfetcher.ts b/_generated/UseDotNetV2/versionfetcher.ts new file mode 100644 index 000000000000..eb25c539eb5b --- /dev/null +++ b/_generated/UseDotNetV2/versionfetcher.ts @@ -0,0 +1,307 @@ +"use strict"; +import * as os from 'os'; +import * as fs from 'fs'; +import * as path from 'path'; + +import * as tl from 'azure-pipelines-task-lib/task'; +import * as trm from 'azure-pipelines-task-lib/toolrunner'; + +import httpClient = require("typed-rest-client/HttpClient"); +import httpInterfaces = require("typed-rest-client/Interfaces"); + +import { VersionInfo, Channel, VersionFilesData, VersionParts } from "./models" +import * as utils from "./versionutilities"; + +export class DotNetCoreVersionFetcher { + private explicitVersioning: boolean = false; + private channels: Channel[]; + private httpCallbackClient: httpClient.HttpClient; + private machineOsSuffixes: string[]; + constructor(explicitVersioning: boolean = false) { + this.explicitVersioning = explicitVersioning; + let proxyUrl: string = tl.getVariable("agent.proxyurl"); + var requestOptions: httpInterfaces.IRequestOptions = { + allowRetries: true, + maxRetries: 3 + }; + + if (proxyUrl) { + requestOptions.proxy = { + proxyUrl: proxyUrl, + proxyUsername: tl.getVariable("agent.proxyusername"), + proxyPassword: tl.getVariable("agent.proxypassword"), + proxyBypassHosts: tl.getVariable("agent.proxybypasslist") ? JSON.parse(tl.getVariable("agent.proxybypasslist")) : null + } + } + + this.httpCallbackClient = new httpClient.HttpClient(tl.getVariable("AZURE_HTTP_USER_AGENT"), null, requestOptions); + this.channels = []; + } + + public async getVersionInfo(versionSpec: string, vsVersionSpec: string, packageType: string, includePreviewVersions: boolean): Promise { + var requiredVersionInfo: VersionInfo = null; + if (!this.channels || this.channels.length < 1) { + await this.setReleasesIndex(); + } + + let channelInformation = this.getVersionChannel(versionSpec, includePreviewVersions); + if (channelInformation) { + requiredVersionInfo = await this.getVersionFromChannel(channelInformation, versionSpec, vsVersionSpec, packageType, includePreviewVersions); + } + + if (!!requiredVersionInfo) { + console.log(tl.loc("MatchingVersionForUserInputVersion", requiredVersionInfo.getVersion(), channelInformation.channelVersion, versionSpec)) + } + else { + console.log(tl.loc("MatchingVersionNotFound", packageType, versionSpec)); + if (!versionSpec.endsWith("x")) { + console.log(tl.loc("FallingBackToAdjacentChannels", versionSpec)); + requiredVersionInfo = await this.getVersionFromOtherChannels(versionSpec, vsVersionSpec, packageType, includePreviewVersions); + } + } + + if (!requiredVersionInfo) { + throw tl.loc("VersionNotFound", packageType, versionSpec); + } + + let dotNetSdkVersionTelemetry = `{"userVersion":"${versionSpec}", "resolvedVersion":"${requiredVersionInfo.getVersion()}"}`; + console.log("##vso[telemetry.publish area=TaskDeploymentMethod;feature=UseDotNetV2]" + dotNetSdkVersionTelemetry); + return requiredVersionInfo; + } + + public getDownloadUrl(versionInfo: VersionInfo): string { + console.log(tl.loc("GettingDownloadUrl", versionInfo.getPackageType(), versionInfo.getVersion())); + + this.detectMachineOS(); + let downloadPackageInfoObject: VersionFilesData = null; + this.machineOsSuffixes.find((osSuffix) => { + downloadPackageInfoObject = versionInfo.getFiles().find((downloadPackageInfo: VersionFilesData) => { + if (downloadPackageInfo.rid && osSuffix && downloadPackageInfo.rid.toLowerCase() == osSuffix.toLowerCase()) { + + if ((osSuffix.split("-")[0] == "win" && downloadPackageInfo.name.endsWith(".zip")) || (osSuffix.split("-")[0] != "win" && downloadPackageInfo.name.endsWith("tar.gz"))) { + return true; + } + } + + return false; + }); + return !!downloadPackageInfoObject; + }); + + if (!!downloadPackageInfoObject && downloadPackageInfoObject.url) { + tl.debug("Got download URL for platform with rid: " + downloadPackageInfoObject.rid); + return downloadPackageInfoObject.url; + } + + throw tl.loc("DownloadUrlForMatchingOsNotFound", versionInfo.getPackageType(), versionInfo.getVersion(), this.machineOsSuffixes.toString()); + } + + private setReleasesIndex(): Promise { + return this.httpCallbackClient.get(DotNetCoreReleasesIndexUrl) + .then((response: httpClient.HttpClientResponse) => { + return response.readBody(); + }) + .then((body: string) => { + let parsedReleasesIndexBody = JSON.parse(body); + if (!parsedReleasesIndexBody || !parsedReleasesIndexBody["releases-index"] || parsedReleasesIndexBody["releases-index"].length < 1) { + throw tl.loc("ReleasesIndexBodyIncorrect") + } + + parsedReleasesIndexBody["releases-index"].forEach(channelRelease => { + if (channelRelease) { + try { + this.channels.push(new Channel(channelRelease)); + } + catch (ex) { + tl.debug("Channel information in releases-index.json was not proper. Error: " + JSON.stringify(ex)); + // do not fail, try to find version in the available channels. + } + } + }); + }) + .catch((ex) => { + throw tl.loc("ExceptionWhileDownloadOrReadReleasesIndex", JSON.stringify(ex)); + }); + } + + private getVersionChannel(versionSpec: string, includePreviewVersions: boolean): Channel { + let versionParts = new VersionParts(versionSpec, this.explicitVersioning); + + let requiredChannelVersion = `${versionParts.majorVersion}.${versionParts.minorVersion}`; + if (versionParts.minorVersion == "x") { + var latestChannelVersion: string = ""; + this.channels.forEach(channel => { + // Checks if the channel is in preview state, if so then only select the channel if includePreviewVersion should be true. + // As a channel with state in preview will only have preview releases. + // example: versionSpec: 3.x Channels: 3.0 (current), 3.1 (preview). + // if (includePreviewVersion == true) select 3.1 + // else select 3.0 + let satisfiesPreviewCheck: boolean = (includePreviewVersions || (!channel.supportPhase || channel.supportPhase.toLowerCase() !== "preview")); + if (satisfiesPreviewCheck && channel.channelVersion.startsWith(versionParts.majorVersion) && (!latestChannelVersion || utils.compareChannelVersion(channel.channelVersion, latestChannelVersion) > 0)) { + latestChannelVersion = channel.channelVersion; + } + }); + + requiredChannelVersion = latestChannelVersion; + } + + tl.debug(tl.loc("RequiredChannelVersionForSpec", requiredChannelVersion, versionSpec)); + if (!!requiredChannelVersion) { + return this.channels.find(channel => { + if (channel.channelVersion == requiredChannelVersion) { + return true + } + }); + } + } + + private getVersionFromChannel(channelInformation: Channel, versionSpec: string, vsVersionSpec: string, packageType: string, includePreviewVersions: boolean): Promise { + var releasesJsonUrl: string = channelInformation.releasesJsonUrl; + + if (releasesJsonUrl) { + return this.httpCallbackClient.get(releasesJsonUrl) + .then((response: httpClient.HttpClientResponse) => { + return response.readBody(); + }) + .then((body: string) => { + var channelReleases = JSON.parse(body).releases; + + let versionInfoList: VersionInfo[] = []; + channelReleases.forEach((release) => { + if (release && packageType === 'sdk' && release.sdks) { + try { + release.sdks.forEach((sdk) => { + let versionInfo: VersionInfo = new VersionInfo(sdk, packageType); + + if (!versionInfo.getvsVersion() || !vsVersionSpec || (vsVersionSpec == versionInfo.getvsVersion())) { + versionInfoList.push(versionInfo); + } + + }); + } + catch (err) { + tl.debug(tl.loc("VersionInformationNotComplete", release[packageType].version, err)); + } + } + if (release && release[packageType] && release[packageType].version && !versionInfoList.find((versionInfo) => { return versionInfo.getVersion() === release[packageType].version })) { + try { + let versionInfo: VersionInfo = new VersionInfo(release[packageType], packageType); + + if (!versionInfo.getvsVersion() || !vsVersionSpec || (vsVersionSpec == versionInfo.getvsVersion())) { + versionInfoList.push(versionInfo); + } + } + catch (err) { + tl.debug(tl.loc("VersionInformationNotComplete", release[packageType].version, err)); + } + } + }); + + return utils.getMatchingVersionFromList(versionInfoList, versionSpec, includePreviewVersions); + }) + .catch((ex) => { + tl.error(tl.loc("ErrorWhileGettingVersionFromChannel", versionSpec, channelInformation.channelVersion, JSON.stringify(ex))); + return null; + }); + } + else { + tl.error(tl.loc("UrlForReleaseChannelNotFound", channelInformation.channelVersion)); + } + } + + private async getVersionFromOtherChannels(version: string, vsVersionSpec: string, packageType: string, includePreviewVersions: boolean): Promise { + let fallbackChannels = this.getChannelsForMajorVersion(version); + if (!fallbackChannels && fallbackChannels.length < 1) { + throw tl.loc("NoSuitableChannelWereFound", version); + } + + var versionInfo: VersionInfo = null; + for (var i = 0; i < fallbackChannels.length; i++) { + console.log(tl.loc("LookingForVersionInChannel", (fallbackChannels[i]).channelVersion)); + versionInfo = await this.getVersionFromChannel(fallbackChannels[i], version, vsVersionSpec, packageType, includePreviewVersions); + + if (versionInfo) { + break; + } + } + + return versionInfo; + } + + private getChannelsForMajorVersion(version: string): Channel[] { + var versionParts = new VersionParts(version, this.explicitVersioning); + let adjacentChannels: Channel[] = []; + this.channels.forEach(channel => { + if (channel.channelVersion.startsWith(`${versionParts.majorVersion}`)) { + adjacentChannels.push(channel); + } + }); + + return adjacentChannels; + } + + private detectMachineOS(): void { + if (!this.machineOsSuffixes) { + let osSuffix = []; + let scriptRunner: trm.ToolRunner; + + try { + console.log(tl.loc("DetectingPlatform")); + if (tl.osType().match(/^Win/i)) { + let escapedScript = path.join(this.getCurrentDir(), 'externals', 'get-os-platform.ps1').replace(/'/g, "''"); + let command = `& '${escapedScript}'`; + + let powershellPath = tl.which('powershell', true); + scriptRunner = tl.tool(powershellPath) + .line('-NoLogo -Sta -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command') + .arg(command); + } + else { + let scriptPath = path.join(this.getCurrentDir(),'externals', 'get-os-distro.sh'); + this.setFileAttribute(scriptPath, "755"); + + scriptRunner = tl.tool(tl.which(scriptPath, true)); + } + let result: trm.IExecSyncResult = scriptRunner.execSync(); + if (result.code != 0) { + throw tl.loc("getMachinePlatformFailed", result.error ? result.error.message : result.stderr); + } + + let output: string = result.stdout; + + let index; + + if ((index = output.indexOf("Primary:")) >= 0) { + let primary = output.substr(index + "Primary:".length).split(os.EOL)[0]; + osSuffix.push(primary); + console.log(tl.loc("PrimaryPlatform", primary)); + } + + if ((index = output.indexOf("Legacy:")) >= 0) { + let legacy = output.substr(index + "Legacy:".length).split(os.EOL)[0]; + osSuffix.push(legacy); + console.log(tl.loc("LegacyPlatform", legacy)); + } + + if (osSuffix.length == 0) { + throw tl.loc("CouldNotDetectPlatform"); + } + } + catch (ex) { + throw tl.loc("FailedInDetectingMachineArch", JSON.stringify(ex)); + } + + this.machineOsSuffixes = osSuffix; + } + } + + private setFileAttribute(file: string, mode: string): void { + fs.chmodSync(file, mode); + } + + private getCurrentDir(): string { + return __dirname; + } +} + +const DotNetCoreReleasesIndexUrl: string = "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json"; diff --git a/_generated/UseDotNetV2/versioninstaller.ts b/_generated/UseDotNetV2/versioninstaller.ts new file mode 100644 index 000000000000..03c908951588 --- /dev/null +++ b/_generated/UseDotNetV2/versioninstaller.ts @@ -0,0 +1,181 @@ +"use strict"; +import * as path from 'path'; +import * as fs from "fs"; +import * as url from "url"; + +import * as tl from 'azure-pipelines-task-lib/task'; +import * as toolLib from 'azure-pipelines-tool-lib/tool'; + +import * as utils from "./versionutilities"; +import { VersionInfo } from "./models" +import { tinyGuid } from 'azure-pipelines-tasks-utility-common/tinyGuidUtility' + +export class VersionInstaller { + constructor(packageType: string, installationPath: string) { + try { + tl.exist(installationPath) || tl.mkdirP(installationPath); + } + catch (ex) { + throw tl.loc("UnableToAccessPath", installationPath, JSON.stringify(ex)); + } + + this.packageType = packageType; + this.installationPath = installationPath; + } + /** + * Install a single version from a versionInfo + * @param versionInfo the versionInfo object with all information from the version + * @param downloadUrl The download url of the sdk / runtime. + */ + public async downloadAndInstall(versionInfo: VersionInfo, downloadUrl: string): Promise { + if (!versionInfo || !versionInfo.getVersion() || !downloadUrl || !url.parse(downloadUrl)) { + throw tl.loc("VersionCanNotBeDownloadedFromUrl", versionInfo, downloadUrl); + } + let version = versionInfo.getVersion(); + + try { + try { + var downloadPath = await toolLib.downloadTool(downloadUrl) + } + catch (ex) { + tl.warning(tl.loc("CouldNotDownload", downloadUrl, ex)); + let fallBackUrl = `https://dotnetcli.azureedge.net/dotnet/${this.packageType === "runtime" ? "Runtime" : "Sdk"}/${version}/${downloadUrl.substring(downloadUrl.lastIndexOf('/') + 1)}`; + console.log("Using fallback url for download: " + fallBackUrl); + var downloadPath = await toolLib.downloadTool(fallBackUrl) + } + + // Extract + console.log(tl.loc("ExtractingPackage", downloadPath)); + try { + let tempDirectory = tl.getVariable('Agent.TempDirectory'); + let extDirectory = path.join(tempDirectory, tinyGuid()); + var extPath = tl.osType().match(/^Win/) ? await toolLib.extractZip(downloadPath, extDirectory) : await toolLib.extractTar(downloadPath); + } + catch (ex) { + throw tl.loc("FailedWhileExtractingPacakge", ex); + } + + // Copy folders + tl.debug(tl.loc("CopyingFoldersIntoPath", this.installationPath)); + var allRootLevelEnteriesInDir: string[] = tl.ls("", [extPath]).map(name => path.join(extPath, name)); + var directoriesTobeCopied: string[] = allRootLevelEnteriesInDir.filter(path => fs.lstatSync(path).isDirectory()); + directoriesTobeCopied.forEach((directoryPath) => { + tl.cp(directoryPath, this.installationPath, "-rf", false); + }); + + // Copy files + try { + if (this.packageType == utils.Constants.sdk && this.isLatestInstalledVersion(version)) { + tl.debug(tl.loc("CopyingFilesIntoPath", this.installationPath)); + var filesToBeCopied = allRootLevelEnteriesInDir.filter(path => !fs.lstatSync(path).isDirectory()); + filesToBeCopied.forEach((filePath) => { + tl.cp(filePath, this.installationPath, "-f", false); + }); + } + } + catch (ex) { + tl.warning(tl.loc("FailedToCopyTopLevelFiles", this.installationPath, ex)); + } + + // Cache tool + this.createInstallationCompleteFile(versionInfo); + + console.log(tl.loc("SuccessfullyInstalled", this.packageType, version)); + } + catch (ex) { + throw tl.loc("FailedWhileInstallingVersionAtPath", version, this.installationPath, ex); + } + } + + /** + * This checks if an explicit version is installed. + * This doesn't work with a search pattern like 1.0.x. + * @param version An explicit version. Like 1.0.1 + */ + public isVersionInstalled(version: string): boolean { + if (!toolLib.isExplicitVersion(version)) { + throw tl.loc("ExplicitVersionRequired", version); + } + + var isInstalled: boolean = false; + if (this.packageType == utils.Constants.sdk) { + isInstalled = tl.exist(path.join(this.installationPath, utils.Constants.relativeSdkPath, version)) && tl.exist(path.join(this.installationPath, utils.Constants.relativeSdkPath, `${version}.complete`)); + } + else { + isInstalled = tl.exist(path.join(this.installationPath, utils.Constants.relativeRuntimePath, version)) && tl.exist(path.join(this.installationPath, utils.Constants.relativeRuntimePath, `${version}.complete`)); + } + + isInstalled ? console.log(tl.loc("VersionFoundInCache", version)) : console.log(tl.loc("VersionNotFoundInCache", version)); + return isInstalled; + } + + private createInstallationCompleteFile(versionInfo: VersionInfo): void { + tl.debug(tl.loc("CreatingInstallationCompeleteFile", versionInfo.getVersion(), this.packageType)); + // always add for runtime as it is installed with sdk as well. + var pathToVersionCompleteFile: string = ""; + if (this.packageType == utils.Constants.sdk) { + let sdkVersion = versionInfo.getVersion(); + pathToVersionCompleteFile = path.join(this.installationPath, utils.Constants.relativeSdkPath, `${sdkVersion}.complete`); + tl.writeFile(pathToVersionCompleteFile, `{ "version": "${sdkVersion}" }`); + } + + let runtimeVersion = versionInfo.getRuntimeVersion(); + if (runtimeVersion) { + pathToVersionCompleteFile = path.join(this.installationPath, utils.Constants.relativeRuntimePath, `${runtimeVersion}.complete`); + tl.writeFile(pathToVersionCompleteFile, `{ "version": "${runtimeVersion}" }`); + } + else if (this.packageType == utils.Constants.runtime) { + throw tl.loc("CannotFindRuntimeVersionForCompletingInstallation", this.packageType, versionInfo.getVersion()); + } + } + + private isLatestInstalledVersion(version: string): boolean { + var pathTobeChecked = this.packageType == utils.Constants.sdk ? path.join(this.installationPath, utils.Constants.relativeSdkPath) : path.join(this.installationPath, utils.Constants.relativeRuntimePath); + if (!tl.exist(pathTobeChecked)) { + throw tl.loc("PathNotFoundException", pathTobeChecked); + } + + var allEnteries: string[] = tl.ls("", [pathTobeChecked]).map(name => path.join(pathTobeChecked, name)); + var folderPaths: string[] = allEnteries.filter(element => fs.lstatSync(element).isDirectory()); + var isLatest: boolean = folderPaths.findIndex(folderPath => { + try { + let versionFolderName = path.basename(folderPath); + tl.debug(tl.loc("ComparingInstalledFolderVersions", version, versionFolderName)); + return utils.versionCompareFunction(versionFolderName, version) > 0; + } + catch (ex) { + // no op, folder name might not be in version format + } + }) < 0; + + var filePaths: string[] = allEnteries.filter(element => !fs.lstatSync(element).isDirectory()); + isLatest = isLatest && filePaths.findIndex(filePath => { + try { + var versionCompleteFileName = this.getVersionCompleteFileName(path.basename(filePath)); + tl.debug(tl.loc("ComparingInstalledFileVersions", version, versionCompleteFileName)); + return utils.versionCompareFunction(versionCompleteFileName, version) > 0 + } + catch (ex) { + // no op, file name might not be in version format + } + }) < 0; + + isLatest ? tl.debug(tl.loc("VersionIsLocalLatest", version, this.installationPath)) : tl.debug(tl.loc("VersionIsNotLocalLatest", version, this.installationPath)); + return isLatest; + } + + private getVersionCompleteFileName(name: string): string { + if (name && name.endsWith(".complete")) { + var parts = name.split('.'); + var fileNameWithoutExtensionLength = name.length - (parts[parts.length - 1].length + 1); + if (fileNameWithoutExtensionLength > 0) { + return name.substr(0, fileNameWithoutExtensionLength); + } + } + + throw tl.loc("FileNameNotCorrectCompleteFileName", name); + } + + private packageType: string; + private installationPath: string; +} \ No newline at end of file diff --git a/_generated/UseDotNetV2/versionutilities.ts b/_generated/UseDotNetV2/versionutilities.ts new file mode 100644 index 000000000000..181310ff2e9d --- /dev/null +++ b/_generated/UseDotNetV2/versionutilities.ts @@ -0,0 +1,74 @@ +"use strict"; +import * as path from 'path'; +import * as semver from 'semver'; + +import * as tl from 'azure-pipelines-task-lib/task'; +import * as toolLib from 'azure-pipelines-tool-lib'; + +import { VersionInfo } from "./models" + +export function versionCompareFunction(versionA: string, versionB: string): number { + if (!toolLib.isExplicitVersion(versionA) || !toolLib.isExplicitVersion(versionB)) { + throw tl.loc("VersionsCanNotBeCompared", versionA, versionB); + } + + return semver.compare(versionA, versionB); +} + +export function compareChannelVersion(channelVersionA: string, channelVersionB: string): number { + if (!channelVersionA || !channelVersionB) { + throw "One channel version is missing" + } + + let channelVersionAParts = channelVersionA.split("."); + let channelVersionBParts = channelVersionB.split("."); + if (channelVersionAParts.length != 2 || channelVersionBParts.length != 2) { + throw tl.loc("ChannelVersionsNotComparable", channelVersionA, channelVersionB) + } + + let channelAMajorVersion = Number.parseInt(channelVersionAParts[0]); + let channelAMinorVersion = Number.parseInt(channelVersionAParts[1]); + let channelBMajorVersion = Number.parseInt(channelVersionBParts[0]); + let channelBMinorVersion = Number.parseInt(channelVersionBParts[1]); + + if (Number.isNaN(channelAMajorVersion) || Number.isNaN(channelAMinorVersion) || Number.isNaN(channelBMajorVersion) || Number.isNaN(channelBMinorVersion)) { + throw tl.loc("ChannelVersionsNotComparable", channelVersionA, channelVersionB); + } + + if (channelAMajorVersion != channelBMajorVersion) { + return channelAMajorVersion > channelBMajorVersion ? 1 : -1; + } + else if (channelAMinorVersion != channelBMinorVersion) { + return channelAMinorVersion > channelBMinorVersion ? 1 : -1; + } + + return 0; +} + +export function getMatchingVersionFromList(versionInfoList: VersionInfo[], versionSpec: string, includePreviewVersions: boolean = false): VersionInfo { + let versionList: string[] = []; + versionInfoList.forEach(versionInfo => { + if (versionInfo && versionInfo.getVersion()) { + versionList.push(versionInfo.getVersion()); + } + }); + + if (versionList.length > 0) { + let matchedVersion = semver.maxSatisfying(versionList, versionSpec, { includePrerelease: includePreviewVersions }); + if (matchedVersion) { + return versionInfoList.find(versionInfo => { + return versionInfo.getVersion() == matchedVersion + }); + } + } + + return null; +} + +export const Constants = { + "sdk": "sdk", + "runtime": "runtime", + "relativeRuntimePath": path.join("shared", "Microsoft.NETCore.App"), + "relativeSdkPath": "sdk", + "relativeGlobalToolPath": path.join(".dotnet", "tools") +} \ No newline at end of file diff --git a/_generated/UseDotNetV2_Node16/README.md b/_generated/UseDotNetV2_Node16/README.md new file mode 100644 index 000000000000..9da172ab0504 --- /dev/null +++ b/_generated/UseDotNetV2_Node16/README.md @@ -0,0 +1,56 @@ +# 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.9.6 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. + +* **Use global json**: This checkbox indicates that all versions from all `global.json` files will be used to install the sdk versions. You can set the search root path with `Working Directory`. + +* **Working Directory**: This path can only be set if the option `Use global json` is selected. Specify path from where global.json files should be searched when using `Use global json`. If empty, `system.DefaultWorkingDirectory` will be considered as the root path. + +* **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
    For getting more details about exact version, refer [this link](https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json). + +* **Compatible Visual Studio Version**: Specify a compatible Visual Studio version. If a version is specified, then only those versions of .Net Core SDK/runtime will be considered for installation which are compatible with this Visual Studio version. Specify complete Visual Studio version containing major version, minor version and patch number. e.g. 16.6.4. Compatibility of Visual Studio is checked by looking at vs-version property specified in the release manifest from the releases.json files. The link to releases.json of that major.minor version can be found in [**releases-index file.**](https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/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**: +
    C:\\Program Files\\dotnet (64-bit processes) +
    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).
    diff --git a/_generated/UseDotNetV2_Node16/Strings/resources.resjson/de-DE/resources.resjson b/_generated/UseDotNetV2_Node16/Strings/resources.resjson/de-DE/resources.resjson new file mode 100644 index 000000000000..f27d4d1a8806 --- /dev/null +++ b/_generated/UseDotNetV2_Node16/Strings/resources.resjson/de-DE/resources.resjson @@ -0,0 +1,100 @@ +{ + "loc.friendlyName": ".NET Core verwenden", + "loc.helpMarkDown": "[Weitere Informationen zu dieser Aufgabe](https://aka.ms/AA4xgy0)", + "loc.description": "Ruft eine bestimmte Version für das .NET Core SDK aus dem Internet oder dem lokalen Cache ab und fügt sie PATH hinzu. Verwenden Sie diese Aufgabe, um die in nachfolgenden Aufgaben verwendete .NET Core-Version zu ändern. Bietet zusätzlich Proxyunterstützung.", + "loc.instanceNameFormat": "Verwenden Sie .NET Core $(packageType) $(version).", + "loc.releaseNotes": "
  • Unterstützung für die parallele Installation mehrerer Versionen
  • Unterstützung für Versionsmuster, um die neueste Nebenversion/Hauptversion abzurufen
  • Einschränkung der Suche auf mehreren Ebenen
  • Installation von NuGet und Bereitstellung von Proxyunterstützung
  • Installation von SDK-Versionen aus global.json-Dateien
  • ", + "loc.group.displayName.advanced": "Erweitert", + "loc.input.label.packageType": "Zu installierendes Paket", + "loc.input.help.packageType": "Wählen Sie aus, ob nur die Runtime oder das SDK installiert werden soll.", + "loc.input.label.useGlobalJson": "\"global.json\" verwenden", + "loc.input.help.useGlobalJson": "Wählen Sie diese Option aus, um alle SDKs aus global.json-Dateien zu installieren. Diese Dateien werden in \"system.DefaultWorkingDirectory\" gesucht. Sie können den Stammpfad für die Suche ändern, indem Sie die Arbeitsverzeichniseingabe festlegen.", + "loc.input.label.workingDirectory": "Arbeitsverzeichnis", + "loc.input.help.workingDirectory": "Geben Sie den Pfad an, von dem aus nach global.json-Dateien gesucht werden soll, wenn \"global.json verwenden\" verwendet wird. Wird dieser Wert leer gelassen, wird \"system.DefaultWorkingDirectory\" als Stammpfad angenommen.", + "loc.input.label.version": "Version", + "loc.input.help.version": "Geben Sie die Version von .NET Core SDK oder Runtime an, die installiert werden soll.
    Versionen können in den folgenden Formaten angegeben werden:
  • 2.x: Installation der aktuellen Hauptversion
  • 2.2.x: Installation der aktuellen Haupt- und Nebenversion
  • 2.2.104: Installation der genauen Version

  • Suchen Sie in der Datei \"releases.json\" nach dem Wert \"version\" zur Installation von SDK/Runtime. Den Link zu \"releases.json\" dieser Hauptversion.Nebenversion finden Sie in der [**releases-index-Datei**](https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json). Der Link zu \"releases.json\" für Version 2.2 version lautet https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/2.2/releases.json.", + "loc.input.label.vsVersion": "Kompatible Visual Studio-Version", + "loc.input.help.vsVersion": "Geben Sie eine kompatible Version von Visual Studio an, für die das .NET Core SDK installiert werden soll. Die Angabe muss die vollständige VS-Version mit Hauptversion, Nebenversion und Patchnummer enthalten, z. B. \"16.6.4\". Suchen Sie in der Datei \"releases.json\" nach dem Wert von \"version\" für die Installation von SDK/Runtime. Den Link zu \"releases.json\" für die jeweilige \"Hauptversion.Nebenversion\" finden Sie in der [**Datei \"releases-index\"**](https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json).", + "loc.input.label.includePreviewVersions": "Vorschauversionen einschließen", + "loc.input.help.includePreviewVersions": "Wählen Sie aus, ob die Vorschauversionen bei der Suche nach aktuellen Versionen einbezogen werden sollen, etwa bei der Suche nach Version 2.2.x. Diese Einstellung wird ignoriert, wenn Sie eine genaue Version angeben, z. B. 3.0.100-preview3-010431.", + "loc.input.label.installationPath": "Pfad zur Installation von .NET Core", + "loc.input.help.installationPath": "Geben Sie an, wo das .NET Core SDK/die Runtime installiert werden soll. Verschiedene Pfade können sich folgendermaßen auf das .NET-Verhalten auswirken.
  • $(Agent.ToolsDirectory): Hiermit wird die Version auf dem Agent zwischengespeichert, weil dieses Verzeichnis nicht pipelineübergreifend bereinigt wird. Alle auf dem Agent ausgeführten Pipelines würden Zugriff auf die Versionen erhalten, die zuvor über den Agent installiert wurden.
  • $(Agent.TempDirectory): Auf diese Weise kann sichergestellt werden, dass eine Pipeline keine zwischengespeicherte Version von .NET Core verwendet, weil dieser Ordner nach jeder Pipeline bereinigt wird.
  • Jeder andere Pfad: Sie können einen beliebigen anderen Pfad konfigurieren, solange der Agentprozess Zugriff auf den Pfad besitzt. Dies ändert den Status des Computers und wirkt sich auf alle darauf ausgeführten Prozesse aus.
    Beachten Sie, dass Sie auch die Einstellung zur Suche auf mehreren Ebenen konfigurieren können, um die Suche des .NET-Hosts nach einer geeigneten Version zu konfigurieren.", + "loc.input.label.performMultiLevelLookup": "Suche auf mehreren Ebenen ausführen", + "loc.input.help.performMultiLevelLookup": "Diese Eingabe gilt nur für Windows-basierte Agents. Hiermit wird das Verhalten des .NET-Hostprozesses für die Suche nach einem geeigneten freigegebenen Framework konfiguriert.
  • Deaktiviert: Der Hostprozess sucht nur Versionen, die in dem in dieser Aufgabe angegebenen Ordner vorhanden sind.
  • Aktiviert: Der Host versucht, über eine Suche auf mehreren Ebenen in vordefinierten globalen Speicherorten zu suchen.
    Die globalen Standardspeicherorte lauten:
    Für Windows:
    C:\\Programme\\dotnet (64-Bit-Prozess)
    C:\\Programme (x86)\\dotnet (32-Bit-Prozess)
  • Weitere Informationen finden Sie [**HIER**](https://github.com/dotnet/core-setup/blob/master/Documentation/design-docs/multilevel-sharedfx-lookup.md).
    ", + "loc.messages.ToolFailed": "Fehler bei der Toolinstallation: %s", + "loc.messages.ImplicitVersionNotSupported": "Die Version muss eine gültige und bestimmte Version sein: %s.", + "loc.messages.getMachinePlatformFailed": "Fehler beim Abrufen der Details zur Computerplattform. Fehler: %s.", + "loc.messages.getDownloadUrlsFailed": "Fehler beim Abrufen der Download-URLs. Fehler: %s.", + "loc.messages.UsingCachedTool": "Es ist eine zwischengespeicherte Kopie von .NET Core vorhanden. Eine Neuinstallation ist nicht erforderlich. Speicherort des zwischengespeicherten Tools: %s.", + "loc.messages.CheckingToolCache": "Es wird überprüft, ob eine zwischengespeicherte Kopie für diese Version vorhanden ist...", + "loc.messages.InstallingAfresh": "Der Cache enthält nicht die angeforderte Version von .NET Core. Laden Sie die Version jetzt herunter, und installieren Sie sie.", + "loc.messages.GettingDownloadUrl": "URL zum Herunterladen von .NET Core %s, Version %s wird abgerufen.", + "loc.messages.CouldNotDetectPlatform": "Das Betriebssystem des Computers konnte nicht ermittelt werden.", + "loc.messages.NullDownloadUrls": "Die Download-URL konnte nicht erstellt werden. Stellen Sie sicher, dass die angegebene Version %s gültig ist.", + "loc.messages.DownloadingUrl": ".NET Core-Paket wird von URL %s heruntergeladen.", + "loc.messages.ExtractingPackage": "Das heruntergeladene Paket %s wird extrahiert.", + "loc.messages.CachingTool": "Dieses installierte Tool wird zwischengespeichert.", + "loc.messages.SuccessfullyInstalled": ".NET Core %s Version %s wurde erfolgreich installiert.", + "loc.messages.ToolToInstall": "Zu installierendes Tool: .NET Core %s Version %s.", + "loc.messages.PrimaryPlatform": "Erkannte Plattform (primär): %s", + "loc.messages.LegacyPlatform": "Erkannte Plattform (Legacy): %s", + "loc.messages.CouldNotDownload": "Das Installationspaket konnte nicht von dieser URL heruntergeladen werden: %s. Fehler: %s", + "loc.messages.FailedToDownloadPackage": "Fehler beim Herunterladen des Pakets für die Installation.", + "loc.messages.PrependGlobalToolPath": "Der globale Toolpfad wird erstellt und PATH vorangestellt.", + "loc.messages.VersionsFileMalformed": "Die Downloadlinks der angegebenen Version sind im Dokument mit unterstützten Versionen nicht ordnungsgemäß formatiert: => %s/", + "loc.messages.MatchingVersionNotFound": "Für die angegebene Version wurde keine übereinstimmende %s-Version gefunden: %s. Beachten Sie, dass die Vorschauversionen nur in den letzten Versionssuchen berücksichtigt werden, wenn das Kontrollkästchen \"Vorschauversionen einschließen\" aktiviert ist.", + "loc.messages.UnableToAccessPath": "Auf den Pfad kann nicht zugegriffen werden: %s. Fehler: %s. Stellen Sie sicher, dass der Agentprozess Zugriff auf den Pfad besitzt.", + "loc.messages.VersionCanNotBeDownloadedFromUrl": "Version %s kann nicht über die URL %s heruntergeladen werden. Entweder ist die URL oder die Version falsch.", + "loc.messages.CopyingFoldersIntoPath": "Alle Stammordner werden in den Installationspfad kopiert: %s", + "loc.messages.CopyingFilesIntoPath": "Stammdateien (z. B. \"dotnet.exe\") werden in den Installationspfad kopiert: %s", + "loc.messages.FailedToCopyTopLevelFiles": "Fehler beim Kopieren der Stammdateien in den Installationspfad: %s. Fehler: %s", + "loc.messages.FailedWhileInstallingVersionAtPath": "Fehler beim Installieren der Version %s in Pfad \"%s\". Fehler: %s", + "loc.messages.ExplicitVersionRequired": "Version %s ist nicht zulässig. Die zu installierenden Versionen müssen das folgende Format aufweisen: Hauptversion.Nebenversion.Patchversion. Beispiel: 2.2.1", + "loc.messages.VersionFoundInCache": "Version %s wurde im Cache gefunden.", + "loc.messages.VersionNotFoundInCache": "Die Version %s wurde nicht im Cache gefunden.", + "loc.messages.CreatingInstallationCompeleteFile": "Die Markerdatei für \"Installation abgeschlossen\" von .NET Core %s, Version %s, wird erstellt.", + "loc.messages.CannotFindRuntimeVersionForCompletingInstallation": "Die Runtimeversion für den Pakettyp \"%s\" mit Version %s wurde nicht gefunden.", + "loc.messages.PathNotFoundException": "Der Pfad \"%s\" wurde nicht gefunden. Stellen Sie sicher, dass der Pfad vorhanden ist.", + "loc.messages.VersionIsLocalLatest": "Version %s ist die neueste Version, die im Pfad \"%s\" vorhanden ist.", + "loc.messages.VersionIsNotLocalLatest": "Version %s ist nicht die neueste Version, die unter \"%s\" vorhanden ist.", + "loc.messages.DownloadUrlForMatchingOsNotFound": "Die Download-URL für .NET Core %s, Version %s wurde für die folgenden Betriebssystemplattformen (RID) nicht gefunden: %s", + "loc.messages.ExceptionWhileDownloadOrReadReleasesIndex": "Fehler beim Herunterladen oder Analysieren von \"release-index.json\" mit folgendem Fehler: %s", + "loc.messages.MatchingVersionForUserInputVersion": "Version %s in Kanal \"%s\" für benutzerseitig angegebene Versionsspezifikation gefunden: %s", + "loc.messages.UrlForReleaseChannelNotFound": "Die URL für \"releases.json\" der Kanalversion %s wurde nicht gefunden.", + "loc.messages.NoSuitableChannelWereFound": "Der zugehörige Kanal zu Version %s wurde nicht gefunden.", + "loc.messages.DetectingPlatform": "Die Betriebssystemplattform wird ermittelt, um das richtige Downloadpaket für das Betriebssystem zu finden.", + "loc.messages.FailedInDetectingMachineArch": "Fehler beim Ermitteln der Betriebssystemplattform für den Computer. Fehler: %s", + "loc.messages.runtimeVersionPropertyNotFound": "Die runtime-version-Eigenschaft für .NET Core %s, Version %s wurde nicht gefunden.", + "loc.messages.VersionNotFound": "%s-Versionsabgleich: \"%s\" wurde nicht gefunden.", + "loc.messages.VersionNotAllowed": "Die Version %s ist nicht zulässig. Zulässige Versionstypen: Hauptversion.x, Hauptversion.Nebenversion.x, Hauptversion.Nebenversion.Patchversion. Weitere Informationen: %s", + "loc.messages.VersionsCanNotBeCompared": "Die Versionen %s und %s können nicht verglichen werden. Es muss sich in beiden Fällen um explizite Versionen handeln.", + "loc.messages.FileNameNotCorrectCompleteFileName": "Der Dateiname \"%s\" entspricht keiner gültigen COMPLETE-Datei.", + "loc.messages.ChannelVersionsNotComparable": "Die Kanalversionen %s und %s können nicht verglichen werden. Beide müssen Haupt- und Nebenversionen enthalten.", + "loc.messages.LookingForVersionInChannel": "Die Version wird im Kanal \"%s\" gesucht.", + "loc.messages.FallingBackToAdjacentChannels": "Die Version %s wurde nicht im Kanal gefunden. Es wird in benachbarten Kanälen gesucht.", + "loc.messages.ErrorWhileSettingDotNetToolPath": "Fehler beim Voranstellen der .NET Core-Toolpfads an die PATH-Umgebungsvariable. Fehler: %s", + "loc.messages.RequiredChannelVersionForSpec": "Der Kanal \"%s\" für Version %s wird gesucht.", + "loc.messages.ErrorWhileGettingVersionFromChannel": "Fehler beim Abrufen der Version %s aus Kanal \"%s\". Fehler: %s", + "loc.messages.ComparingInstalledFolderVersions": "Es wird verglichen, ob die zu installierende Version %s höher ist als die bereits installierte Version mit dem Ordnernamen \"%s\".", + "loc.messages.ComparingInstalledFileVersions": "Es wird verglichen, ob die zu installierende Version %s höher ist als die bereits installierte Version mit version.complete-Datei \"%s\".", + "loc.messages.InvalidChannelObject": "Das Objekt kann nicht als Kanal verwendet werden, erforderliche Eigenschaften wie z. B. die Kanalversion und \"releases.json\" fehlen.", + "loc.messages.ReleasesIndexBodyIncorrect": "Der analysierte Indextext für das Release ist nicht korrekt. Stellen Sie sicher, dass der Abschnitt \"releases-index\" in der Datei nicht leer ist.", + "loc.messages.InvalidVersionObject": "\"releases.json\" weist ein Release mit ungültigem %s-Objekt auf: %s", + "loc.messages.InvalidVersion": "Ungültige Version angegeben: %s", + "loc.messages.FilesDataIsIncorrectInVersion": "In Release %s für Version %s sind die Dateidaten falsch (möglicherweise fehlen erforderliche Felder wie Name, RID und URL): %s", + "loc.messages.VersionFilesDataIncorrect": "Die Dateidaten der Version fehlen, oder es fehlen erforderliche Felder.", + "loc.messages.VersionInformationNotComplete": "Für Version %s erforderliche Informationen sind in der Datei \"releases.json\" nicht vollständig. Fehler: %s", + "loc.messages.FailedWhileExtractingPacakge": "Fehler beim Extrahieren des heruntergeladenen Pakets. Fehler: %s", + "loc.messages.InstallingNuGetVersion": "NuGet-Version %s wird installiert.", + "loc.messages.FailureWhileInstallingNuGetVersion": "Fehler beim Installieren der NuGet-Version. Fehler: %s", + "loc.messages.SettingUpNugetProxySettings": "Die Proxykonfiguration für NuGet wird eingerichtet.", + "loc.messages.GlobalJsonFound": "\"global.json\" im folgenden Pfad gefunden: %s", + "loc.messages.GlobalJsonSdkVersion": "SDK-Version %s wird durch \"global.json\" im Pfad \"%s\" angegeben.", + "loc.messages.GlobalJsonIsEmpty": "Die Datei \"global.json\" im Pfad \"%s\" ist leer. Es wurde keine Version angegeben.", + "loc.messages.FailedToFindGlobalJson": "Fehler bei der Suche nach \"global.json\" im folgenden Pfad: %s", + "loc.messages.FailedToReadGlobalJson": "Die Datei \"global.json\" im Pfad \"%s\" weist das falsche Format auf. Informationen zu \"global.json\" finden Sie hier: https://docs.microsoft.com/de-de/dotnet/core/tools/global-json. Fehler beim Lesen: %s", + "loc.messages.VersionNumberHasTheWrongFormat": "Die Versionsnummer %s weist nicht das korrekte Format auf. Versionen können in den folgenden Formaten angegeben werden: 2.x: Installation der aktuellen Hauptversion. 2.2.x: Installation der aktuellen Haupt- und Nebenversion. 2.2.104: Installation der genauen Version. Suchen Sie in der Datei \"releases.json\" nach dem Wert \"version\" zur Installation von SDK/Runtime. Den Link zu \"releases.json\" dieser Hauptversion.Nebenversion finden Sie in der [**releases-index-Datei**](https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json). Der Link zu \"releases.json\" für Version 2.2 version lautet https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/2.2/releases.json.", + "loc.messages.OnlyExplicitVersionAllowed": "Es werden nur explizite Versionen akzeptiert, z. B. 2.2.301. Version %s ist ungültig.", + "loc.messages.SupportPhaseNotPresentInChannel": "Die Supportphase ist im Kanal mit Kanalversion %s nicht vorhanden.", + "loc.messages.DepricatedVersionNetCore": "Die von Ihnen angegebene NET Core-Version %s wird nicht mehr unterstützt und in Kürze von gehosteten Agents entfernt. Weitere Informationen zur .NET-Supportrichtlinie finden Sie unter https://aka.ms/dotnet-core-support." +} \ No newline at end of file diff --git a/_generated/UseDotNetV2_Node16/Strings/resources.resjson/en-US/resources.resjson b/_generated/UseDotNetV2_Node16/Strings/resources.resjson/en-US/resources.resjson new file mode 100644 index 000000000000..cb0a286383d3 --- /dev/null +++ b/_generated/UseDotNetV2_Node16/Strings/resources.resjson/en-US/resources.resjson @@ -0,0 +1,100 @@ +{ + "loc.friendlyName": "Use .NET Core", + "loc.helpMarkDown": "[Learn more about this task](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 .NET Core $(packageType) $(version)", + "loc.releaseNotes": "
  • Support for installing multiple versions side by side.
  • Support for patterns in version to fetch latest in minor/major version.
  • Restrict Multi-level lookup
  • Installs NuGet and provides proxy support.
  • Installs sdk versions from `global.json` file(s)
  • ", + "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.useGlobalJson": "Use global json", + "loc.input.help.useGlobalJson": "Select this option to install all SDKs from global.json files. These files are searched from system.DefaultWorkingDirectory. You can change the search root path by setting working directory input.", + "loc.input.label.workingDirectory": "Working Directory", + "loc.input.help.workingDirectory": "Specify path from where global.json files should be searched when using `Use global json`. If empty, `system.DefaultWorkingDirectory` will be considered as the root path.", + "loc.input.label.version": "Version", + "loc.input.help.version": "Specify version of .NET Core SDK or runtime to install.
    Versions can be given in the following formats
  • 2.x => Install latest in major version.
  • 2.2.x => Install latest in major and minor version
  • 2.2.104 => Install exact version

  • 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://dotnetcli.blob.core.windows.net/dotnet/release-metadata/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.vsVersion": "Compatible Visual Studio version", + "loc.input.help.vsVersion": "Specify version of compatible visual studio for which .NET core sdk to install. Specifiy complete vs-version like 16.6.4 containing major version, minor version and patch number.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://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.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.
  • $(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.
  • $(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.
  • 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.
    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.
  • 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:
    C:\\Program Files\\dotnet (64-bit processes)
    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).
    ", + "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.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. Please make sure that agent process has access 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 marker 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 releases-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. More details: %s", + "loc.messages.VersionsCanNotBeCompared": "Versions %s and %s cannot be compared. Both versions should be explicit.", + "loc.messages.FileNameNotCorrectCompleteFileName": "File name %s is not a correct '.complete' file.", + "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.InvalidVersion": "Invalid version specified %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.", + "loc.messages.GlobalJsonFound": "Found a global.json at path: %s", + "loc.messages.GlobalJsonSdkVersion": "SDK version: %s is specified by global.json at path: %s", + "loc.messages.GlobalJsonIsEmpty": "global.json at path: %s is empty. No version is specified.", + "loc.messages.FailedToFindGlobalJson": "Failed to find global.json at and inside path: %s", + "loc.messages.FailedToReadGlobalJson": "The global.json at path: '%s' has the wrong format. For information about global.json, visit here: https://docs.microsoft.com/en-us/dotnet/core/tools/global-json. Error while trying to read: %s", + "loc.messages.VersionNumberHasTheWrongFormat": "The version number: %s doesn't have the correct format. Versions can be given in the following formats: 2.x => Install latest in major version. 2.2.x => Install latest in major and minor version. 2.2.104 => Install exact version. 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://dotnetcli.blob.core.windows.net/dotnet/release-metadata/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.messages.OnlyExplicitVersionAllowed": "Only explicit versions and accepted, such as: 2.2.301. Version: %s is not valid.", + "loc.messages.SupportPhaseNotPresentInChannel": "support-phase is not present in the channel with channel-version %s.", + "loc.messages.DepricatedVersionNetCore": "NET Core version you specfied %s is out of support and will be removed from hosted agents soon. Please refer to https://aka.ms/dotnet-core-support for more information about the .NET support policy." +} \ No newline at end of file diff --git a/_generated/UseDotNetV2_Node16/Strings/resources.resjson/es-ES/resources.resjson b/_generated/UseDotNetV2_Node16/Strings/resources.resjson/es-ES/resources.resjson new file mode 100644 index 000000000000..dc10cf281171 --- /dev/null +++ b/_generated/UseDotNetV2_Node16/Strings/resources.resjson/es-ES/resources.resjson @@ -0,0 +1,100 @@ +{ + "loc.friendlyName": "Usar .NET Core", + "loc.helpMarkDown": "[Obtener más información acerca de esta tarea](https://aka.ms/AA4xgy0)", + "loc.description": "Adquiere una versión específica del SDK de .NET Core de Internet o de la memoria caché local y la agrega a PATH. Use esta tarea para cambiar la versión de .NET Core que se usa en las tareas siguientes. También proporciona compatibilidad con el proxy.", + "loc.instanceNameFormat": "Usar $(packageType) $(version) de .NET Core", + "loc.releaseNotes": "
  • Compatibilidad para instalar varias versiones en paralelo.
  • Compatibilidad con los patrones de versión para capturar la última versión secundaria o principal.
  • Restringe la búsqueda de varios niveles.
  • Instala NuGet y proporciona compatibilidad con el proxy.
  • Instala versiones del SDK desde los archivos \"global.json\".
  • ", + "loc.group.displayName.advanced": "Avanzado", + "loc.input.label.packageType": "Paquete para instalar", + "loc.input.help.packageType": "Seleccione si debe instalarse solo el entorno de ejecución o el SDK.", + "loc.input.label.useGlobalJson": "Usar JSON global", + "loc.input.help.useGlobalJson": "Seleccione esta opción para instalar todos los SDK de los archivos global.json. Estos archivos se buscan desde system.DefaultWorkingDirectory. Establezca la entrada del directorio de trabajo para cambiar la ruta de acceso raíz de búsqueda.", + "loc.input.label.workingDirectory": "Directorio de trabajo", + "loc.input.help.workingDirectory": "Especifique la ruta de acceso desde la que deben buscarse los archivos global.json cuando se utilice \"Usar JSON global\". Si está vacío, \"system.DefaultWorkingDirectory\" se considerará como la ruta de acceso raíz.", + "loc.input.label.version": "Versión", + "loc.input.help.version": "Especifique la versión del entorno de ejecución o del SDK de .NET Core que debe instalarse.
    Las versiones pueden proporcionarse con los formatos siguientes
  • 2.x => Instalar la última versión principal.
  • 2.2.x => Instalar la última versión principal y secundaria.
  • 2.2.104 => Instalar la versión exacta.

  • Busque el valor de \"versión\" para instalar el SDK o el entorno de ejecución en releases.json. El vínculo a releases.json de dicha versión principal.secundaria puede encontrarse en el [**archivo releases-index.**](https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json). Asimismo, el vínculo a releases.json para la versión 2.2 es https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/2.2/releases.json", + "loc.input.label.vsVersion": "Versión de Visual Studio compatible", + "loc.input.help.vsVersion": "Especifique la versión compatible de Visual Studio para la que se va a instalar el SDK de .NET Core. Especifique una versión de VS completa (por ejemplo, 16.6.4), que contenga la versión principal, la versión secundaria y el número de revisión. Busque el valor de \"version\" para instalar el runtime o el SDK desde releases.json. El vínculo a releases.json de esa versión principal.secundaria puede encontrarse en el [**archivo releases-index.**](https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json)", + "loc.input.label.includePreviewVersions": "Incluir versiones preliminares", + "loc.input.help.includePreviewVersions": "Seleccione si quiere que las versiones preliminares se incluyan en la búsqueda de las últimas versiones, por ejemplo, al buscar 2.2.x. Esta configuración se ignora si se especifica una versión exacta, como 3.0.100-preview3-010431", + "loc.input.label.installationPath": "Ruta de acceso para instalar .Net Core", + "loc.input.help.installationPath": "Especifique dónde debe instalarse el entorno de ejecución o el SDK de .Net Core. Las distintas rutas de acceso pueden tener el efecto siguiente en el comportamiento de .Net.
  • $(Agent.ToolsDirectory): con esta opción, la versión se almacena en la memoria caché del agente, ya que el directorio no se limpia entre canalizaciones. Todas las canalizaciones que se ejecutan en el agente tienen acceso a las versiones instaladas anteriormente con este.
  • $(Agent.TempDirectory): esta opción garantiza que una canalización no use ninguna versión de .Net Core almacenada en caché, ya que la carpeta se limpia después de cada canalización.
  • Cualquier otra ruta de acceso: puede configurar cualquier otra ruta de acceso siempre que el proceso del agente tenga acceso a la ruta. Esto cambiará el estado de la máquina y afectará a todos los procesos que se estén ejecutando en ella.
    Tenga en cuenta que también puede configurar la opción de búsqueda en varios niveles para establecer el sondeo del host de .Net a fin de obtener una versión adecuada.", + "loc.input.label.performMultiLevelLookup": "Realizar búsqueda en varios niveles", + "loc.input.help.performMultiLevelLookup": "Esta entrada solo es aplicable a los agentes basados en Windows. Configura el comportamiento del proceso de host de .Net para buscar un marco de trabajo compartido adecuado.
  • Sin seleccionar: el proceso de host solo busca las versiones presentes en la carpeta que se especifica en esta tarea.
  • Seleccionada: el host intentará buscar en ubicaciones globales predefinidas mediante la búsqueda en varios niveles.
    Las ubicaciones globales predeterminadas son:
    Para Windows:
    C:\\Program Files\\dotnet (procesos de 64 bits)
    C:\\Program Files (x86)\\dotnet (procesos de 32 bits)
  • Puede leer más al respecto [**AQUÍ**](https://github.com/dotnet/core-setup/blob/master/Documentation/design-docs/multilevel-sharedfx-lookup.md).
    ", + "loc.messages.ToolFailed": "No se pudo instalar la herramienta: %s", + "loc.messages.ImplicitVersionNotSupported": "La versión debe ser válida y explícita: %s", + "loc.messages.getMachinePlatformFailed": "Error al obtener los detalles de la plataforma de máquina. Error: %s.", + "loc.messages.getDownloadUrlsFailed": "No se pudieron obtener direcciones URL de descarga. Error: %s.", + "loc.messages.UsingCachedTool": "Existe una copia en caché de .NET Core. No es necesario instalarlo desde cero. Ubicación de la herramienta en caché: %s.", + "loc.messages.CheckingToolCache": "Comprobando si existe una copia en caché de esta versión...", + "loc.messages.InstallingAfresh": "La memoria caché no contiene la versión solicitada de .NET Core. Descargándola e instalándola ahora.", + "loc.messages.GettingDownloadUrl": "Obteniendo direcciones URL para descargar el %s de .NET Core de la versión: %s.", + "loc.messages.CouldNotDetectPlatform": "No se pudo detectar el sistema operativo de la máquina", + "loc.messages.NullDownloadUrls": "No se pueden construir direcciones URL de descarga. Asegúrese de que la versión especificada %s es válida.", + "loc.messages.DownloadingUrl": "Descargando el paquete de .NET Core de la dirección URL: %s", + "loc.messages.ExtractingPackage": "Extrayendo el paquete %s descargado.", + "loc.messages.CachingTool": "Almacenando en caché esta herramienta instalada.", + "loc.messages.SuccessfullyInstalled": ".NET Core %s versión %s se ha instalado correctamente.", + "loc.messages.ToolToInstall": "Herramienta para instalar: .NET Core %s versión %s.", + "loc.messages.PrimaryPlatform": "Se ha detectado la plataforma (principal): %s", + "loc.messages.LegacyPlatform": "Se ha detectado la plataforma (heredada): %s", + "loc.messages.CouldNotDownload": "No se pudo descargar el paquete de instalación desde esta dirección URL: %s Error: %s", + "loc.messages.FailedToDownloadPackage": "No se pudo descargar el paquete de instalación", + "loc.messages.PrependGlobalToolPath": "Creando la ruta de acceso de herramientas global y anteponiéndola a PATH.", + "loc.messages.VersionsFileMalformed": "Los vínculos de descarga de la versión especificada no tienen un formato correcto en el documento de versiones admitidas => %s/", + "loc.messages.MatchingVersionNotFound": "No se encontró ninguna versión de %s coincidente para la versión %s especificada. Tenga en cuenta que las versiones preliminares solo se toman en consideración en las búsquedas de la última versión si la casilla Incluir versiones preliminares está seleccionada.", + "loc.messages.UnableToAccessPath": "No se puede acceder a la ruta de acceso %s. Error: %s. Asegúrese de que el proceso del agente tiene acceso a la ruta correspondiente.", + "loc.messages.VersionCanNotBeDownloadedFromUrl": "No se puede descargar la versión %s de la dirección URL %s. La dirección URL o la versión es incorrecta.", + "loc.messages.CopyingFoldersIntoPath": "Copiando todas las carpetas raíz en la ruta de acceso de instalación: %s", + "loc.messages.CopyingFilesIntoPath": "Copiando archivos raíz (como dotnet.exe) en la ruta de acceso de instalación: %s", + "loc.messages.FailedToCopyTopLevelFiles": "No se pudieron copiar los archivos raíz en la ruta de acceso de la instalación: %s. Error: %s", + "loc.messages.FailedWhileInstallingVersionAtPath": "Error al instalar la versión %s en la ruta de acceso %s: %s", + "loc.messages.ExplicitVersionRequired": "No se admite la versión %s. Las versiones que se van a instalar deben tener el formato principal.secundaria.revisión. Por ejemplo, 2.2.1", + "loc.messages.VersionFoundInCache": "Se ha encontrado la versión %s en la memoria caché.", + "loc.messages.VersionNotFoundInCache": "No se encontró la versión %s en la memoria caché.", + "loc.messages.CreatingInstallationCompeleteFile": "Creando el archivo marcador de instalación completo para .NET Core %s, versión %s", + "loc.messages.CannotFindRuntimeVersionForCompletingInstallation": "No se encuentra la versión del entorno de ejecución para el tipo de paquete %s con la versión %s", + "loc.messages.PathNotFoundException": "No se encontró la ruta de acceso %s. Asegúrese de que existe.", + "loc.messages.VersionIsLocalLatest": "La versión %s es la última de las versiones presentes en la ruta de acceso %s", + "loc.messages.VersionIsNotLocalLatest": "La versión %s no es la última de las versiones presentes en %s", + "loc.messages.DownloadUrlForMatchingOsNotFound": "No se encontró la dirección URL de descarga de .Net Core %s versión %s para las plataformas de sistema operativo siguientes (RID): %s", + "loc.messages.ExceptionWhileDownloadOrReadReleasesIndex": "No se pudo descargar ni analizar el archivo releases-index.json con el error %s.", + "loc.messages.MatchingVersionForUserInputVersion": "Se encontró la versión %s en el canal %s para la especificación de versión determinada por el usuario: %s", + "loc.messages.UrlForReleaseChannelNotFound": "No se encontró la dirección URL para el archivo releases.json de la versión del canal: %s", + "loc.messages.NoSuitableChannelWereFound": "No se encuentra el canal correspondiente a la versión %s.", + "loc.messages.DetectingPlatform": "Detección de la plataforma del sistema operativo para encontrar un paquete de descarga correcto para dicho sistema.", + "loc.messages.FailedInDetectingMachineArch": "Error al detectar la plataforma del sistema operativo de la máquina: %s", + "loc.messages.runtimeVersionPropertyNotFound": "No se encontró la propiedad runtime-version para .Net Core %s versión %s.", + "loc.messages.VersionNotFound": "Coincidencia de versión de %s: no se encontró %s", + "loc.messages.VersionNotAllowed": "No se admite la versión %s. Los tipos de versión admitidos son: majorVersion.x, majorVersion.minorVersion.x, majorVersion.minorVersion.patchVersion. Más detalles: %s", + "loc.messages.VersionsCanNotBeCompared": "No se pueden comparar las versiones %s y %s. Ambas versiones deben ser explícitas.", + "loc.messages.FileNameNotCorrectCompleteFileName": "El nombre de archivo %s no es un archivo \".complete\" correcto.", + "loc.messages.ChannelVersionsNotComparable": "No se pueden comparar las versiones %s y %s del canal. Ambas deben tener versiones principales y secundarias numéricas.", + "loc.messages.LookingForVersionInChannel": "Buscando la versión en canal %s", + "loc.messages.FallingBackToAdjacentChannels": "No se encontró la versión %s en su canal y se va a buscar en los canales adyacentes.", + "loc.messages.ErrorWhileSettingDotNetToolPath": "Error al anteponer la ruta de acceso de la herramienta de .Net Core a la variable de entorno PATH: %s", + "loc.messages.RequiredChannelVersionForSpec": "Buscando el canal %s para la versión %s", + "loc.messages.ErrorWhileGettingVersionFromChannel": "Error al obtener la versión %s del canal %s: %s", + "loc.messages.ComparingInstalledFolderVersions": "Comparando si la versión %s que se va a instalar es posterior a la versión ya instalada con el nombre de carpeta %s", + "loc.messages.ComparingInstalledFileVersions": "Comparando si la versión %s que se va a instalar es posterior a la versión ya instalada con el nombre de archivo de versión completo %s", + "loc.messages.InvalidChannelObject": "El objeto no se puede usar como canal porque faltan propiedades requeridas, como channel-version o releases.json.", + "loc.messages.ReleasesIndexBodyIncorrect": "El cuerpo del índice de versiones analizadas no es correcto. Compruebe que la sección releases-index no está vacía en el archivo.", + "loc.messages.InvalidVersionObject": "La versión del archivo releases.json tiene un objeto %s no válido: %s", + "loc.messages.InvalidVersion": "Se ha especificado una versión %s no válida.", + "loc.messages.FilesDataIsIncorrectInVersion": "En la versión %s (%s), los datos del archivo son incorrectos (puede que falten campos obligatorios, como el nombre, RID y dirección URL): %s", + "loc.messages.VersionFilesDataIncorrect": "Faltan datos de los archivos de la versión o faltan campos obligatorios.", + "loc.messages.VersionInformationNotComplete": "La información necesaria de la versión %s no está completa en el archivo releases.json. Error: %s", + "loc.messages.FailedWhileExtractingPacakge": "No se pudo extraer el paquete descargado. Error: %s", + "loc.messages.InstallingNuGetVersion": "Instalando la versión %s de NuGet", + "loc.messages.FailureWhileInstallingNuGetVersion": "No se pudo instalar la versión de NuGet. Error: %s", + "loc.messages.SettingUpNugetProxySettings": "Configurando el proxy para NuGet.", + "loc.messages.GlobalJsonFound": "Se encontró un archivo global.json en la ruta de acceso: %s", + "loc.messages.GlobalJsonSdkVersion": "El archivo global.json especifica la versión del SDK %s en la ruta de acceso %s", + "loc.messages.GlobalJsonIsEmpty": "El archivo global.json en la ruta de acceso %s está vacío. No se ha especificado ninguna versión.", + "loc.messages.FailedToFindGlobalJson": "No se encontró el archivo global.json en la ruta de acceso ni dentro de ella: %s", + "loc.messages.FailedToReadGlobalJson": "El archivo global.json en la ruta de acceso \"%s\" tiene un formato incorrecto. Para obtener información sobre global.json, visite esta página: https://docs.microsoft.com/en-us/dotnet/core/tools/global-json. Error al intentar leer: %s", + "loc.messages.VersionNumberHasTheWrongFormat": "El número de versión %s no tiene el formato correcto. Las versiones pueden proporcionarse con los formatos siguientes: 2.x => Instalar la última versión principal. 2.2.x => Instalar la última versión principal y secundaria. 2.2.104 => Instalar la versión exacta. Busque el valor de \"versión\" para instalar el SDK o el entorno de ejecución en releases.json. El vínculo a releases.json de dicha versión principal.secundaria puede encontrarse en el [**archivo releases-index.**](https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json). Asimismo, el vínculo a releases.json para la versión 2.2 es https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/2.2/releases.json", + "loc.messages.OnlyExplicitVersionAllowed": "Solo se aceptan las versiones explícitas, por ejemplo, 2.2.301. La versión %s no es válida.", + "loc.messages.SupportPhaseNotPresentInChannel": "La fase de soporte no está presente en el canal con la versión %s.", + "loc.messages.DepricatedVersionNetCore": "La versión de NET Core que especificó %s no es compatible y pronto se quitará de los agentes hospedados. Consulte https://aka.ms/dotnet-core-support para obtener más información sobre la directiva de soporte técnico de .NET." +} \ No newline at end of file diff --git a/_generated/UseDotNetV2_Node16/Strings/resources.resjson/fr-FR/resources.resjson b/_generated/UseDotNetV2_Node16/Strings/resources.resjson/fr-FR/resources.resjson new file mode 100644 index 000000000000..a0af318f250d --- /dev/null +++ b/_generated/UseDotNetV2_Node16/Strings/resources.resjson/fr-FR/resources.resjson @@ -0,0 +1,100 @@ +{ + "loc.friendlyName": "Utiliser .NET Core", + "loc.helpMarkDown": "[En savoir plus sur cette tâche](https://aka.ms/AA4xgy0)", + "loc.description": "Acquiert une version spécifique du kit SDK .NET Core à partir d'Internet ou du cache local, et l'ajoute à PATH. Utilisez cette tâche pour changer la version de .NET Core utilisée dans les tâches suivantes. Fournit également une prise en charge du proxy.", + "loc.instanceNameFormat": "Utilisez .NET Core $(packageType) $(version)", + "loc.releaseNotes": "
  • Prise en charge de l'installation de plusieurs versions côte à côte.
  • Prise en charge des modèles de version pour la récupération (fetch) de la dernière version mineure/principale.
  • Restriction de la recherche multiniveau
  • Installation de NuGet et prise en charge du proxy.
  • Installation des versions du kit SDK à partir des fichiers 'global.json'
  • ", + "loc.group.displayName.advanced": "Avancé", + "loc.input.label.packageType": "Package à installer", + "loc.input.help.packageType": "Choisissez d'installer le runtime uniquement ou le kit SDK.", + "loc.input.label.useGlobalJson": "Utiliser le fichier global json", + "loc.input.help.useGlobalJson": "Sélectionnez cette option pour installer tous les kits SDK à partir des fichiers global.json. Ces fichiers sont recherchés à partir de system.DefaultWorkingDirectory. Vous pouvez changer le chemin racine de recherche en définissant l'entrée du répertoire de travail.", + "loc.input.label.workingDirectory": "Répertoire de travail", + "loc.input.help.workingDirectory": "Spécifiez le chemin de recherche des fichiers global.json quand vous accédez à 'Utiliser le fichier global json'. Si aucune valeur n'est spécifiée, 'system.DefaultWorkingDirectory' est utilisé en tant que chemin racine.", + "loc.input.label.version": "Version", + "loc.input.help.version": "Spécifiez la version du kit SDK ou du runtime .NET Core à installer.
    Vous pouvez spécifier les versions aux formats suivants :
  • 2.x => Installe la dernière version dans la version principale.
  • 2.2.x => Installe la dernière version dans la version principale et la version mineure
  • 2.2.104 => Installe la version exacte

  • Recherchez la valeur de 'version' pour l'installation du kit SDK/runtime dans le fichier releases.json. Le lien vers le fichier releases.json de cette version principale.mineure se trouve dans le [**fichier releases-index.**](https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json). De même, le lien vers releases.json pour la version 2.2 est https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/2.2/releases.json", + "loc.input.label.vsVersion": "Version compatible de Visual Studio", + "loc.input.help.vsVersion": "Spécifiez la version compatible de Visual Studio pour laquelle le kit SDK .NET Core doit être installé. Spécifiez la version complète de Visual Studio, par exemple 16.6.4, qui contient la version principale, la version mineure et le numéro de patch. Recherchez la valeur de 'version' dans releases.json pour l'installation du kit SDK/runtime. Le lien vers le fichier releases.json de cette version principale.mineure se trouve dans le [**fichier releases-index.**](https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json)", + "loc.input.label.includePreviewVersions": "Inclure les préversions", + "loc.input.help.includePreviewVersions": "Sélectionnez cette option si vous souhaitez inclure des préversions durant la recherche des dernières versions, par exemple durant la recherche de la version 2.2.x. Ce paramètre est ignoré si vous spécifiez une version précise, par exemple 3.0.100-preview3-010431", + "loc.input.label.installationPath": "Chemin d'installation de .Net Core", + "loc.input.help.installationPath": "Spécifiez l'emplacement où le kit SDK/Runtime .Net Core doit être installé. Selon les différents chemins, l'impact est le suivant sur le comportement de .Net.
  • $(Agent.ToolsDirectory) : la version est mise en cache sur l'agent, car ce répertoire n'est pas nettoyé entre les pipelines. Tous les pipelines qui s'exécutent sur l'agent ont accès aux versions installées à l'aide de l'agent.
  • $(Agent.TempDirectory) : le pipeline ne peut pas utiliser de version mise en cache de .Net Core, car le dossier est nettoyé après chaque pipeline.
  • Tout autre chemin : vous pouvez configurer un autre chemin dans la mesure où le processus de l'agent a accès au chemin. Cela entraîne un changement d'état de la machine et impacte tous les processus qui s'exécutent sur celle-ci.
    Notez que vous pouvez également configurer le paramètre de recherche multiniveau, qui permet de configurer la détection de l'hôte .Net en fonction de la version appropriée.", + "loc.input.label.performMultiLevelLookup": "Effectuer une recherche multiniveau", + "loc.input.help.performMultiLevelLookup": "Cette entrée est applicable uniquement aux agents Windows. Ceci permet de configurer le comportement du processus hôte .Net pour la recherche d'un framework partagé approprié.
  • Option décochée : seules les versions présentes dans le dossier spécifié de cette tâche sont recherchées par le processus hôte.
  • Option cochée : l'hôte tente d'effectuer des recherches multiniveaux dans les emplacements globaux prédéfinis.
    Emplacements globaux par défaut :
    Pour Windows :
    C:\\Program Files\\dotnet (processus 64 bits)
    C:\\Program Files (x86)\\dotnet (processus 32 bits)
  • Vous trouverez plus d'informations sur le sujet [**ICI**](https://github.com/dotnet/core-setup/blob/master/Documentation/design-docs/multilevel-sharedfx-lookup.md).
    ", + "loc.messages.ToolFailed": "Échec de l'installation de l'outil : %s", + "loc.messages.ImplicitVersionNotSupported": "La version doit être une version valide et explicite : %s", + "loc.messages.getMachinePlatformFailed": "Échec de l'obtention des détails relatifs à la plateforme de la machine. Erreur : %s.", + "loc.messages.getDownloadUrlsFailed": "Échec de l'obtention des URL de téléchargement. Erreur : %s.", + "loc.messages.UsingCachedTool": "Une copie mise en cache de .NET Core existe. Vous devez effectuer une nouvelle installation. Emplacement de l'outil mis en cache : %s.", + "loc.messages.CheckingToolCache": "Vérification de l'existence d'une copie mise en cache pour cette version...", + "loc.messages.InstallingAfresh": "Le cache ne contient pas la version demandée de .NET Core. Téléchargement et installation en cours.", + "loc.messages.GettingDownloadUrl": "Obtention de l'URL de téléchargement de .NET Core %s version %s.", + "loc.messages.CouldNotDetectPlatform": "Impossible de détecter l'OS de la machine", + "loc.messages.NullDownloadUrls": "Impossible de construire l'URL de téléchargement. Vérifiez que la version %s spécifiée est valide.", + "loc.messages.DownloadingUrl": "Téléchargement du package .NET Core à partir de l'URL : %s", + "loc.messages.ExtractingPackage": "Extraction du package téléchargé %s.", + "loc.messages.CachingTool": "Mise en cache de l'outil installé.", + "loc.messages.SuccessfullyInstalled": "Installation réussie de .NET Core %s version %s.", + "loc.messages.ToolToInstall": "Outil à installer : .NET Core %s version %s.", + "loc.messages.PrimaryPlatform": "Plateforme détectée (principal) : %s", + "loc.messages.LegacyPlatform": "Plateforme détectée (héritée) : %s", + "loc.messages.CouldNotDownload": "Impossible de télécharger le package d'installation à partir de cette URL : %s. Erreur : %s", + "loc.messages.FailedToDownloadPackage": "Échec du téléchargement du package pour l'installation", + "loc.messages.PrependGlobalToolPath": "Création d'un chemin d'outil global, et ajout de la valeur correspondante au début de PATH.", + "loc.messages.VersionsFileMalformed": "Les liens de téléchargement de la version spécifiée ne sont pas correctement formés dans le document des versions prises en charge => %s/", + "loc.messages.MatchingVersionNotFound": "La version %s correspondante est introuvable pour la version spécifiée : %s. Notez que les versions de préversion sont prises en compte uniquement dans les recherches de dernières versions, si la case Inclure les préversions est cochée.", + "loc.messages.UnableToAccessPath": "Impossible d'accéder au chemin : %s. Erreur : %s. Vérifiez que le processus de l'agent a accès au chemin.", + "loc.messages.VersionCanNotBeDownloadedFromUrl": "Impossible de télécharger la version %s à partir de l'URL %s. L'URL ou la version est incorrecte.", + "loc.messages.CopyingFoldersIntoPath": "Copie de tous les dossiers racine dans le chemin d'installation : %s", + "loc.messages.CopyingFilesIntoPath": "Copie des fichiers racine (tels que dotnet. exe) dans le chemin d'installation : %s", + "loc.messages.FailedToCopyTopLevelFiles": "Échec de la copie des fichiers racine dans le chemin d'installation : %s. Erreur : %s", + "loc.messages.FailedWhileInstallingVersionAtPath": "Échec de l'installation de la version %s dans le chemin %s. Erreur : %s", + "loc.messages.ExplicitVersionRequired": "La version %s n'est pas autorisée. Les versions à installer doivent être au format suivant : versionprincipale.versionmineure.versioncorrectif. Exemple : 2.2.1", + "loc.messages.VersionFoundInCache": "La version %s a été trouvée dans le cache.", + "loc.messages.VersionNotFoundInCache": "La version %s est introuvable dans le cache.", + "loc.messages.CreatingInstallationCompeleteFile": "Création du fichier marqueur de fin d'installation pour .Net Core %s version %s", + "loc.messages.CannotFindRuntimeVersionForCompletingInstallation": "Version du runtime introuvable pour le package de type %s, version %s", + "loc.messages.PathNotFoundException": "Chemin %s introuvable. Vérifiez que le chemin existe.", + "loc.messages.VersionIsLocalLatest": "La version %s est la plus récente des versions présentes dans le chemin %s", + "loc.messages.VersionIsNotLocalLatest": "La version %s n'est pas la plus récente des versions présentes dans %s", + "loc.messages.DownloadUrlForMatchingOsNotFound": "L'URL de téléchargement de .Net Core %s version %s est introuvable pour les plateformes de système d'exploitation suivantes (RID) : %s", + "loc.messages.ExceptionWhileDownloadOrReadReleasesIndex": "Échec du téléchargement ou de l'analyse de releases-index.json. Erreur : %s", + "loc.messages.MatchingVersionForUserInputVersion": "Version %s trouvée dans le canal %s pour la spécification de version spécifiée par l'utilisateur : %s", + "loc.messages.UrlForReleaseChannelNotFound": "Impossible de localiser l'URL du fichier releases.json de la version de canal : %s", + "loc.messages.NoSuitableChannelWereFound": "Le canal correspondant à la version %s est introuvable.", + "loc.messages.DetectingPlatform": "Détection de la plateforme du système d'exploitation afin de trouver le package de téléchargement approprié pour le système d'exploitation.", + "loc.messages.FailedInDetectingMachineArch": "Échec de la détection de la plateforme de système d'exploitation de la machine. Erreur : %s", + "loc.messages.runtimeVersionPropertyNotFound": "La propriété runtime-version est introuvable pour .Net Core %s version %s.", + "loc.messages.VersionNotFound": "La version %s correspondant à la version %s est introuvable", + "loc.messages.VersionNotAllowed": "La version %s n'est pas autorisée. Types de version autorisés : versionPrincipale.x, versionPrincipale.versionMineure.x, versionPrincipale.versionMineure.versionCorrectif. Plus de détails : %s", + "loc.messages.VersionsCanNotBeCompared": "Impossible de comparer les versions %s et %s. Les deux versions doivent être explicites.", + "loc.messages.FileNameNotCorrectCompleteFileName": "Le nom de fichier %s n'est pas un fichier '.complete' correct.", + "loc.messages.ChannelVersionsNotComparable": "Impossible de comparer les versions de canal %s et %s. Elles doivent comporter toutes les deux des numéros de version principale et mineure.", + "loc.messages.LookingForVersionInChannel": "Recherche de version dans le canal %s", + "loc.messages.FallingBackToAdjacentChannels": "La version %s est introuvable dans son canal. Exécution de la recherche dans les canaux adjacents.", + "loc.messages.ErrorWhileSettingDotNetToolPath": "Échec de l'ajout du chemin d'outils .Net Core au début de la variable d'environnement PATH. Erreur : %s", + "loc.messages.RequiredChannelVersionForSpec": "Recherche du canal %s pour la version %s", + "loc.messages.ErrorWhileGettingVersionFromChannel": "Échec de l'obtention de la version %s à partir du canal %s. Erreur : %s", + "loc.messages.ComparingInstalledFolderVersions": "Comparaison visant à déterminer si la version en cours d'installation (%s) est postérieure à la version installée pour le nom de dossier %s", + "loc.messages.ComparingInstalledFileVersions": "Comparaison visant à déterminer si la version en cours d'installation (%s) est postérieure à la version installée pour le nom de fichier complet %s", + "loc.messages.InvalidChannelObject": "Impossible d'utiliser l'objet en tant que canal. Des propriétés obligatoires telles que channel-version, releases.json sont manquantes.", + "loc.messages.ReleasesIndexBodyIncorrect": "Le corps de l'index des versions release analysées est incorrect. Vérifiez si la section releases-index n'est pas vide dans le fichier.", + "loc.messages.InvalidVersionObject": "Releases.json comporte une version release ayant un objet %s non valide : %s", + "loc.messages.InvalidVersion": "Version non valide spécifiée %s", + "loc.messages.FilesDataIsIncorrectInVersion": "Dans la version release %s de la version %s, des données de fichiers sont incorrectes (des champs obligatoires tels que nom, RID et URL sont peut-être manquants) : %s", + "loc.messages.VersionFilesDataIncorrect": "Des données de fichiers ou des champs obligatoires sont manquants pour la version.", + "loc.messages.VersionInformationNotComplete": "Les informations obligatoires de la version %s sont incomplètes dans le fichier releases.json. Erreur : %s", + "loc.messages.FailedWhileExtractingPacakge": "Échec de l'extraction du package téléchargé. Erreur : %s", + "loc.messages.InstallingNuGetVersion": "Installation de NuGet version %s", + "loc.messages.FailureWhileInstallingNuGetVersion": "Échec de l'installation de la version de NuGet. Erreur : %s", + "loc.messages.SettingUpNugetProxySettings": "Configuration du proxy pour NuGet.", + "loc.messages.GlobalJsonFound": "Fichier global.json trouvé dans le chemin %s", + "loc.messages.GlobalJsonSdkVersion": "Le kit SDK version %s est spécifié par global.json dans le chemin %s", + "loc.messages.GlobalJsonIsEmpty": "global.json dans le chemin %s est vide. Aucune version n'est spécifiée.", + "loc.messages.FailedToFindGlobalJson": "Échec de la localisation de global.json dans le chemin %s", + "loc.messages.FailedToReadGlobalJson": "Le fichier global.json situé dans le chemin '%s' n'est pas au format approprié. Pour plus d'informations sur global.json, accédez à l'adresse suivante : https://docs.microsoft.com/fr-fr/dotnet/core/tools/global-json. Erreur durant la tentative de lecture de %s", + "loc.messages.VersionNumberHasTheWrongFormat": "Le numéro de version %s n'est pas au format approprié. Vous pouvez spécifier les versions aux formats suivants : 2.x => Installe la dernière version dans la version principale. 2.2.x => Installe la dernière version dans la version principale et mineure. 2.2.104 => Installe la version exacte. Recherchez la valeur de 'version' pour l'installation du kit SDK/runtime dans le fichier releases.json. Le lien vers le fichier releases.json de cette version principale.mineure se trouve dans le [**fichier releases-index.**](https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json). De même, le lien vers releases.json pour la version 2.2 est https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/2.2/releases.json", + "loc.messages.OnlyExplicitVersionAllowed": "Seules les versions explicites et acceptées, par exemple 2.2.301. La version %s est non valide.", + "loc.messages.SupportPhaseNotPresentInChannel": "support-phase n'est pas présent dans le canal avec le channel-version %s.", + "loc.messages.DepricatedVersionNetCore": "La version de NET Core que vous avez spécifiée %s n’est pas prise en charge et sera bientôt supprimée des agents hébergés. Pour plus d’informations sur la stratégie de support .NET, consultez https://aka.ms/dotnet-core-support." +} \ No newline at end of file diff --git a/_generated/UseDotNetV2_Node16/Strings/resources.resjson/it-IT/resources.resjson b/_generated/UseDotNetV2_Node16/Strings/resources.resjson/it-IT/resources.resjson new file mode 100644 index 000000000000..a7ff7c22002a --- /dev/null +++ b/_generated/UseDotNetV2_Node16/Strings/resources.resjson/it-IT/resources.resjson @@ -0,0 +1,100 @@ +{ + "loc.friendlyName": "Usa .NET Core", + "loc.helpMarkDown": "[Altre informazioni su questa attività](https://aka.ms/AA4xgy0)", + "loc.description": "Acquisisce una versione specifica di .NET Core SDK da Internet o dalla cache locale e la aggiunge a PATH. Usare questa attività per cambiare la versione di .NET Core usata nelle attività successive. Fornisce anche il supporto per proxy.", + "loc.instanceNameFormat": "Usa .NET Core $(packageType) $(version)", + "loc.releaseNotes": "
  • Supporto per l'installazione di più versioni side-by-side.
  • Supporto per i criteri di recupero dell'ultima versione principale/secondaria.
  • Limitazione della ricerca multilivello
  • Installazione di NuGet e aggiunta del supporto per proxy.
  • Installa le versioni dell'SDK da file `global.json`
  • ", + "loc.group.displayName.advanced": "Avanzate", + "loc.input.label.packageType": "Pacchetto da installare", + "loc.input.help.packageType": "Scegliere se installare solo il runtime o l'SDK.", + "loc.input.label.useGlobalJson": "Usa JSON globale", + "loc.input.help.useGlobalJson": "Selezionare questa opzione per installare tutti gli SDK dai file global.json. Questi file vengono cercati da system.DefaultWorkingDirectory. È possibile modificare il percorso radice della ricerca impostando il valore di input della directory di lavoro.", + "loc.input.label.workingDirectory": "Directory di lavoro", + "loc.input.help.workingDirectory": "Consente di specificare il percorso da cui cercare i file global.json quando si usa l'attività `Usa JSON globale`. Se è vuoto, come percorso radice verrà usato `system.DefaultWorkingDirectory`.", + "loc.input.label.version": "Versione", + "loc.input.help.version": "Consente di specificare la versione di .NET Core SDK o il runtime da installare.
    È possibile specificare le versioni nei formati seguenti:
  • 2.x => Installa la versione principale più recente.
  • 2.2.x => Installa la versione principale e secondaria più recente
  • 2.2.104 => Installa la versione esatta

  • Individuare il valore di `version` per l'installazione di SDK/Runtime in releases.json. Il collegamento a releases.json della versione principale.secondaria è disponibile nel [**file releases-index**](https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json). Ad esempio, il collegamento a releases.json per la versione 2.2 è https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/2.2/releases.json", + "loc.input.label.vsVersion": "Versione di Visual Studio compatibile", + "loc.input.help.vsVersion": "Consente di specificare la versione di Visual Studio compatibile per cui installare .NET Core SDK. Specificare la versione di Visual Studio completa, ad esempio 16.6.4 che contiene il numero di versione principale, quello secondario e quello di patch. Trovare il valore di `version` per l'installazione di SDK/Runtime in releases.json. Il collegamento a releases.json di tale versione principale.secondaria è disponibile nel [**file releases-index**].(https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json)", + "loc.input.label.includePreviewVersions": "Includi versioni in anteprima", + "loc.input.help.includePreviewVersions": "Selezionare questa impostazione se si vuole che le versioni in anteprima vengano incluse durante la ricerca delle versioni più recenti, ad esempio durante la ricerca della versione 2.2.x. Questa impostazione viene ignorata se si specifica una versione esatta, ad esempio: 3.0.100-preview3-010431", + "loc.input.label.installationPath": "Percorso per l'installazione di .NET Core", + "loc.input.help.installationPath": "Specificare la posizione in cui installare .NET Core SDK/Runtime. I diversi percorsi diversi possono avere l'impatto seguente sul comportamento di .NET.
  • $(Agent.ToolsDirectory): con questo percorso la versione viene memorizzata nella cache dell'agente perché questa directory non viene pulita nelle pipeline. Tutte le pipeline in esecuzione nell'agente avranno accesso alle versioni installate in precedenza con l'agente.
  • $(Agent.TempDirectory): questo percorso garantisce che una pipeline non utilizzi alcuna versione memorizzata nella cache di .NET Core perché questa cartella viene pulita dopo ogni pipeline.
  • Qualsiasi altro percorso: è possibile configurare qualsiasi altro percorso purché accessibile al processo dell'agente. Questa impostazione comporterà la modifica dello stato del computer e influirà su tutti i processi in esecuzione.
    È anche possibile configurare l'impostazione per la ricerca multilivello, che consente di configurare l'esecuzione del probe dell'host .NET per una versione appropriata.", + "loc.input.label.performMultiLevelLookup": "Esegui ricerca multilivello", + "loc.input.help.performMultiLevelLookup": "Questo input è applicabile solo agli agenti basati su Windows. Consente di configurare il comportamento del processo host .NET per la ricerca di un framework condiviso appropriato.
  • impostazione deselezionata: il processo host potrà visualizzare solo le versioni presenti nella cartella specificata in questa attività.
  • impostazione selezionata: l'host proverà a cercare nei percorsi globali predefiniti usando la ricerca multilivello.
    I percorsi globali predefiniti sono:
    Per Windows:
    C:\\Program Files\\dotnet (processi a 64 bit)
    C:\\Program Files (x86)\\dotnet (processo a 32 bit)
  • Per altre informazioni, vedere [**QUI**](https://github.com/dotnet/core-setup/blob/master/Documentation/design-docs/multilevel-sharedfx-lookup.md).
    ", + "loc.messages.ToolFailed": "L'installazione dello strumento non è riuscita: %s", + "loc.messages.ImplicitVersionNotSupported": "La versione deve essere valida ed esplicita: %s", + "loc.messages.getMachinePlatformFailed": "Non è stato possibile ottenere i dettagli della piattaforma del computer. Errore: %s.", + "loc.messages.getDownloadUrlsFailed": "Non è stato possibile recuperare gli URL di download. Errore: %s.", + "loc.messages.UsingCachedTool": "Esiste una copia di .NET Core memorizzata nella cache. Non è necessario installarla di nuovo. Percorso dello strumento memorizzato nella cache: %s.", + "loc.messages.CheckingToolCache": "Verifica dell'esistenza di una copia memorizzata nella cache per questa versione...", + "loc.messages.InstallingAfresh": "La cache non contiene la versione richiesta di .NET Core. Verrà scaricata e installata ora.", + "loc.messages.GettingDownloadUrl": "Recupero dell'URL per scaricare .NET Core %s versione %s.", + "loc.messages.CouldNotDetectPlatform": "Non è stato possibile rilevare il sistema operativo del computer", + "loc.messages.NullDownloadUrls": "Non è stato possibile costruire l'URL di download. Assicurarsi che la versione specificata %s sia valida.", + "loc.messages.DownloadingUrl": "Download del pacchetto .NET Core dall'URL %s", + "loc.messages.ExtractingPackage": "Estrazione del pacchetto scaricato %s.", + "loc.messages.CachingTool": "Questo strumento installato verrà memorizzato nella cache.", + "loc.messages.SuccessfullyInstalled": ".NET Core %s versione %s è stato installato.", + "loc.messages.ToolToInstall": "Strumento da installare: .NET Core %s versione %s.", + "loc.messages.PrimaryPlatform": "Piattaforma rilevata (primaria): %s", + "loc.messages.LegacyPlatform": "Piattaforma rilevata (legacy): %s", + "loc.messages.CouldNotDownload": "Non è stato possibile scaricare il pacchetto di installazione da questo URL: %s Errore: %s", + "loc.messages.FailedToDownloadPackage": "Non è stato possibile scaricare il pacchetto per l'installazione", + "loc.messages.PrependGlobalToolPath": "Creazione del percorso strumenti globale e aggiunta del percorso prima di PATH.", + "loc.messages.VersionsFileMalformed": "Il formato dei collegamenti di download della versione specificata non è corretto nel documento delle versioni supportate => %s/", + "loc.messages.MatchingVersionNotFound": "Non è stata trovata alcuna versione %s corrispondente per la versione specificata %s. Tenere presente che le versioni in anteprima vengono considerate nelle ricerche delle versioni più recenti solo se la casella di controllo Includi versioni in anteprima è selezionata.", + "loc.messages.UnableToAccessPath": "Non è possibile accedere al percorso %s. Errore: %s. Assicurarsi che il processo dell'agente possa accedere al percorso.", + "loc.messages.VersionCanNotBeDownloadedFromUrl": "Non è possibile scaricare la versione %s dall'URL %s. Il valore dell'URL o della versione non è corretto.", + "loc.messages.CopyingFoldersIntoPath": "Copia di tutte le cartelle radice nel percorso di installazione: %s", + "loc.messages.CopyingFilesIntoPath": "Copia dei file radice (ad esempio dotnet.exe) nel percorso di installazione: %s", + "loc.messages.FailedToCopyTopLevelFiles": "Non è stato possibile copiare i file radice nel percorso di installazione: %s. Errore: %s", + "loc.messages.FailedWhileInstallingVersionAtPath": "Si è verificato un errore durante l'installazione della versione %s nel percorso %s. Errore: %s", + "loc.messages.ExplicitVersionRequired": "La versione %s non è consentita. Le versioni da installare devono essere specificate nel formato principale.secondaria.versionepatch. Ad esempio: 2.2.1", + "loc.messages.VersionFoundInCache": "La versione %s è stata trovata nella cache.", + "loc.messages.VersionNotFoundInCache": "La versione %s non è stata trovata nella cache.", + "loc.messages.CreatingInstallationCompeleteFile": "Creazione del file indicatore di installazione completato per .NET Core %s versione %s", + "loc.messages.CannotFindRuntimeVersionForCompletingInstallation": "Non è possibile trovare la versione del runtime per il tipo di pacchetto %s con versione %s", + "loc.messages.PathNotFoundException": "Non è stato possibile individuare/trovare il percorso %s. Assicurarsi che sia esistente.", + "loc.messages.VersionIsLocalLatest": "La versione %s è l'ultima tra le versioni presenti nel percorso %s", + "loc.messages.VersionIsNotLocalLatest": "La versione %s non è l'ultima tra le versioni presenti in %s", + "loc.messages.DownloadUrlForMatchingOsNotFound": "Non è stato possibile trovare l'URL di download di .NET Core %s versione %s per le piattaforme del sistema operativo seguenti (RID): %s", + "loc.messages.ExceptionWhileDownloadOrReadReleasesIndex": "Non è stato possibile scaricare o analizzare releases-index.json. Errore: %s", + "loc.messages.MatchingVersionForUserInputVersion": "La versione %s per l'identificatore di versione specificato dall'utente è stata trovata nel canale %s: %s", + "loc.messages.UrlForReleaseChannelNotFound": "Non è stato possibile trovare l'URL del file releases.json della versione del canale: %s", + "loc.messages.NoSuitableChannelWereFound": "Non è stato possibile trovare il canale corrispondente alla versione %s.", + "loc.messages.DetectingPlatform": "Rilevamento della piattaforma del sistema operativo per individuare il pacchetto di download corretto per il sistema operativo.", + "loc.messages.FailedInDetectingMachineArch": "Si è verificato un errore durante il rilevamento della piattaforma del sistema operativo del computer. Errore: %s", + "loc.messages.runtimeVersionPropertyNotFound": "Non è stato possibile trovare la proprietà runtime-version per .NET Core %s versione %s.", + "loc.messages.VersionNotFound": "Non è stato possibile trovare la versione %s corrispondente a %s", + "loc.messages.VersionNotAllowed": "La versione %s non è consentita. I tipi di versione consentiti sono: versionePrincipale.x, versionePrincipale.versioneSecondaria.x, versionePrincipale.versioneSecondaria.versionePatch. Maggiori dettagli: %s", + "loc.messages.VersionsCanNotBeCompared": "Non è possibile confrontare le versioni %s e %s. Entrambe le versioni devono essere esplicite.", + "loc.messages.FileNameNotCorrectCompleteFileName": "Il nome file %s non corrisponde a un file '.complete' corretto.", + "loc.messages.ChannelVersionsNotComparable": "Non è possibile confrontare le versioni %s e %s del canale. Devono includere entrambe versioni numeriche principali e secondarie.", + "loc.messages.LookingForVersionInChannel": "Ricerca della versione nel canale %s", + "loc.messages.FallingBackToAdjacentChannels": "Non è stato possibile trovare la versione %s nel relativo canale. Verrà eseguita la ricerca nei canali adiacenti.", + "loc.messages.ErrorWhileSettingDotNetToolPath": "Si è verificato un errore durante l'aggiunta del percorso dello strumento .NET Core alla variabile di ambiente PATH. Errore: %s", + "loc.messages.RequiredChannelVersionForSpec": "Ricerca del canale %s per la versione %s", + "loc.messages.ErrorWhileGettingVersionFromChannel": "Si è verificato un errore durante il recupero della versione %s dal canale %s. Errore: %s", + "loc.messages.ComparingInstalledFolderVersions": "Verrà eseguito un confronto per verificare se la versione %s da installare è successiva a una versione già installata con nome di cartella %s", + "loc.messages.ComparingInstalledFileVersions": "Verrà eseguito un confronto per verificare se la versione %s da installare è successiva a una versione già installata con nome file completo %s", + "loc.messages.InvalidChannelObject": "Non è possibile usare l'oggetto come canale. Mancano proprietà obbligatorie, come channel-version in releases.json.", + "loc.messages.ReleasesIndexBodyIncorrect": "Il corpo dell'indice delle versioni analizzato non è corretto. Verificare se la sezione releases-index non è vuota nel file.", + "loc.messages.InvalidVersionObject": "Il file releases.json contiene una versione con oggetto %s non valido: %s", + "loc.messages.InvalidVersion": "La versione specificata %s non è valida", + "loc.messages.FilesDataIsIncorrectInVersion": "Nella versione %s per la versione %s i dati dei file non sono corretti (potrebbero mancare campi obbligatori, come nome, RID e URL): %s", + "loc.messages.VersionFilesDataIncorrect": "I dati dei file della versione non sono presenti o non includono campi obbligatori.", + "loc.messages.VersionInformationNotComplete": "Le informazioni obbligatorie della versione %s non sono complete nel file releases.json. Errore: %s", + "loc.messages.FailedWhileExtractingPacakge": "Si è verificato un errore durante l'estrazione del pacchetto scaricato. Errore: %s", + "loc.messages.InstallingNuGetVersion": "Installazione della versione %s di NuGet", + "loc.messages.FailureWhileInstallingNuGetVersion": "Si è verificato un errore durante l'installazione della versione di NuGet. Errore: %s", + "loc.messages.SettingUpNugetProxySettings": "Impostazione della configurazione proxy per NuGet.", + "loc.messages.GlobalJsonFound": "È stato trovato un file global.json nel percorso %s", + "loc.messages.GlobalJsonSdkVersion": "La versione %s dell'SDK è specificata dal file global.json nel percorso %s", + "loc.messages.GlobalJsonIsEmpty": "Il file global.json nel percorso %s è vuoto. Non è stata specificata alcuna versione.", + "loc.messages.FailedToFindGlobalJson": "Non è stato possibile trovare il file global.json nel percorso: %s", + "loc.messages.FailedToReadGlobalJson": "Il formato del file global.json nel percorso '%s' non è corretto. Per informazioni su global.json, vedere https://docs.microsoft.com/it-it/dotnet/core/tools/global-json. Si è verificato un errore durante il tentativo di lettura di %s", + "loc.messages.VersionNumberHasTheWrongFormat": "Il formato del numero di versione %s non è corretto. È possibile specificare le versioni nei formati seguenti: 2.x => Installa la versione principale più recente. 2.2.x => Installa la versione principale e secondaria più recente. 2.2.104 => Installa la versione esatta. Individuare il valore di `version` per l'installazione di SDK/Runtime in releases.json. Il collegamento a releases.json della versione principale.secondaria è disponibile nel [**file releases-index**](https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json). Ad esempio, il collegamento a releases.json per la versione 2.2 è https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/2.2/releases.json", + "loc.messages.OnlyExplicitVersionAllowed": "Sono accettate solo versioni esplicite, ad esempio 2.2.301. La versione %s non è valida.", + "loc.messages.SupportPhaseNotPresentInChannel": "support-phase non è presente nel canale con channel-version %s.", + "loc.messages.DepricatedVersionNetCore": "La versione NET Core specificata %s non è supportata e verrà rimossa a breve dagli agenti ospitati. Per altre informazioni sui criteri di supporto .NET, vedere https://aka.ms/dotnet-core-support." +} \ No newline at end of file diff --git a/_generated/UseDotNetV2_Node16/Strings/resources.resjson/ja-JP/resources.resjson b/_generated/UseDotNetV2_Node16/Strings/resources.resjson/ja-JP/resources.resjson new file mode 100644 index 000000000000..3ce9a6b657dc --- /dev/null +++ b/_generated/UseDotNetV2_Node16/Strings/resources.resjson/ja-JP/resources.resjson @@ -0,0 +1,100 @@ +{ + "loc.friendlyName": ".Net Core の使用", + "loc.helpMarkDown": "[このタスクの詳細を表示](https://aka.ms/AA4xgy0)", + "loc.description": ".NET Core SDK の特定のバージョンをインターネットまたはローカル キャッシュから取得し、PATH に追加します。このタスクを使用して、後続のタスクで使用されている .NET Core のバージョンを変更します。さらに、プロキシのサポートも提供します。", + "loc.instanceNameFormat": ".NET Core $(packageType) $(version) の使用", + "loc.releaseNotes": "
  • 複数のバージョンを同時にインストールするためのサポート。
  • 最新のマイナーまたはメジャー バージョンをフェッチするためのバージョンのパターンのサポート。
  • マルチレベル検索を制限する
  • NuGet をインストールしてプロキシ サポートを制限する。
  • `global.json` ファイルから SDK のバージョンをインストールする
  • ", + "loc.group.displayName.advanced": "詳細設定", + "loc.input.label.packageType": "インストールするパッケージ", + "loc.input.help.packageType": "ランタイムのみをインストールするか、SDK をインストールするかを選択してください。", + "loc.input.label.useGlobalJson": "グローバル JSON を使用する", + "loc.input.help.useGlobalJson": "すべての SDK を global.json ファイルからインストールするには、このオプションを選択します。これらのファイルは system.DefaultWorkingDirectory から検索されます。検索ルート パスを変更するには、作業ディレクトリの入力を設定します。", + "loc.input.label.workingDirectory": "作業ディレクトリ", + "loc.input.help.workingDirectory": "`Use global json` を使用する際に、global.json ファイルを検索するパスを指定します。空の場合、`system.DefaultWorkingDirectory` がルート パスと見なされます。", + "loc.input.label.version": "バージョン", + "loc.input.help.version": "インストールする .NET Core SDK またはランタイムのバージョンを指定します。
    バージョンは以下の形式で指定できます
  • 2.x => メジャー バージョンが最新のものをインストールします。
  • 2.2.x => メジャー バージョンとマイナー バージョンが最新のものをインストールします
  • 2.2.104 => バージョンが正確に一致するものをインストールします

  • SDK またはランタイムをインストールするために release.json で `version` の値を探します。その major.minor バージョンの releases.json へのリンクは [**releases-index ファイル**](https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json) からわかります。たとえば、2.2 バージョンの releases.json へのリンクは https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/2.2/releases.json です", + "loc.input.label.vsVersion": "互換性のある Visual Studio バージョン", + "loc.input.help.vsVersion": ".NET Core SDK をインストールする、互換性のある Visual Studio のバージョンを指定します。メジャー バージョン、マイナー バージョン、パッチ番号を含む 16.6.4 などの完全な VS バージョンを指定します。releases.jsから SDK またはランタイムをインストールするための 'version' の値を検索します。この major.minor バージョンの releases.js へのリンクは、[**releases-index ファイル**](https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json)にあります。", + "loc.input.label.includePreviewVersions": "プレビュー バージョンを含める", + "loc.input.help.includePreviewVersions": "2.2.x を検索するときのように最新バージョンを検索するときにプレビュー バージョンを含める場合に選択します。次のように正確なバージョンを指定する場合、この設定は無視されます: 3.0.100-preview3-010431", + "loc.input.label.installationPath": ".Net Core をインストールするパス", + "loc.input.help.installationPath": ".NET Core SDK/ランタイムのインストール場所を指定します。各パスは、.Net の動作に次のような影響を与える可能性があります。
  • $(Agent.ToolsDirectory): このディレクトリはパイプライン間でクリーンアップされないため、この場合、バージョンがエージェントにキャッシュされます。エージェントで実行されるパイプラインはすべて、エージェントを使用して既にインストールされているバージョンにアクセスすることができます。
  • $(Agent.TempDirectory): このフォルダーは各パイプラインの後にクリーンアップされるので、この場合、キャッシュされた .Net Core バージョンがパイプラインで使用されないようにすることができます。
  • それ以外のすべてのパス: エージェント プロセスで他のいずれかのパスにアクセスできる場合は、そのパスを構成できます。これによってマシンの状態が変更され、それを実行しているすべてのプロセスに影響を与えます。
    適切なバージョンの .Net ホストの調査を構成できる複数レベルのルックアップ設定を構成することもできます。", + "loc.input.label.performMultiLevelLookup": "複数レベルの検索を実行", + "loc.input.help.performMultiLevelLookup": "この入力は、Windows ベースのエージェントにのみ適用されます。これは、適切な共有フレームワークを検索するための .NET ホスト プロセスの動作を構成します。
  • オフ: このタスクで指定されたフォルダーに存在するバージョンのみがホスト プロセスによって検索されます。
  • オン: ホストは、複数レベルのルックアップを使用した事前定義されたグローバルな場所の検索を試みます。
    既定のグローバルな場所は、次のとおりです:
    Windows の場合:
    C:\\Program Files\\dotnet (64 ビット プロセス)
    C:\\Program Files (x86)\\dotnet (32 ビット プロセス)
  • これについて詳しくは、[**こちら**](https://github.com/dotnet/core-setup/blob/master/Documentation/design-docs/multilevel-sharedfx-lookup.md)をご覧ください。
    ", + "loc.messages.ToolFailed": "ツールをインストールできませんでした: %s", + "loc.messages.ImplicitVersionNotSupported": "バージョンは、有効で明示的なバージョンである必要があります: %s", + "loc.messages.getMachinePlatformFailed": "マシンのプラットフォームの詳細を取得できませんでした。エラー: %s。", + "loc.messages.getDownloadUrlsFailed": "ダウンロード URL を取得できませんでした。エラー: %s。", + "loc.messages.UsingCachedTool": ".NET Core のキャッシュ済みのコピーが存在します。新しくインストールする必要はありません。キャッシュされたツールの場所は %s です。", + "loc.messages.CheckingToolCache": "このバージョンのキャッシュ済みコピーが存在するかどうか確認しています...", + "loc.messages.InstallingAfresh": "キャッシュに要求されたバージョンの .NET Core が含まれていません。ダウンロードしてインストールしています。", + "loc.messages.GettingDownloadUrl": ".NET Core %s バージョンをダウンロードする URL を取得しています: %s。", + "loc.messages.CouldNotDetectPlatform": "マシンの OS を検出できませんでした", + "loc.messages.NullDownloadUrls": "ダウンロード URL を作成できませんでした。指定されたバージョン %s が有効であることをご確認ください。", + "loc.messages.DownloadingUrl": "URL から .NET Core パッケージをダウンロードしています: %s", + "loc.messages.ExtractingPackage": "ダウンロードされたパッケージ %s を抽出しています。", + "loc.messages.CachingTool": "このインストール済みのツールをキャッシュしています。", + "loc.messages.SuccessfullyInstalled": ".NET Core %s バージョン %s が正常にインストールされました。", + "loc.messages.ToolToInstall": "インストールするツール: .NET Core %s バージョン %s。", + "loc.messages.PrimaryPlatform": "検出されたプラットフォーム (プライマリ): %s", + "loc.messages.LegacyPlatform": "検出されたプラットフォーム (レガシ): %s", + "loc.messages.CouldNotDownload": "次の URL からインストール パッケージをダウンロードできませんでした: %s。エラー: %s", + "loc.messages.FailedToDownloadPackage": "インストール用のパッケージをダウンロードできませんでした", + "loc.messages.PrependGlobalToolPath": "グローバル ツール パスを作成し、パスの先頭に追加しています。", + "loc.messages.VersionsFileMalformed": "指定されたバージョンのダウンロード リンクが、サポートされているバージョンのドキュメントの正しい形式ではありません => %s/ ", + "loc.messages.MatchingVersionNotFound": "次の指定バージョンと一致する %s バージョンが見つかりませんでした: %s。[プレビュー バージョンを含める] チェック ボックスがオンの場合、プレビュー バージョンは最新バージョンの検索でのみ考慮されます。", + "loc.messages.UnableToAccessPath": "パス %s にアクセスできません。エラー: %s。エージェント プロセスにそのパスへのアクセス権があることを確認してください。", + "loc.messages.VersionCanNotBeDownloadedFromUrl": "バージョン: %s を URL: %s からダウンロードできません。URL またはバージョンのいずれかが正しくありません。", + "loc.messages.CopyingFoldersIntoPath": "すべてのルート フォルダーを次のインストール パスにコピーしています: %s", + "loc.messages.CopyingFilesIntoPath": "ルート ファイル (dotnet.exe など) を次のインストール パスにコピーしています: %s", + "loc.messages.FailedToCopyTopLevelFiles": "ルート ファイルを次のインストール パスにコピーできませんでした: %s。エラー: %s", + "loc.messages.FailedWhileInstallingVersionAtPath": "パス: %s のバージョン: %s のインストール中、次のエラーで失敗しました: %s", + "loc.messages.ExplicitVersionRequired": "バージョン: %s は許可されていません。インストールするバージョンは、次の形式にする必要があります: major.minor.patchversion。例: 2.2.1", + "loc.messages.VersionFoundInCache": "バージョン: %s がキャッシュに見つかりました。", + "loc.messages.VersionNotFoundInCache": "バージョン %s がキャッシュに見つかりませんでした。", + "loc.messages.CreatingInstallationCompeleteFile": ".Net Core %s バージョン %s のインストールの完了マーカー ファイルを作成しています", + "loc.messages.CannotFindRuntimeVersionForCompletingInstallation": "パッケージの種類: %s、バージョン: %s のランタイム バージョンが見つかりません", + "loc.messages.PathNotFoundException": "パス: %s が見つかりませんでした。パスが存在することを確認してください。", + "loc.messages.VersionIsLocalLatest": "バージョン: %s は、パス: %s に存在するバージョン間で最新です。", + "loc.messages.VersionIsNotLocalLatest": "バージョン: %s は、%s に存在する最新のバージョンではありません", + "loc.messages.DownloadUrlForMatchingOsNotFound": "次の OS プラットフォーム (rid) の .Net Core %s バージョン %s のダウンロード URL が見つかりませんでした: %s", + "loc.messages.ExceptionWhileDownloadOrReadReleasesIndex": "releases-index.json のダウンロードまたは解析に失敗しました。エラー: %s", + "loc.messages.MatchingVersionForUserInputVersion": "次のユーザー指定バージョン仕様のチャネル %s でバージョン %s が見つかりました: %s", + "loc.messages.UrlForReleaseChannelNotFound": "次のチャネル バージョンの release.json の URL が見つかりませんでした: %s", + "loc.messages.NoSuitableChannelWereFound": "バージョン %s に対応するチャネルが見つかりませんでした。", + "loc.messages.DetectingPlatform": "OS に対して正しいダウンロード パッケージを見つけるために OS プラットフォームを検出しています。", + "loc.messages.FailedInDetectingMachineArch": "マシン OS プラットフォームの検出中、次のエラーで失敗しました: %s", + "loc.messages.runtimeVersionPropertyNotFound": ".Net Core %s バージョン %s の runtime-version プロパティが見つかりませんでした。", + "loc.messages.VersionNotFound": "%s バージョンの一致: %s が見つかりませんでした", + "loc.messages.VersionNotAllowed": "バージョン %s は許可されていません。許可されているバージョンの種類は、majorVersion.x、majorVersion.minorVersion.x、majorVersion.minorVersion.patchVersion です。詳細情報: %s", + "loc.messages.VersionsCanNotBeCompared": "バージョン %s と %s を比較できません。両方のバージョンを明示的に指定する必要があります。", + "loc.messages.FileNameNotCorrectCompleteFileName": "ファイル名 %s は正しい '.complete' ファイルではありません。", + "loc.messages.ChannelVersionsNotComparable": "チャネルのバージョン %s と %s を比較できません。両方とも数値のメジャー バージョンとマイナー バージョンが必要です。", + "loc.messages.LookingForVersionInChannel": "チャネル %s のバージョンを検索しています", + "loc.messages.FallingBackToAdjacentChannels": "バージョン %s がそのチャネルで見つかりませんでした。隣接するチャネルを検索します。", + "loc.messages.ErrorWhileSettingDotNetToolPath": ".Net Core Tool パスを PATH 環境変数の先頭に追加しているときに失敗しました。エラー: %s", + "loc.messages.RequiredChannelVersionForSpec": "バージョン %s のチャネル %s を検索しています", + "loc.messages.ErrorWhileGettingVersionFromChannel": "チャネル %s からのバージョン %s の取得中、次のエラーで失敗しました: %s", + "loc.messages.ComparingInstalledFolderVersions": "インストールされるバージョン %s が、フォルダー名 %s の既にインストールされているバージョンより後のものかどうかを比較しています", + "loc.messages.ComparingInstalledFileVersions": "インストールされるバージョン %s が、version complete ファイル名 %s の既にインストールされているバージョンより後のものかどうかを比較しています", + "loc.messages.InvalidChannelObject": "オブジェクトをチャネルとして使用することはできません。channel-version、release. json などの必須プロパティがありません。", + "loc.messages.ReleasesIndexBodyIncorrect": "解析されたリリース インデックス本体が正しくありません。ファイルの releases-index セクションが空でないかどうかを確認してください。", + "loc.messages.InvalidVersionObject": "releases.json には、無効な %s オブジェクトを含むリリースが含まれています: %s", + "loc.messages.InvalidVersion": "指定されたバージョン %s が無効です", + "loc.messages.FilesDataIsIncorrectInVersion": "リリース %s (バージョン %s) のファイル データが正しくありません (name、rid、および url などの必須フィールドが存在していない可能性があります): %s", + "loc.messages.VersionFilesDataIncorrect": "バージョンのファイル データがないか、必須フィールドがありません。", + "loc.messages.VersionInformationNotComplete": "バージョン: %s で必要な情報が releases.json ファイルで不足しています。エラー: %s", + "loc.messages.FailedWhileExtractingPacakge": "ダウンロードされたパッケージの抽出中、次のエラーで失敗しました: %s", + "loc.messages.InstallingNuGetVersion": "NuGet バージョン %s をインストールしています", + "loc.messages.FailureWhileInstallingNuGetVersion": "NuGet バージョンのインストール中にエラーが発生しました。エラー: %s", + "loc.messages.SettingUpNugetProxySettings": "NuGet のプロキシ構成を設定しています。", + "loc.messages.GlobalJsonFound": "パス %s に global.json が見つかりました", + "loc.messages.GlobalJsonSdkVersion": "SDK バージョン %s が、パス %s の global.json で指定されています", + "loc.messages.GlobalJsonIsEmpty": "パス %s にある global.json が空です。バージョンが指定されていません。", + "loc.messages.FailedToFindGlobalJson": "パス %s およびその内部に global.json が見つかりませんでした", + "loc.messages.FailedToReadGlobalJson": "パス '%s' にある global.json の形式が正しくありません。global.json の詳細については、https://docs.microsoft.com/ja-jp/dotnet/core/tools/global-json をご覧ください。%s の読み取り中にエラーが発生しました", + "loc.messages.VersionNumberHasTheWrongFormat": "バージョン番号 %s の形式が正しくありません。バージョンは次の形式で指定できます。2.x => メジャー バージョンが最新のものをインストールします。2.2.x => メジャー バージョンとマイナー バージョンが最新のものをインストールします。2.2.104 => バージョンが正確に一致するものをインストールします。SDK またはランタイムのインストール用の 'version' の値を release.json で探します。その major.minor バージョンの releases.json へのリンクは [**releases-index ファイル**](https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json) からわかります。たとえば、2.2 バージョンの releases.json へのリンクは https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/2.2/releases.json です", + "loc.messages.OnlyExplicitVersionAllowed": "2.2.301 など、明示的なバージョンのみが許可されます。バージョン %s は有効ではありません。", + "loc.messages.SupportPhaseNotPresentInChannel": "サポート フェーズがチャネル バージョン %s のチャネルにありません。", + "loc.messages.DepricatedVersionNetCore": "指定された %s の .NET Core バージョンはサポートが終了しており、ホストされているエージェントからまもなく削除される予定です。.NET サポート ポリシーの詳細については、https://aka.ms/dotnet-core-support を参照してください。" +} \ No newline at end of file diff --git a/_generated/UseDotNetV2_Node16/Strings/resources.resjson/ko-KR/resources.resjson b/_generated/UseDotNetV2_Node16/Strings/resources.resjson/ko-KR/resources.resjson new file mode 100644 index 000000000000..bd184723da88 --- /dev/null +++ b/_generated/UseDotNetV2_Node16/Strings/resources.resjson/ko-KR/resources.resjson @@ -0,0 +1,100 @@ +{ + "loc.friendlyName": ".NET Core 사용", + "loc.helpMarkDown": "[이 작업에 대한 자세한 정보](https://aka.ms/AA4xgy0)", + "loc.description": "인터넷 또는 로컬 캐시에서 특정 버전의 .NET Core SDK를 가져와 PATH에 추가합니다. 이 작업을 사용하여 후속 작업에 사용되는 .NET Core 버전을 변경할 수 있습니다. 프록시 지원도 제공합니다.", + "loc.instanceNameFormat": ".NET Core $(packageType) $(version) 사용", + "loc.releaseNotes": "
  • 여러 버전을 나란히 설치할 수 있습니다.
  • 부/주 버전에서 최신 패턴을 가져오도록 버전의 패턴을 지원합니다.
  • 다단계 조회 제한
  • NuGet을 설치하고 프록시 지원을 제공합니다.
  • 'global.json' 파일에서 sdk 버전을 설치합니다.
  • ", + "loc.group.displayName.advanced": "고급", + "loc.input.label.packageType": "설치할 패키지", + "loc.input.help.packageType": "런타임만 설치할지 또는 SDK를 설치할지 선택합니다.", + "loc.input.label.useGlobalJson": "전역 json 사용", + "loc.input.help.useGlobalJson": "global.json 파일에서 모든 SDK를 설치하려면 이 옵션을 선택합니다. 이러한 파일은 system.DefaultWorkingDirectory에서 검색됩니다. 작업 디렉터리 입력을 설정하여 검색 루트 경로를 변경할 수 있습니다.", + "loc.input.label.workingDirectory": "작업 디렉터리", + "loc.input.help.workingDirectory": "'전역 json 사용'을 사용할 때 global.json 파일을 검색할 경로를 지정합니다. 비워 두면 `system.DefaultWorkingDirectory`가 루트 경로로 간주됩니다.", + "loc.input.label.version": "버전", + "loc.input.help.version": "설치할 .NET Core SDK 또는 런타임 버전을 지정합니다.
    다음 형식으로 버전을 지정할 수 있습니다.
  • 2.x => 주 버전으로 최신 버전을 설치합니다.
  • 2.2.x => 주 버전과 부 버전으로 최신 버전을 설치합니다.
  • 2.2.104 => 정확한 버전을 설치합니다.

  • releases.json에서 SDK/런타임을 설치할 '버전' 값을 찾습니다. 해당 major.minor 버전의 releases.json 링크는 [**releases-index 파일**](https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json)에서 확인할 수 있습니다. 예를 들어 2.2 버전의 releases.json 링크는 https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/2.2/releases.json입니다.", + "loc.input.label.vsVersion": "호환되는 Visual Studio 버전", + "loc.input.help.vsVersion": ".NET Core SDK를 설치할 호환되는 Visual Studio의 버전을 지정합니다. 16.6.4처럼 주 버전, 부 버전 및 패치 번호가 포함된 전체 VS 버전을 지정합니다. releases.json에서 SDK/런타임을 설치하기 위해 '버전' 값을 찾으세요. 해당 주.부 버전의 releases.json 링크는 [**releases-index 파일**](https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json)에서 찾을 수 있습니다.", + "loc.input.label.includePreviewVersions": "미리 보기 버전 포함", + "loc.input.help.includePreviewVersions": "최신 버전을 검색할 때(예: 2.2.x 검색) 미리 보기 버전을 포함하려면 선택합니다. 정확한 버전(예: 3.0.100-preview3-010431)을 지정하는 경우 이 설정은 무시됩니다.", + "loc.input.label.installationPath": ".NET Core 설치 경로", + "loc.input.help.installationPath": ".NET Core SDK/런타임을 설치할 위치를 지정합니다. 경로에 따라 .NET의 동작에 다음과 같은 영향을 줄 수 있습니다.
  • $(Agent.ToolsDirectory): 이 디렉터리는 파이프라인 간에 정리되지 않으므로 버전이 에이전트에 캐시되도록 합니다. 에이전트에서 실행되는 모든 파이프라인이 이전에 해당 에이전트를 사용하여 설치된 버전에 액세스할 수 있습니다.
  • $(Agent.TempDirectory): 이 폴더는 각 파이프라인 후에 정리되므로 파이프라인에서 캐시된 .NET Core 버전을 사용하지 않도록 할 수 있습니다.
  • 다른 모든 경로: 에이전트 프로세스에서 경로에 액세스할 수 있기만 하면 다른 경로를 구성할 수 있습니다. 이렇게 하면 머신의 상태가 변경되고 머신에서 실행되는 모든 프로세스에 영향을 줍니다.
    적합한 버전에 대해 .NET 호스트 프로빙을 구성할 수 있는 다단계 조회 설정을 구성할 수도 있습니다.", + "loc.input.label.performMultiLevelLookup": "다단계 조회 수행", + "loc.input.help.performMultiLevelLookup": "이 입력은 Windows 기반 에이전트에만 해당합니다. 적합한 공유 프레임워크를 찾기 위한 .NET 호스트 프로세스의 동작을 구성합니다.
  • 선택 취소됨: 호스트 프로세스에서 이 작업에 지정된 폴더에 있는 버전만 확인합니다.
  • 선택됨: 호스트가 다단계 조회를 사용하여 미리 정의된 전역 위치에서 찾습니다.
    기본 전역 위치는 다음과 같습니다.
    Windows:
    C:\\Program Files\\dotnet(64비트 프로세스)
    C:\\Program Files (x86)\\dotnet(32비트 프로세스)
  • [**여기**](https://github.com/dotnet/core-setup/blob/master/Documentation/design-docs/multilevel-sharedfx-lookup.md)에서 자세한 정보를 확인할 수 있습니다.
    ", + "loc.messages.ToolFailed": "도구 설치 실패: %s", + "loc.messages.ImplicitVersionNotSupported": "버전은 유효하고 명시적인 버전(%s)이어야 합니다.", + "loc.messages.getMachinePlatformFailed": "머신 플랫폼 정보를 가져오지 못했습니다. 오류: %s.", + "loc.messages.getDownloadUrlsFailed": "다운로드 URL을 가져오지 못했습니다. 오류: %s.", + "loc.messages.UsingCachedTool": ".NET Core의 캐시된 복사본이 있습니다. 새로 설치하지 않아도 됩니다. 캐시된 도구 위치: %s.", + "loc.messages.CheckingToolCache": "이 버전에 대해 캐시된 복사본이 있는지 확인 중...", + "loc.messages.InstallingAfresh": "캐시에 요청된 .NET Core 버전이 없습니다. 지금 다운로드하여 설치합니다.", + "loc.messages.GettingDownloadUrl": ".NET Core %s 버전, %s을(를) 다운로드할 URL을 가져오는 중입니다.", + "loc.messages.CouldNotDetectPlatform": "머신의 OS를 검색할 수 없습니다.", + "loc.messages.NullDownloadUrls": "다운로드 URL을 생성할 수 없습니다. 지정한 버전 %s이(가) 유효한지 확인하세요.", + "loc.messages.DownloadingUrl": "URL %s에서 .NET Core 패키지를 다운로드하는 중", + "loc.messages.ExtractingPackage": "다운로드한 패키지 %s의 압축을 푸는 중입니다.", + "loc.messages.CachingTool": "설치된 이 도구를 캐싱하는 중입니다.", + "loc.messages.SuccessfullyInstalled": ".NET Core %s 버전 %s을(를) 설치했습니다.", + "loc.messages.ToolToInstall": "설치할 도구: .NET Core %s 버전 %s.", + "loc.messages.PrimaryPlatform": "검색된 플랫폼(기본): %s", + "loc.messages.LegacyPlatform": "검색된 플랫폼(레거시): %s", + "loc.messages.CouldNotDownload": "이 URL %s에서 설치 패키지를 다운로드할 수 없습니다. 오류: %s", + "loc.messages.FailedToDownloadPackage": "설치할 패키지를 다운로드하지 못했습니다.", + "loc.messages.PrependGlobalToolPath": "전역 도구 경로를 만들어 PATH 앞에 추가하는 중입니다.", + "loc.messages.VersionsFileMalformed": "지정한 버전의 다운로드 링크가 지원되는 버전 문서에서 올바르게 구성되지 않았습니다. => %s/", + "loc.messages.MatchingVersionNotFound": "일치하는 %s 버전을 찾을 수 없습니다. 지정한 버전은 %s입니다. [미리 보기 버전 포함] 확인란을 선택한 경우에만 최신 버전 검색에서 미리 보기 버전이 고려됩니다.", + "loc.messages.UnableToAccessPath": "%s 경로에 액세스할 수 없습니다. 오류: %s \n 에이전트 프로세스에 경로에 대한 액세스 권한이 있는지 확인하세요.", + "loc.messages.VersionCanNotBeDownloadedFromUrl": "%s 버전을 URL %s에서 다운로드할 수 없습니다. URL 또는 버전이 잘못되었습니다.", + "loc.messages.CopyingFoldersIntoPath": "모든 루트 폴더를 설치 경로 %s에 복사하는 중", + "loc.messages.CopyingFilesIntoPath": "루트 파일(예: dotnet.exe)을 설치 경로 %s에 복사하는 중", + "loc.messages.FailedToCopyTopLevelFiles": "루트 파일을 설치 경로 %s에 복사하지 못했습니다. 오류: %s", + "loc.messages.FailedWhileInstallingVersionAtPath": "%s 버전을 %s 경로에 설치하지 못했습니다. 오류: %s", + "loc.messages.ExplicitVersionRequired": "%s 버전은 허용되지 않습니다. 설치할 버전은 major.minor.patchversion 형식이어야 합니다. 예: 2.2.1", + "loc.messages.VersionFoundInCache": "캐시에서 %s 버전을 찾았습니다.", + "loc.messages.VersionNotFoundInCache": "캐시에서 %s 버전을 찾을 수 없습니다.", + "loc.messages.CreatingInstallationCompeleteFile": ".NET Core %s 버전 %s의 설치 완료 표시 파일을 만드는 중", + "loc.messages.CannotFindRuntimeVersionForCompletingInstallation": "패키지 형식 %s 버전 %s의 런타임 버전을 찾을 수 없습니다.", + "loc.messages.PathNotFoundException": "%s 경로를 찾을 수 없습니다. 경로가 있는지 확인하세요.", + "loc.messages.VersionIsLocalLatest": "%s 버전이 %s 경로에 있는 버전 중 최신 버전입니다.", + "loc.messages.VersionIsNotLocalLatest": "%s 버전은 %s에 있는 버전 중 최신 버전이 아닙니다.", + "loc.messages.DownloadUrlForMatchingOsNotFound": "다음 OS 플랫폼(RID)용 .NET Core %s 버전 %s의 다운로드 URL을 찾을 수 없음: %s", + "loc.messages.ExceptionWhileDownloadOrReadReleasesIndex": "releases-index.json을 다운로드하거나 구문 분석하지 못했습니다. 오류: %s", + "loc.messages.MatchingVersionForUserInputVersion": "%s 버전을 %s 채널(사용자 지정 버전 사양 %s)에서 찾았습니다.", + "loc.messages.UrlForReleaseChannelNotFound": "채널 버전 %s의 releases.json URL을 찾을 수 없습니다.", + "loc.messages.NoSuitableChannelWereFound": "%s 버전에 해당하는 채널을 찾을 수 없습니다.", + "loc.messages.DetectingPlatform": "OS에 맞는 다운로드 패키지를 찾기 위해 OS 플랫폼을 검색하는 중입니다.", + "loc.messages.FailedInDetectingMachineArch": "머신 OS 플랫폼을 검색하지 못했습니다. 오류: %s", + "loc.messages.runtimeVersionPropertyNotFound": ".NET Core %s 버전 %s의 runtime-version 속성을 찾을 수 없습니다.", + "loc.messages.VersionNotFound": "%s 버전 일치: %s을(를) 찾을 수 없습니다.", + "loc.messages.VersionNotAllowed": "%s 버전은 허용되지 않습니다. 허용되는 버전 유형은 majorVersion.x, majorVersion.minorVersion.x, majorVersion.minorVersion.patchVersion입니다. 자세한 내용: %s", + "loc.messages.VersionsCanNotBeCompared": "%s 버전과 %s 버전을 비교할 수 없습니다. 둘 다 명시적 버전이어야 합니다.", + "loc.messages.FileNameNotCorrectCompleteFileName": "파일 이름 %s이(가) 올바른 '.complete' 파일이 아닙니다.", + "loc.messages.ChannelVersionsNotComparable": "채널 버전 %s과(와) %s을(를) 비교할 수 없습니다. 둘 다 주 버전과 부 버전이 숫자여야 합니다.", + "loc.messages.LookingForVersionInChannel": "%s 채널에서 버전을 검색하는 중", + "loc.messages.FallingBackToAdjacentChannels": "해당 채널에서 %s 버전을 찾을 수 없습니다. 이제 인접한 채널에서 검색합니다.", + "loc.messages.ErrorWhileSettingDotNetToolPath": ".NET Core 도구 경로를 PATH 환경 변수 앞에 추가하지 못했습니다. 오류: %s", + "loc.messages.RequiredChannelVersionForSpec": "%s 채널(%s 버전)을 찾는 중", + "loc.messages.ErrorWhileGettingVersionFromChannel": "%s 버전을 %s 채널에서 가져오지 못했습니다. 오류: %s", + "loc.messages.ComparingInstalledFolderVersions": "설치되는 버전 %s이(가) 폴더 이름 %s(으)로 설치된 기존 버전보다 이후 버전인지 비교하는 중", + "loc.messages.ComparingInstalledFileVersions": "설치되는 버전 %s이(가) version.complete 파일 이름 %s(으)로 설치된 기존 버전보다 이후 버전인지 비교하는 중", + "loc.messages.InvalidChannelObject": "개체를 채널로 사용할 수 없습니다. channel-version, releases.json 등의 필수 속성이 누락되었습니다.", + "loc.messages.ReleasesIndexBodyIncorrect": "구문 분석된 릴리스 인덱스 본문이 잘못되었습니다. 파일에서 releases-index 섹션이 비어 있지 않은지 확인하세요.", + "loc.messages.InvalidVersionObject": "Releases.json에 잘못된 %s 개체가 포함된 릴리스가 있음: %s", + "loc.messages.InvalidVersion": "잘못된 버전 %s이(가) 지정되었습니다.", + "loc.messages.FilesDataIsIncorrectInVersion": "%s 릴리스(%s 버전)의 파일 데이터가 잘못됨(이름, RID, URL 등의 필수 필드가 누락되었을 수 있음): %s", + "loc.messages.VersionFilesDataIncorrect": "버전의 파일 데이터가 없거나 필수 필드가 누락되었습니다.", + "loc.messages.VersionInformationNotComplete": "releases.json 파일에 있는 %s 버전의 필수 정보가 불완전합니다. 오류: %s", + "loc.messages.FailedWhileExtractingPacakge": "다운로드한 패키지를 추출하지 못했습니다. 오류: %s", + "loc.messages.InstallingNuGetVersion": "NuGet 버전 %s을(를) 설치하는 중", + "loc.messages.FailureWhileInstallingNuGetVersion": "NuGet 버전을 설치하지 못했습니다. 오류: %s", + "loc.messages.SettingUpNugetProxySettings": "NuGet의 프록시 구성을 설정하는 중입니다.", + "loc.messages.GlobalJsonFound": "경로 %s에서 global.json을 찾았습니다.", + "loc.messages.GlobalJsonSdkVersion": "global.json이 SDK 버전 %s을(를) 경로 %s에 지정했습니다.", + "loc.messages.GlobalJsonIsEmpty": "경로 %s의 global.json이 비어 있습니다. 버전을 지정하지 않았습니다.", + "loc.messages.FailedToFindGlobalJson": "%s 경로에서 global.json을 찾지 못했습니다.", + "loc.messages.FailedToReadGlobalJson": "경로 '%s'의 global.json 형식이 잘못되었습니다. global.json에 대한 내용은 https://docs.microsoft.com/en-us/dotnet/core/tools/global-json을 참조하세요. %s을(를) 읽는 동안 오류가 발생했습니다.", + "loc.messages.VersionNumberHasTheWrongFormat": "버전 번호 %s이(가) 올바른 형식이 아닙니다. 다음 형식으로 버전을 지정할 수 있습니다. 2.x => 주 버전으로 최신 버전을 설치합니다. 2.2.x => 주 버전과 부 버전으로 최신 버전을 설치합니다. 2.2.104 => 정확한 버전을 설치합니다. releases.json에서 SDK/런타임을 설치할 '버전' 값을 찾습니다. 해당 major.minor 버전의 releases.json 링크는 [**releases-index 파일**](https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json)에서 확인할 수 있습니다. 예를 들어 2.2 버전의 releases.json 링크는 https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/2.2/releases.json입니다.", + "loc.messages.OnlyExplicitVersionAllowed": "명시적 버전(예: 2.2.301)만 허용됩니다. 버전 %s은(는) 잘못되었습니다.", + "loc.messages.SupportPhaseNotPresentInChannel": "채널 버전이 %s인 채널에 지원 단계가 없습니다.", + "loc.messages.DepricatedVersionNetCore": "%s을(를) 지정한 NET Core 버전이 지원되지 않으며 곧 호스트된 에이전트에서 제거될 예정입니다. .NET 지원 정책에 대한 자세한 내용은 https://aka.ms/dotnet-core-support를 참조하세요." +} \ No newline at end of file diff --git a/_generated/UseDotNetV2_Node16/Strings/resources.resjson/ru-RU/resources.resjson b/_generated/UseDotNetV2_Node16/Strings/resources.resjson/ru-RU/resources.resjson new file mode 100644 index 000000000000..862b3b301e34 --- /dev/null +++ b/_generated/UseDotNetV2_Node16/Strings/resources.resjson/ru-RU/resources.resjson @@ -0,0 +1,100 @@ +{ + "loc.friendlyName": "Использовать .NET Core", + "loc.helpMarkDown": "[См. дополнительные сведения об этой задаче](https://aka.ms/AA4xgy0)", + "loc.description": "Получает определенную версию пакета SDK для .NET Core из Интернета или локального кэша и добавляет ее в PATH. Эта задача служит для изменения версии .NET Core, используемой в последующих задачах. Дополнительно обеспечивает поддержку прокси.", + "loc.instanceNameFormat": "Использовать .NET Core $(packageType) $(version)", + "loc.releaseNotes": "
  • Поддержка параллельной установки нескольких версий.
  • Поддержка шаблонов в версии для получения последнего дополнительного или основного номера версии.
  • Ограничение многоуровневого поиска.
  • Установка NuGet и обеспечение поддержки прокси.
  • Установка версии пакета SDK из файлов global.json.
  • ", + "loc.group.displayName.advanced": "Дополнительно", + "loc.input.label.packageType": "Пакет для установки", + "loc.input.help.packageType": "Выберите, следует ли устанавливать только среду выполнения или пакет SDK.", + "loc.input.label.useGlobalJson": "Использовать глобальную JSON", + "loc.input.help.useGlobalJson": "Выберите этот параметр, чтобы установить все пакеты SDK из файлов global.json. Поиск этих файлов осуществляется из system.DefaultWorkingDirectory. Вы можете изменить корневой путь поиска, задав входные данные для рабочего каталога.", + "loc.input.label.workingDirectory": "Рабочий каталог", + "loc.input.help.workingDirectory": "Укажите путь, по которому следует искать файлы global.json при применении команды \"Использовать глобальную JSON\". Если значение пусто, в качестве корневого пути будет использоваться system.DefaultWorkingDirectory.", + "loc.input.label.version": "Версия", + "loc.input.help.version": "Укажите версию пакета SDK для .NET Core или среды выполнения для установки.
    Версии можно задать в следующих форматах
  • 2.x => установка последнего основного номера версии
  • 2.2.x => установка последнего основного и дополнительного номеров версии
  • 2.2.104 => установка точной версии

  • Найдите значение version для установки пакета SDK или среды выполнения в releases.json. Ссылку на releases.json для версии основной_номер.дополнительный_номер можно найти в [**файле releases-index.**](https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json). Ссылка на releases.json для версии 2.2: https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/2.2/releases.json", + "loc.input.label.vsVersion": "Совместимая версия Visual Studio", + "loc.input.help.vsVersion": "Укажите совместимую версию Visual Studio, для которой будет установлен пакет SDK .NET Core. Укажите полную версию vs-version, содержащую основную версию, дополнительную версию и номер исправления, например 16.6.4. Значение параметра \"version\" для установки пакета SDK или среды выполнения можно найти в файле releases.json. Ссылку на файл releases.json для этого сочетания основной и дополнительной версии можно найти в [**файле releases-index.**] (https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json)", + "loc.input.label.includePreviewVersions": "Включить предварительные версии", + "loc.input.help.includePreviewVersions": "Выберите, нужно ли включать предварительные версии при поиске последних версий, например 2.2.x. Этот параметр игнорируется, если указана точная версия, например 3.0.100-preview3-010431", + "loc.input.label.installationPath": "Путь для установки .NET Core", + "loc.input.help.installationPath": "Укажите, где следует установить пакет SDK для .NET Core или среду выполнения. Различные пути могут оказывать соответствующее воздействие на поведение .NET.
  • $(Agent.ToolsDirectory): приведет к кэшированию версии на агенте, так как этот каталог не очищается между конвейерами. Все конвейеры, выполняющиеся на агенте, имеют доступ к версиям, ранее установленным с помощью этого агента.
  • $(Agent.TempDirectory): гарантирует, что конвейер не использует кэшированную версию .NET Core, так как эта папка очищается после каждого конвейера.
  • Любой другой путь: вы можете настроить любой другой путь, при условии, что процесс агента имеет доступ к нему. Это приведет к изменению состояния компьютера и повлияет на все выполняющиеся там процессы.
    Обратите внимание, что можно также использовать параметр многоуровневого поиска, который позволяет настроить проверку подходящей версии узлом .NET.", + "loc.input.label.performMultiLevelLookup": "Выполнить многоуровневый поиск", + "loc.input.help.performMultiLevelLookup": "Эти входные данные применимы только для агентов на основе Windows. Этот параметр настраивает поведение хост-процесса .NET для поиска подходящей общей платформы.
  • Флажок снят: хост-процесс будет просматривать только версии в папке, указанной в этой задаче.
  • Флажок установлен: хост-процесс попытается искать в предварительно определенных глобальных расположениях с использованием многоуровневого поиска.
    Глобальные расположения по умолчанию:
    Для Windows:
    C:\\Program Files\\dotnet (64-разрядные процессы)
    C:\\Program Files (x86)\\dotnet (32-разрядные процессы)
  • Дополнительные сведения см. [**здесь**](https://github.com/dotnet/core-setup/blob/master/Documentation/design-docs/multilevel-sharedfx-lookup.md).
    ", + "loc.messages.ToolFailed": "Сбой установки инструмента: %s", + "loc.messages.ImplicitVersionNotSupported": "Следует указать допустимую и явную версию: %s", + "loc.messages.getMachinePlatformFailed": "Не удалось получить сведения о платформе компьютера. Ошибка: %s.", + "loc.messages.getDownloadUrlsFailed": "Не удалось получить URL-адреса для скачивания. Ошибка: %s.", + "loc.messages.UsingCachedTool": "Есть кэшированная копия пакета .NET Core. Устанавливать пакет заново не нужно. Расположение кэшированного пакета: %s.", + "loc.messages.CheckingToolCache": "Проверка наличия кэшированной копии для этой версии...", + "loc.messages.InstallingAfresh": "Кэш не содержит запрошенной версии .NET Core. Идет ее скачивание и установка.", + "loc.messages.GettingDownloadUrl": "Идет получение URL-адреса для скачивания версии %s .NET Core: %s.", + "loc.messages.CouldNotDetectPlatform": "Не удалось определить ОС компьютера", + "loc.messages.NullDownloadUrls": "Не удалось сформировать URL-адрес для скачивания. Убедитесь в том, что указанная версия %s допустима.", + "loc.messages.DownloadingUrl": "Скачивается пакет .NET Core с URL-адреса: %s", + "loc.messages.ExtractingPackage": "Распаковка скачанного пакета %s.", + "loc.messages.CachingTool": "Кэширование установленного инструмента.", + "loc.messages.SuccessfullyInstalled": "Пакет .NET Core %s версии %s успешно установлен.", + "loc.messages.ToolToInstall": "Инструмент для установки: .NET Core %s версии %s.", + "loc.messages.PrimaryPlatform": "Обнаружена платформа (основная): %s", + "loc.messages.LegacyPlatform": "Обнаружена платформа (прежней версии): %s", + "loc.messages.CouldNotDownload": "Не удалось скачать пакет установки с этого URL-адреса: %s. Ошибка: %s", + "loc.messages.FailedToDownloadPackage": "Не удалось скачать пакет для установки", + "loc.messages.PrependGlobalToolPath": "Создание глобального пути к средству и добавление его в начало PATH.", + "loc.messages.VersionsFileMalformed": "Ссылки на скачивание для указанной версии неправильно сформированы в документе поддерживаемых версий => %s/", + "loc.messages.MatchingVersionNotFound": "Не удалось найти соответствующую версию %s для указанной версии: %s. Обратите внимание, что предварительные версии учитываются при поиске последней версии, только если установлен флажок \"Включить предварительные версии\".", + "loc.messages.UnableToAccessPath": "Не удалось получить доступ к пути: %s. Ошибка: %s. Убедитесь, что процесс агента имеет доступ к этому пути.", + "loc.messages.VersionCanNotBeDownloadedFromUrl": "Версию %s не удается скачать по URL-адресу %s. Неверное значение URL-адреса или версии.", + "loc.messages.CopyingFoldersIntoPath": "Копирование всех корневых папок в путь установки: %s", + "loc.messages.CopyingFilesIntoPath": "Копирование корневых файлов (например, dotnet.exe) в путь установки: %s", + "loc.messages.FailedToCopyTopLevelFiles": "Не удалось скопировать корневые файлы в путь установки: %s. Ошибка: %s", + "loc.messages.FailedWhileInstallingVersionAtPath": "Сбой при установке версии: %s по пути: %s, ошибка: %s", + "loc.messages.ExplicitVersionRequired": "Версия %s не разрешена. Устанавливаемые версии должны иметь формат: основной_номер.дополнительный_номер.версия_исправления. Например: 2.2.1", + "loc.messages.VersionFoundInCache": "Версия %s найдена в кэше.", + "loc.messages.VersionNotFoundInCache": "Версия %s не найдена в кэше.", + "loc.messages.CreatingInstallationCompeleteFile": "Создание файла маркера завершения установки для .NET Core %s версии %s", + "loc.messages.CannotFindRuntimeVersionForCompletingInstallation": "Не удается найти версию среды выполнения для типа пакета: %s с версией: %s", + "loc.messages.PathNotFoundException": "Не удалось найти путь: %s. Убедитесь, что он существует.", + "loc.messages.VersionIsLocalLatest": "Версия %s является последней из версий, представленных по пути %s", + "loc.messages.VersionIsNotLocalLatest": "Версия %s не является последней из версий, представленных в %s", + "loc.messages.DownloadUrlForMatchingOsNotFound": "Не удалось найти URL-адрес скачивания для .NET Core %s версии %s для следующих платформ ОС (относительный идентификатор): %s", + "loc.messages.ExceptionWhileDownloadOrReadReleasesIndex": "Не удалось скачать или проанализировать releases-index.json, ошибка: %s", + "loc.messages.MatchingVersionForUserInputVersion": "Найдена версия %s в канале %s для указанной пользователем спецификации версии: %s", + "loc.messages.UrlForReleaseChannelNotFound": "Не удалось найти URL-адрес для releases.json версии канала: %s", + "loc.messages.NoSuitableChannelWereFound": "Не удалось найти канал, соответствующий версии %s.", + "loc.messages.DetectingPlatform": "Определение платформы ОС для поиска правильного загружаемого пакета ОС.", + "loc.messages.FailedInDetectingMachineArch": "Сбой при определении платформы ОС компьютера, ошибка: %s", + "loc.messages.runtimeVersionPropertyNotFound": "Не удалось найти свойство runtime-version для .NET Core %s версии %s.", + "loc.messages.VersionNotFound": "Сопоставление версий %s: не удалось найти %s", + "loc.messages.VersionNotAllowed": "Версия %s не разрешена. Разрешенные типы версий: основной_номер_версии.x, основной_номер_версии.дополнительный_номер_версии.x, основной_номер_версии.дополнительный_номер_версии.версия_исправления. Дополнительные сведения: %s", + "loc.messages.VersionsCanNotBeCompared": "Версии %s и %s невозможно сравнить. Обе версии должны быть явными.", + "loc.messages.FileNameNotCorrectCompleteFileName": "Имя файла %s не является правильным файлом COMPLETE.", + "loc.messages.ChannelVersionsNotComparable": "Версии канала %s и %s невозможно сравнить. Они должны иметь числовые основной и дополнительный номера версии.", + "loc.messages.LookingForVersionInChannel": "Поиск версии в канале %s", + "loc.messages.FallingBackToAdjacentChannels": "Не удалось найти версию %s в ее канале, сейчас будет выполнен поиск в смежных каналах.", + "loc.messages.ErrorWhileSettingDotNetToolPath": "Сбой при добавлении пути к средствам .NET Core в начало переменной среды PATH. Ошибка: %s", + "loc.messages.RequiredChannelVersionForSpec": "Поиск канала %s для версии %s", + "loc.messages.ErrorWhileGettingVersionFromChannel": "Сбой при получении %s версии из канала %s, ошибка: %s", + "loc.messages.ComparingInstalledFolderVersions": "Сравнение того, является ли устанавливаемая версия %s старше установленной версии с именем папки %s", + "loc.messages.ComparingInstalledFileVersions": "Сравнение того, является ли устанавливаемая версия %s старше установленной версии с полным именем файла версии %s", + "loc.messages.InvalidChannelObject": "Объект не может быть использован в качестве канала; отсутствуют обязательные свойства, такие как channel-version в releases.json.", + "loc.messages.ReleasesIndexBodyIncorrect": "Неверный проанализированный текст индекса выпусков. Убедитесь, что раздел releases-index в файле не пуст.", + "loc.messages.InvalidVersionObject": "Releases.json имеет выпуск с недопустимым объектом %s: %s", + "loc.messages.InvalidVersion": "Указана недопустимая версия %s", + "loc.messages.FilesDataIsIncorrectInVersion": "В выпуске %s для версии %s приведены неправильные данные файла (возможно, отсутствуют обязательные поля, такие как name, rid и url): %s", + "loc.messages.VersionFilesDataIncorrect": "Данные файлов версии отсутствуют или не содержат обязательные поля.", + "loc.messages.VersionInformationNotComplete": "В файле releases.json указаны неполные обязательные сведения для версии %s. Ошибка: %s", + "loc.messages.FailedWhileExtractingPacakge": "Сбой при извлечении скачанного пакета, ошибка: %s", + "loc.messages.InstallingNuGetVersion": "Установка версии NuGet %s", + "loc.messages.FailureWhileInstallingNuGetVersion": "Не удалось установить версию NuGet. Ошибка: %s", + "loc.messages.SettingUpNugetProxySettings": "Настройка конфигурации прокси-сервера для NuGet.", + "loc.messages.GlobalJsonFound": "Обнаружен global.json по пути: %s", + "loc.messages.GlobalJsonSdkVersion": "Версия пакета SDK %s указана в global.json по пути: %s", + "loc.messages.GlobalJsonIsEmpty": "Файл global.json по пути %s пуст. Версия не указана.", + "loc.messages.FailedToFindGlobalJson": "Не удалось найти файл global.json по следующему пути и внутри него: %s", + "loc.messages.FailedToReadGlobalJson": "Недопустимый формат файла global.json по пути: \"%s\". Дополнительные сведения о файле global.json см. по адресу https://docs.microsoft.com/en-us/dotnet/core/tools/global-json. Ошибка при попытке чтения: %s", + "loc.messages.VersionNumberHasTheWrongFormat": "Номер версии %s имеет неправильный формат. Версии можно задать в следующих форматах: 2.x => установка последнего основного номера версии, 2.2.x => установка последнего основного и дополнительного номеров версии, 2.2.104 => установка точной версии. Найдите значение version для установки пакета SDK или среды выполнения в releases.json. Ссылку на releases.json для версии основной_номер.дополнительный_номер можно найти в [**файле releases-index.**](https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json). Ссылка на releases.json для версии 2.2: https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/2.2/releases.json", + "loc.messages.OnlyExplicitVersionAllowed": "Принимаются только явные версии, например: 2.2.301. Недопустимая версия: %s.", + "loc.messages.SupportPhaseNotPresentInChannel": "этап поддержки отсутствует в канале с версией %s.", + "loc.messages.DepricatedVersionNetCore": "Указанная вами версия NET Core %s не поддерживается и скоро будет удалена из размещенных агентов. Дополнительные сведения о политике поддержки .NET см. по адресу https://aka.ms/dotnet-core-support." +} \ No newline at end of file diff --git a/_generated/UseDotNetV2_Node16/Strings/resources.resjson/zh-CN/resources.resjson b/_generated/UseDotNetV2_Node16/Strings/resources.resjson/zh-CN/resources.resjson new file mode 100644 index 000000000000..74ef38822e1b --- /dev/null +++ b/_generated/UseDotNetV2_Node16/Strings/resources.resjson/zh-CN/resources.resjson @@ -0,0 +1,100 @@ +{ + "loc.friendlyName": "使用 .NET Core", + "loc.helpMarkDown": "[详细了解此任务](https://aka.ms/AA4xgy0)", + "loc.description": "从 Internet 或本地缓存获取特定版本的 .NET Core SDK,并将其添加到 PATH。使用此任务更改后续任务中使用的 .NET Core 版本。另外还提供代理支持。", + "loc.instanceNameFormat": "使用 .NET Core $(packageType) $(version)", + "loc.releaseNotes": "
  • 支持并行安装多个版本。
  • 支持版本模式,以获取最新的次要/主要版本。
  • 限制多级查找
  • 安装 NuGet 并提供代理支持。
  • 从 \"global.json\" 文件安装 sdk 版本
  • ", + "loc.group.displayName.advanced": "高级", + "loc.input.label.packageType": "要安装的包", + "loc.input.help.packageType": "请选择仅安装运行时还是安装 SDK。", + "loc.input.label.useGlobalJson": "使用全局 json", + "loc.input.help.useGlobalJson": "选择此选项以安装 global.json 文件中的所有 SDK。可从 system.DefaultWorkingDirectory 中搜索这些文件。可通过设置工作目录输入来更改搜索根路径。", + "loc.input.label.workingDirectory": "工作目录", + "loc.input.help.workingDirectory": "指定在使用 `Use global json` 时应从其中搜索 global.json 文件的路径。如果为空,则 `system.DefaultWorkingDirectory` 将被视为根路径。", + "loc.input.label.version": "版本", + "loc.input.help.version": "指定要安装的 .NET Core SDK 或运行时的版本。
    可按以下格式提供版本
  • 2.x => 安装最新主要版本。
  • 2.2.x => 安装最新主要版本和次要版本
  • 2.2.104 => 安装确切版本

  • 从 releases.json 中查找 `version` 的值,以安装 SDK/运行时。指向该 major.minor 版本的 releases.json 的链接可在[版本索引文件****](https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json)中找到。例如指向 releases.json 2.2 版本的链接为 https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/2.2/releases.json", + "loc.input.label.vsVersion": "兼容 Visual Studio 版本", + "loc.input.help.vsVersion": "指定要安装 .NET Core SDK 的兼容 Visual Studio 的版本。请指定完整的 VS 版本(如 16.6.4),其中包含主要版本、次要版本和补丁号。从 releases.json 查找用于安装 SDK/运行时的“版本”值。在 [releases-index 文件](https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json)中可以找到该 major.minor 版本的 releases.json 的链接 ", + "loc.input.label.includePreviewVersions": "包括预览版本", + "loc.input.help.includePreviewVersions": "选择在搜索最新版本时(例如在搜索 2.2.x 时),是否希望包括预览版本。如果指定了确切版本(例如 3.0.100-preview3-010431),则忽略此设置", + "loc.input.label.installationPath": "安装 .Net Core 的路径", + "loc.input.help.installationPath": "指定应在何处安装 .Net Core SDK/运行时。不同的路径可能会对 .Net 的行为产生以下影响。
  • $(Agent.ToolsDirectory): 这会在代理上缓存版本,因为未在多个管道之间清理此目录。在代理上运行的所有管道都有权访问以前使用代理安装的版本。
  • $(Agent.TempDirectory): 这可以确保管道不使用任何缓存版本的 .Net core,因为会在每个管道之后清理此文件夹。
  • 任何其他路径: 可以配置任何其他路径,前提是代理进程有权访问该路径。这将更改计算机的状态并影响在其上运行的所有进程。
    请注意,还可以配置多级查找设置,该设置可以配置 .Net 主机对适当版本的探测。", + "loc.input.label.performMultiLevelLookup": "执行多级查找", + "loc.input.help.performMultiLevelLookup": "此输入仅适用于基于 Windows 的代理。这将配置 .Net 主机进程的行为以查找合适的共享框架。
  • 未选中: 主机进程将仅查看在此任务中指定的文件夹中存在的版本。
  • 选中: 主机将尝试使用多级查找查看预定义的全局位置。
    默认全局位置为:
    对于 Windows:
    C:\\Program Files\\dotnet (64 位进程)
    C:\\Program Files (x86)\\dotnet (32 位进程)
  • 可在[**此处**](https://github.com/dotnet/core-setup/blob/master/Documentation/design-docs/multilevel-sharedfx-lookup.md)阅读其详细信息。
    ", + "loc.messages.ToolFailed": "工具安装失败: %s", + "loc.messages.ImplicitVersionNotSupported": "版本应为有效的显式版本: %s", + "loc.messages.getMachinePlatformFailed": "无法获取计算机平台详细信息。错误: %s。", + "loc.messages.getDownloadUrlsFailed": "未能获取下载 URL。错误: %s。", + "loc.messages.UsingCachedTool": "存在 .NET Core 的缓存副本。不需要重新安装。缓存工具位置: %s。", + "loc.messages.CheckingToolCache": "正在检查是否存在此版本的缓存副本...", + "loc.messages.InstallingAfresh": "缓存未包含 .NET Core 的请求版本。立即下载并安装。", + "loc.messages.GettingDownloadUrl": "正在获取用于下载 .NET Core %s 版本 %s 的 URL。", + "loc.messages.CouldNotDetectPlatform": "无法检测计算机的操作系统", + "loc.messages.NullDownloadUrls": "无法构造下载 URL。请确保指定的版本 %s 有效。", + "loc.messages.DownloadingUrl": "正在从 URL 下载 .NET Core 包: %s", + "loc.messages.ExtractingPackage": "正在解压已下载的包 %s。", + "loc.messages.CachingTool": "正在缓存已安装的此工具。", + "loc.messages.SuccessfullyInstalled": "已成功安装 .NET Core %s 版本 %s。", + "loc.messages.ToolToInstall": "要安装的工具: .NET Core %s 版本 %s。", + "loc.messages.PrimaryPlatform": "检测到的平台(主要): %s", + "loc.messages.LegacyPlatform": "检测到的平台(旧版): %s", + "loc.messages.CouldNotDownload": "无法从该 URL 下载安装包: %s 错误: %s", + "loc.messages.FailedToDownloadPackage": "无法下载用于安装的包", + "loc.messages.PrependGlobalToolPath": "正在创建全局工具路径并预附加到 PATH。", + "loc.messages.VersionsFileMalformed": "在支持的版本文档中,指定版本的下载链接格式不正确 => %s/", + "loc.messages.MatchingVersionNotFound": "针对以下指定的版本找不到匹配的 %s 版本: %s 请注意,如果选中“包括预览版本”复选框,则仅在最新版本搜索中考虑预览版本。", + "loc.messages.UnableToAccessPath": "无法访问路径: %s。错误: %s。请确保代理进程有权访问该路径。", + "loc.messages.VersionCanNotBeDownloadedFromUrl": "版本 %s 无法从 URL %s 中下载。URL 或版本不正确。", + "loc.messages.CopyingFoldersIntoPath": "正在将所有根文件夹复制到安装路径: %s", + "loc.messages.CopyingFilesIntoPath": "正在将根文件(如 dotnet.exe)复制到安装路径: %s", + "loc.messages.FailedToCopyTopLevelFiles": "未能将根文件复制到安装路径: %s。错误: %s", + "loc.messages.FailedWhileInstallingVersionAtPath": "安装版本 %s(位于路径 %s 下)时失败,出现错误: %s", + "loc.messages.ExplicitVersionRequired": "不允许使用版本: %s。要安装的版本应为以下格式: major.minor.patchversion。例如: 2.2.1", + "loc.messages.VersionFoundInCache": "已在缓存中找到版本 %s。", + "loc.messages.VersionNotFoundInCache": "未在缓存中找到版本 %s。", + "loc.messages.CreatingInstallationCompeleteFile": "正在创建 .Net Core %s 版本 %s 的安装完成标记文件", + "loc.messages.CannotFindRuntimeVersionForCompletingInstallation": "找不到包类型 %s (版本为 %s)的运行时版本", + "loc.messages.PathNotFoundException": "未能找到路径: %s。请确保该路径存在。", + "loc.messages.VersionIsLocalLatest": "版本 %s 是路径 %s 中存在的版本之中的最新版本", + "loc.messages.VersionIsNotLocalLatest": "版本 %s 不是 %s 中存在的版本之中的最新版本", + "loc.messages.DownloadUrlForMatchingOsNotFound": "对于以下操作系统平台(rid),找不到 .Net Core %s 版本 %s 的下载 URL: %s", + "loc.messages.ExceptionWhileDownloadOrReadReleasesIndex": "未能下载或分析 releases-index.json,出现错误: %s", + "loc.messages.MatchingVersionForUserInputVersion": "针对以下用户指定的版本规范找到版本 %s (位于通道 %s 中): %s", + "loc.messages.UrlForReleaseChannelNotFound": "找不到通道版本为 %s 的 releases.json 的 URL", + "loc.messages.NoSuitableChannelWereFound": "找不到与版本 %s 对应的通道。", + "loc.messages.DetectingPlatform": "正在检测操作系统平台以查找操作系统的正确下载包。", + "loc.messages.FailedInDetectingMachineArch": "检测计算机操作系统平台时失败,出现错误: %s", + "loc.messages.runtimeVersionPropertyNotFound": "找不到 .Net Core %s 版本 %s 的 runtime-version 属性。", + "loc.messages.VersionNotFound": "找不到与以下内容匹配的 %s 版本: %s", + "loc.messages.VersionNotAllowed": "不允许使用版本 %s。允许的版本类型为: majorVersion.x、majorVersion.minorVersion.x、majorVersion.minorVersion.patchVersion。更多详细信息: %s", + "loc.messages.VersionsCanNotBeCompared": "无法比较版本 %s 和 %s。这两个版本都应是显式的。", + "loc.messages.FileNameNotCorrectCompleteFileName": "文件名 %s 不是正确的 \".complete\" 文件。", + "loc.messages.ChannelVersionsNotComparable": "无法比较通道版本 %s 和 %s。它们都必须具有数字主要版本和次要版本。", + "loc.messages.LookingForVersionInChannel": "正在通道 %s 中搜索版本", + "loc.messages.FallingBackToAdjacentChannels": "无法在版本 %s 的通道中找到该版本,现在将在邻近通道中搜索。", + "loc.messages.ErrorWhileSettingDotNetToolPath": "将 .Net Core 工具路径预附加到 PATH 环境变量时失败。错误: %s", + "loc.messages.RequiredChannelVersionForSpec": "正在查找通道 %s (针对版本 %s)", + "loc.messages.ErrorWhileGettingVersionFromChannel": "获取版本 %s(从通道 %s 获取)时失败,出现错误: %s", + "loc.messages.ComparingInstalledFolderVersions": "正在比较正在安装的版本 %s 是否高于具有文件夹名称 %s 的已安装版本", + "loc.messages.ComparingInstalledFileVersions": "正在比较正在安装的版本 %s 是否高于具有版本完整文件名 %s 的已安装版本", + "loc.messages.InvalidChannelObject": "对象不能用作通道,缺少必需的属性,如 channel-version、releases.json。", + "loc.messages.ReleasesIndexBodyIncorrect": "已分析的版本索引正文不正确。请确保文件中的版本索引部分为非空。", + "loc.messages.InvalidVersionObject": "Releases.json 具有一个包含无效 %s 对象的版本: %s", + "loc.messages.InvalidVersion": "指定的版本无效 %s", + "loc.messages.FilesDataIsIncorrectInVersion": "在发布 %s 中(针对版本 %s),文件数据不正确(可能缺少必填字段,如 name、rid 和 url): %s", + "loc.messages.VersionFilesDataIncorrect": "版本的文件数据缺失或缺少必填字段。", + "loc.messages.VersionInformationNotComplete": "版本 %s 所需的信息在 releases.json 文件中不完整。错误: %s", + "loc.messages.FailedWhileExtractingPacakge": "提取下载的包时失败,出现错误: %s", + "loc.messages.InstallingNuGetVersion": "正在安装 NuGet 版本 %s", + "loc.messages.FailureWhileInstallingNuGetVersion": "安装 NuGet 版本时失败。错误: %s", + "loc.messages.SettingUpNugetProxySettings": "正在设置 NuGet 的代理配置。", + "loc.messages.GlobalJsonFound": "在路径 %s 中找到了 global.json", + "loc.messages.GlobalJsonSdkVersion": "SDK 版本 %s 由路径 %s 中的 global.json 指定", + "loc.messages.GlobalJsonIsEmpty": "路径 %s 中的 global.json 为空。未指定任何版本。", + "loc.messages.FailedToFindGlobalJson": "未能在路径 %s 中找到 global.json", + "loc.messages.FailedToReadGlobalJson": "路径 \"%s\" 中的 global.json 的格式不正确。有关 global.json 的信息,请访问此处: https://docs.microsoft.com/zh-cn/dotnet/core/tools/global-json。尝试读取时出错: %s", + "loc.messages.VersionNumberHasTheWrongFormat": "版本号 %s 的格式不正确。可按以下格式提供版本: 2.x => 安装最新主要版本。2.2.x => 安装最新主要版本和次要版本。2.2.104 => 安装确切版本。从 releases.json 中查找 `version` 值,以安装 SDK/运行时。指向该 major.minor 版本的 releases.json 的链接可在[版本索引文件****](https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json)中找到。例如指向 releases.json 2.2 版本的链接为 https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/2.2/releases.json", + "loc.messages.OnlyExplicitVersionAllowed": "仅接受显式版本,例如: 2.2.301。版本 %s 无效。", + "loc.messages.SupportPhaseNotPresentInChannel": "通道版本为 %s 的通道中不存在支持阶段。", + "loc.messages.DepricatedVersionNetCore": "你指定的 NET Core 版本 %s 不受支持,并且即将从托管代理中删除。有关 .NET 支持策略的详细信息,请参阅 https://aka.ms/dotnet-core-support。" +} \ No newline at end of file diff --git a/_generated/UseDotNetV2_Node16/Strings/resources.resjson/zh-TW/resources.resjson b/_generated/UseDotNetV2_Node16/Strings/resources.resjson/zh-TW/resources.resjson new file mode 100644 index 000000000000..ed7b0eec2a83 --- /dev/null +++ b/_generated/UseDotNetV2_Node16/Strings/resources.resjson/zh-TW/resources.resjson @@ -0,0 +1,100 @@ +{ + "loc.friendlyName": "使用 .NET Core", + "loc.helpMarkDown": "[深入了解此工作](https://aka.ms/AA4xgy0)", + "loc.description": "從網際網路或本機快取取得特定 .NET Core SDK 版本,然後將其新增至 PATH。使用此工作可變更後續工作中使用的 .NET Core 版本。另提供 Proxy 支援。", + "loc.instanceNameFormat": "使用 .NET Core $(packageType) $(version)", + "loc.releaseNotes": "
  • 並存安裝多個版本的支援。
  • 版本模式支援,可擷取最新的次要/主要版本。
  • 限制多重層級查閱
  • 安裝 NuGet,並提供 Proxy 支援。
  • 從 `global.json` 檔案安裝 sdk 版本
  • ", + "loc.group.displayName.advanced": "進階", + "loc.input.label.packageType": "要安裝的套件", + "loc.input.help.packageType": "請選取要僅安裝執行階段或 SDK。", + "loc.input.label.useGlobalJson": "使用全域 json", + "loc.input.help.useGlobalJson": "選取此選項以從 global.json 檔案安裝所有 SDK。系統會從 system.DefaultWorkingDirectory 中搜尋這些檔案。您可以設定工作目錄輸入來變更搜尋根路徑。", + "loc.input.label.workingDirectory": "工作目錄", + "loc.input.help.workingDirectory": "指定使用 `Use global json` 時,要從哪個路徑搜尋 global.json 檔案。如果保留空白,會將 `system.DefaultWorkingDirectory` 視為根路徑。", + "loc.input.label.version": "版本", + "loc.input.help.version": "指定要安裝的 .NET Core SDK 或執行階段版本。
    您可以使用下列格式指定版本
  • 2.x => 安裝最新的主要版本。
  • 2.2.x => 安裝最新的主要和次要版本
  • 2.2.104 => 安裝完全相符的版本

  • 您可從 releases.json 中尋找 `version` 的值來安裝 SDK/執行階段。如需該 major.minor 版本的 releases.json 連結,請參閱 [**releases-index 檔案**](https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json)。例如 2.2 版的 releases.json 連結為 https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/2.2/releases.json", + "loc.input.label.vsVersion": "相容的 Visual Studio 版本", + "loc.input.help.vsVersion": "指定 .NET Core SDK 要安裝的相容 Visual Studio 版本。指定包含主要版本、次要版本和修補程式編號的完整 vs 版本,例如 16.6.4。在 releases.json 中尋找安裝 SDK/執行階段所需要的 `version` 值。該 major.minor 版本的 releases.json 連結位於 [**releases-index 檔案。**](https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json)", + "loc.input.label.includePreviewVersions": "包含預覽版本", + "loc.input.help.includePreviewVersions": "如果您希望在搜尋最新版本 (例如搜尋 2.2.x) 時包含預覽版本,請選取此項目。如果您指定完全符合版本 (例如 3.0.100-preview3-010431),則會忽略此設定", + "loc.input.label.installationPath": "要安裝 .Net Core 的路徑", + "loc.input.help.installationPath": "請指定應安裝 .Net Core SDK/執行階段的位置。路徑如果不同,則可能會對 .Net 的行為造成後續影響。
  • $(Agent.ToolsDirectory): 因為此目錄未於各管線間清除,所以這會使版本快取至代理程式。在代理程式上執行的所有管線,都能存取先前使用代理程式安裝的版本。
  • $(Agent.TempDirectory): 因為此資料夾未於各管線後清除,所以這能確保管線不會使用 .Net 核心的任何快取版本。
  • 任何其他路徑: 假如代理程式處理序有路徑的存取權,您就可以設定任何其他路徑。這會變更電腦的狀態,並影響在其上執行的所有處理序。
    請注意,您也可以進行多層次查閱設定,該設定可針對適合的版本設定 .Net 主機的探查。", + "loc.input.label.performMultiLevelLookup": "執行多層級查閱", + "loc.input.help.performMultiLevelLookup": "此輸入只適用於以 Windows 為基礎的代理程式。這會設定查閱適當共用架構的 .Net 主機處理序行為。
  • 取消選取: 主機處理序只會查閱此工作中所指定資料夾內的版本。
  • 選取: 主機會嘗試使用多重層級查閱在預先定義的全域位置中查閱。
    預設全域位置為:
    若為 Windows:
    C:\\Program Files\\dotnet (64 位元處理序)
    C:\\Program Files (x86)\\dotnet (32 位元處理序)
  • 若要閱讀更多內容,請前往 [**這裡**](https://github.com/dotnet/core-setup/blob/master/Documentation/design-docs/multilevel-sharedfx-lookup.md)。
    ", + "loc.messages.ToolFailed": "工具安裝失敗: %s", + "loc.messages.ImplicitVersionNotSupported": "版本應為有效的明確版本: %s", + "loc.messages.getMachinePlatformFailed": "無法取得機器平台詳細資料。錯誤: %s。", + "loc.messages.getDownloadUrlsFailed": "無法取得下載 URL。錯誤: %s。", + "loc.messages.UsingCachedTool": ".NET Core 的快取複本已存在。不需要重新安裝。快取的工具位置: %s。", + "loc.messages.CheckingToolCache": "正在檢查此版本是否有快取複本...", + "loc.messages.InstallingAfresh": "快取未包含所要求版本的 .NET Core。正在下載該版本的 .NET Core 以立即安裝。", + "loc.messages.GettingDownloadUrl": "正在取得 URL 以下載 .NET Core %s 版: %s。", + "loc.messages.CouldNotDetectPlatform": "偵測不到機器的 OS", + "loc.messages.NullDownloadUrls": "無法建構下載 URL。請確認指定的版本 %s 有效。", + "loc.messages.DownloadingUrl": "正在從 URL 下載 .NET Core 套件: %s", + "loc.messages.ExtractingPackage": "正在將下載的套件 %s 解壓縮。", + "loc.messages.CachingTool": "正在快取這個安裝的工具。", + "loc.messages.SuccessfullyInstalled": "已成功安裝 .NET Core %s 版本 %s。", + "loc.messages.ToolToInstall": "要安裝的工具: .NET Core %s 版本 %s。", + "loc.messages.PrimaryPlatform": "偵測到的平台 (主要): %s", + "loc.messages.LegacyPlatform": "偵測到的平台 (舊版): %s", + "loc.messages.CouldNotDownload": "無法從此 URL %s 下載安裝套件,錯誤: %s", + "loc.messages.FailedToDownloadPackage": "無法下載套件以進行安裝", + "loc.messages.PrependGlobalToolPath": "正在建立全域工具路徑並加到 PATH 前面。", + "loc.messages.VersionsFileMalformed": "指定版本的下載連結,在支援的版本文件中語式錯誤 => %s/", + "loc.messages.MatchingVersionNotFound": "無法為指定的版本找到符合的 %s 版本: %s 敬請注意,只有在已選取 [包含預覽版本] 核取方塊的情況下,才會將預覽版本視作在最新版本搜尋內。", + "loc.messages.UnableToAccessPath": "無法存取路徑: %s。錯誤: %s。請確認代理程式處理序有權存取路徑。", + "loc.messages.VersionCanNotBeDownloadedFromUrl": "版本: 無法從 URL 下載 %s: %s。URL 或版本錯誤。", + "loc.messages.CopyingFoldersIntoPath": "正在將所有根資料夾複製到路徑: %s", + "loc.messages.CopyingFilesIntoPath": "正在將根檔案 (例如 dotnet.exe) 複製到安裝路徑: %s", + "loc.messages.FailedToCopyTopLevelFiles": "無法將根檔案複製到安裝路徑: %s。錯誤: %s。", + "loc.messages.FailedWhileInstallingVersionAtPath": "安裝版本時失敗: %s。路徑: %s。錯誤: %s", + "loc.messages.ExplicitVersionRequired": "版本: 不允許 %s。欲安裝版本的格式應為: major.minor.patchversion。例如: 2.2.1", + "loc.messages.VersionFoundInCache": "版本: 於快取中找到了 %s。", + "loc.messages.VersionNotFoundInCache": "未在快取中找到版本 %s。", + "loc.messages.CreatingInstallationCompeleteFile": "正在建立 .Net Core %s 版本 %s 的安裝完成標記檔案", + "loc.messages.CannotFindRuntimeVersionForCompletingInstallation": "找不到套件類型的執行階段版本: %s,版本: %s", + "loc.messages.PathNotFoundException": "路徑: 找不到 %s。請確認路徑存在。", + "loc.messages.VersionIsLocalLatest": "版本: %s 在路徑出現的版本間是最新的: %s", + "loc.messages.VersionIsNotLocalLatest": "版本: %s 在 %s 出現的版本間不是最新的", + "loc.messages.DownloadUrlForMatchingOsNotFound": "無法為以下 OS 平台 (RID) 找到 .Net Core %s 版本 %s 的下載 URL: %s", + "loc.messages.ExceptionWhileDownloadOrReadReleasesIndex": "無法下載或剖析 release-index.json。錯誤: %s", + "loc.messages.MatchingVersionForUserInputVersion": "找到的版本: %s。所在通道: %s。使用者指定的版本規格: %s", + "loc.messages.UrlForReleaseChannelNotFound": "無法為通道版本的 releases.json 找到 URL: %s", + "loc.messages.NoSuitableChannelWereFound": "找不到對應至 %s 版的通道。", + "loc.messages.DetectingPlatform": "正在偵測 OS 平台以為此 OS 尋找正確的下載套件。", + "loc.messages.FailedInDetectingMachineArch": "偵測機器 OS 平台時失敗。錯誤: %s", + "loc.messages.runtimeVersionPropertyNotFound": "找不到 .Net Core %s 版本 %s 的 runtime-version 屬性", + "loc.messages.VersionNotFound": "找不到符合以下項目的 %s 版本: %s", + "loc.messages.VersionNotAllowed": "不允許版本 %s。允許的版本類型為: majorVersion.x、majorVersion.minorVersion.x、majorVersion.minorVersion.patchVersion。詳細資料: %s", + "loc.messages.VersionsCanNotBeCompared": "無法比較版本 %s 與 %s。這兩個版本都必須為明確版本。", + "loc.messages.FileNameNotCorrectCompleteFileName": "檔案名稱 %s 不是正確的 '.complete' 檔案。", + "loc.messages.ChannelVersionsNotComparable": "無法比較通道版本 %s 與 %s。這兩個版本都必須有數字的主要和次要版本。", + "loc.messages.LookingForVersionInChannel": "正於通道 %s 中尋找版本", + "loc.messages.FallingBackToAdjacentChannels": "無法在版本 %s 的通道中找到該版本,將於相鄰通道進行搜尋。", + "loc.messages.ErrorWhileSettingDotNetToolPath": "將 .Net Core 工具路徑加至 PATH 環境變數前時失敗。錯誤: %s", + "loc.messages.RequiredChannelVersionForSpec": "正在尋找以下版本的通道 %s: %s", + "loc.messages.ErrorWhileGettingVersionFromChannel": "從以下頻道取得版本 %s 時失敗: %s。錯誤: %s", + "loc.messages.ComparingInstalledFolderVersions": "正在比較正在安裝的版本 %s 是否大於資料夾名稱為 %s 的已安裝版本", + "loc.messages.ComparingInstalledFileVersions": "正在比較正在安裝的版本 %s 是否大於版本完整檔案名稱為 %s 的已安裝版本", + "loc.messages.InvalidChannelObject": "物件不得當作通道使用,需要 channel-version 之類的屬性,缺少 releases.json。", + "loc.messages.ReleasesIndexBodyIncorrect": "剖析的版本索引主體錯誤。請您查看檔案中的 releases-index 區段是否不為空白。", + "loc.messages.InvalidVersionObject": "Releases.json 有 %s 物件無效的版本: %s", + "loc.messages.InvalidVersion": "指定的版本 %s 無效", + "loc.messages.FilesDataIsIncorrectInVersion": "版本 (release) %s (位於版本 (version) %s) 中的檔案資料錯誤 (可能缺少名稱、rid 或 URL 等必要欄位): %s", + "loc.messages.VersionFilesDataIncorrect": "版本的檔案資料遺失,或缺少必要欄位。", + "loc.messages.VersionInformationNotComplete": "版本: releases.json 檔案中的 %s 必要資訊不完整。錯誤: %s", + "loc.messages.FailedWhileExtractingPacakge": "擷取已下載套件時失敗。錯誤: %s", + "loc.messages.InstallingNuGetVersion": "正在安裝 NuGet 版本 %s", + "loc.messages.FailureWhileInstallingNuGetVersion": "安裝 NuGet 版本時失敗。錯誤: %s", + "loc.messages.SettingUpNugetProxySettings": "正在進行 NuGet 的 Proxy 設定。", + "loc.messages.GlobalJsonFound": "在路徑 %s 中找到 global.json", + "loc.messages.GlobalJsonSdkVersion": "SDK 版本 %s 由路徑 %s 中的 global.json 指定", + "loc.messages.GlobalJsonIsEmpty": "路徑 %s 的 global.json 是空白的。未指定任何版本。", + "loc.messages.FailedToFindGlobalJson": "在此路徑中找不到 global.json: %s", + "loc.messages.FailedToReadGlobalJson": "位於路徑: '%s' 的 global.json 格式錯誤。如需 global.json 的相關資訊,請參閱這裡: https://docs.microsoft.com/zh-tw/dotnet/core/tools/global-json (機器翻譯)。嘗試讀取時發生錯誤: %s", + "loc.messages.VersionNumberHasTheWrongFormat": "版本號碼 %s 格式錯誤。您可以使用下列格式指定版本: 2.x => 安裝最新的主要版本。2.2.x => 安裝最新的主要和次要版本。2.2.104 => 安裝完全相符的版本。您可從 releases.json 中尋找 `version` 的值來安裝 SDK/執行階段。如需該 major.minor 版本的 releases.json 連結,請參閱 [**releases-index 檔案**](https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json)。例如 2.2 版的 releases.json 連結為 https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/2.2/releases.json", + "loc.messages.OnlyExplicitVersionAllowed": "僅接受明確的版本,例如: 2.2.301。版本 %s 無效。", + "loc.messages.SupportPhaseNotPresentInChannel": "channel-version 為 %s 的通道中沒有 support-phase。", + "loc.messages.DepricatedVersionNetCore": "您指定的 NET Core 版本 %s 不受支援,即將從代管代理程式中移除。如需 .NET 支援原則的詳細資訊,請參閱 https://aka.ms/dotnet-core-support。" +} \ No newline at end of file diff --git a/_generated/UseDotNetV2_Node16/Task Design.md b/_generated/UseDotNetV2_Node16/Task Design.md new file mode 100644 index 000000000000..630d82a21eb6 --- /dev/null +++ b/_generated/UseDotNetV2_Node16/Task Design.md @@ -0,0 +1,103 @@ +# **Use dotnet Task V2** + +The task installs user specified version of .NET Core SDK/Runtime. This can be consumed to supply a particular version of .Net Core SDK/runtime to the subsequent tasks in pipeline. + +### **A new major version of the task is created because of the following breaking changes:** +- **Installing multiple sdk/runtime versions side by side:** Users had asked for the feature where multiple versions of sdk/runtime can be installed and then be used in subsequent tasks in a pipeline.(one project may require multiple .Net Core sdks to build different applications), for more information about user's ask, [refer here](https://github.com/Microsoft/azure-pipelines-tasks/issues/8306). This is a breaking change, as previously the V0 task always provided only one version of sdk/runtime. + +## New features added in V1 task: + +## **- Support for fetching latest version for a given major or major.minor version** +This feature was being asked by users who wanted to install the latest version as soon as it becomes available, without manually changing the version in the task. For information about user's asks, refer [here](https://github.com/Microsoft/azure-pipelines-tasks/issues/9171). + +This feature is implemented by supporting patterns in version input: `version`. This input now accepts .Net sdk/runtime versions in the following patterns +- `Major.Minor.PatchVersion :` complete version as present in releases.json for the Major.Minor Version channel. Example: 2.2.104 +- `Major.Minor.x :` Latest version in the Major.Minor version channel release. It can also be the latest preview version if `includePreviewVersions` input is enabled/true. This can be used to get all latest bug fixes automatically in a major.minor version. As back-compat is maintained in major.minor version, thus ensuring applications being built will not break. +- `Major.x :` Latest version released in the Major version channel. It can also be the latest preview version if `includePreviewVersions` input is enabled/true. This can be used by tools or library developers who need to test with every latest version for compatibility. + +### How it works: +The correct version needs to be identified in case user enters pattern based version such as 2.2.x. This is how the exact needed version and its information is extracted: + +- [releases-index.json](https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json) The file containing links to all .Net Core release channels is download and read into a JSON object `releasesIndex`. This is used to find all available release channels and links to their releases.json. + +- The `version` input is divided into three sections: + - Major + - Minor + - Patch + +- Based on Minor versions value, the following can happen + - Numeric : we get the corresponding channel's (Major.Minor) releases.json link from `releasesIndex`. Then the releases.json is downloaded and parsed into an object: `channelInformation`. + - NOTE: in case exact version is not found, the function logs error and task will fail. + - x : in this case, we find the latest channel with `support-phase` != `preview` (unless `includePreviewVersions` is true). The releases.json for the selected channel is then downloaded and parsed into json object `releaseInformation`. + - The version with highest `release.sdk/runtime.version` is then returned. (preview version will only be selected if `includePreviewVersions` is true) + - Empty: the function will log error as version needs to be given till at least minor version. As a result the task will fail. + + +- Based on Patch version value, the following can happen + - Empty : the function logs error and task will fail as it expects either a value or x. + - Exact Version (alpha numeric): a release with exact release.sdk/runtime.version will be searched in `channelInformation`. + - `version found:` the version information is returned + - `version not found:` function logs error and task will fail. + - x : The latest sdk/runtime version among all releases in that channel will be searched. The latest version information is then returned. + +## **- Support for multiple versions to be installed side by side** +This feature was asked by users so that multiple versions can be installed using the task and they all will be available to subsequent tasks in pipeline. It is required in applications where multiple versions of SDK/runtime are required to build/run different projects. + +Advantages of this feature: +- User can build all applications in a project using a single build task and need not create different pipelines or add multiple build task. + +### How it works: +This feature is implemented, by asking user a new input: `installationPath`, the path where .Net core SDK/runtime should be installed. The Agent process should have write access on the path. +There are multiple benefits of asking `installationPath` from user: +- User can choose to install a particular version in isolation of all other version already installed, by specifying a path which is cleaned up after each release/build. +- User can augment existing set of versions installed with another version by specifying a path where a set of .Net core versions might already be installed, such as: $(Agent.ToolsDirectory) +- User can also install it at any other location, such as: C:\user\username\temp. This will lead to changing the machine configuration and may affect all processes running on the machine. + +The way a version is installed at the `installationPath` is now as follows: +- We extract all folders from dotnetVersions.zip/tgz into the `installationPath`, just like install-dotnet.ps1/sh. +- The files in root directory of archive are only copied/overridden if + - The .Net core version being installed at `installationPath` is later than all other versions already installed at the path. + +The advantage of the above installation approach are: +- Time is saved by not copying unneeded files. +- Failures which might occur while overriding existing files are avoided. + +Also to further optimize and save time while installation, we do not install a version if it is already cached at that path. Below described are different approaches to find out if a version is cached, + +1. **`Folder based approach`** + - `Installation process:` While installing a version, we will extract the files from downloaded archive and then copy paste the files into the installationPath folder. + - `Caching process:` Existence of folder with name = version inside sdk or host/fxr folder will be considered as proof that sdk/runtime version is cached. Algorithm to find if version is cached or not will be like this: + - `installationPath` should contains a folder called `sdk or host/fxr`. If it + - `exists:` check if sdk or host/fxr folder contains a folder with name = version to be downloaded. + - `exists:` Version is cached, nothing more needs to be done. + - `doesn't exist:` Version needs to be installed. + - `doesn't exist:` Version needs to be installed + +2. **`version.completed file based approach`** + - `Installation process:` Once all the files are successfully extracted, copied and pasted into installationPath, we will create a **`version.completed`** file in sdk/runtime folder. The version.completed file will exist at the same level as the version folder and will be considered as a stamp of successful installation. + - If installation is not complete/successfull, we will not create the version.completed file. + - `Caching Process:` So, the algorithm will be same as in Approach 1, but with an additional required check for `version.completed` file to be present in sdk or host/fxr folder along with folder with name = version. Based on version.completed's existance, the following will be concluded + - `Exists`: version will be considered as cached + - `Doesn't exist`: version will be installed. (overwriting if the files already exist) + + +There are a few advantages of `version.completed` based approach over `folder only` based approach: +- Handles failed installation attempts: in case the last installation was left incomplete, the version.completed file would not exist and thus in next try, the version will be installed. + + +## **- Inbuilt option to perform Multi-Level lookup** +This feature is introduced as users had asked for an option to configure Multi-Level lookup, to know more about user's ask, refer [here](https://github.com/Microsoft/azure-pipelines-tasks/issues/9608). This is applicable to Windows based agents only. + +Multi-level lookup configures the .Net core host to probe several locations to find a suitable shared framework. If a folder is not found in folder containing dotnet.exe, it will attempt to look in pre-defined global locations using multi-level lookup. The default global locations are: + +**For Windows:** +- C:/Program Files/dotnet (64-bit) +- C:/Program Files (x86)/dotnet (32-bit) + +It's value will be set as an environment variable: `DOTNET_MULTILEVEL_LOOKUP` with values +- `0` : Disabled +- `1` : Enabled + +For more information on Multi-Level Lookup refer [HERE](https://github.com/dotnet/core-setup/blob/master/Documentation/design-docs/multilevel-sharedfx-lookup.md). + +## **- Installs NuGet and sets up NuGet proxy configuration** \ No newline at end of file diff --git a/_generated/UseDotNetV2_Node16/Tests/L0.ts b/_generated/UseDotNetV2_Node16/Tests/L0.ts new file mode 100644 index 000000000000..8a79b0517d44 --- /dev/null +++ b/_generated/UseDotNetV2_Node16/Tests/L0.ts @@ -0,0 +1,536 @@ +"use strict"; +const assert = require('assert'); +const ttm = require('azure-pipelines-task-lib/mock-test'); +const os = require('os'); +const path = require('path'); + +function setResponseFile(name) { + process.env['MOCK_RESPONSES'] = path.join(__dirname, name); +} + +function runValidations(validator: () => void, tr, done) { + try { + validator(); + done(); + } + catch (error) { + console.log("STDERR", tr.stderr); + console.log("STDOUT", tr.stdout); + done(error); + } +} + +describe('UseDotNet', function () { + this.timeout(30000); + before((done) => { + done(); + }); + after(function () { + }); + + it("[VersionUtilities] versionCompareFunction should throw for non explicit versions or empty version strings", (done) => { + process.env["__non_explicit__"] = "true" + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionUtilityVersionCompareTests.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == false, ("should have thrown and failed")); + assert(tr.stdout.indexOf("FunctionThrewAsExpected") > -1, "Should have thrown as versions are not explicit and are empty strings."); + }, tr, done); + }); + + it("[VersionUtilities] versionCompareFunction should return 1, 0 or -1 when versionA is gt, eq or lt versionB", (done) => { + process.env["__non_explicit__"] = "false"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionUtilityVersionCompareTests.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should have succeeded")); + assert(tr.stdout.indexOf("FunctionGaveRightResult") > -1, "Should have given right results for all cases."); + }, tr, done); + }); + + it("[VersionUtilities] compareChannelVersion function should throw when either or both channel versions are empty or are non numeric", (done) => { + process.env["__non_explicit__"] = "true" + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionUtilityVersionCompareTests.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == false, ("should have thrown and failed")); + assert(tr.stdout.indexOf("FunctionThrewAsExpected") > -1, "Should have thrown as versions are not explicit and are empty strings."); + }, tr, done); + }); + + it("[VersionUtilities] compareChannelVersion function should return 1, 0 or -1 when channelVersionA is gt, eq or lt channelVersionB", (done) => { + process.env["__non_explicit__"] = "false"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionUtilityChannelVersionCompareTests.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should have succeeded")); + assert(tr.stdout.indexOf("FunctionGaveRightResult") > -1, "Should have given right results for all cases."); + }, tr, done); + }); + + it("[VersionUtilities] getMatchingVersionFromList should return null for empty versionInfoList, versionInfoList elements having empty version or no matching version found in list while toggling includePreviewVersionsValue", (done) => { + process.env["__empty__"] = "true" + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionUtilityGetMatchingVersionFromListTests.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should have succeeded")); + assert(tr.stdout.indexOf("FunctionReturnedNull") > -1, "Should have returned null for all cases and print the message."); + }, tr, done); + }); + + it("[VersionUtilities] getMatchingVersionFromList should return heighest version for the spec when versionSpec is not exact version", (done) => { + process.env["__empty__"] = "false" + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionUtilityGetMatchingVersionFromListTests.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should have succeeded")); + assert(tr.stdout.indexOf("FuctionReturnedCorrectVersion") > -1, "Should have returned null for all cases and print the message."); + }, tr, done); + }); + + it("[Models.VersionParts] constructor should throw when version fails validation", (done) => { + process.env["__invalid_versionparts__"] = "true"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "modelsVersionPartsTests.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == false, ("Should have failed")); + assert(tr.stdout.indexOf("FunctionThrewAsExpected") > -1, "Should have thrown for all invalid version specs."); + }, tr, done); + }); + + it("[Models.VersionParts] constructor return object instance with correct major, minor and patch version", (done) => { + process.env["__invalid_versionparts__"] = "false"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "modelsVersionPartsTests.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should have returned right objects")); + assert(tr.stdout.indexOf("VersionPartsCreatedSuccessfully") > -1, "Should have returned the correct objects and print the statement."); + }, tr, done); + }); + + it("[Models.Channel] constructor should throw if object passed doesn't contain channel-version or releasesJsonUrl, or contains invalid releasesJsonUrl", (done) => { + process.env["__invalid_channelobject__"] = "true"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "modelsChannelTests.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == false, ("Should have failed for incorrect objects.")); + assert(tr.stdout.indexOf("FunctionThrewAsExpected") > -1, "Should have thrown error in all cases."); + }, tr, done); + }); + + it("[Models.Channel] constructor should pass if object contains channel-version and valid releasesJsonUrl", (done) => { + process.env["__invalid_channelobject__"] = "false"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "modelsChannelTests.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should have successfully created channel objects.")); + assert(tr.stdout.indexOf("ChannelCreatedSuccessfully") > -1, "Should have returned the correct objects and print the statement."); + }, tr, done); + }); + + it("[Models.VersionInfo] getRuntimeVersion should return correct runtime-version from sdk versionInfo object", (done) => { + process.env["__sdk_runtime__"] = "true"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "modelsGetRuntimeVersionTests.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should have successfully returned runtime versions for sdk package type.")); + assert(tr.stdout.indexOf("RuntimeVersionsReturnedForSdkAreCorrect") > -1, "Should have returned correct runtime versions for all cases of packageType sdk."); + }, tr, done); + }); + + it("[Models.VersionInfo] getRuntimeVersion should return version for runtime versionInfo object", (done) => { + process.env["__sdk_runtime__"] = "false"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "modelsGetRuntimeVersionTests.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should have successfully returned runtime versions for runtime package type.")); + assert(tr.stdout.indexOf("RuntimeVersionsReturnedAreCorrect") > -1, "Should have returned correct runtime versions for all cases of packageType runtime."); + }, tr, done); + }); + + it("[VersionFetcher.DotNetCoreVersionFetcher] getVersionInfo should throw if version for pacakge type can not be found, and error message should contain the package type", (done) => { + process.env["__failat__"] = "versionnotfound"; + process.env["__versionspec__"] = "2.2.999-cantbefound-234"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionFetcherGetVersionInfoFailTests.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == false, ("Should have failed as the wanted version of package type can not be found.")); + assert(tr.stdout.indexOf("VersionNotFound") > -1, "Should have thrown version not found exception."); + }, tr, done); + }); + + it("[VersionFetcher.DotNetCoreVersionFetcher] getVersionInfo should throw if getting channel fails", (done) => { + process.env["__failat__"] = "channelfetch"; + process.env["__versionspec__"] = "2.2.999-cantbefound-234"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionFetcherGetVersionInfoFailTests.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == false, ("Should have failed as channels could not be fetched.")); + assert(tr.stdout.indexOf("ExceptionWhileDownloadOrReadReleasesIndex") > -1, "Should have thrown exception and returned."); + }, tr, done); + }); + + it("[VersionFetcher.DotNetCoreVersionFetcher] getVersionInfo should throw if preview versions included and version not found", (done) => { + process.env["__failat__"] = "versionnotfound"; + process.env["__versionspec__"] = "4.40.x"; + process.env["__inlcudepreviewversion__"] = "true"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionFetcherGetVersionInfoFailTests.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == false, ("Should have failed as channels could not be fetched.")); + assert(tr.stdout.indexOf("MatchingVersionNotFound") > -1, "Should not have found a matching version."); + assert(tr.stdout.indexOf("VersionNotFound") > -1, "Should have thrown with VersionNotFound error."); + }, tr, done); + }); + + it("[VersionFetcher.DotNetCoreVersionFetcher] getVersionInfo should return correct version info for a correct version spec", (done) => { + process.env["__versionspec__"] = "2.2.103"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionFetcherGetVersionInfoTestsCorrect.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should have returned the correct version info.")); + }, tr, done); + }); + + it("[VersionFetcher.DotNetCoreVersionFetcher] getVersionInfo should be able to return versionInfo for sdk present in sdks property of a release object.", (done) => { + process.env["__versionspec__"] = "2.2.104"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionFetcherGetVersionInfoTestsCorrect.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should have returned the correct version info.")); + }, tr, done); + }); + + it("[VersionFetcher.DotNetCoreVersionFetcher] getVersionInfo should return correct version info for a version which exists in a different channel of the same major version", (done) => { + process.env["__versionspec__"] = "2.1.104"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionFetcherGetVersionInfoTestsCorrect.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should have returned the correct version info.")); + }, tr, done); + }); + + it("[VersionFetcher.DotNetCoreVersionFetcher] getVersionInfo should return latest version info in a major version for a versionSpec of type majorVersion.x", (done) => { + process.env["__versionspec__"] = "2.x"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionFetcherGetVersionInfoTestsCorrect.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should have returned the correct version info.")); + }, tr, done); + }); + + it("[VersionFetcher.DotNetCoreVersionFetcher] getVersionInfo should return latest version info in a major.minor version for a versionSpec of type majorVersion.minorVersion.x", (done) => { + process.env["__versionspec__"] = "2.2.x"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionFetcherGetVersionInfoTestsCorrect.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should have returned the correct version info.")); + }, tr, done); + }); + + it("[VersionFetcher.DotNetCoreVersionFetcher] getVersionInfo should return latest preview version info if includePreviewVersion is true and latest version is a preview version", (done) => { + process.env["__versionspec__"] = "2.2.x"; + process.env["__inlcudepreviewversion__"] = "true"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionFetcherGetVersionInfoTestsCorrect.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should have returned the correct version info.")); + }, tr, done); + }); + + it("[VersionFetcher.DotNetCoreVersionFetcher] getVersionInfo should return latest version info even if includePreviewVersion is true but latest version is non preview", (done) => { + process.env["__versionspec__"] = "2.3.x"; + process.env["__inlcudepreviewversion__"] = "true"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionFetcherGetVersionInfoTestsCorrect.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should have returned the correct version info.")); + }, tr, done); + }); + + it("[VersionFetcher.DotNetCoreVersionFetcher] getVersionInfo should return latest version info if includePreviewVersion is true and only 1 channel and is preview", (done) => { + process.env["__versionspec__"] = "3.x"; + process.env["__inlcudepreviewversion__"] = "true"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionFetcherGetVersionInfoTestsCorrect.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should have returned the correct version info.")); + }, tr, done); + }); + + it("[VersionFetcher.DotNetCoreVersionFetcher] getVersionInfo should return latest version info if includePreviewVersion is false and latest version is preview", (done) => { + process.env["__versionspec__"] = "4.x"; + process.env["__inlcudepreviewversion__"] = "false"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionFetcherGetVersionInfoTestsCorrect.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should have returned the correct version info.")); + }, tr, done); + }); + + it("[VersionFetcher.DotNetCoreVersionFetcher] getDownloadUrl should throw if VersionFilesData doesn't contain download URL", (done) => { + process.env["__ostype__"] = "win"; + process.env["__getmachineosfail__"] = "false"; + process.env["__versioninfo__"] = `{"version":"2.2.104", "files": [{"name":"winpackage.zip", "rid":"win-x64", "url": ""}]}`; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionFetcherGetDownloadUrlFailTests.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == false, ("Should have failed as download URL is missing.")); + assert(tr.stdout.indexOf("DownloadUrlForMatchingOsNotFound") > 0, ("Should have thrown the error message as download URL is not present.")) + }, tr, done); + }); + + it("[VersionFetcher.DotNetCoreVersionFetcher] getDownloadUrl should throw if download information object with RID matching OS, could not be found", (done) => { + process.env["__ostype__"] = "win"; + process.env["__getmachineosfail__"] = "false"; + process.env["__versioninfo__"] = `{"version":"2.2.104", "files": [{"name": "linux.tar.gz", "rid":"linux-x64", "url": ""}, {"name": "win.zip", "rid":"win-x86", "url": ""}]}`; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionFetcherGetDownloadUrlFailTests.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == false, ("Should have failed as download URL is missing.")); + assert(tr.stdout.indexOf("DownloadUrlForMatchingOsNotFound") > 0, ("Should have thrown the error message as download URL is not present.")) + }, tr, done); + }); + + it("[VersionFetcher.DotNetCoreVersionFetcher] getDownloadUrl should throw if error encountered while detecting machine os", (done) => { + process.env["__ostype__"] = "win"; + process.env["__getmachineosfail__"] = "true"; + process.env["__versioninfo__"] = `{"version":"2.2.104", "files": [{"name": "linux.tar.gz", "rid":"linux-x64", "url": ""}, {"name":"winpackage.zip", "rid":"win-x86", "url": ""}]}`; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionFetcherGetDownloadUrlFailTests.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == false, ("Should have failed as machine os could not be detected.")); + assert(tr.stdout.indexOf("getMachinePlatformFailed") > 0, ("Should have thrown the error message as getMachineOs script execution was not successful.")) + }, tr, done); + }); + + it("[VersionFetcher.DotNetCoreVersionFetcher] getDownloadUrl should throw if zip package is not found for windows os", (done) => { + process.env["__ostype__"] = "win"; + process.env["__getmachineosfail__"] = "false"; + process.env["__versioninfo__"] = `{"version":"2.2.104", "files": [{"name": "winpacakage.exe", "rid":"win-x64", "url": "https://path.to/file.exe"}, {"name": "winpacakage2.exe", "rid":"win-x86", "url": "https://path.to/file.exe"}]}`; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionFetcherGetDownloadUrlFailTests.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == false, ("Should have failed as download URL is missing.")); + assert(tr.stdout.indexOf("DownloadUrlForMatchingOsNotFound") > 0, ("Should have thrown the error message as download url of zip could not be found for windows.")) + }, tr, done); + }); + + it("[VersionFetcher.DotNetCoreVersionFetcher] getDownloadUrl should throw if tar.gz package is not found for non windows os", (done) => { + process.env["__ostype__"] = "osx"; + process.env["__getmachineosfail__"] = "false"; + process.env["__versioninfo__"] = `{"version":"2.2.104", "files": [{"name": "linux.tar", "rid":"linux-x64", "url": "https://path.to/file.pkg"}, {"name": "osx.pkg", "rid":"osx-x64", "url": "https://path.to/file.pkg"}]}`; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionFetcherGetDownloadUrlFailTests.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == false, ("Should have failed as download URL is missing.")); + assert(tr.stdout.indexOf("DownloadUrlForMatchingOsNotFound") > 0, ("Should have thrown the error message as download url of tar file could not be found for mac os.")) + }, tr, done); + }); + + it("[VersionFetcher.DotNetCoreVersionFetcher] getDownloadUrl should return correct download URL for matching OS", (done) => { + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionFetcherGetDownloadUrlPassTests.js")); + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should have passed as download URL for all windows, linux and osx are available for correct rid.")); + assert(tr.stdout.indexOf("CorrectDownloadUrlsSuccessfullyReturnedForAllOs") > 0, ("Should have printed success message on receiving correct urls for all os's.")) + }, tr, done); + }); + + it("[VersionInstaller] constructor should throw if installationPath doesn't exist and cannot be created", (done) => { + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionInstallerTests.js")) + tr.run(); + runValidations(() => { + assert(tr.succeeded == false, ("Should have failed as the installation path doesn't exist and cannot be created or the process doesn't have permission over it.")) + }, tr, done); + }); + + it("[VersionInstaller] downloadAndInstall should throw if passed arguments are empty or doesn't contain version or downloadUrl is malformed", (done) => { + process.env["__case__"] = "urlerror"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionInstallerDownloadAndInstallTests.js")) + tr.run(); + runValidations(() => { + assert(tr.succeeded == false, ("Should have failed as the arguments passed are not correct.")); + assert(tr.stdout.indexOf("VersionCanNotBeDownloadedFromUrl") > -1, "Should have thrown this error: VersionCanNotBeDownloadedFromUrl"); + assert(tr.stdout.lastIndexOf("VersionCanNotBeDownloadedFromUrl") > tr.stdout.indexOf("VersionCanNotBeDownloadedFromUrl"), "Should have thrown this error: VersionCanNotBeDownloadedFromUrl"); + }, tr, done); + }); + + it("[VersionInstaller] downloadAndInstall should throw if downloading version from URL fails", (done) => { + process.env["__case__"] = "downloaderror"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionInstallerDownloadAndInstallTests.js")) + tr.run(); + runValidations(() => { + assert(tr.succeeded == false, ("Should have failed as downloading the package from url did not complete.")); + assert(tr.stdout.indexOf("CouldNotDownload") > -1, "Should have thrown this error: CouldNotDownload"); + }, tr, done); + }); + + it("[VersionInstaller] downloadAndInstall should throw if extracting downloaded package or copying folders into installation path fails.", (done) => { + process.env["__case__"] = "extracterror"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionInstallerDownloadAndInstallTests.js")) + tr.run(); + runValidations(() => { + assert(tr.succeeded == false, ("Should have failed as extraction of package was not successfull.")); + assert(tr.stdout.indexOf("FailedWhileExtractingPacakge") > -1, "Should have thrown this error: FailedWhileExtractingPacakge"); + }, tr, done); + }); + + it("[VersionInstaller] downloadAndInstall should not throw if root folders were successfully copied but copying root files from package into installationPath failed", (done) => { + process.env["__case__"] = "filecopyerror"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionInstallerDownloadAndInstallTests.js")) + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should have passed.")); + assert(tr.stdout.indexOf("FailedToCopyTopLevelFiles") > -1, "Should not have caused function failure when root file's copying failed."); + assert(tr.stdout.indexOf("SuccessfullyInstalled") > -1, "Function should have completed successfully."); + }, tr, done); + }); + + it("[VersionInstaller] downloadAndInstall should not copy files from root folder if version being installed in the path is not greater than all other already present or runtime is being installed", (done) => { + process.env["__case__"] = "conditionalfilecopy"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionInstallerDownloadAndInstallTests.js")) + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should have passed.")); + assert(tr.stdout.lastIndexOf("CopyingFilesIntoPath [ 'installationPath' ]") == tr.stdout.indexOf("CopyingFilesIntoPath [ 'installationPath' ]"), "Should have copied root files in only one case where the version being installed is latest among already installed ones."); + }, tr, done); + }); + + it("[VersionInstaller] downloadAndInstall should throw if creating version.complete file fails.", (done) => { + process.env["__case__"] = "versioncompletefileerror"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionInstallerDownloadAndInstallTests.js")) + tr.run(); + runValidations(() => { + assert(tr.succeeded == false, ("Should have failed as creating completion markup file failed for package.")); + assert(tr.stdout.indexOf("CreatingInstallationCompeleteFile") > -1, "Should have tried creating the file."); + assert(tr.stdout.indexOf("FailedWhileInstallingVersionAtPath") > -1, "Should have thrown this error as the parent error."); + }, tr, done); + }); + + it("[VersionInstaller] downloadAndInstall should complete successfully on complete installation and create complete file in both sdk and runtime when sdk is installed and in runtime when only runtime is installed.", (done) => { + process.env["__case__"] = "successfullinstall"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionInstallerDownloadAndInstallTests.js")) + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should have passed.")); + assert(tr.stdout.indexOf("SuccessfullyInstalled") > -1, "Should have SuccessfullyInstalled.") + }, tr, done); + }); + + it("[VersionInstaller] isVersionInstalled should throw if version being checked is not explicit.", (done) => { + process.env["__case__"] = "nonexplicit"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionInstallerIsVersionInstalledTests.js")) + tr.run(); + runValidations(() => { + assert(tr.succeeded == false, ("Should have failed.")); + assert(tr.stdout.indexOf("ExplicitVersionRequired") > -1, "Should have printed ExplicitVersionRequired.") + }, tr, done); + }); + + it("[VersionInstaller] isVersionInstalled should return false if either folder or file with name as version is not present inside sdk/runtime folder.", (done) => { + process.env["__case__"] = "folderorfilemissing"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionInstallerIsVersionInstalledTests.js")) + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should have returned false without failure.")); + assert(tr.stdout.indexOf("VersionFoundInCache") <= -1, "Should not have found any version in cache as either file or folder for that version were missing"); + }, tr, done); + }); + + it("[VersionInstaller] isVersionInstalled should return true if both folder or file with name as version is present inside sdk/runtime path.", (done) => { + process.env["__case__"] = "success"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "versionInstallerIsVersionInstalledTests.js")) + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should have returned false without failure.")); + assert(tr.stdout.indexOf("VersionFoundInCache") > -1, "Should not have found any version in cache as either file or folder for that version were missing"); + }, tr, done); + }); + + it("[usedotnet] run should throw if versionSpec is invalid.", (done) => { + process.env["__case__"] = "matchingversionnotfound"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "usedotnetTests.js")) + tr.run(); + runValidations(() => { + assert(tr.succeeded == false, ("Should have failed.")); + assert(tr.stdout.indexOf("MatchingVersionNotFound") > -1, "Should not have thrown this message as versionInfo for a matching version could not be found."); + }, tr, done); + }); + + it("[usedotnet] run should skip installation if version found in cache but should prepend all the required paths and should also use $(Agent.ToolsDirectory)/dotnet as installation when input is missing.", (done) => { + process.env["__case__"] = "skipinstallation"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "usedotnetTests.js")) + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should have passed.")); + assert(tr.stdout.indexOf("PrependingInstallationPath") > -1, "Should have prepended installation path"); + assert(tr.stdout.indexOf("PrependGlobalToolPath") > -1, "Should have printed this message as addDotNetCoreToolPath function should have been called."); + assert(tr.stdout.indexOf("PrependingGlobalToolPath") > -1, "Should have prepended global tool path"); + assert(tr.stdout.indexOf("DownloadAndInstallCalled") == -1, "Should not have printed this message as DownloadAndInstall function should not have been called."); + }, tr, done); + }); + + it("[usedotnet] run should install if version is not found in cache and prepend the required paths.", (done) => { + process.env["__case__"] = "installversion"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "usedotnetTests.js")) + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should have passed.")); + assert(tr.stdout.indexOf("PrependingInstallationPath") > -1, "Should have prepended installation path"); + assert(tr.stdout.indexOf("PrependGlobalToolPath") > -1, "Should have printed this message as addDotNetCoreToolPath function should have been called."); + assert(tr.stdout.indexOf("PrependingGlobalToolPath") > -1, "Should have prepended global tool path"); + assert(tr.stdout.indexOf("DownloadAndInstallCalled") > -1, "Should have printed this message as DownloadAndInstall function should have been called."); + }, tr, done); + }); + + it("[usedotnet] run should not fail if globalToolPath could not be created or set.", (done) => { + process.env["__case__"] = "globaltoolpathfailure"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "usedotnetTests.js")) + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should have passed.")); + assert(tr.stdout.indexOf("PrependingInstallationPath") > -1, "Should have prepended installation path"); + assert(tr.stdout.indexOf("PrependGlobalToolPath") > -1, "Should have printed this message as addDotNetCoreToolPath function should have been called."); + assert(tr.stdout.indexOf("ErrorWhileSettingDotNetToolPath") > -1, "Should have printed this message as error must have been encountered while setting GlobalToolPath."); + }, tr, done); + }); + + it("[globaljsonfetcher] run should not fail if one global.json with a valid version was found.", (done) => { + process.env["__case__"] = "subdirAsRoot"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "globaljsonfetcherTest.js")) + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should have passed.")); + assert(tr.stdout.indexOf("GlobalJsonFound") > -1, "should found a global.json file"); + }, tr, done); + }); + it("[globaljsonfetcher] run should not fail if two global.json with a valid version was found.", (done) => { + process.env["__case__"] = "rootAsRoot"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "globaljsonfetcherTest.js")) + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should have passed.")); + assert(tr.stdout.indexOf("GlobalJsonFound") > -1, "should found a global.json file"); + }, tr, done); + }); + it("[globaljsonfetcher] run should fail if no global.json is found.", (done) => { + process.env["__case__"] = "invalidDir"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "globaljsonfetcherTest.js")) + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should't have passed.")); + assert(tr.stdout.indexOf("FailedToFindGlobalJson") > -1, "should throw an error that no file was found."); + }, tr, done); + }); + it("[globaljsonfetcher] run shouldn't fail if the global.json is empty.", (done) => { + process.env["__case__"] = "emptyGlobalJson"; + let tr = new ttm.MockTestRunner(path.join(__dirname, "globaljsonfetcherTest.js")) + tr.run(); + runValidations(() => { + assert(tr.succeeded == true, ("Should passed.")); + assert(tr.stdout.indexOf("GlobalJsonIsEmpty") > -1, "should throw an error that no file was found."); + }, tr, done); + }) +}); + diff --git a/_generated/UseDotNetV2_Node16/Tests/globaljsonfetcherTest.ts b/_generated/UseDotNetV2_Node16/Tests/globaljsonfetcherTest.ts new file mode 100644 index 000000000000..8a0a7d49bb0b --- /dev/null +++ b/_generated/UseDotNetV2_Node16/Tests/globaljsonfetcherTest.ts @@ -0,0 +1,136 @@ +"use strict"; +import * as tl from 'azure-pipelines-task-lib/task'; +import { GlobalJson } from "../globaljsonfetcher"; +import { Buffer } from "buffer"; +import { VersionInfo } from '../models'; +import { Promise } from 'q'; +import fs = require('fs'); +var mockery = require('mockery'); + +const workingDir: string = "work/"; +const validRootGlobalJson = workingDir + "global.json"; +const rootVersionNumber = "2.2.2"; +const workingSubDir = workingDir + "testdir/"; +const validSubDirGlobalJson = workingSubDir + "global.json"; +const subDirVersionNumber = "3.0.0-pre285754637"; +const pathToEmptyGlobalJsonDir = workingDir + "empty/"; +const pathToEmptyGlobalJson = pathToEmptyGlobalJsonDir + "global.json"; + +//setup mocks +mockery.enable({ + useCleanCache: true, + warnOnReplace: false, + warnOnUnregistered: false +}); + +mockery.registerMock('azure-pipelines-task-lib/task', { + findMatch: function (path: string, searchPattern: string): string[] { + if (searchPattern != "**/global.json") { + return []; + } + if (path == workingDir) { + // If it's working dir subdir is included, because it is a child; + return [validRootGlobalJson, validSubDirGlobalJson]; + } + if (path == workingSubDir) { + return [validSubDirGlobalJson]; + } + if (path == pathToEmptyGlobalJsonDir) { + return [pathToEmptyGlobalJson]; + } + return []; + }, + loc: function (locString, ...param: string[]) { return tl.loc(locString, param); }, + debug: function (message) { return tl.debug(message); } +}); + +mockery.registerMock('fs', { + ...fs, + readFileSync: function (path: string): Buffer { + if (path == validRootGlobalJson) { + var globalJson = new GlobalJson(rootVersionNumber); + return Buffer.from(JSON.stringify(globalJson)); + } + if (path == validSubDirGlobalJson) { + var globalJson = new GlobalJson(subDirVersionNumber); + return Buffer.from(JSON.stringify(globalJson)); + } + if (path == pathToEmptyGlobalJson) { + return Buffer.from(""); + } + return Buffer.from(null); + } +}); + +mockery.registerMock('./versionfetcher', { + DotNetCoreVersionFetcher: function (explicitVersioning: boolean = false) { + return { + getVersionInfo: function (versionSpec: string, vsVersionSpec: string, packageType: string, includePreviewVersions: boolean): Promise { + return Promise((resolve, reject) => { + resolve(new VersionInfo({ + version: versionSpec, + files: [{ + name: 'testfile.json', + hash: 'testhash', + url: 'testurl', + rid: 'testrid' + }], + "runtime-version": versionSpec, + "vs-version": vsVersionSpec + }, packageType)); + }); + } + } + } + +}); + +// start test +import { globalJsonFetcher } from "../globaljsonfetcher"; +if (process.env["__case__"] == "subdirAsRoot") { + let fetcher = new globalJsonFetcher(workingSubDir); + fetcher.GetVersions().then(versionInfos => { + if (versionInfos.length != 1) { + throw "GetVersions should return one result if one global.json is found."; + } + if (versionInfos[0].getVersion() != subDirVersionNumber) { + throw `GetVersions should return the version number that was inside the global.json. Expected: ${subDirVersionNumber} Actual: ${versionInfos[0].getVersion()}`; + } + if (versionInfos[0].getPackageType() != 'sdk') { + throw `GetVersions return always 'sdk' as package type. Actual: ${versionInfos[0].getPackageType()}`; + } + }); +} + +if (process.env["__case__"] == "rootAsRoot") { + let fetcher = new globalJsonFetcher(workingDir); + fetcher.GetVersions().then(versionInfos => { + if (versionInfos.length != 2) { + throw "GetVersions should return all global.json in a folder hierarchy result if multiple global.json are found."; + } + }); +} + +if (process.env["__case__"] == "invalidDir") { + let fetcher = new globalJsonFetcher("invalidDir"); + fetcher.GetVersions().then(versionInfos => { + throw "GetVersions shouldn't success if no matching version was found."; + }, err => { + // here we are good because the getVersion throw an error. + return; + }); +} + +if (process.env["__case__"] == "emptyGlobalJson") { + let fetcher = new globalJsonFetcher(pathToEmptyGlobalJsonDir); + fetcher.GetVersions().then(versionInfos => { + if (versionInfos == null) { + throw "GetVersions shouldn't return null if the global.json is empty."; + } + if (versionInfos.length != 0) { + throw "GetVersions shouldn't return a arry with 0 elements if global.json is empty."; + } + }, err => { + throw "GetVersions shouldn't throw an error if global.json is empty."; + }); +} \ No newline at end of file diff --git a/_generated/UseDotNetV2_Node16/Tests/mocks/mockedModels.ts b/_generated/UseDotNetV2_Node16/Tests/mocks/mockedModels.ts new file mode 100644 index 000000000000..413e019c521c --- /dev/null +++ b/_generated/UseDotNetV2_Node16/Tests/mocks/mockedModels.ts @@ -0,0 +1,41 @@ +export class HttpClientResponse { + constructor(message) { + this.message = message; + } + public readBody() { + return new Promise((resolve, reject) => { + resolve(this.message); + }) + } + message: string = "" +} + +export class toolrunner { + constructor(toolPath, outputToReturn) { + this.toolPath = toolPath; + this.outputToReturn = outputToReturn; + } + public line (somearg) { + return this; + } + + public arg (args) { + return this; + } + + public execSync() { + if (this.outputToReturn) { + return this.outputToReturn; + } + + return { + code: 0, + error: null, + stdout: "", + stderr: "" + } + } + + private toolPath; + private outputToReturn; +} \ No newline at end of file diff --git a/_generated/UseDotNetV2_Node16/Tests/modelsChannelTests.ts b/_generated/UseDotNetV2_Node16/Tests/modelsChannelTests.ts new file mode 100644 index 000000000000..45846ab24910 --- /dev/null +++ b/_generated/UseDotNetV2_Node16/Tests/modelsChannelTests.ts @@ -0,0 +1,73 @@ +'use strict'; +import { Channel } from "../models"; +import * as tl from 'azure-pipelines-task-lib/task'; + +if (process.env["__invalid_channelobject__"] == "true") { + let throwCount: number = 0; + // try with non explicit version + try { + new Channel(null); + } + catch (ex) { + throwCount++; + } + + try { + new Channel(undefined); + } + catch (ex) { + throwCount++; + } + + try { + new Channel(""); + } + catch (ex) { + throwCount++; + } + + try { + new Channel({}); + } + catch (ex) { + throwCount++; + } + + try { + new Channel({"channel-version": undefined, "releases.json": ""}); + } + catch (ex) { + throwCount++; + } + + try { + new Channel({"channel-version": "2.2", "releases.json": null}); + } + catch (ex) { + throwCount++; + } + + try { + new Channel({"channel-version": "2.2", "releases.json": ""}); + } + catch (ex) { + throwCount++; + } + + if (throwCount == 7) { + throw tl.loc("FunctionThrewAsExpected"); + } +} +else { + let channel = new Channel({"channel-version": "2.2", "releases.json": "https://channelRelease.com"}); + if (channel.channelVersion != "2.2" || channel.releasesJsonUrl != "https://channelRelease.com") { + throw tl.loc("first") + } + + channel = new Channel({"channel-version": "3.x", "releases.json": "https://channelRelease.com/downloadreleases.json"}); + if (channel.channelVersion != "3.x" || channel.releasesJsonUrl != "https://channelRelease.com/downloadreleases.json") { + throw tl.loc("second") + } + + console.log("ChannelCreatedSuccessfully"); +} \ No newline at end of file diff --git a/_generated/UseDotNetV2_Node16/Tests/modelsGetRuntimeVersionTests.ts b/_generated/UseDotNetV2_Node16/Tests/modelsGetRuntimeVersionTests.ts new file mode 100644 index 000000000000..7e64c0d031d1 --- /dev/null +++ b/_generated/UseDotNetV2_Node16/Tests/modelsGetRuntimeVersionTests.ts @@ -0,0 +1,30 @@ +'use strict'; +import { VersionInfo } from "../models"; +import * as tl from 'azure-pipelines-task-lib/task'; + +if (process.env["__sdk_runtime__"] == "true") { + let versionInfo = new VersionInfo(JSON.parse(`{"version":"2.1.1", "files": []}`), "sdk"); + if (versionInfo.getRuntimeVersion() != "") { + throw ""; + } + + versionInfo = new VersionInfo(JSON.parse(`{"version":"2.1.1", "runtime-version":"2.2.4", "files": []}`), "sdk"); + if (versionInfo.getRuntimeVersion() != "2.2.4") { + throw ""; + } + + console.log(tl.loc("RuntimeVersionsReturnedForSdkAreCorrect")); +} +else { + let versionInfo = new VersionInfo(JSON.parse(`{"version":"2.1.1", "files": []}`), "runtime"); + if (versionInfo.getRuntimeVersion() != "2.1.1") { + throw ""; + } + + versionInfo = new VersionInfo(JSON.parse(`{"version":"2.1.1", "runtime-version": "2.2.4", "files": []}`), "runtime"); + if (versionInfo.getRuntimeVersion() != "2.1.1") { + throw ""; + } + + console.log(tl.loc("RuntimeVersionsReturnedAreCorrect")); +} \ No newline at end of file diff --git a/_generated/UseDotNetV2_Node16/Tests/modelsVersionPartsTests.ts b/_generated/UseDotNetV2_Node16/Tests/modelsVersionPartsTests.ts new file mode 100644 index 000000000000..b51c3f070c48 --- /dev/null +++ b/_generated/UseDotNetV2_Node16/Tests/modelsVersionPartsTests.ts @@ -0,0 +1,119 @@ +'use strict'; +import { VersionParts } from "../models"; +import * as tl from 'azure-pipelines-task-lib/task'; + +if (process.env["__invalid_versionparts__"] == "true") { + let throwCount: number = 0; + // try with non explicit version + try { + new VersionParts("2a.x"); + } + catch (ex) { + throwCount++; + } + + try { + new VersionParts("2.2x"); + } + catch (ex) { + throwCount++; + } + + try { + new VersionParts("2.x.2"); + } + catch (ex) { + throwCount++; + } + + try { + new VersionParts("2.2."); + } + catch (ex) { + throwCount++; + } + + try { + new VersionParts("2.2"); + } + catch (ex) { + throwCount++; + } + + try { + new VersionParts(""); + } + catch (ex) { + throwCount++; + } + + try { + new VersionParts(".."); + } + catch (ex) { + throwCount++; + } + + try { + new VersionParts("2.2.2fs"); + } + catch (ex) { + throwCount++; + } + try{ + new VersionParts("2.2.x", true); + } + catch(ex){ + throwCount++; + } + try{ + new VersionParts("2.x.x", true); + } + catch(ex){ + throwCount++; + } + try{ + new VersionParts("2.2.2.2", true); + } + catch(ex){ + throwCount++; + } + try{ + new VersionParts("2.2.2fs", true); + } + catch(ex){ + throwCount++; + } + + if (throwCount == 12) { + throw tl.loc("FunctionThrewAsExpected"); + } +} +else { + let versionParts = new VersionParts("2.x") + if (versionParts.majorVersion != "2" || versionParts.minorVersion != "x" || versionParts.patchVersion != "") { + throw tl.loc("first") + } + + versionParts = new VersionParts("2.100.x"); + if (versionParts.majorVersion != "2" || versionParts.minorVersion != "100" || versionParts.patchVersion != "x") { + throw tl.loc("second") + } + + versionParts = new VersionParts("2.100.1"); + if (versionParts.majorVersion != "2" || versionParts.minorVersion != "100" || versionParts.patchVersion != "1") { + throw tl.loc("third") + } + + versionParts = new VersionParts("2.100.13-preview"); + if (versionParts.majorVersion != "2" || versionParts.minorVersion != "100" || versionParts.patchVersion != "13-preview") { + throw tl.loc("fourth") + } + + versionParts = new VersionParts("2.100.14-rc1-431"); + if (versionParts.majorVersion != "2" || versionParts.minorVersion != "100" || versionParts.patchVersion != "14-rc1-431") { + throw tl.loc("fifth") + } + + console.log("VersionPartsCreatedSuccessfully"); +} \ No newline at end of file diff --git a/_generated/UseDotNetV2_Node16/Tests/usedotnetTests.ts b/_generated/UseDotNetV2_Node16/Tests/usedotnetTests.ts new file mode 100644 index 000000000000..46697968f6a3 --- /dev/null +++ b/_generated/UseDotNetV2_Node16/Tests/usedotnetTests.ts @@ -0,0 +1,178 @@ +"use strict"; +import * as os from 'os'; +import * as tl from 'azure-pipelines-task-lib/task'; +import { Constants } from '../versionutilities'; +import { VersionInfo } from '../models'; +import { setFlagsFromString } from 'v8'; +import fs = require('fs'); + +let mockery = require('mockery'); +let osType = "win"; + +//setup mocks +mockery.enable({ + useCleanCache: true, + warnOnReplace: false, + warnOnUnregistered: false +}); + +mockery.registerMock('fs', { + ...fs, + lstatSync: function (elementPath: string) { + if (elementPath.indexOf(".") > -1 && !elementPath.endsWith("1.0.0") && !elementPath.endsWith("2.0.0") && !elementPath.endsWith("2.1.0")) { + return { + isDirectory: function () { + return false; + } + }; + } + + return { + isDirectory: function () { + return true; + } + }; + } +}); + +mockery.registerMock('azure-pipelines-task-lib/task', { + getHttpProxyConfiguration: function () { return ""; }, + getHttpCertConfiguration: function () { return "" }, + setResourcePath: function (resourcePath) { return; }, + prependPath: function (toolPath: string): void { + if (process.env["__case__"] == "globaltoolpathfailure" && toolPath.includes(Constants.relativeGlobalToolPath)) { + throw tl.loc("ErrorWhileSettingDotNetToolPath"); + } + + if (toolPath.includes("installationPath") || toolPath.includes("agentstooldir")) { + console.log(tl.loc("PrependingInstallationPath")) + return; + } + + if (toolPath.includes(Constants.relativeGlobalToolPath)) { + console.log(tl.loc("PrependingGlobalToolPath")); + } + + throw ""; + }, + osType: function () { return os.type(); }, + mkdirP: function (directoryPath) { return; }, + loc: function (locString, ...param: string[]) { return tl.loc(locString, param); }, + debug: function (message) { return tl.debug(message); }, + getVariable: function (variableName) { + if (variableName == "Agent.ToolsDirectory") { + return "agentstooldir"; + } + + return tl.getVariable(variableName); + }, + getInput: function (inputName: string, required: boolean): string { + if (inputName == "packageType") { + return "sdk"; + } + else if (inputName == "version") { + return "2.2.1"; + } + else if (inputName == "installationPath") { + if (process.env["__case__"] == "skipinstallation") { + return ""; + } + + return "installationPath"; + } + }, + getBoolInput: function (inputName: string, required: boolean): boolean { + if (inputName == "includePreviewVersions") { + if (required) { + throw ""; + } + + return false; + } + else if (inputName == "performMultiLevelLookup") { + if (required) { + throw ""; + } + + return false; + } + }, + getPathInput: function (inputName: string, required: boolean): string { + if (inputName == "workingDirectory") { + + return ""; + } + return ""; + }, + setResult: function (result: tl.TaskResult, message: string): void { + tl.setResult(result, message); + }, + setVariable: function (name: string, value: string, secret?: boolean) { + tl.setVariable(name, value, secret ? true : false); + }, + TaskResult: { + Failed: tl.TaskResult.Failed, + Succeeded: tl.TaskResult.Succeeded + } +}); + +mockery.registerMock('./versionfetcher', { + DotNetCoreVersionFetcher: function () { + return { + getVersionInfo: function (versionSpec: string, vsVersionSpec: string, packageType: string, includePreviewVersions: boolean): Promise { + if (process.env["__case__"] == "matchingversionnotfound") { + return new Promise((resolve, reject) => { + resolve(null); + }); + } + + return new Promise((resolve, reject) => { + resolve(new VersionInfo(JSON.parse(`{"version":"2.1.0", "runtime-version":"2.1.100", "files":[{"name":"win-x64.zip", "url":"https://pathToWin/zip", "rid":"win-x64"}]}`), "sdk")); + }); + }, + getDownloadUrl: function (versionInfo: VersionInfo): string { + return versionInfo.getFiles()[0].url; + } + } + } +}); + +mockery.registerMock('./versioninstaller', { + VersionInstaller: function (pacakageType: string, receivedInstallationPath: string) { + console.log(tl.loc("installationPathValueIs", receivedInstallationPath)) + if (process.env["__case__"] == "skipinstallation" && !receivedInstallationPath.includes("agentstooldir") && !receivedInstallationPath.includes("dotnet")) { + throw ""; + } + + return { + isVersionInstalled: function (version: string): boolean { + if (process.env["__case__"] == "skipinstallation") { + return true; + } + + return false; + }, + downloadAndInstall: function (versionInfo: VersionInfo, downloadUrl: string): Promise { + console.log(tl.loc("DownloadAndInstallCalled")); + return new Promise((resolve, reject) => { + resolve(); + }); + } + } + } +}); + +mockery.registerMock('./nugetinstaller', { + NuGetInstaller: { + installNuGet: function (version) { + return new Promise((resolve, reject) => { + resolve(); + }) + } + } +}); + +process.env["USERPROFILE"] = "userprofile" +process.env.HOME = "home" + +require('../usedotnet'); \ No newline at end of file diff --git a/_generated/UseDotNetV2_Node16/Tests/versionFetcherGetDownloadUrlFailTests.ts b/_generated/UseDotNetV2_Node16/Tests/versionFetcherGetDownloadUrlFailTests.ts new file mode 100644 index 000000000000..c42f337dfd7c --- /dev/null +++ b/_generated/UseDotNetV2_Node16/Tests/versionFetcherGetDownloadUrlFailTests.ts @@ -0,0 +1,87 @@ +"use strict"; +import * as tl from 'azure-pipelines-task-lib/task'; +import * as os from 'os'; +import { toolrunner } from './mocks/mockedModels' +var mockery = require('mockery'); + +mockery.enable({ + useCleanCache: true, + warnOnReplace: false, + warnOnUnregistered: false +}); + +mockery.registerMock('typed-rest-client/HttpClient', { + HttpClient: function () { + return { + get: function (url: string, headers) { + return ""; + } + } + } +}); + +mockery.registerMock('azure-pipelines-task-lib/task', { + osType: function () { return process.env["__ostype__"]; }, + which: function (tool: string, check: boolean) { + if (tool == 'powershell') { + return "C:/Program Files/PowerShell"; + } + else if (tool.endsWith(".sh")) { + return "/temp/somefile.sh"; + } + }, + tool: function (pathToTool) { + if (process.env["__ostype__"].toLowerCase().includes("win")) { + if (process.env["__getmachineosfail__"] == "true") { + return new toolrunner(pathToTool, {code: 1, error: null, stderr: "failedWhileExecutingScript"}); + } + + return new toolrunner(pathToTool, { + code: 0, + error: null, + stderr: "", + stdout: `Primary:win-x64${os.EOL}Legacy:win-x64` + }); + } + else if (process.env["__ostype__"].toLowerCase().includes("linux")) { + return new toolrunner(pathToTool, { + code: 0, + error: null, + stderr: "", + stdout: `Primary:linux-x64${os.EOL}Legacy:ubuntu16.04` + }); + } + else if (process.env["__ostype__"].toLowerCase().includes("osx")) { + return new toolrunner(pathToTool, { + code: 0, + error: null, + stderr: "", + stdout: `Primary:osx-x64${os.EOL}Legacy:osx-x64` + }); + } + }, + loc: function (locString, param: string[]) { return tl.loc(locString, param); }, + debug: function (message) { return tl.debug(message); }, + error: function (errorMessage) { return tl.error(errorMessage); }, + getVariable: function (variableName) { return tl.getVariable(variableName); }, + getHttpProxyConfiguration: function () { return ""; }, + getHttpCertConfiguration: function () { return "" }, + setResourcePath: function (path) { return; } +}); + +import { DotNetCoreVersionFetcher } from "../versionfetcher"; +import { VersionInfo } from '../models'; + +let versionFetcher = new DotNetCoreVersionFetcher(); +try { + let versionInfo = new VersionInfo(JSON.parse(process.env["__versioninfo__"]), "sdk"); + let downloadUrl = versionFetcher.getDownloadUrl(versionInfo); + if (downloadUrl) { + tl.setResult(tl.TaskResult.Succeeded, "succeeded"); + } + + tl.setResult(tl.TaskResult.Failed, "DownloadUrlWasNotReturned"); +} +catch (ex) { + tl.setResult(tl.TaskResult.Failed, "TestThrewException" + ex); +} \ No newline at end of file diff --git a/_generated/UseDotNetV2_Node16/Tests/versionFetcherGetDownloadUrlPassTests.ts b/_generated/UseDotNetV2_Node16/Tests/versionFetcherGetDownloadUrlPassTests.ts new file mode 100644 index 000000000000..f10c0f0b2bfd --- /dev/null +++ b/_generated/UseDotNetV2_Node16/Tests/versionFetcherGetDownloadUrlPassTests.ts @@ -0,0 +1,103 @@ +"use strict"; +import * as tl from 'azure-pipelines-task-lib/task'; +import * as os from 'os'; +import { toolrunner } from './mocks/mockedModels' +var mockery = require('mockery'); +var osType = "win"; + +mockery.enable({ + useCleanCache: true, + warnOnReplace: false, + warnOnUnregistered: false +}); + +mockery.registerMock('typed-rest-client/HttpClient', { + HttpClient: function () { + return { + get: function (url: string, headers) { + return ""; + } + } + } +}); + +mockery.registerMock('azure-pipelines-task-lib/task', { + osType: function () { return osType; }, + which: function (tool: string, check: boolean) { + if (tool == 'powershell') { + return "C:/Program Files/PowerShell"; + } + else if (tool.endsWith(".sh")) { + return "/temp/somefile.sh"; + } + }, + tool: function (pathToTool) { + if (osType.toLowerCase().includes("win")) { + return new toolrunner(pathToTool, { + code: 0, + error: null, + stderr: "", + stdout: `Primary:win-x64${os.EOL}Legacy:win-x64` + }); + } + else if (osType.toLowerCase().includes("linux")) { + return new toolrunner(pathToTool, { + code: 0, + error: null, + stderr: "", + stdout: `Primary:linux-x64${os.EOL}Legacy:ubuntu16.04` + }); + } + else if (osType.toLowerCase().includes("osx")) { + return new toolrunner(pathToTool, { + code: 0, + error: null, + stderr: "", + stdout: `Primary:osx-x64${os.EOL}Legacy:osx-x64` + }); + } + }, + loc: function (locString, param: string[]) { return tl.loc(locString, param); }, + debug: function (message) { return tl.debug(message); }, + error: function (errorMessage) { return tl.error(errorMessage); }, + getVariable: function (variableName) { return tl.getVariable(variableName); }, + getHttpProxyConfiguration: function () { return ""; }, + getHttpCertConfiguration: function () { return "" }, + setResourcePath: function (path) { return; } +}); + + +import { DotNetCoreVersionFetcher } from "../versionfetcher"; +import { VersionInfo } from '../models'; +try { + let versionInfo = new VersionInfo(JSON.parse(`{"version":"2.2.104", "files": [{"name": "linux.tar.gz", "rid":"linux-x64", "url": "https://path.to/file.tar.gz"}, {"name": "osx.pkg", "rid":"osx-x64", "url": "https://path.to/file.pkg"}, {"name": "osx.tar.gz", "rid":"osx-x64", "url": "https://path.toMac/file.tar.gz"}, {"name": "win.exe", "rid":"win-x64", "url": "https://path.to/file.exe"}, {"name": "win.zip", "rid":"win-x64", "url": "https://path.to/file.zip"}]}`), "sdk"); + + // Test for windows + osType = "win"; + let versionFetcher = new DotNetCoreVersionFetcher(); + let downloadUrl = versionFetcher.getDownloadUrl(versionInfo); + if (downloadUrl != "https://path.to/file.zip") { + throw ""; + } + + // Test for linux + osType = "linux"; + versionFetcher = new DotNetCoreVersionFetcher(); + downloadUrl = versionFetcher.getDownloadUrl(versionInfo); + if (downloadUrl != "https://path.to/file.tar.gz") { + throw ""; + } + + // Test for mac os + osType = "osx"; + versionFetcher = new DotNetCoreVersionFetcher(); + downloadUrl = versionFetcher.getDownloadUrl(versionInfo); + if (downloadUrl != "https://path.toMac/file.tar.gz") { + throw ""; + } + + tl.setResult(tl.TaskResult.Succeeded, "CorrectDownloadUrlsSuccessfullyReturnedForAllOs"); +} +catch (ex) { + tl.setResult(tl.TaskResult.Failed, "TestThrewException" + ex); +} \ No newline at end of file diff --git a/_generated/UseDotNetV2_Node16/Tests/versionFetcherGetVersionInfoFailTests.ts b/_generated/UseDotNetV2_Node16/Tests/versionFetcherGetVersionInfoFailTests.ts new file mode 100644 index 000000000000..1daaabb562bd --- /dev/null +++ b/_generated/UseDotNetV2_Node16/Tests/versionFetcherGetVersionInfoFailTests.ts @@ -0,0 +1,135 @@ +"use strict"; +import * as tl from 'azure-pipelines-task-lib/task'; +import { HttpClientResponse } from "./mocks/mockedModels" +var mockery = require('mockery'); + +mockery.enable({ + useCleanCache: true, + warnOnReplace: false, + warnOnUnregistered: false +}); + +mockery.registerMock('typed-rest-client/HttpClient', { + HttpClient: function () { + return { + get: function (url: string, headers) { + if (url == DotNetCoreReleasesIndexUrl && process.env["__failat__"] == "versionnotfound") { + return new Promise((resolve, reject) => { + resolve(new HttpClientResponse(`{ + "releases-index": [ + { + "channel-version": "2.2", + "releases.json": "${ReleasesJsonUrl2}" + }, + { + "channel-version": "3.0", + "releases.json": "${ReleasesJsonUrl3}", + "support-phase": "preview" + }, + { + "channel-version": "4.0", + "releases.json": "${ReleasesJsonUrl4}" + }, + { + "channel-version": "4.1", + "releases.json": "${ReleasesJsonUrl5}", + "support-phase": "preview" + } + ] + }`)) + }); + } + else if (url == DotNetCoreReleasesIndexUrl && process.env["__failat__"] == "channelfetch") { + return new Promise((resolve, reject) => { + reject(""); + }); + } + else if (url == ReleasesJsonUrl2) { + return new Promise((resolve, reject) => { + resolve(new HttpClientResponse(`{ + "releases": [ + { + "version": "2.2.104", + "files": [ + "rid": "winx64", + "url": "https://dotnetWindowsDownloadUrl.com" + ] + } + ] + }`)); + }); + } + else if (url == ReleasesJsonUrl3) { + return new Promise((resolve, reject) => { + resolve(new HttpClientResponse(`{ + "releases": [ + { + "version": "3.0.104", + "files": [ + "rid": "winx64", + "url": "https://dotnetWindowsDownloadUrl.com" + ] + } + ] + }`)); + }); + } + else if (url == ReleasesJsonUrl4) { + return new Promise((resolve, reject) => { + resolve(new HttpClientResponse(`{ + "releases": [ + { + "version": "4.0.102", + "files": [ + "rid": "winx64", + "url": "https://dotnetWindowsDownloadUrl.com" + ] + } + ] + }`)); + }); + } + else if (url == ReleasesJsonUrl5) { + return new Promise((resolve, reject) => { + resolve(new HttpClientResponse(`{ + "releases": [ + { + "version": "4.1.100", + "files": [ + "rid": "winx64", + "url": "https://dotnetWindowsDownloadUrl.com" + ] + } + ] + }`)); + }); + } + } + } + } +}); + +import { DotNetCoreVersionFetcher } from "../versionfetcher"; + +const DotNetCoreReleasesIndexUrl: string = "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json"; +const ReleasesJsonUrl2: string = "https://releases.file.com/version2.2.json" +const ReleasesJsonUrl3: string = "https://releases.file.com/version3.0.json" +const ReleasesJsonUrl4: string = "https://releases.file.com/version4.0.json" +const ReleasesJsonUrl5: string = "https://releases.file.com/version4.1.json" + +let versionFetcher = new DotNetCoreVersionFetcher(); +versionFetcher.getVersionInfo(process.env["__versionspec__"], null, "sdk", process.env["__inlcudepreviewversion__"] == "true") + .catch((ex) => { + if (process.env["__versionspec__"] == "2.2.999-cantbefound-234") { + tl.setResult(tl.TaskResult.Failed, "FailedAsExpected"); + } + else if (process.env["__versionspec__"] == "3.x" && process.env["__inlcudepreviewversion__"] != "true") { + tl.setResult(tl.TaskResult.Failed, "FailedAsExpected"); + } + else if (process.env["__versionspec__"] == "4.40.x" && process.env["__inlcudepreviewversion__"] == "true") { + tl.setResult(tl.TaskResult.Failed, "FailedAsExpected"); + } + else { + tl.setResult(tl.TaskResult.Succeeded, "succeeded"); + } + }); \ No newline at end of file diff --git a/_generated/UseDotNetV2_Node16/Tests/versionFetcherGetVersionInfoTestsCorrect.ts b/_generated/UseDotNetV2_Node16/Tests/versionFetcherGetVersionInfoTestsCorrect.ts new file mode 100644 index 000000000000..9abdcb564352 --- /dev/null +++ b/_generated/UseDotNetV2_Node16/Tests/versionFetcherGetVersionInfoTestsCorrect.ts @@ -0,0 +1,234 @@ +"use strict"; +import * as tl from 'azure-pipelines-task-lib/task'; +import { HttpClientResponse } from "./mocks/mockedModels" +var mockery = require('mockery'); + +mockery.enable({ + useCleanCache: true, + warnOnReplace: false, + warnOnUnregistered: false +}); + +mockery.registerMock('typed-rest-client/HttpClient', { + HttpClient: function () { + return { + get: function (url: string, headers) { + if (url == DotNetCoreReleasesIndexUrl) { + return new Promise((resolve, reject) => { + resolve(new HttpClientResponse(`{ + "releases-index": [ + { + "channel-version": "2.0", + "releases.json": "${ReleasesJsonUrl0}" + }, + { + "channel-version": "2.1", + "releases.json": "${ReleasesJsonUrl1}" + }, + { + "channel-version": "2.2", + "releases.json": "${ReleasesJsonUrl2}" + }, + { + "channel-version": "2.3", + "releases.json": "${ReleasesJsonUrl3}" + }, + { + "channel-version": "3.0", + "releases.json": "${ReleasesJsonUrl4}", + "support-phase": "preview" + }, + { + "channel-version": "4.0", + "releases.json": "${ReleasesJsonUrl5}" + }, + { + "channel-version": "4.1", + "releases.json": "${ReleasesJsonUrl6}", + "support-phase": "preview" + } + ] + }`)); + }); + } + else if (url == ReleasesJsonUrl0) { + return new Promise((resolve, reject) => { + resolve(new HttpClientResponse(`{ + "releases": [ + { + "sdk": { + "version": "2.0.1", + "files": [] + } + }, + { + "sdk": { + "version": "2.1.104", + "files": [] + } + } + ] + }`)); + }); + } + else if (url == ReleasesJsonUrl1) { + return new Promise((resolve, reject) => { + resolve(new HttpClientResponse(`{ + "releases": [ + { + "sdk": { + "version": "2.1.103-preview-999", + "files": [] + } + } + ] + }`)); + }); + } + else if (url == ReleasesJsonUrl2) { + return new Promise((resolve, reject) => { + resolve(new HttpClientResponse(` + { + "releases": [ + { + "sdk": { + "version": "2.2.106-preview-1", + "files": [] + } + }, + { + "sdks": [ + { + "version": "2.2.104", + "files": [] + }, + { + "version": "2.2.105", + "files": [] + } + ] + }, + { + "sdk": { + "version": "2.2.103", + "files": [] + } + } + ] + }`)); + }); + } + else if (url == ReleasesJsonUrl3) { + return new Promise((resolve, reject) => { + resolve(new HttpClientResponse(`{ + "releases": [ + { + "sdk": { + "version": "2.3.105", + "files": [] + } + }, + { + "sdk": { + "version": "2.3.103-preview-999", + "files": [] + } + } + ] + }`)); + }); + } + else if (url == ReleasesJsonUrl4) { + return new Promise((resolve, reject) => { + resolve(new HttpClientResponse(`{ + "releases": [ + { + "sdk": { + "version": "3.0.10-preview-999", + "files": [] + } + } + ] + }`)); + }); + } + else if (url == ReleasesJsonUrl5) { + return new Promise((resolve, reject) => { + resolve(new HttpClientResponse(`{ + "releases": [ + { + "sdk": { + "version": "4.0.100", + "files": [] + } + } + ] + }`)); + }); + } + else if (url == ReleasesJsonUrl6) { + return new Promise((resolve, reject) => { + resolve(new HttpClientResponse(`{ + "releases": [ + { + "sdk": { + "version": "4.1.5-preview-999", + "files": [] + } + } + ] + }`)); + }); + } + } + } + } +}); + +import { DotNetCoreVersionFetcher } from "../versionfetcher"; + +const DotNetCoreReleasesIndexUrl: string = "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json"; +const ReleasesJsonUrl0: string = "https://releases.file.com/version2.0.json"; +const ReleasesJsonUrl1: string = "https://releases.file.com/version2.1.json"; +const ReleasesJsonUrl2: string = "https://releases.file.com/version2.2.json"; +const ReleasesJsonUrl3: string = "https://releases.file.com/version2.3.json"; +const ReleasesJsonUrl4: string = "https://releases.file.com/version3.0.json"; +const ReleasesJsonUrl5: string = "https://releases.file.com/version4.0.json"; +const ReleasesJsonUrl6: string = "https://releases.file.com/version4.1.json"; + +let versionFetcher = new DotNetCoreVersionFetcher(); +versionFetcher.getVersionInfo(process.env["__versionspec__"], null, "sdk", process.env["__inlcudepreviewversion__"] == "true") + .then((versionInfo) => { + if (process.env["__versionspec__"] == "2.2.103" && versionInfo.getVersion() != "2.2.103") { + throw ""; + } + else if (process.env["__versionspec__"] == "2.2.104" && versionInfo.getVersion() != "2.2.104") { + throw ""; + } + else if (process.env["__versionspec__"] == "2.1.104" && versionInfo.getVersion() != "2.1.104") { + throw ""; + } + else if (process.env["__versionspec__"] == "2.x" && versionInfo.getVersion() != "2.3.105") { + throw ""; + } + else if (process.env["__versionspec__"] == "2.2.x" && process.env["__inlcudepreviewversion__"] != "true" && versionInfo.getVersion() != "2.2.105") { + throw ""; + } + else if (process.env["__versionspec__"] == "2.2.x" && process.env["__inlcudepreviewversion__"] == "true" && versionInfo.getVersion() != "2.2.106-preview-1") { + throw ""; + } + else if (process.env["__versionspec__"] == "2.3.x" && process.env["__inlcudepreviewversion__"] == "true" && versionInfo.getVersion() != "2.3.105") { + throw ""; + } + else if (process.env["__versionspec__"] == "3.x" && process.env["__inlcudepreviewversion__"] == "true" && versionInfo.getVersion() != "3.0.10-preview-999") { + throw ""; + } + else if (process.env["__versionspec__"] == "4.x" && process.env["__inlcudepreviewversion__"] != "true" && versionInfo.getVersion() != "4.0.100") { + throw ""; + } + + tl.setResult(tl.TaskResult.Succeeded, "succeeded"); + }) + .catch((ex) => { + tl.setResult(tl.TaskResult.Failed, "FailedAsExpected"); + }); \ No newline at end of file diff --git a/_generated/UseDotNetV2_Node16/Tests/versionInstallerDownloadAndInstallTests.ts b/_generated/UseDotNetV2_Node16/Tests/versionInstallerDownloadAndInstallTests.ts new file mode 100644 index 000000000000..88032a5c2424 --- /dev/null +++ b/_generated/UseDotNetV2_Node16/Tests/versionInstallerDownloadAndInstallTests.ts @@ -0,0 +1,247 @@ +"use strict"; +import * as tl from 'azure-pipelines-task-lib/task'; +import * as os from 'os'; +import { toolrunner } from './mocks/mockedModels' +import { Constants } from "../versionutilities"; +import fs = require('fs'); +var mockery = require('mockery'); +var osType = "win"; + +const installationPath: string = "installationPath" + +//setup mocks +mockery.enable({ + useCleanCache: true, + warnOnReplace: false, + warnOnUnregistered: false +}); + +mockery.registerMock('typed-rest-client/HttpClient', { + HttpClient: function () { + return { + get: function (url: string, headers) { + return ""; + } + } + } +}); + +mockery.registerMock('azure-pipelines-tool-lib/tool', { + downloadTool: function (url: string, fileName?: string): Promise { + return Promise((resolve, reject) => { + if (process.env["__case__"] == "downloaderror") { + reject("downloaderror"); + } + + resolve("downloadPath"); + }); + }, + extractZip: function (file: string): Promise { + return Promise((resolve, reject) => { + if (process.env["__case__"] == "extracterror") { + reject("extractError"); + } + + resolve("extractPath"); + }) + }, + extractTar: function (file: string): Promise { + return Promise((resolve, reject) => { + if (process.env["__case__"] == "extracterror") { + reject("extractError"); + } + + resolve("extractPath"); + }) + } +}) + +mockery.registerMock('azure-pipelines-task-lib/task', { + exist: function (elementPath: string) { + if (elementPath.startsWith(installationPath)) { + return true; + } + + return false; + }, + osType: function () { return osType; }, + which: function (tool: string, check: boolean) { + if (tool == 'powershell') { + return "C:/Program Files/PowerShell"; + } + else if (tool.endsWith(".sh")) { + return "/temp/somefile.sh"; + } + }, + tool: function (pathToTool) { + if (osType.toLowerCase().includes("win")) { + return new toolrunner(pathToTool, { + code: 0, + error: null, + stderr: "", + stdout: `Primary:win-x64${os.EOL}Legacy:win-x64` + }); + } + else if (osType.toLowerCase().includes("linux")) { + return new toolrunner(pathToTool, { + code: 0, + error: null, + stderr: "", + stdout: `Primary:linux-x64${os.EOL}Legacy:ubuntu16.04` + }); + } + else if (osType.toLowerCase().includes("osx")) { + return new toolrunner(pathToTool, { + code: 0, + error: null, + stderr: "", + stdout: `Primary:osx-x64${os.EOL}Legacy:osx-x64` + }); + } + }, + ls: function (options: string, paths: string[]): string[] { + if (paths.length == 1 && paths[0] == "extractPath") { + return ["host", "sdk", "shared", "dotnet.exe", "ThirdPartyNotices.txt", "LICENSE"]; + } + else if (paths.length == 1 && paths[0].includes(Constants.relativeSdkPath)) { + return ["1.0.0", "1.0.0.complete", "2.0.0", "2.0.0.complete", "2.1.0", "2.1.0.complete", "nugetfallback"] + } + else if (paths.length == 1 && paths[0].includes(Constants.relativeRuntimePath)) { + return ["1.0.0", "1.0.0.complete", "2.0.0", "2.0.0.complete", "2.1.0", "2.1.0.complete", ""] + } + + return []; + }, + cp: function (source: string, dest: string, options?: string, continueOnError?: boolean): void { + if (source.indexOf(".") > -1 && process.env["__case__"] == "filecopyerror") { + throw "fileCopyError"; + } + + return; + }, + writeFile: function (file: string, data: string | Buffer, options?: string): void { + if (process.env["__case__"] == "versioncompletefileerror") { + throw "versioncompletefileerror"; + } + + tl.debug(tl.loc("creatingfile", file)); + return; + }, + loc: function (locString, ...param: string[]) { return tl.loc(locString, param); }, + debug: function (message) { return tl.debug(message); }, + warning: function (message) { return tl.warning(message); }, + error: function (errorMessage) { return tl.error(errorMessage); }, + getVariable: function (variableName) { return tl.getVariable(variableName); }, + getHttpProxyConfiguration: function () { return ""; }, + getHttpCertConfiguration: function () { return "" }, + setResourcePath: function (path) { return; } +}); + +mockery.registerMock('fs', { + ...fs, + lstatSync: function (path: string) { + if (path.indexOf(".") > -1 && !path.endsWith("1.0.0") && !path.endsWith("2.0.0") && !path.endsWith("2.1.0")) { + return { + isDirectory: function () { + return false; + } + }; + } + + return { + isDirectory: function () { + return true; + } + }; + } +}); + +//start tests +import { VersionInstaller } from "../versioninstaller"; +import { VersionInfo } from "../models"; +import { Promise } from 'q'; +let versionInstaller = new VersionInstaller("sdk", installationPath); + +let versionInfo = new VersionInfo(JSON.parse(`{"version":"2.2.104", "files": [{"name": "linux.tar.gz", "rid":"linux-x64", "url": "https://path.to/file.tar.gz"}, {"name": "osx.pkg", "rid":"osx-x64", "url": "https://path.to/file.pkg"}, {"name": "osx.tar.gz", "rid":"osx-x64", "url": "https://path.toMac/file.tar.gz"}, {"name": "win.exe", "rid":"win-x64", "url": "https://path.to/file.exe"}, {"name": "win.zip", "rid":"win-x64", "url": "https://path.to/file.zip"}]}`), "sdk"); +process.env["AGENT_TEMPDIRECTORY"] = process.cwd(); + +if (process.env["__case__"] == "urlerror") { + versionInstaller.downloadAndInstall(versionInfo, "") + .then(() => { + tl.setResult(tl.TaskResult.Succeeded, "DidNotThrowAsExpected"); + }, (ex) => { + versionInstaller.downloadAndInstall(null, "https://path.to/file.zip") + .then(() => { + tl.setResult(tl.TaskResult.Succeeded, "DidNotThrowAsExpected"); + }, (ex) => { + tl.setResult(tl.TaskResult.Failed, "ThrewAsExpected"); + }); + }); +} +else if (process.env["__case__"] == "downloaderror") { + versionInstaller.downloadAndInstall(versionInfo, "file") + .then(() => { + tl.setResult(tl.TaskResult.Succeeded, "DidNotThrowAsExpected"); + }, (ex) => { + tl.setResult(tl.TaskResult.Failed, "ThrewAsExpected"); + }); +} +else if (process.env["__case__"] == "extracterror") { + versionInstaller.downloadAndInstall(versionInfo, "file") + .then(() => { + tl.setResult(tl.TaskResult.Succeeded, "DidNotThrowAsExpected"); + }, (ex) => { + tl.setResult(tl.TaskResult.Failed, "ThrewAsExpected"); + }); +} +else if (process.env["__case__"] == "filecopyerror") { + versionInstaller.downloadAndInstall(versionInfo, "file") + .then(() => { + tl.setResult(tl.TaskResult.Succeeded, "SuccessfullyCompleted"); + }, (ex) => { + tl.setResult(tl.TaskResult.Failed, "TestThrewException"); + }); +} +else if (process.env["__case__"] == "conditionalfilecopy") { + // version being installed is the latest among already installed ones in the installation path and hence files should also be copied + versionInfo = new VersionInfo(JSON.parse(`{"version":"2.2.104", "runtime-version":"2.0.100", "files": [{"name": "linux.tar.gz", "rid":"linux-x64", "url": "https://path.to/file.tar.gz"}, {"name": "osx.pkg", "rid":"osx-x64", "url": "https://path.to/file.pkg"}, {"name": "osx.tar.gz", "rid":"osx-x64", "url": "https://path.toMac/file.tar.gz"}, {"name": "win.exe", "rid":"win-x64", "url": "https://path.to/file.exe"}, {"name": "win.zip", "rid":"win-x64", "url": "https://path.to/file.zip"}]}`), "sdk"); + versionInstaller.downloadAndInstall(versionInfo, "file") + .then(() => { + // version being installed is not the latest and hence root directory files should not be copied. + versionInfo = new VersionInfo(JSON.parse(`{"version":"2.0.1", "files": [{"name": "linux.tar.gz", "rid":"linux-x64", "url": "https://path.to/file.tar.gz"}, {"name": "osx.pkg", "rid":"osx-x64", "url": "https://path.to/file.pkg"}, {"name": "osx.tar.gz", "rid":"osx-x64", "url": "https://path.toMac/file.tar.gz"}, {"name": "win.exe", "rid":"win-x64", "url": "https://path.to/file.exe"}, {"name": "win.zip", "rid":"win-x64", "url": "https://path.to/file.zip"}]}`), "sdk"); + versionInstaller.downloadAndInstall(versionInfo, "file") + .then(() => { + versionInstaller = new VersionInstaller("runtime", installationPath); + + // version being installed is the latest but files will still no be copied as runtime is being installed. + versionInfo = new VersionInfo(JSON.parse(`{"version":"2.2.104", "files": [{"name": "linux.tar.gz", "rid":"linux-x64", "url": "https://path.to/file.tar.gz"}, {"name": "osx.pkg", "rid":"osx-x64", "url": "https://path.to/file.pkg"}, {"name": "osx.tar.gz", "rid":"osx-x64", "url": "https://path.toMac/file.tar.gz"}, {"name": "win.exe", "rid":"win-x64", "url": "https://path.to/file.exe"}, {"name": "win.zip", "rid":"win-x64", "url": "https://path.to/file.zip"}]}`), "runtime"); + versionInstaller.downloadAndInstall(versionInfo, "file") + .then(() => { + tl.setResult(tl.TaskResult.Succeeded, "CopiedFilesConditionally"); + }, (ex) => { + tl.setResult(tl.TaskResult.Failed, "ShouldNotHaveThrown"); + }) + }, (ex) => { + tl.setResult(tl.TaskResult.Failed, "ShouldNotHaveThrown"); + }); + }, (ex) => { + tl.setResult(tl.TaskResult.Failed, "ShouldNotHaveThrown"); + }); +} +else if (process.env["__case__"] == "versioncompletefileerror") { + versionInstaller.downloadAndInstall(versionInfo, "file") + .then(() => { + tl.setResult(tl.TaskResult.Succeeded, "ShouldHaveThrown"); + }, (ex) => { + tl.setResult(tl.TaskResult.Failed, "ThrewAsExpected"); + }); + +} +else if (process.env["__case__"] == "successfullinstall") { + versionInstaller.downloadAndInstall(versionInfo, "file") + .then(() => { + tl.setResult(tl.TaskResult.Succeeded, "SuccessfullyInstalled"); + }, (ex) => { + tl.setResult(tl.TaskResult.Failed, "ShouldNotHaveThrownException" + ex); + }); +} diff --git a/_generated/UseDotNetV2_Node16/Tests/versionInstallerIsVersionInstalledTests.ts b/_generated/UseDotNetV2_Node16/Tests/versionInstallerIsVersionInstalledTests.ts new file mode 100644 index 000000000000..eed98f6fba43 --- /dev/null +++ b/_generated/UseDotNetV2_Node16/Tests/versionInstallerIsVersionInstalledTests.ts @@ -0,0 +1,151 @@ +"use strict"; +import * as tl from 'azure-pipelines-task-lib/task'; +import * as path from 'path'; +import { Constants } from "../versionutilities"; +let mockery = require('mockery'); + +const version = "2.1.1"; +const installationPath: string = "installationPath" + +mockery.enable({ + useCleanCache: true, + warnOnReplace: false, + warnOnUnregistered: false +}); + +mockery.registerMock('typed-rest-client/HttpClient', { + HttpClient: function () { + return { + get: function (url: string, headers) { + return ""; + } + } + } +}); + +let sdkFolderExists = true; +let sdkFileExists = true; +let runtimeFolderExists = true; +let runtimeFileExists = true; +mockery.registerMock('azure-pipelines-task-lib/task', { + exist: function (elementPath: string) { + if (elementPath == path.join(installationPath, Constants.relativeSdkPath, version)) { + return sdkFolderExists; + } + else if (elementPath == path.join(installationPath, Constants.relativeSdkPath, `${version}.complete`)) { + return sdkFileExists; + } + else if (elementPath == path.join(installationPath, Constants.relativeRuntimePath, version)) { + return runtimeFolderExists; + } + else if (elementPath == path.join(installationPath, Constants.relativeRuntimePath, `${version}.complete`)) { + return runtimeFileExists; + } + else if (elementPath == installationPath) { + return true; + } + + return false; + }, + loc: function (locString, ...param: string[]) { return tl.loc(locString, param); }, + debug: function (message) { return tl.debug(message); }, + warning: function (message) { return tl.warning(message); }, + error: function (errorMessage) { return tl.error(errorMessage); }, + getVariable: function (variableName) { return tl.getVariable(variableName); }, + getHttpProxyConfiguration: function () { return ""; }, + getHttpCertConfiguration: function () { return "" }, + setResourcePath: function (path) { return; } +}); + +import { VersionInstaller } from "../versioninstaller"; +let versionInstaller = new VersionInstaller("sdk", installationPath); + +if (process.env["__case__"] == "nonexplicit") { + let throwcount = 0; + try { + versionInstaller.isVersionInstalled("") + } + catch (ex) { + throwcount++ + } + + try { + versionInstaller.isVersionInstalled("2.1") + } + catch (ex) { + throwcount++ + } + + try { + versionInstaller.isVersionInstalled("2.1.x") + } + catch (ex) { + throwcount++ + } + + if (throwcount == 3) { + tl.setResult(tl.TaskResult.Failed, "ThrewAsExpected"); + } + else { + tl.setResult(tl.TaskResult.Succeeded, "ShouldHaveThrownInAllCases"); + } +} +else if (process.env["__case__"] == "folderorfilemissing") { + sdkFolderExists = false; + if (versionInstaller.isVersionInstalled(version)) { + tl.setResult(tl.TaskResult.Failed, "ShouldHaveReturnedFalse"); + throw ""; + } + + sdkFolderExists = true; + sdkFileExists = false; + if (versionInstaller.isVersionInstalled(version)) { + tl.setResult(tl.TaskResult.Failed, "ShouldHaveReturnedFalse"); + throw ""; + } + + sdkFolderExists = false; + sdkFileExists = false; + if (versionInstaller.isVersionInstalled(version)) { + tl.setResult(tl.TaskResult.Failed, "ShouldHaveReturnedFalse"); + throw ""; + } + + versionInstaller = new VersionInstaller("runtime", installationPath); + runtimeFolderExists = true; + runtimeFileExists = false; + if (versionInstaller.isVersionInstalled(version)) { + tl.setResult(tl.TaskResult.Failed, "ShouldHaveReturnedFalse"); + throw ""; + } + + runtimeFolderExists = true; + runtimeFileExists = false; + if (versionInstaller.isVersionInstalled(version)) { + tl.setResult(tl.TaskResult.Failed, "ShouldHaveReturnedFalse"); + throw ""; + } + + runtimeFolderExists = true; + runtimeFileExists = false; + if (versionInstaller.isVersionInstalled(version)) { + tl.setResult(tl.TaskResult.Failed, "ShouldHaveReturnedFalse"); + throw ""; + } + + tl.setResult(tl.TaskResult.Succeeded, "ReturnedFalseForAll"); +} +else if (process.env["__case__"] == "success") { + if (!versionInstaller.isVersionInstalled(version)) { + tl.setResult(tl.TaskResult.Failed, "ShouldHaveReturnedTrue"); + throw ""; + } + + versionInstaller = new VersionInstaller("runtime", installationPath); + if (!versionInstaller.isVersionInstalled(version)) { + tl.setResult(tl.TaskResult.Failed, "ShouldHaveReturnedTrue"); + throw ""; + } + + tl.setResult(tl.TaskResult.Succeeded, "ReturnedTrue"); +} \ No newline at end of file diff --git a/_generated/UseDotNetV2_Node16/Tests/versionInstallerTests.ts b/_generated/UseDotNetV2_Node16/Tests/versionInstallerTests.ts new file mode 100644 index 000000000000..713607a5e03c --- /dev/null +++ b/_generated/UseDotNetV2_Node16/Tests/versionInstallerTests.ts @@ -0,0 +1,34 @@ +"use strict"; +import * as tl from 'azure-pipelines-task-lib/task'; +var mockery = require('mockery'); +mockery.enable({ + useCleanCache: true, + warnOnReplace: false, + warnOnUnregistered: false +}); + +mockery.registerMock('azure-pipelines-task-lib/task', { + exist: function (path: string) { tl.debug(tl.loc("inexist")); return false; }, + mkdirP: function (path: string) { + tl.debug(tl.loc("inmkdirp")) + throw ""; + }, + loc: function (locString, param: string[]) { return tl.loc(locString, param); }, + debug: function (message) { return tl.debug(message); }, + error: function (errorMessage) { return tl.error(errorMessage); }, + getVariable: function (variableName) { return tl.getVariable(variableName); }, + getHttpProxyConfiguration: function () { return ""; }, + getHttpCertConfiguration: function () { return "" }, + setResourcePath: function (path) { return; } +}); + +import { VersionInstaller } from "../versioninstaller"; + +try { + new VersionInstaller("sdk", "C:/unknownlocation"); +} +catch (ex) { + tl.setResult(tl.TaskResult.Failed, "ThrownAsExpected"); +} + +tl.setResult(tl.TaskResult.Succeeded, "DidNotThrowAsExpected"); \ No newline at end of file diff --git a/_generated/UseDotNetV2_Node16/Tests/versionUtilityChannelVersionCompareTests.ts b/_generated/UseDotNetV2_Node16/Tests/versionUtilityChannelVersionCompareTests.ts new file mode 100644 index 000000000000..522ef7a414fc --- /dev/null +++ b/_generated/UseDotNetV2_Node16/Tests/versionUtilityChannelVersionCompareTests.ts @@ -0,0 +1,54 @@ +'use strict'; +import * as versionutilities from "../versionutilities"; +import * as tl from 'azure-pipelines-task-lib/task'; + +if (process.env["__non_explicit__"] == "true") { + let throwCount: number = 0; + // try with non explicit version + try { + versionutilities.compareChannelVersion("2.2", "2.x"); + } + catch (ex) { + throwCount++; + } + + try { + versionutilities.compareChannelVersion("2.x", "2.1"); + } + catch (ex) { + throwCount++; + } + + try { + versionutilities.compareChannelVersion("", "3.14"); + } + catch (ex) { + throwCount++; + } + + try { + versionutilities.compareChannelVersion("1.127", ""); + } + catch (ex) { + throwCount++; + } + + if (throwCount == 4) { + throw tl.loc("FunctionThrewAsExpected"); + } +} +else { + if (versionutilities.compareChannelVersion("3.0", "2.999") < 1) { + throw ""; + } + + if (versionutilities.compareChannelVersion("3.547", "3.547") != 0) { + throw ""; + } + + if (versionutilities.compareChannelVersion("2.100", "2.200") > -1) { + throw ""; + } + + console.log("FunctionGaveRightResult"); +} \ No newline at end of file diff --git a/_generated/UseDotNetV2_Node16/Tests/versionUtilityGetMatchingVersionFromListTests.ts b/_generated/UseDotNetV2_Node16/Tests/versionUtilityGetMatchingVersionFromListTests.ts new file mode 100644 index 000000000000..5a763a94222b --- /dev/null +++ b/_generated/UseDotNetV2_Node16/Tests/versionUtilityGetMatchingVersionFromListTests.ts @@ -0,0 +1,82 @@ +'use strict'; +import * as versionutilities from "../versionutilities"; +import { VersionInfo } from "../models"; + +if (process.env["__empty__"] == "true") { + let throwCount: number = 0; + // empty version info list + + if (versionutilities.getMatchingVersionFromList([], "2.x") != null) { + throw "" + } + + // form the version info list with preview versions as well + let versionInfoList: VersionInfo[] = []; + ["3.0.100", "3.1.0-preview-850"].forEach((version) => { + var temp = new VersionInfo(JSON.parse(`{"version": "${version}", "files": []}`), "sdk"); + versionInfoList.push(temp); + }); + + // version info list with no version matching the version spec, with includePreviewVersion as false + if (versionutilities.getMatchingVersionFromList(versionInfoList, "3.1.x", false) != null) { + throw ""; + } + + + // version info list with no version matching the version spec, with includePreviewVersion as true + if (versionutilities.getMatchingVersionFromList(versionInfoList, "2.9.x", true) != null) { + throw ""; + } + + // version info list with version exactly equal to version not present (in this case version spec is an exact version), , with includePreviewVersion as false + if (versionutilities.getMatchingVersionFromList(versionInfoList, "3.1.0", false) != null) { + throw ""; + } + + // version info list with version exactly equal to version not present (in this case version spec is an exact version), with includePreviewVersion as true + if (versionutilities.getMatchingVersionFromList(versionInfoList, "3.1.0", true) != null) { + throw ""; + } + + console.log("FunctionReturnedNull") +} +else { + // form the version info list with preview versions as well + let versionInfoList: VersionInfo[] = []; + ["3.0.100", "3.0.200-preview-850", "3.1.100", "3.1.101-preview-850"].forEach((version) => { + var temp = new VersionInfo(JSON.parse(`{"version": "${version}", "files": []}`), "sdk"); + versionInfoList.push(temp); + }); + + // should return heighest non preview version in major version 3 + if (versionutilities.getMatchingVersionFromList(versionInfoList, "3.x", false).getVersion() != "3.1.100") { + throw ""; + } + + // should return heighest version (may be preview as well) in major version 3 + if (versionutilities.getMatchingVersionFromList(versionInfoList, "3.x", true).getVersion() != "3.1.101-preview-850") { + throw ""; + } + + // should return heighest non preview version in major version 3 and minor version 0 + if (versionutilities.getMatchingVersionFromList(versionInfoList, "3.0.x", false).getVersion() != "3.0.100") { + throw ""; + } + + // should return heighest version (may be preview as well) in major version 3 and minor version 0 + if (versionutilities.getMatchingVersionFromList(versionInfoList, "3.0.x", true).getVersion() != "3.0.200-preview-850") { + throw ""; + } + + // should return exact version from list + if (versionutilities.getMatchingVersionFromList(versionInfoList, "3.0.100", false).getVersion() != "3.0.100") { + throw ""; + } + + // should return exact version from list even if includePreviewVersion is false and the version spec is preview + if (versionutilities.getMatchingVersionFromList(versionInfoList, "3.0.200-preview-850", false).getVersion() != "3.0.200-preview-850") { + throw ""; + } + + console.log("FuctionReturnedCorrectVersion"); +} \ No newline at end of file diff --git a/_generated/UseDotNetV2_Node16/Tests/versionUtilityVersionCompareTests.ts b/_generated/UseDotNetV2_Node16/Tests/versionUtilityVersionCompareTests.ts new file mode 100644 index 000000000000..c842b19ce78a --- /dev/null +++ b/_generated/UseDotNetV2_Node16/Tests/versionUtilityVersionCompareTests.ts @@ -0,0 +1,66 @@ +'use strict'; +import * as versionutilities from "../versionutilities"; +import * as tl from 'azure-pipelines-task-lib/task'; + +if (process.env["__non_explicit__"] == "true") { + let throwCount: number = 0; + // try with non explicit version + try { + versionutilities.versionCompareFunction("2.2.104", "2.2.x"); + } + catch (ex) { + throwCount++; + } + + try { + versionutilities.versionCompareFunction("2.x", "2.2.2"); + } + catch (ex) { + throwCount++; + } + + try { + versionutilities.versionCompareFunction("", "2.2.104"); + } + catch (ex) { + throwCount++; + } + + try { + versionutilities.versionCompareFunction("3.0.3-preview-727", ""); + } + catch (ex) { + throwCount++; + } + + if (throwCount == 4) { + throw tl.loc("FunctionThrewAsExpected"); + } +} +else { + if (versionutilities.versionCompareFunction("2.2.104", "2.1.507") < 1) { + throw ""; + } + + if (versionutilities.versionCompareFunction("3.0.0-preview-1", "3.0.0-preview-0") < 1) { + throw ""; + } + + if (versionutilities.versionCompareFunction("2.2.104", "2.2.104") != 0) { + throw ""; + } + + if (versionutilities.versionCompareFunction("3.1.104-preview1-324", "3.1.104-preview1-324") != 0) { + throw ""; + } + + if (versionutilities.versionCompareFunction("2.1.400", "2.2.0") > -1) { + throw ""; + } + + if (versionutilities.versionCompareFunction("1.14.1", "1.15.0-preview-1") > -1) { + throw ""; + } + + console.log("FunctionGaveRightResult"); +} \ No newline at end of file diff --git a/_generated/UseDotNetV2_Node16/externals/get-os-distro.sh b/_generated/UseDotNetV2_Node16/externals/get-os-distro.sh new file mode 100644 index 000000000000..689da6d682cb --- /dev/null +++ b/_generated/UseDotNetV2_Node16/externals/get-os-distro.sh @@ -0,0 +1,192 @@ +#!/usr/bin/env bash +# Copyright (c) .NET Foundation and contributors. All rights reserved. +# Licensed under the MIT license. See LICENSE file in the project root for full license information. +# + +# Stop script on NZEC +set -e +# Stop script if unbound variable found (use ${var:-} if intentional) +set -u +# By default cmd1 | cmd2 returns exit code of cmd2 regardless of cmd1 success +# This is causing it to fail +set -o pipefail + +# Use in the the functions: eval $invocation +invocation='say_verbose "Calling: ${yellow:-}${FUNCNAME[0]} ${green:-}$*${normal:-}"' + +# standard output may be used as a return value in the functions +# we need a way to write text on the screen in the functions so that +# it won't interfere with the return value. +# Exposing stream 3 as a pipe to standard output of the script itself +exec 3>&1 + +say_err() { + printf "%b\n" "get-os-distro: Error: $1" >&2 +} + +# This platform list is finite - if the SDK/Runtime has supported Linux distribution-specific assets, +# then and only then should the Linux distribution appear in this list. +# Adding a Linux distribution to this list does not imply distribution-specific support. +get_legacy_os_name_from_platform() { + + platform="$1" + case "$platform" in + "centos.7") + echo "centos" + return 0 + ;; + "debian.8") + echo "debian" + return 0 + ;; + "fedora.23") + echo "fedora.23" + return 0 + ;; + "fedora.27") + echo "fedora.27" + return 0 + ;; + "fedora.24") + echo "fedora.24" + return 0 + ;; + "opensuse.13.2") + echo "opensuse.13.2" + return 0 + ;; + "opensuse.42.1") + echo "opensuse.42.1" + return 0 + ;; + "opensuse.42.3") + echo "opensuse.42.3" + return 0 + ;; + "rhel.7"*) + echo "rhel" + return 0 + ;; + "ubuntu.14.04") + echo "ubuntu" + return 0 + ;; + "ubuntu.16.04") + echo "ubuntu.16.04" + return 0 + ;; + "ubuntu.16.10") + echo "ubuntu.16.10" + return 0 + ;; + "ubuntu.18.04") + echo "ubuntu.18.04" + return 0 + ;; + "alpine.3.4.3") + echo "alpine" + return 0 + ;; + esac + return 1 +} + +get_linux_platform_name() { + + if [ -e /etc/os-release ]; then + . /etc/os-release + echo "$ID.$VERSION_ID" + return 0 + elif [ -e /etc/redhat-release ]; then + local redhatRelease=$( /dev/null; then + CPUName=$(uname -m) + case $CPUName in + armv7l) + echo "arm" + return 0 + ;; + aarch64) + echo "arm64" + return 0 + ;; + esac + fi + + # Always default to 'x64' + echo "x64" + return 0 +} + +osName=$(get_current_os_name || echo "") +legacyOsName=$(get_legacy_os_name || echo "") +arch=$(get_machine_architecture || echo "") + +primaryName="$osName-$arch" +legacyName="$legacyOsName-$arch" + +echo "Primary:$primaryName" +echo "Legacy:$legacyName" + +if [ -z "$osName" ] && [ -z "$legacyOsName" ];then + exit 1 +fi diff --git a/_generated/UseDotNetV2_Node16/externals/get-os-platform.ps1 b/_generated/UseDotNetV2_Node16/externals/get-os-platform.ps1 new file mode 100644 index 000000000000..4ac8d07f5ba4 --- /dev/null +++ b/_generated/UseDotNetV2_Node16/externals/get-os-platform.ps1 @@ -0,0 +1,18 @@ +function Get-Machine-Architecture() +{ + # possible values: AMD64, IA64, x86 + return $ENV:PROCESSOR_ARCHITECTURE +} + +function Get-CLIArchitecture-From-Architecture([string]$Architecture) +{ + switch ($Architecture.ToLower()) + { + { ($_ -eq "amd64") -or ($_ -eq "x64") } { return "x64" } + { $_ -eq "x86" } { return "x86" } + default { throw "Architecture not supported. If you think this is a bug, please report it at https://github.com/dotnet/cli/issues" } + } +} + +$CLIArchitecture = Get-CLIArchitecture-From-Architecture $(Get-Machine-Architecture) +Write-Output "Primary:win-$CLIArchitecture" \ No newline at end of file diff --git a/_generated/UseDotNetV2_Node16/globaljsonfetcher.ts b/_generated/UseDotNetV2_Node16/globaljsonfetcher.ts new file mode 100644 index 000000000000..aaa3fe5ccb86 --- /dev/null +++ b/_generated/UseDotNetV2_Node16/globaljsonfetcher.ts @@ -0,0 +1,94 @@ +"use strict"; +import * as fileSystem from "fs"; +import * as tl from 'azure-pipelines-task-lib/task'; +import { DotNetCoreVersionFetcher } from "./versionfetcher"; +import { VersionInfo } from "./models"; + +export class globalJsonFetcher { + + private workingDirectory: string; + private versionFetcher: DotNetCoreVersionFetcher = new DotNetCoreVersionFetcher(true); + /** + * The global json fetcher provider functionality to extract the version information from all global json in the working directory. + * @param workingDirectory + */ + constructor(workingDirectory: string) { + this.workingDirectory = workingDirectory; + } + + /** + * Get all version information from all global.json starting from the working directory without duplicates. + */ + public async GetVersions(): Promise { + var versionInformation: VersionInfo[] = new Array(); + var versionStrings = this.getVersionStrings(); + for (let index = 0; index < versionStrings.length; index++) { + const version = versionStrings[index]; + if (version != null) { + var versionInfo = await this.versionFetcher.getVersionInfo(version, null, "sdk", false); + versionInformation.push(versionInfo); + } + } + + return Array.from(new Set(versionInformation)); // this remove all not unique values. + } + + private getVersionStrings(): Array { + let filePathsToGlobalJson = tl.findMatch(this.workingDirectory, "**/global.json"); + if (filePathsToGlobalJson == null || filePathsToGlobalJson.length == 0) { + throw tl.loc("FailedToFindGlobalJson", this.workingDirectory); + } + + return filePathsToGlobalJson.map(path => { + var content = this.readGlobalJson(path); + if (content != null) { + tl.loc("GlobalJsonSdkVersion", content.sdk.version, path); + return content.sdk.version; + } + + return null; + }) + .filter(d => d != null); // remove all global.json that can't read + } + + private readGlobalJson(path: string): GlobalJson | null { + let globalJson: GlobalJson | null = null; + tl.loc("GlobalJsonFound", path); + try { + let fileContent = fileSystem.readFileSync(path); + // Since here is a buffer, we need to check length property to determine if it is empty. + if (!fileContent.length) { + // do not throw if globa.json is empty, task need not install any version in such case. + tl.loc("GlobalJsonIsEmpty", path); + return null; + } + + globalJson = (JSON.parse(fileContent.toString())) as { sdk: { version: string } }; + } catch (error) { + // we throw if the global.json is invalid + throw tl.loc("FailedToReadGlobalJson", path, error); // We don't throw if a global.json is invalid. + } + + if (globalJson == null || globalJson.sdk == null || globalJson.sdk.version == null) { + tl.loc("FailedToReadGlobalJson", path); + return null; + } + + return globalJson; + } + +} + +export class GlobalJson { + constructor(version: string | null = null) { + if (version != null) { + this.sdk = new sdk(); + this.sdk.version = version; + } + } + public sdk: sdk; +} + +class sdk { + public version: string; +} \ No newline at end of file diff --git a/_generated/UseDotNetV2_Node16/icon.png b/_generated/UseDotNetV2_Node16/icon.png new file mode 100644 index 000000000000..3e954ccf8d28 Binary files /dev/null and b/_generated/UseDotNetV2_Node16/icon.png differ diff --git a/_generated/UseDotNetV2_Node16/icon.svg b/_generated/UseDotNetV2_Node16/icon.svg new file mode 100644 index 000000000000..8cc980aff2d1 --- /dev/null +++ b/_generated/UseDotNetV2_Node16/icon.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/_generated/UseDotNetV2_Node16/make.json b/_generated/UseDotNetV2_Node16/make.json new file mode 100644 index 000000000000..5f5e63059fd8 --- /dev/null +++ b/_generated/UseDotNetV2_Node16/make.json @@ -0,0 +1,21 @@ +{ + + "cp": [ + { + "source": "externals", + "options": "-R" + } + ], + "rm": [ + { + "items": [ + "node_modules/azure-pipelines-tasks-packaging-common/node_modules/azure-pipelines-task-lib", + "node_modules/azure-pipelines-tasks-packaging-common/node_modules/azure-pipelines-tool-lib", + "node_modules/azure-pipelines-tasks-utility-common/node_modules/azure-pipelines-task-lib", + "node_modules/azure-pipelines-tasks-utility-common/node_modules/azure-pipelines-tool-lib", + "node_modules/azure-pipelines-tool-lib/node_modules/azure-pipelines-task-lib" + ], + "options": "-Rf" + } + ] +} \ No newline at end of file diff --git a/_generated/UseDotNetV2_Node16/models.ts b/_generated/UseDotNetV2_Node16/models.ts new file mode 100644 index 000000000000..e17e07e3a52e --- /dev/null +++ b/_generated/UseDotNetV2_Node16/models.ts @@ -0,0 +1,192 @@ +"use strict"; +import * as semver from "semver"; +import * as url from "url"; + +import * as tl from 'azure-pipelines-task-lib/task'; + +import * as utils from "./versionutilities"; + +export class VersionInfo { + private version: string; + private files: VersionFilesData[]; + private packageType: string; + private runtimeVersion: string; + + private vsVersion: string; + + constructor(versionInfoObject: { version: string, files: { name: string, hash: string, url: string, rid: string }[], 'runtime-version': string, 'vs-version': string }, packageType: string) { + if (!versionInfoObject.version || !versionInfoObject.files) { + throw tl.loc("InvalidVersionObject", packageType, versionInfoObject) + } + + this.version = versionInfoObject.version; + this.packageType = packageType; + this.files = []; + versionInfoObject.files.forEach(fileData => { + try { + this.files.push(new VersionFilesData(fileData)); + } + catch (ex) { + tl.debug(tl.loc("FilesDataIsIncorrectInVersion", this.packageType, this.version, ex)); + } + }); + + if (this.packageType == utils.Constants.sdk) { + this.runtimeVersion = versionInfoObject["runtime-version"] || ""; + this.vsVersion = versionInfoObject["vs-version"] || ""; + } + else { + this.runtimeVersion = this.version; + } + } + + public getVersion(): string { + return this.version; + } + + public getFiles(): VersionFilesData[] { + return this.files; + } + + public getRuntimeVersion(): string { + return this.runtimeVersion; + } + + public getPackageType(): string { + return this.packageType; + } + + public getvsVersion(): string { + return this.vsVersion; + } +} + +export class VersionFilesData { + public name: string; + public url: string; + public rid: string; + public hash?: string; + + constructor(versionFilesData: any) { + if (!versionFilesData || !versionFilesData.name || !versionFilesData.url || !versionFilesData.rid) { + throw tl.loc("VersionFilesDataIncorrect"); + } + + this.name = versionFilesData.name; + this.url = versionFilesData.url; + this.rid = versionFilesData.rid; + this.hash = versionFilesData.hash; + } +} + +export class Channel { + constructor(channelRelease: any) { + if (!channelRelease || !channelRelease["channel-version"] || !channelRelease["releases.json"]) { + throw tl.loc("InvalidChannelObject"); + } + + this.channelVersion = channelRelease["channel-version"]; + this.releasesJsonUrl = channelRelease["releases.json"]; + + if (!channelRelease["support-phase"]) { + tl.debug(tl.loc("SupportPhaseNotPresentInChannel", this.channelVersion)); + } + else { + this.supportPhase = channelRelease["support-phase"]; + } + } + + public channelVersion: string; + public releasesJsonUrl: string; + public supportPhase: string; +} + +export class VersionParts { + constructor(version: string, explicitVersion: boolean = false) { + if (explicitVersion) { + VersionParts.ValidateExplicitVersionNumber(version); + } else { + VersionParts.ValidateVersionSpec(version); + } + this.versionSpec = version; + let parts: string[] = version.split("."); + this.majorVersion = parts[0]; + this.minorVersion = parts[1]; + this.patchVersion = ""; + if (this.minorVersion != "x") { + this.patchVersion = parts[2]; + } + } + + /** + * Validate the version if this string is a explicit version number. Returns an exception if the version number is not explicit. + * @param version the input version number as string + */ + private static ValidateExplicitVersionNumber(version: string): void { + try { + let parts = version.split('.'); + // validate version + if ((parts.length < 3) || // check if the version has at least 3 parts + !parts[0] || // The major version must always be set + !parts[1] || // The minor version must always be set + !parts[2] || // The patch version must always be set + Number.isNaN(Number.parseInt(parts[0])) || // the major version number must be a number + Number.isNaN(Number.parseInt(parts[1])) || // the minor version number must be a number + Number.isNaN(Number.parseInt(parts[2].split(/\-|\+/)[0])) // the patch version number must be a number. (the patch version can have a '-', or a '+' because of version numbers like: 1.0.0-beta-50) + ) { + throw tl.loc("OnlyExplicitVersionAllowed", version); + } + + if (!semver.valid(version)) { + throw tl.loc("InvalidVersion", version); + } + } + catch (ex) { + throw tl.loc("VersionNotAllowed", version, ex); + } + } + + /** + * Validate the version. Returns an exception if the version number is wrong. + * @param version the input version number as string + */ + private static ValidateVersionSpec(version: string): void { + try { + let parts = version.split('.'); + // validate version + if (parts.length < 2 || // check if the version has at least 3 parts + (parts[1] == "x" && parts.length > 2) || // a version number like `1.x` must have only major and minor version + (parts[1] != "x" && parts.length <= 2) || // a version number like `1.1` must have a patch version + !parts[0] || // The major version must always be set + !parts[1] || // The minor version must always be set + (parts.length == 3 && !parts[2]) || // a version number like `1.1.` is invalid because the patch version is missing + Number.isNaN(Number.parseInt(parts[0])) || // the major version number must be a number + ( + parts[1] != "x" && // if the minor version is not `x` + ( + Number.isNaN(Number.parseInt(parts[1])) || // the minor version number must be a number + ( + parts.length > 2 && parts[2] != "x" && // if the patch is not `x`, then its an explicit version + !semver.valid(version) // validate the explicit version + ) + ) + ) + ) { + throw tl.loc("VersionNumberHasTheWrongFormat", version); + } + + new semver.Range(version); + } + catch (ex) { + throw tl.loc("VersionNotAllowed", version, ex); + } + } + + public majorVersion: string; + public minorVersion: string; + public patchVersion: string; + /** + * the version number entered by the user + */ + public versionSpec: string; +} diff --git a/_generated/UseDotNetV2_Node16/nugetinstaller.ts b/_generated/UseDotNetV2_Node16/nugetinstaller.ts new file mode 100644 index 000000000000..e44f2e5d70db --- /dev/null +++ b/_generated/UseDotNetV2_Node16/nugetinstaller.ts @@ -0,0 +1,46 @@ +"use strict"; +import * as tl from 'azure-pipelines-task-lib/task'; +import * as trm from 'azure-pipelines-task-lib/toolrunner'; +import * as nuGetGetter from 'azure-pipelines-tasks-packaging-common/nuget/NuGetToolGetter'; + + export class NuGetInstaller { + public static async installNuGet(version: string) { + try { + const proxy: tl.ProxyConfiguration = tl.getHttpProxyConfiguration(); + if (proxy) { + console.log(tl.loc("InstallingNuGetVersion", version)); + await nuGetGetter.getNuGet(version, false, true); + NuGetInstaller.setProxy(proxy); + } + } + catch (error) { + console.warn(tl.loc("FailureWhileInstallingNuGetVersion", version, error.message)); + } + } + + private static setProxy(proxyConfig: tl.ProxyConfiguration) { + const nugetPath = tl.which('nuget'); + + console.log(tl.loc("SettingUpNugetProxySettings")); + // Set proxy url + let nuget = tl.tool(nugetPath); + nuget.arg('config'); + nuget.arg('-set'); + nuget.arg('http_proxy=' + proxyConfig.proxyUrl); + nuget.exec({} as trm.IExecOptions); + + // Set proxy username + nuget = tl.tool(nugetPath); + nuget.arg('config'); + nuget.arg('-set'); + nuget.arg('http_proxy.user=' + proxyConfig.proxyUsername); + nuget.exec({} as trm.IExecOptions); + + // Set proxy password + nuget = tl.tool(nugetPath); + nuget.arg('config'); + nuget.arg('-set'); + nuget.arg('http_proxy.password=' + proxyConfig.proxyPassword); + nuget.exec({} as trm.IExecOptions); + } +} \ No newline at end of file diff --git a/_generated/UseDotNetV2_Node16/package-lock.json b/_generated/UseDotNetV2_Node16/package-lock.json new file mode 100644 index 000000000000..395475bb37f1 --- /dev/null +++ b/_generated/UseDotNetV2_Node16/package-lock.json @@ -0,0 +1,877 @@ +{ + "name": "usedotnet", + "version": "2.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@types/concat-stream": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@types/concat-stream/-/concat-stream-1.6.0.tgz", + "integrity": "sha1-OU2+C7X+5Gs42JZzXoto7yOQ0A0=", + "requires": { + "@types/node": "*" + } + }, + "@types/form-data": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/@types/form-data/-/form-data-0.0.33.tgz", + "integrity": "sha1-yayFsqX9GENbjIXZ7LUObWyJP/g=", + "requires": { + "@types/node": "*" + } + }, + "@types/ini": { + "version": "1.3.30", + "resolved": "https://registry.npmjs.org/@types/ini/-/ini-1.3.30.tgz", + "integrity": "sha512-2+iF8zPSbpU83UKE+PNd4r/MhwNAdyGpk3H+VMgEH3EhjFZq1kouLgRoZrmIcmoGX97xFvqdS44DkICR5Nz3tQ==" + }, + "@types/ltx": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/@types/ltx/-/ltx-2.8.0.tgz", + "integrity": "sha512-qHnPVD0FFquypl7Yy8qqvDjhnX3c7toUYjjALK+bug7MfR2WCRTIjw+GUMfehRi/Mbhj5rLAQerPTnTCUzSCWg==", + "requires": { + "@types/node": "*" + } + }, + "@types/mocha": { + "version": "5.2.6", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-5.2.6.tgz", + "integrity": "sha512-1axi39YdtBI7z957vdqXI4Ac25e7YihYQtJa+Clnxg1zTJEaIRbndt71O3sP4GAMgiAm0pY26/b9BrY4MR/PMw==" + }, + "@types/mockery": { + "version": "1.4.29", + "resolved": "https://registry.npmjs.org/@types/mockery/-/mockery-1.4.29.tgz", + "integrity": "sha1-m6It838H43gP/4Ux0aOOYz+UV6U=" + }, + "@types/node": { + "version": "16.18.38", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.38.tgz", + "integrity": "sha512-6sfo1qTulpVbkxECP+AVrHV9OoJqhzCsfTNp5NIG+enM4HyM3HvZCO798WShIXBN0+QtDIcutJCjsVYnQP5rIQ==" + }, + "@types/q": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/@types/q/-/q-1.5.2.tgz", + "integrity": "sha512-ce5d3q03Ex0sy4R14722Rmt6MT07Ua+k4FwDfdcToYJcMKNtRVQvJ6JCAPdAmAnbRb6CsX6aYb9m96NGod9uTw==" + }, + "@types/qs": { + "version": "6.9.5", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.5.tgz", + "integrity": "sha512-/JHkVHtx/REVG0VVToGRGH2+23hsYLHdyG+GrvoUGlGAd0ErauXDyvHtRI/7H7mzLm+tBCKA7pfcpkQ1lf58iQ==" + }, + "@types/semver": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-6.0.0.tgz", + "integrity": "sha512-OO0srjOGH99a4LUN2its3+r6CBYcplhJ466yLqs+zvAWgphCpS8hYZEZ797tRDP/QKcqTdb/YCN6ifASoAWkrQ==" + }, + "@types/uuid": { + "version": "3.4.9", + "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-3.4.9.tgz", + "integrity": "sha512-XDwyIlt/47l2kWLTzw/mtrpLdB+GPSskR2n/PIcPn+VYhVO77rGhRncIR5GPU0KRzXuqkDO+J5qqrG0Y8P6jzQ==" + }, + "adm-zip": { + "version": "0.4.16", + "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.4.16.tgz", + "integrity": "sha512-TFi4HBKSGfIKsK5YCkKaaFG2m4PEDyViZmEwof3MTIgzimHLto6muaHVpbrljdIvIrFZzEq/p4nafOeLcYegrg==" + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "requires": { + "sprintf-js": "~1.0.2" + }, + "dependencies": { + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" + } + } + }, + "asap": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", + "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=" + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + }, + "azure-devops-node-api": { + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/azure-devops-node-api/-/azure-devops-node-api-10.2.2.tgz", + "integrity": "sha512-4TVv2X7oNStT0vLaEfExmy3J4/CzfuXolEcQl/BRUmvGySqKStTG2O55/hUQ0kM7UJlZBLgniM0SBq4d/WkKow==", + "requires": { + "tunnel": "0.0.6", + "typed-rest-client": "^1.8.4" + } + }, + "azure-pipelines-task-lib": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/azure-pipelines-task-lib/-/azure-pipelines-task-lib-4.4.0.tgz", + "integrity": "sha512-JgtxfjxjRA+KWY0Q5UC1fo48nkbVxFHgKEuasKdJMSNxHydOyNlB5MNw4UTiTXp9b0nnqKeOQOBn5RN3go3aPg==", + "requires": { + "minimatch": "3.0.5", + "mockery": "^2.1.0", + "q": "^1.5.1", + "semver": "^5.1.0", + "shelljs": "^0.8.5", + "sync-request": "6.1.0", + "uuid": "^3.0.1" + }, + "dependencies": { + "mockery": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mockery/-/mockery-2.1.0.tgz", + "integrity": "sha512-9VkOmxKlWXoDO/h1jDZaS4lH33aWfRiJiNT/tKj+8OGzrcFDLo8d0syGdbsc3Bc4GvRXPb+NMMvojotmuGJTvA==" + }, + "semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==" + } + } + }, + "azure-pipelines-tasks-packaging-common": { + "version": "2.198.1", + "resolved": "https://registry.npmjs.org/azure-pipelines-tasks-packaging-common/-/azure-pipelines-tasks-packaging-common-2.198.1.tgz", + "integrity": "sha512-iApnFFlGy8oGo2wacMExApsFqPeElcL1dRj8mxOHLrFVw2XzncJ5zl0tEskLcQoN25heWySxU5lQ1AMMvpmSXA==", + "requires": { + "@types/ini": "1.3.30", + "@types/ltx": "2.8.0", + "@types/mocha": "^5.2.6", + "@types/mockery": "1.4.29", + "@types/node": "^10.17.0", + "@types/q": "1.5.2", + "adm-zip": "^0.4.11", + "azure-devops-node-api": "10.2.2", + "azure-pipelines-task-lib": "^3.1.0", + "azure-pipelines-tool-lib": "^1.0.2", + "ini": "^1.3.4", + "ip-address": "^5.8.9", + "ltx": "^2.6.2", + "q": "^1.5.0", + "semver": "^5.5.0", + "typed-rest-client": "1.8.4" + }, + "dependencies": { + "@types/node": { + "version": "10.17.60", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.60.tgz", + "integrity": "sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw==" + }, + "@types/semver": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-5.5.0.tgz", + "integrity": "sha512-41qEJgBH/TWgo5NFSvBCJ1qkoi3Q6ONSF2avrHq1LVEZfYpdHmj0y9SuTK+u9ZhG1sYQKBL1AWXKyLWP4RaUoQ==" + }, + "azure-pipelines-task-lib": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/azure-pipelines-task-lib/-/azure-pipelines-task-lib-3.4.0.tgz", + "integrity": "sha512-3eC4OTFw+7xD7A2aUhxR/j+jRlTI+vVfS0CGxt1pCLs4c/KmY0tQWgbqjD3157kmiucWxELBvgZHaD2gCBe9fg==", + "requires": { + "minimatch": "3.0.5", + "mockery": "^2.1.0", + "q": "^1.5.1", + "semver": "^5.1.0", + "shelljs": "^0.8.5", + "sync-request": "6.1.0", + "uuid": "^3.0.1" + }, + "dependencies": { + "mockery": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mockery/-/mockery-2.1.0.tgz", + "integrity": "sha512-9VkOmxKlWXoDO/h1jDZaS4lH33aWfRiJiNT/tKj+8OGzrcFDLo8d0syGdbsc3Bc4GvRXPb+NMMvojotmuGJTvA==" + } + } + }, + "azure-pipelines-tool-lib": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/azure-pipelines-tool-lib/-/azure-pipelines-tool-lib-1.3.1.tgz", + "integrity": "sha512-6XrjayeYI7QeL2tGP3FPgHggWHAYe4opESnZ9a3UsbtWYdZu3dldBbOlJZpkAxfKCpjRDYMuq6SP1MUsOOm0kA==", + "requires": { + "@types/semver": "^5.3.0", + "@types/uuid": "^3.4.5", + "azure-pipelines-task-lib": "^3.1.10", + "semver": "^5.7.0", + "semver-compare": "^1.0.0", + "typed-rest-client": "^1.8.6", + "uuid": "^3.3.2" + }, + "dependencies": { + "azure-pipelines-task-lib": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/azure-pipelines-task-lib/-/azure-pipelines-task-lib-3.3.1.tgz", + "integrity": "sha512-56ZAr4MHIoa24VNVuwPL4iUQ5MKaigPoYXkBG8E8fiVmh8yZdatUo25meNoQwg77vDY22F63Q44UzXoMWmy7ag==", + "requires": { + "minimatch": "3.0.5", + "mockery": "^1.7.0", + "q": "^1.5.1", + "semver": "^5.1.0", + "shelljs": "^0.8.5", + "sync-request": "6.1.0", + "uuid": "^3.0.1" + } + }, + "typed-rest-client": { + "version": "1.8.9", + "resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-1.8.9.tgz", + "integrity": "sha512-uSmjE38B80wjL85UFX3sTYEUlvZ1JgCRhsWj/fJ4rZ0FqDUFoIuodtiVeE+cUqiVTOKPdKrp/sdftD15MDek6g==", + "requires": { + "qs": "^6.9.1", + "tunnel": "0.0.6", + "underscore": "^1.12.1" + } + } + } + }, + "minimatch": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.5.tgz", + "integrity": "sha512-tUpxzX0VAzJHjLu0xUfFv1gwVp9ba3IOuRAVH2EGuRW8a5emA2FlACLqiT/lDVtS1W+TGNwqz3sWaNyLgDJWuw==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + }, + "typed-rest-client": { + "version": "1.8.4", + "resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-1.8.4.tgz", + "integrity": "sha512-MyfKKYzk3I6/QQp6e1T50py4qg+c+9BzOEl2rBmQIpStwNUoqQ73An+Tkfy9YuV7O+o2mpVVJpe+fH//POZkbg==", + "requires": { + "qs": "^6.9.1", + "tunnel": "0.0.6", + "underscore": "^1.12.1" + }, + "dependencies": { + "qs": { + "version": "6.11.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.1.tgz", + "integrity": "sha512-0wsrzgTz/kAVIeuxSjnpGC56rzYtr6JT/2BwEvMaPhFIoYa1aGO8LbzuU1R0uUYQkLpWBTOj0l/CLAJB64J6nQ==", + "requires": { + "side-channel": "^1.0.4" + } + } + } + } + } + }, + "azure-pipelines-tasks-utility-common": { + "version": "3.198.1", + "resolved": "https://registry.npmjs.org/azure-pipelines-tasks-utility-common/-/azure-pipelines-tasks-utility-common-3.198.1.tgz", + "integrity": "sha512-XxXLwrz06lSXP31JGCcgp2DCuVwcKLCjma55DtsjDe8L8sngKfmTBIiSuZe41aP+KlRtqo8n1I/FBQNPWxGw9w==", + "requires": { + "@types/node": "^10.17.0", + "azure-pipelines-task-lib": "^3.1.0", + "azure-pipelines-tool-lib": "^1.0.2", + "js-yaml": "3.13.1", + "semver": "^5.4.1" + }, + "dependencies": { + "@types/node": { + "version": "10.17.60", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.60.tgz", + "integrity": "sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw==" + }, + "@types/semver": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-5.5.0.tgz", + "integrity": "sha512-41qEJgBH/TWgo5NFSvBCJ1qkoi3Q6ONSF2avrHq1LVEZfYpdHmj0y9SuTK+u9ZhG1sYQKBL1AWXKyLWP4RaUoQ==" + }, + "azure-pipelines-task-lib": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/azure-pipelines-task-lib/-/azure-pipelines-task-lib-3.4.0.tgz", + "integrity": "sha512-3eC4OTFw+7xD7A2aUhxR/j+jRlTI+vVfS0CGxt1pCLs4c/KmY0tQWgbqjD3157kmiucWxELBvgZHaD2gCBe9fg==", + "requires": { + "minimatch": "3.0.5", + "mockery": "^2.1.0", + "q": "^1.5.1", + "semver": "^5.1.0", + "shelljs": "^0.8.5", + "sync-request": "6.1.0", + "uuid": "^3.0.1" + }, + "dependencies": { + "mockery": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mockery/-/mockery-2.1.0.tgz", + "integrity": "sha512-9VkOmxKlWXoDO/h1jDZaS4lH33aWfRiJiNT/tKj+8OGzrcFDLo8d0syGdbsc3Bc4GvRXPb+NMMvojotmuGJTvA==" + } + } + }, + "azure-pipelines-tool-lib": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/azure-pipelines-tool-lib/-/azure-pipelines-tool-lib-1.3.1.tgz", + "integrity": "sha512-6XrjayeYI7QeL2tGP3FPgHggWHAYe4opESnZ9a3UsbtWYdZu3dldBbOlJZpkAxfKCpjRDYMuq6SP1MUsOOm0kA==", + "requires": { + "@types/semver": "^5.3.0", + "@types/uuid": "^3.4.5", + "azure-pipelines-task-lib": "^3.1.10", + "semver": "^5.7.0", + "semver-compare": "^1.0.0", + "typed-rest-client": "^1.8.6", + "uuid": "^3.3.2" + }, + "dependencies": { + "azure-pipelines-task-lib": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/azure-pipelines-task-lib/-/azure-pipelines-task-lib-3.3.1.tgz", + "integrity": "sha512-56ZAr4MHIoa24VNVuwPL4iUQ5MKaigPoYXkBG8E8fiVmh8yZdatUo25meNoQwg77vDY22F63Q44UzXoMWmy7ag==", + "requires": { + "minimatch": "3.0.5", + "mockery": "^1.7.0", + "q": "^1.5.1", + "semver": "^5.1.0", + "shelljs": "^0.8.5", + "sync-request": "6.1.0", + "uuid": "^3.0.1" + } + } + } + }, + "minimatch": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.5.tgz", + "integrity": "sha512-tUpxzX0VAzJHjLu0xUfFv1gwVp9ba3IOuRAVH2EGuRW8a5emA2FlACLqiT/lDVtS1W+TGNwqz3sWaNyLgDJWuw==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + } + } + }, + "azure-pipelines-tool-lib": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/azure-pipelines-tool-lib/-/azure-pipelines-tool-lib-2.0.4.tgz", + "integrity": "sha512-LgAelZKJe3k/t3NsKSKzjeRviphns0w0p5tgwz8uHN70I9m2TToiOKl+fogrdXcM6+jiLBk5KTqrcRBqPpv/XA==", + "requires": { + "@types/semver": "^5.3.0", + "@types/uuid": "^3.4.5", + "azure-pipelines-task-lib": "^4.1.0", + "semver": "^5.7.0", + "semver-compare": "^1.0.0", + "typed-rest-client": "^1.8.6", + "uuid": "^3.3.2" + }, + "dependencies": { + "@types/semver": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-5.5.0.tgz", + "integrity": "sha512-41qEJgBH/TWgo5NFSvBCJ1qkoi3Q6ONSF2avrHq1LVEZfYpdHmj0y9SuTK+u9ZhG1sYQKBL1AWXKyLWP4RaUoQ==" + }, + "semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==" + } + } + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "buffer-from": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==" + }, + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" + }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "concat-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "requires": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + } + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" + }, + "form-data": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.1.tgz", + "integrity": "sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, + "get-intrinsic": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.0.tgz", + "integrity": "sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q==", + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.3" + } + }, + "get-port": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/get-port/-/get-port-3.2.0.tgz", + "integrity": "sha1-3Xzn3hh8Bsi/NTeWrHHgmfCYDrw=" + }, + "glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "dependencies": { + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "requires": { + "brace-expansion": "^1.1.7" + } + } + } + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==" + }, + "http-basic": { + "version": "8.1.3", + "resolved": "https://registry.npmjs.org/http-basic/-/http-basic-8.1.3.tgz", + "integrity": "sha512-/EcDMwJZh3mABI2NhGfHOGOeOZITqfkEO4p/xK+l3NpyncIHUQBoMvCSF/b5GqvKtySC2srL/GGG3+EtlqlmCw==", + "requires": { + "caseless": "^0.12.0", + "concat-stream": "^1.6.2", + "http-response-object": "^3.0.1", + "parse-cache-control": "^1.0.1" + } + }, + "http-response-object": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/http-response-object/-/http-response-object-3.0.2.tgz", + "integrity": "sha512-bqX0XTF6fnXSQcEJ2Iuyr75yVakyjIDCqroJQ/aHfSdlM743Cwqoi2nDYMzLGWUcuTWGWy8AAvOKXTfiv6q9RA==", + "requires": { + "@types/node": "^10.0.3" + }, + "dependencies": { + "@types/node": { + "version": "10.17.60", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.60.tgz", + "integrity": "sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw==" + } + } + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" + }, + "interpret": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", + "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==" + }, + "ip-address": { + "version": "5.9.4", + "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-5.9.4.tgz", + "integrity": "sha512-dHkI3/YNJq4b/qQaz+c8LuarD3pY24JqZWfjB8aZx1gtpc2MDILu9L9jpZe1sHpzo/yWFweQVn+U//FhazUxmw==", + "requires": { + "jsbn": "1.1.0", + "lodash": "^4.17.15", + "sprintf-js": "1.1.2" + } + }, + "is-core-module": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.9.0.tgz", + "integrity": "sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A==", + "requires": { + "has": "^1.0.3" + } + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "js-yaml": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "jsbn": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz", + "integrity": "sha1-sBMHyym2GKHtJux56RH4A8TaAEA=" + }, + "lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + }, + "ltx": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/ltx/-/ltx-2.10.0.tgz", + "integrity": "sha512-RB4zR6Mrp/0wTNS9WxMvpgfht/7u/8QAC9DpPD19opL/4OASPa28uoliFqeDkLUU8pQ4aeAfATBZmz1aSAHkMw==", + "requires": { + "inherits": "^2.0.4" + } + }, + "mime-db": { + "version": "1.44.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz", + "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==" + }, + "mime-types": { + "version": "2.1.27", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz", + "integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==", + "requires": { + "mime-db": "1.44.0" + } + }, + "minimatch": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.5.tgz", + "integrity": "sha512-tUpxzX0VAzJHjLu0xUfFv1gwVp9ba3IOuRAVH2EGuRW8a5emA2FlACLqiT/lDVtS1W+TGNwqz3sWaNyLgDJWuw==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "mockery": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/mockery/-/mockery-1.7.0.tgz", + "integrity": "sha1-9O3g2HUMHJcnwnLqLGBiniyaHE8=" + }, + "object-inspect": { + "version": "1.12.3", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", + "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==" + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "requires": { + "wrappy": "1" + } + }, + "parse-cache-control": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parse-cache-control/-/parse-cache-control-1.0.1.tgz", + "integrity": "sha1-juqz5U+laSD+Fro493+iGqzC104=" + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==" + }, + "path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" + }, + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + }, + "promise": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/promise/-/promise-8.1.0.tgz", + "integrity": "sha512-W04AqnILOL/sPRXziNicCjSNRruLAuIHEOVBazepu0545DDNGYHz7ar9ZgZ1fMU8/MA4mVxp5rkBWRi6OXIy3Q==", + "requires": { + "asap": "~2.0.6" + } + }, + "q": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", + "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=" + }, + "qs": { + "version": "6.11.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.1.tgz", + "integrity": "sha512-0wsrzgTz/kAVIeuxSjnpGC56rzYtr6JT/2BwEvMaPhFIoYa1aGO8LbzuU1R0uUYQkLpWBTOj0l/CLAJB64J6nQ==", + "requires": { + "side-channel": "^1.0.4" + } + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "rechoir": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==", + "requires": { + "resolve": "^1.1.6" + } + }, + "resolve": { + "version": "1.22.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", + "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", + "requires": { + "is-core-module": "^2.9.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + }, + "semver-compare": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz", + "integrity": "sha1-De4hahyUGrN+nvsXiPavxf9VN/w=" + }, + "shelljs": { + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz", + "integrity": "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==", + "requires": { + "glob": "^7.0.0", + "interpret": "^1.0.0", + "rechoir": "^0.6.2" + } + }, + "side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "requires": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + } + }, + "sprintf-js": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.2.tgz", + "integrity": "sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug==" + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==" + }, + "sync-request": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/sync-request/-/sync-request-6.1.0.tgz", + "integrity": "sha512-8fjNkrNlNCrVc/av+Jn+xxqfCjYaBoHqCsDz6mt030UMxJGr+GSfCV1dQt2gRtlL63+VPidwDVLr7V2OcTSdRw==", + "requires": { + "http-response-object": "^3.0.1", + "sync-rpc": "^1.2.1", + "then-request": "^6.0.0" + } + }, + "sync-rpc": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/sync-rpc/-/sync-rpc-1.3.6.tgz", + "integrity": "sha512-J8jTXuZzRlvU7HemDgHi3pGnh/rkoqR/OZSjhTyyZrEkkYQbk7Z33AXp37mkPfPpfdOuj7Ex3H/TJM1z48uPQw==", + "requires": { + "get-port": "^3.1.0" + } + }, + "then-request": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/then-request/-/then-request-6.0.2.tgz", + "integrity": "sha512-3ZBiG7JvP3wbDzA9iNY5zJQcHL4jn/0BWtXIkagfz7QgOL/LqjCEOBQuJNZfu0XYnv5JhKh+cDxCPM4ILrqruA==", + "requires": { + "@types/concat-stream": "^1.6.0", + "@types/form-data": "0.0.33", + "@types/node": "^8.0.0", + "@types/qs": "^6.2.31", + "caseless": "~0.12.0", + "concat-stream": "^1.6.0", + "form-data": "^2.2.0", + "http-basic": "^8.1.1", + "http-response-object": "^3.0.1", + "promise": "^8.0.0", + "qs": "^6.4.0" + }, + "dependencies": { + "@types/node": { + "version": "8.10.66", + "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.66.tgz", + "integrity": "sha512-tktOkFUA4kXx2hhhrB8bIFb5TbwzS4uOhKEmwiD+NoiL0qtP2OQ9mFldbgD4dV1djrlBYP6eBuQZiWjuHUpqFw==" + } + } + }, + "tunnel": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", + "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==" + }, + "typed-rest-client": { + "version": "1.8.9", + "resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-1.8.9.tgz", + "integrity": "sha512-uSmjE38B80wjL85UFX3sTYEUlvZ1JgCRhsWj/fJ4rZ0FqDUFoIuodtiVeE+cUqiVTOKPdKrp/sdftD15MDek6g==", + "requires": { + "qs": "^6.9.1", + "tunnel": "0.0.6", + "underscore": "^1.12.1" + } + }, + "typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" + }, + "typescript": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.0.2.tgz", + "integrity": "sha512-e4ERvRV2wb+rRZ/IQeb3jm2VxBsirQLpQhdxplZ2MEzGvDkkMmPglecnNDfSUBivMjP93vRbngYYDQqQ/78bcQ==", + "dev": true + }, + "underscore": { + "version": "1.13.4", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.4.tgz", + "integrity": "sha512-BQFnUDuAQ4Yf/cYY5LNrK9NCJFKriaRbD9uR1fTeXnBeoa97W0i41qkZfGO9pSo8I5KzjAcSY2XYtdf0oKd7KQ==" + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "uuid": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", + "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==" + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" + } + } +} diff --git a/_generated/UseDotNetV2_Node16/package.json b/_generated/UseDotNetV2_Node16/package.json new file mode 100644 index 000000000000..f9d3991b0174 --- /dev/null +++ b/_generated/UseDotNetV2_Node16/package.json @@ -0,0 +1,40 @@ +{ + "name": "usedotnet", + "version": "2.0.0", + "description": "Use .Net Core", + "main": "usedotnet.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/Microsoft/azure-pipelines-tasks.git" + }, + "keywords": [ + "Azure", + "Pipelines", + "Tasks", + "DotNetCore", + "Use" + ], + "author": "Microsoft Corporation", + "license": "MIT", + "bugs": { + "url": "https://github.com/Microsoft/azure-pipelines-tasks/issues" + }, + "homepage": "https://github.com/Microsoft/azure-pipelines-tasks#readme", + "dependencies": { + "@types/mocha": "^5.2.6", + "@types/node": "^16.11.39", + "@types/semver": "6.0.0", + "azure-pipelines-task-lib": "^4.4.0", + "azure-pipelines-tasks-packaging-common": "^2.198.1", + "azure-pipelines-tasks-utility-common": "^3.198.1", + "azure-pipelines-tool-lib": "^2.0.4", + "semver": "6.3.0", + "typed-rest-client": "^1.8.9" + }, + "devDependencies": { + "typescript": "4.0.2" + } +} diff --git a/_generated/UseDotNetV2_Node16/task.json b/_generated/UseDotNetV2_Node16/task.json new file mode 100644 index 000000000000..2bbe13f7ca5e --- /dev/null +++ b/_generated/UseDotNetV2_Node16/task.json @@ -0,0 +1,201 @@ +{ + "id": "B0CE7256-7898-45D3-9CB5-176B752BFEA6", + "name": "UseDotNet", + "friendlyName": "Use .NET Core", + "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.", + "category": "Tool", + "helpUrl": "https://aka.ms/AA4xgy0", + "helpMarkDown": "[Learn more about this task](https://aka.ms/AA4xgy0)", + "runsOn": [ + "Agent", + "DeploymentGroup" + ], + "author": "Microsoft Corporation", + "version": { + "Major": 2, + "Minor": 226, + "Patch": 0 + }, + "satisfies": [ + "DotNetCore" + ], + "demands": [], + "minimumAgentVersion": "2.144.0", + "ecosystem": "dotnet", + "instanceNameFormat": "Use .NET Core $(packageType) $(version)", + "releaseNotes": "
  • Support for installing multiple versions side by side.
  • Support for patterns in version to fetch latest in minor/major version.
  • Restrict Multi-level lookup
  • Installs NuGet and provides proxy support.
  • Installs sdk versions from `global.json` file(s)
  • ", + "groups": [ + { + "name": "advanced", + "displayName": "Advanced", + "isExpanded": true + } + ], + "inputs": [ + { + "name": "packageType", + "type": "pickList", + "label": "Package to install", + "defaultValue": "sdk", + "required": false, + "helpMarkDown": "Please select whether to install only runtime or SDK.", + "options": { + "runtime": "Runtime", + "sdk": "SDK (contains runtime)" + } + }, + { + "name": "useGlobalJson", + "type": "boolean", + "label": "Use global json", + "defaultValue": false, + "required": false, + "helpMarkDown": "Select this option to install all SDKs from global.json files. These files are searched from system.DefaultWorkingDirectory. You can change the search root path by setting working directory input.", + "visibleRule": "packageType = sdk" + }, + { + "name": "workingDirectory", + "type": "filePath", + "label": "Working Directory", + "helpMarkDown": "Specify path from where global.json files should be searched when using `Use global json`. If empty, `system.DefaultWorkingDirectory` will be considered as the root path.", + "required": "false", + "visibleRule": "useGlobalJson = true" + }, + { + "name": "version", + "type": "string", + "label": "Version", + "defaultValue": "", + "required": false, + "helpMarkDown": "Specify version of .NET Core SDK or runtime to install.
    Versions can be given in the following formats
  • 2.x => Install latest in major version.
  • 2.2.x => Install latest in major and minor version
  • 2.2.104 => Install exact version

  • 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://dotnetcli.blob.core.windows.net/dotnet/release-metadata/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", + "visibleRule": "useGlobalJson = false || packageType = runtime" + }, + { + "name": "vsVersion", + "type": "string", + "label": "Compatible Visual Studio version", + "defaultValue": "", + "required": false, + "groupName": "advanced", + "helpMarkDown": "Specify version of compatible visual studio for which .NET core sdk to install. Specifiy complete vs-version like 16.6.4 containing major version, minor version and patch number.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://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json)" + }, + { + "name": "includePreviewVersions", + "type": "boolean", + "label": "Include Preview Versions", + "defaultValue": "false", + "required": false, + "helpMarkDown": "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", + "visibleRule": "useGlobalJson = false || packageType = runtime" + }, + { + "name": "installationPath", + "type": "string", + "label": "Path To Install .Net Core", + "defaultValue": "$(Agent.ToolsDirectory)/dotnet", + "required": false, + "groupName": "advanced", + "helpMarkDown": "Specify where .Net Core SDK/Runtime should be installed. Different paths can have the following impact on .Net's behavior.
  • $(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.
  • $(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.
  • 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.
    Note that you can also configure Multi-Level Lookup setting which can configure .Net host's probing for a suitable version." + }, + { + "name": "performMultiLevelLookup", + "type": "boolean", + "label": "Perform Multi Level Lookup", + "groupName": "advanced", + "defaultValue": false, + "required": false, + "helpMarkDown": "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:
    C:\\Program Files\\dotnet (64-bit processes)
    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).
    " + } + ], + "execution": { + "Node10": { + "target": "usedotnet.js" + }, + "Node16": { + "target": "usedotnet.js", + "argumentFormat": "" + } + }, + "messages": { + "ToolFailed": "Tool install failed: %s", + "ImplicitVersionNotSupported": "Version should be a valid and explicit version: %s", + "getMachinePlatformFailed": "Failed to get machine platform details. Error: %s.", + "getDownloadUrlsFailed": "Failed to get download URLS. Error: %s.", + "UsingCachedTool": "Cached copy of .NET Core exists. No need to install afresh. Cached tool location: %s.", + "CheckingToolCache": "Checking if a cached copy exists for this version...", + "InstallingAfresh": "The cache does not contain the requested version of .NET Core. Downloading and installing it now.", + "GettingDownloadUrl": "Getting URL to download .NET Core %s version: %s.", + "CouldNotDetectPlatform": "Could not detect the machine's OS", + "NullDownloadUrls": "Could not construct download URL. Please ensure that specified version %s is valid.", + "DownloadingUrl": "Downloading .NET Core package from URL: %s", + "ExtractingPackage": "Extracting downloaded package %s.", + "CachingTool": "Caching this installed tool.", + "SuccessfullyInstalled": "Successfully installed .NET Core %s version %s.", + "ToolToInstall": "Tool to install: .NET Core %s version %s.", + "PrimaryPlatform": "Detected platform (Primary): %s", + "LegacyPlatform": "Detected platform (Legacy): %s", + "CouldNotDownload": "Could not download installation package from this URL: %s Error: %s", + "FailedToDownloadPackage": "Failed to download package for installation", + "PrependGlobalToolPath": "Creating global tool path and pre-pending to PATH.", + "VersionsFileMalformed": "The specified version's download links are not correctly formed in the supported versions document => %s/", + "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.", + "UnableToAccessPath": "Unable to access path: %s. Error: %s. Please make sure that agent process has access to the path.", + "VersionCanNotBeDownloadedFromUrl": "Version: %s cannot be downloaded from URL: %s. Either the URL or version is incorrect.", + "CopyingFoldersIntoPath": "Copying all root folders into installation path: %s", + "CopyingFilesIntoPath": "Copying root files (such as dotnet.exe) into installation path: %s", + "FailedToCopyTopLevelFiles": "Failed to copy root files into installation path: %s. Error: %s", + "FailedWhileInstallingVersionAtPath": "Failed while installing version: %s at path: %s with error: %s", + "ExplicitVersionRequired": "Version: %s is not allowed. Versions to be installed should be of format: major.minor.patchversion. For example: 2.2.1", + "VersionFoundInCache": "Version: %s was found in cache.", + "VersionNotFoundInCache": "Version %s was not found in cache.", + "CreatingInstallationCompeleteFile": "Creating installation complete marker file for .Net core %s version %s", + "CannotFindRuntimeVersionForCompletingInstallation": "Cannot find runtime version for package type: %s with version: %s", + "PathNotFoundException": "Path: %s could not be located/found. Make sure the path exists.", + "VersionIsLocalLatest": "Version: %s is the latest among the versions present at path: %s", + "VersionIsNotLocalLatest": "Version: %s is not the latest among the versions present at %s", + "DownloadUrlForMatchingOsNotFound": "Download URL for .Net Core %s version %s could not be found for the following OS platforms (rid): %s", + "ExceptionWhileDownloadOrReadReleasesIndex": "Failed to download or parse releases-index.json with error: %s", + "MatchingVersionForUserInputVersion": "Found version %s in channel %s for user specified version spec: %s", + "UrlForReleaseChannelNotFound": "Could not find URL for releases.json of channel version: %s", + "NoSuitableChannelWereFound": "Channel corresponding to version %s could not be found.", + "DetectingPlatform": "Detecting OS platform to find correct download package for the OS.", + "FailedInDetectingMachineArch": "Failed while detecting machine OS platform with error: %s", + "runtimeVersionPropertyNotFound": "runtime-version property could not be found for .Net Core %s version %s.", + "VersionNotFound": "%s version matching: %s could not be found", + "VersionNotAllowed": "Version %s is not allowed. Allowed version types are: majorVersion.x, majorVersion.minorVersion.x, majorVersion.minorVersion.patchVersion. More details: %s", + "VersionsCanNotBeCompared": "Versions %s and %s cannot be compared. Both versions should be explicit.", + "FileNameNotCorrectCompleteFileName": "File name %s is not a correct '.complete' file.", + "ChannelVersionsNotComparable": "Channel versions %s and %s can not be compared. They both must have numeric major and minor versions.", + "LookingForVersionInChannel": "Searching for version in channel %s", + "FallingBackToAdjacentChannels": "Version %s could not be found in its channel, will now search in adjacent channels.", + "ErrorWhileSettingDotNetToolPath": "Failed while prepending .Net Core Tool path to PATH envrionment variable. Error: %s", + "RequiredChannelVersionForSpec": "Finding channel %s for version %s", + "ErrorWhileGettingVersionFromChannel": "Failed while getting version %s from channel %s with error: %s", + "ComparingInstalledFolderVersions": "Comparing if version being installed %s is greater than already installed version with folder name %s", + "ComparingInstalledFileVersions": "Comparing if version being installed %s is greater than already installed version with version complete file name %s", + "InvalidChannelObject": "Object cannot be used as Channel, required properties such as channel-version, releases.json is missing.", + "ReleasesIndexBodyIncorrect": "Parsed releases index body is not correct. Kindly see if the releases-index section is not empty in the file.", + "InvalidVersionObject": "Releases.json has a release with invalid %s object: %s", + "InvalidVersion": "Invalid version specified %s", + "FilesDataIsIncorrectInVersion": "In release %s for version %s, File data is incorrect (might have missing required fields, such as name, rid and url): %s", + "VersionFilesDataIncorrect": "Version's files data is missing or has missing required fields.", + "VersionInformationNotComplete": "Version: %s required information is not complete in releases.json file. Error: %s", + "FailedWhileExtractingPacakge": "Failed while extracting downloaded package with error: %s", + "InstallingNuGetVersion": "Installing NuGet version %s", + "FailureWhileInstallingNuGetVersion": "Failed while installing NuGet version. Error: %s", + "SettingUpNugetProxySettings": "Setting up proxy configuration for NuGet.", + "GlobalJsonFound": "Found a global.json at path: %s", + "GlobalJsonSdkVersion": "SDK version: %s is specified by global.json at path: %s", + "GlobalJsonIsEmpty": "global.json at path: %s is empty. No version is specified.", + "FailedToFindGlobalJson": "Failed to find global.json at and inside path: %s", + "FailedToReadGlobalJson": "The global.json at path: '%s' has the wrong format. For information about global.json, visit here: https://docs.microsoft.com/en-us/dotnet/core/tools/global-json. Error while trying to read: %s", + "VersionNumberHasTheWrongFormat": "The version number: %s doesn't have the correct format. Versions can be given in the following formats: 2.x => Install latest in major version. 2.2.x => Install latest in major and minor version. 2.2.104 => Install exact version. 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://dotnetcli.blob.core.windows.net/dotnet/release-metadata/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", + "OnlyExplicitVersionAllowed": "Only explicit versions and accepted, such as: 2.2.301. Version: %s is not valid.", + "SupportPhaseNotPresentInChannel": "support-phase is not present in the channel with channel-version %s.", + "DepricatedVersionNetCore": "NET Core version you specfied %s is out of support and will be removed from hosted agents soon. Please refer to https://aka.ms/dotnet-core-support for more information about the .NET support policy." + }, + "_buildConfigMapping": { + "Default": "2.226.1", + "Node16-225": "2.226.0" + } +} \ No newline at end of file diff --git a/_generated/UseDotNetV2_Node16/task.loc.json b/_generated/UseDotNetV2_Node16/task.loc.json new file mode 100644 index 000000000000..0fb77760f3b3 --- /dev/null +++ b/_generated/UseDotNetV2_Node16/task.loc.json @@ -0,0 +1,201 @@ +{ + "id": "B0CE7256-7898-45D3-9CB5-176B752BFEA6", + "name": "UseDotNet", + "friendlyName": "ms-resource:loc.friendlyName", + "description": "ms-resource:loc.description", + "category": "Tool", + "helpUrl": "https://aka.ms/AA4xgy0", + "helpMarkDown": "ms-resource:loc.helpMarkDown", + "runsOn": [ + "Agent", + "DeploymentGroup" + ], + "author": "Microsoft Corporation", + "version": { + "Major": 2, + "Minor": 226, + "Patch": 0 + }, + "satisfies": [ + "DotNetCore" + ], + "demands": [], + "minimumAgentVersion": "2.144.0", + "ecosystem": "dotnet", + "instanceNameFormat": "ms-resource:loc.instanceNameFormat", + "releaseNotes": "ms-resource:loc.releaseNotes", + "groups": [ + { + "name": "advanced", + "displayName": "ms-resource:loc.group.displayName.advanced", + "isExpanded": true + } + ], + "inputs": [ + { + "name": "packageType", + "type": "pickList", + "label": "ms-resource:loc.input.label.packageType", + "defaultValue": "sdk", + "required": false, + "helpMarkDown": "ms-resource:loc.input.help.packageType", + "options": { + "runtime": "Runtime", + "sdk": "SDK (contains runtime)" + } + }, + { + "name": "useGlobalJson", + "type": "boolean", + "label": "ms-resource:loc.input.label.useGlobalJson", + "defaultValue": false, + "required": false, + "helpMarkDown": "ms-resource:loc.input.help.useGlobalJson", + "visibleRule": "packageType = sdk" + }, + { + "name": "workingDirectory", + "type": "filePath", + "label": "ms-resource:loc.input.label.workingDirectory", + "helpMarkDown": "ms-resource:loc.input.help.workingDirectory", + "required": "false", + "visibleRule": "useGlobalJson = true" + }, + { + "name": "version", + "type": "string", + "label": "ms-resource:loc.input.label.version", + "defaultValue": "", + "required": false, + "helpMarkDown": "ms-resource:loc.input.help.version", + "visibleRule": "useGlobalJson = false || packageType = runtime" + }, + { + "name": "vsVersion", + "type": "string", + "label": "ms-resource:loc.input.label.vsVersion", + "defaultValue": "", + "required": false, + "groupName": "advanced", + "helpMarkDown": "ms-resource:loc.input.help.vsVersion" + }, + { + "name": "includePreviewVersions", + "type": "boolean", + "label": "ms-resource:loc.input.label.includePreviewVersions", + "defaultValue": "false", + "required": false, + "helpMarkDown": "ms-resource:loc.input.help.includePreviewVersions", + "visibleRule": "useGlobalJson = false || packageType = runtime" + }, + { + "name": "installationPath", + "type": "string", + "label": "ms-resource:loc.input.label.installationPath", + "defaultValue": "$(Agent.ToolsDirectory)/dotnet", + "required": false, + "groupName": "advanced", + "helpMarkDown": "ms-resource:loc.input.help.installationPath" + }, + { + "name": "performMultiLevelLookup", + "type": "boolean", + "label": "ms-resource:loc.input.label.performMultiLevelLookup", + "groupName": "advanced", + "defaultValue": false, + "required": false, + "helpMarkDown": "ms-resource:loc.input.help.performMultiLevelLookup" + } + ], + "execution": { + "Node10": { + "target": "usedotnet.js" + }, + "Node16": { + "target": "usedotnet.js", + "argumentFormat": "" + } + }, + "messages": { + "ToolFailed": "ms-resource:loc.messages.ToolFailed", + "ImplicitVersionNotSupported": "ms-resource:loc.messages.ImplicitVersionNotSupported", + "getMachinePlatformFailed": "ms-resource:loc.messages.getMachinePlatformFailed", + "getDownloadUrlsFailed": "ms-resource:loc.messages.getDownloadUrlsFailed", + "UsingCachedTool": "ms-resource:loc.messages.UsingCachedTool", + "CheckingToolCache": "ms-resource:loc.messages.CheckingToolCache", + "InstallingAfresh": "ms-resource:loc.messages.InstallingAfresh", + "GettingDownloadUrl": "ms-resource:loc.messages.GettingDownloadUrl", + "CouldNotDetectPlatform": "ms-resource:loc.messages.CouldNotDetectPlatform", + "NullDownloadUrls": "ms-resource:loc.messages.NullDownloadUrls", + "DownloadingUrl": "ms-resource:loc.messages.DownloadingUrl", + "ExtractingPackage": "ms-resource:loc.messages.ExtractingPackage", + "CachingTool": "ms-resource:loc.messages.CachingTool", + "SuccessfullyInstalled": "ms-resource:loc.messages.SuccessfullyInstalled", + "ToolToInstall": "ms-resource:loc.messages.ToolToInstall", + "PrimaryPlatform": "ms-resource:loc.messages.PrimaryPlatform", + "LegacyPlatform": "ms-resource:loc.messages.LegacyPlatform", + "CouldNotDownload": "ms-resource:loc.messages.CouldNotDownload", + "FailedToDownloadPackage": "ms-resource:loc.messages.FailedToDownloadPackage", + "PrependGlobalToolPath": "ms-resource:loc.messages.PrependGlobalToolPath", + "VersionsFileMalformed": "ms-resource:loc.messages.VersionsFileMalformed", + "MatchingVersionNotFound": "ms-resource:loc.messages.MatchingVersionNotFound", + "UnableToAccessPath": "ms-resource:loc.messages.UnableToAccessPath", + "VersionCanNotBeDownloadedFromUrl": "ms-resource:loc.messages.VersionCanNotBeDownloadedFromUrl", + "CopyingFoldersIntoPath": "ms-resource:loc.messages.CopyingFoldersIntoPath", + "CopyingFilesIntoPath": "ms-resource:loc.messages.CopyingFilesIntoPath", + "FailedToCopyTopLevelFiles": "ms-resource:loc.messages.FailedToCopyTopLevelFiles", + "FailedWhileInstallingVersionAtPath": "ms-resource:loc.messages.FailedWhileInstallingVersionAtPath", + "ExplicitVersionRequired": "ms-resource:loc.messages.ExplicitVersionRequired", + "VersionFoundInCache": "ms-resource:loc.messages.VersionFoundInCache", + "VersionNotFoundInCache": "ms-resource:loc.messages.VersionNotFoundInCache", + "CreatingInstallationCompeleteFile": "ms-resource:loc.messages.CreatingInstallationCompeleteFile", + "CannotFindRuntimeVersionForCompletingInstallation": "ms-resource:loc.messages.CannotFindRuntimeVersionForCompletingInstallation", + "PathNotFoundException": "ms-resource:loc.messages.PathNotFoundException", + "VersionIsLocalLatest": "ms-resource:loc.messages.VersionIsLocalLatest", + "VersionIsNotLocalLatest": "ms-resource:loc.messages.VersionIsNotLocalLatest", + "DownloadUrlForMatchingOsNotFound": "ms-resource:loc.messages.DownloadUrlForMatchingOsNotFound", + "ExceptionWhileDownloadOrReadReleasesIndex": "ms-resource:loc.messages.ExceptionWhileDownloadOrReadReleasesIndex", + "MatchingVersionForUserInputVersion": "ms-resource:loc.messages.MatchingVersionForUserInputVersion", + "UrlForReleaseChannelNotFound": "ms-resource:loc.messages.UrlForReleaseChannelNotFound", + "NoSuitableChannelWereFound": "ms-resource:loc.messages.NoSuitableChannelWereFound", + "DetectingPlatform": "ms-resource:loc.messages.DetectingPlatform", + "FailedInDetectingMachineArch": "ms-resource:loc.messages.FailedInDetectingMachineArch", + "runtimeVersionPropertyNotFound": "ms-resource:loc.messages.runtimeVersionPropertyNotFound", + "VersionNotFound": "ms-resource:loc.messages.VersionNotFound", + "VersionNotAllowed": "ms-resource:loc.messages.VersionNotAllowed", + "VersionsCanNotBeCompared": "ms-resource:loc.messages.VersionsCanNotBeCompared", + "FileNameNotCorrectCompleteFileName": "ms-resource:loc.messages.FileNameNotCorrectCompleteFileName", + "ChannelVersionsNotComparable": "ms-resource:loc.messages.ChannelVersionsNotComparable", + "LookingForVersionInChannel": "ms-resource:loc.messages.LookingForVersionInChannel", + "FallingBackToAdjacentChannels": "ms-resource:loc.messages.FallingBackToAdjacentChannels", + "ErrorWhileSettingDotNetToolPath": "ms-resource:loc.messages.ErrorWhileSettingDotNetToolPath", + "RequiredChannelVersionForSpec": "ms-resource:loc.messages.RequiredChannelVersionForSpec", + "ErrorWhileGettingVersionFromChannel": "ms-resource:loc.messages.ErrorWhileGettingVersionFromChannel", + "ComparingInstalledFolderVersions": "ms-resource:loc.messages.ComparingInstalledFolderVersions", + "ComparingInstalledFileVersions": "ms-resource:loc.messages.ComparingInstalledFileVersions", + "InvalidChannelObject": "ms-resource:loc.messages.InvalidChannelObject", + "ReleasesIndexBodyIncorrect": "ms-resource:loc.messages.ReleasesIndexBodyIncorrect", + "InvalidVersionObject": "ms-resource:loc.messages.InvalidVersionObject", + "InvalidVersion": "ms-resource:loc.messages.InvalidVersion", + "FilesDataIsIncorrectInVersion": "ms-resource:loc.messages.FilesDataIsIncorrectInVersion", + "VersionFilesDataIncorrect": "ms-resource:loc.messages.VersionFilesDataIncorrect", + "VersionInformationNotComplete": "ms-resource:loc.messages.VersionInformationNotComplete", + "FailedWhileExtractingPacakge": "ms-resource:loc.messages.FailedWhileExtractingPacakge", + "InstallingNuGetVersion": "ms-resource:loc.messages.InstallingNuGetVersion", + "FailureWhileInstallingNuGetVersion": "ms-resource:loc.messages.FailureWhileInstallingNuGetVersion", + "SettingUpNugetProxySettings": "ms-resource:loc.messages.SettingUpNugetProxySettings", + "GlobalJsonFound": "ms-resource:loc.messages.GlobalJsonFound", + "GlobalJsonSdkVersion": "ms-resource:loc.messages.GlobalJsonSdkVersion", + "GlobalJsonIsEmpty": "ms-resource:loc.messages.GlobalJsonIsEmpty", + "FailedToFindGlobalJson": "ms-resource:loc.messages.FailedToFindGlobalJson", + "FailedToReadGlobalJson": "ms-resource:loc.messages.FailedToReadGlobalJson", + "VersionNumberHasTheWrongFormat": "ms-resource:loc.messages.VersionNumberHasTheWrongFormat", + "OnlyExplicitVersionAllowed": "ms-resource:loc.messages.OnlyExplicitVersionAllowed", + "SupportPhaseNotPresentInChannel": "ms-resource:loc.messages.SupportPhaseNotPresentInChannel", + "DepricatedVersionNetCore": "ms-resource:loc.messages.DepricatedVersionNetCore" + }, + "_buildConfigMapping": { + "Default": "2.226.1", + "Node16-225": "2.226.0" + } +} \ No newline at end of file diff --git a/_generated/UseDotNetV2_Node16/tsconfig.json b/_generated/UseDotNetV2_Node16/tsconfig.json new file mode 100644 index 000000000000..0438b79f69ac --- /dev/null +++ b/_generated/UseDotNetV2_Node16/tsconfig.json @@ -0,0 +1,6 @@ +{ + "compilerOptions": { + "target": "ES6", + "module": "commonjs" + } +} \ No newline at end of file diff --git a/_generated/UseDotNetV2_Node16/usedotnet.ts b/_generated/UseDotNetV2_Node16/usedotnet.ts new file mode 100644 index 000000000000..32b12e21fa7a --- /dev/null +++ b/_generated/UseDotNetV2_Node16/usedotnet.ts @@ -0,0 +1,128 @@ +"use strict"; +import * as path from 'path'; + +import * as tl from 'azure-pipelines-task-lib/task'; +import { DotNetCoreVersionFetcher } from "./versionfetcher"; +import { globalJsonFetcher } from "./globaljsonfetcher"; +import { VersionInstaller } from "./versioninstaller"; +import { Constants } from "./versionutilities"; +import { VersionInfo, VersionParts } from "./models" +import { NuGetInstaller } from "./nugetinstaller"; + + +function checkVersionForDeprecationAndNotify(versionSpec: string | null): void { + if (versionSpec != null && versionSpec.startsWith("2.1")) { + tl.warning(tl.loc('DepricatedVersionNetCore',versionSpec)); + } +} + +async function run() { + let useGlobalJson: boolean = tl.getBoolInput('useGlobalJson'); + let packageType = (tl.getInput('packageType') || "sdk").toLowerCase();; + let versionSpec = tl.getInput('version'); + let vsVersionSpec = tl.getInput('vsVersion'); + const nugetVersion = tl.getInput('nugetVersion') || '4.9.6'; + + let installationPath = tl.getInput('installationPath'); + if (!installationPath || installationPath.length == 0) { + installationPath = path.join(tl.getVariable('Agent.ToolsDirectory'), "dotnet"); + } + + let performMultiLevelLookup = tl.getBoolInput("performMultiLevelLookup", false); + // Check if we want install dotnet + if (versionSpec || (useGlobalJson && packageType == "sdk")) { + let includePreviewVersions: boolean = tl.getBoolInput('includePreviewVersions'); + let workingDirectory: string | null = tl.getPathInput("workingDirectory", false) || null; + await installDotNet(installationPath, packageType, versionSpec, vsVersionSpec, useGlobalJson, workingDirectory, includePreviewVersions); + tl.prependPath(installationPath); + // Set DOTNET_ROOT for dotnet core Apphost to find runtime since it is installed to a non well-known location. + tl.setVariable('DOTNET_ROOT', installationPath); + // By default disable Multi Level Lookup unless user wants it enabled. + tl.setVariable("DOTNET_MULTILEVEL_LOOKUP", !performMultiLevelLookup ? "0" : "1"); + } + + // Add dot net tools path to "PATH" environment variables, so that tools can be used directly. + addDotNetCoreToolPath(); + // Install NuGet version specified by user or 4.9.6 in case none is specified + // Also sets up the proxy configuration settings. + await NuGetInstaller.installNuGet(nugetVersion); +} + +/** + * install dotnet to the installation path. + * @param installationPath The installation path. If this is empty it would use {Agent.ToolsDirectory}/dotnet/ + * @param packageType The installation type for the installation. Only `sdk` and `runtime` are valid options + * @param versionSpec The version the user want to install. + * @param useGlobalJson A switch so we know if the user have `global.json` files and want use that. If this is true only SDK is possible! + * @param workingDirectory This is only relevant if the `useGlobalJson` switch is `true`. It will set the root directory for the search of `global.json` + * @param includePreviewVersions Define if the installer also search for preview version + */ +async function installDotNet( + installationPath: string, + packageType: string, + versionSpec: string | null, + vsVersionSpec: string | null, + useGlobalJson: boolean, + workingDirectory: string | null, + includePreviewVersions: boolean) { + + let versionFetcher = new DotNetCoreVersionFetcher(); + let dotNetCoreInstaller = new VersionInstaller(packageType, installationPath); + // here we must check also the package type because if the user switch the packageType the useGlobalJson can be true, also if it will hidden. + if (useGlobalJson && packageType == "sdk") { + let globalJsonFetcherInstance = new globalJsonFetcher(workingDirectory); + let versionsToInstall: VersionInfo[] = await globalJsonFetcherInstance.GetVersions(); + for (let index = 0; index < versionsToInstall.length; index++) { + const version = versionsToInstall[index]; + let url = versionFetcher.getDownloadUrl(version); + if (!dotNetCoreInstaller.isVersionInstalled(version.getVersion())) { + await dotNetCoreInstaller.downloadAndInstall(version, url); + } else { + checkVersionForDeprecationAndNotify(versionSpec); + } + } + } else if (versionSpec) { + console.log(tl.loc("ToolToInstall", packageType, versionSpec)); + let versionSpecParts = new VersionParts(versionSpec); + let versionInfo: VersionInfo = await versionFetcher.getVersionInfo(versionSpecParts.versionSpec, vsVersionSpec, packageType, includePreviewVersions); + + if (!versionInfo) { + throw tl.loc("MatchingVersionNotFound", versionSpecParts.versionSpec); + } + if (!dotNetCoreInstaller.isVersionInstalled(versionInfo.getVersion())) { + await dotNetCoreInstaller.downloadAndInstall(versionInfo, versionFetcher.getDownloadUrl(versionInfo)); + } else { + checkVersionForDeprecationAndNotify(versionSpec); + } + } else { + throw new Error("Hey developer you have called the method `installDotNet` without a `versionSpec` or without `useGlobalJson`. that is impossible."); + } +} + +function addDotNetCoreToolPath() { + try { + let globalToolPath: string = ""; + if (tl.osType().match(/^Win/)) { + globalToolPath = path.join(process.env.USERPROFILE, Constants.relativeGlobalToolPath); + } else { + globalToolPath = path.join(process.env.HOME, Constants.relativeGlobalToolPath); + } + + console.log(tl.loc("PrependGlobalToolPath")); + tl.mkdirP(globalToolPath); + tl.prependPath(globalToolPath); + } catch (error) { + //nop + console.log(tl.loc("ErrorWhileSettingDotNetToolPath", JSON.stringify(error))); + } +} + +const taskManifestPath = path.join(__dirname, "task.json"); +const packagingCommonManifestPath = path.join(__dirname, "node_modules/azure-pipelines-tasks-packaging-common/module.json"); +tl.debug("Setting resource path to " + taskManifestPath); +tl.setResourcePath(taskManifestPath); +tl.setResourcePath(packagingCommonManifestPath); + +run() + .then(() => tl.setResult(tl.TaskResult.Succeeded, "")) + .catch((error) => tl.setResult(tl.TaskResult.Failed, !!error.message ? error.message : error)); \ No newline at end of file diff --git a/_generated/UseDotNetV2_Node16/versionfetcher.ts b/_generated/UseDotNetV2_Node16/versionfetcher.ts new file mode 100644 index 000000000000..eb25c539eb5b --- /dev/null +++ b/_generated/UseDotNetV2_Node16/versionfetcher.ts @@ -0,0 +1,307 @@ +"use strict"; +import * as os from 'os'; +import * as fs from 'fs'; +import * as path from 'path'; + +import * as tl from 'azure-pipelines-task-lib/task'; +import * as trm from 'azure-pipelines-task-lib/toolrunner'; + +import httpClient = require("typed-rest-client/HttpClient"); +import httpInterfaces = require("typed-rest-client/Interfaces"); + +import { VersionInfo, Channel, VersionFilesData, VersionParts } from "./models" +import * as utils from "./versionutilities"; + +export class DotNetCoreVersionFetcher { + private explicitVersioning: boolean = false; + private channels: Channel[]; + private httpCallbackClient: httpClient.HttpClient; + private machineOsSuffixes: string[]; + constructor(explicitVersioning: boolean = false) { + this.explicitVersioning = explicitVersioning; + let proxyUrl: string = tl.getVariable("agent.proxyurl"); + var requestOptions: httpInterfaces.IRequestOptions = { + allowRetries: true, + maxRetries: 3 + }; + + if (proxyUrl) { + requestOptions.proxy = { + proxyUrl: proxyUrl, + proxyUsername: tl.getVariable("agent.proxyusername"), + proxyPassword: tl.getVariable("agent.proxypassword"), + proxyBypassHosts: tl.getVariable("agent.proxybypasslist") ? JSON.parse(tl.getVariable("agent.proxybypasslist")) : null + } + } + + this.httpCallbackClient = new httpClient.HttpClient(tl.getVariable("AZURE_HTTP_USER_AGENT"), null, requestOptions); + this.channels = []; + } + + public async getVersionInfo(versionSpec: string, vsVersionSpec: string, packageType: string, includePreviewVersions: boolean): Promise { + var requiredVersionInfo: VersionInfo = null; + if (!this.channels || this.channels.length < 1) { + await this.setReleasesIndex(); + } + + let channelInformation = this.getVersionChannel(versionSpec, includePreviewVersions); + if (channelInformation) { + requiredVersionInfo = await this.getVersionFromChannel(channelInformation, versionSpec, vsVersionSpec, packageType, includePreviewVersions); + } + + if (!!requiredVersionInfo) { + console.log(tl.loc("MatchingVersionForUserInputVersion", requiredVersionInfo.getVersion(), channelInformation.channelVersion, versionSpec)) + } + else { + console.log(tl.loc("MatchingVersionNotFound", packageType, versionSpec)); + if (!versionSpec.endsWith("x")) { + console.log(tl.loc("FallingBackToAdjacentChannels", versionSpec)); + requiredVersionInfo = await this.getVersionFromOtherChannels(versionSpec, vsVersionSpec, packageType, includePreviewVersions); + } + } + + if (!requiredVersionInfo) { + throw tl.loc("VersionNotFound", packageType, versionSpec); + } + + let dotNetSdkVersionTelemetry = `{"userVersion":"${versionSpec}", "resolvedVersion":"${requiredVersionInfo.getVersion()}"}`; + console.log("##vso[telemetry.publish area=TaskDeploymentMethod;feature=UseDotNetV2]" + dotNetSdkVersionTelemetry); + return requiredVersionInfo; + } + + public getDownloadUrl(versionInfo: VersionInfo): string { + console.log(tl.loc("GettingDownloadUrl", versionInfo.getPackageType(), versionInfo.getVersion())); + + this.detectMachineOS(); + let downloadPackageInfoObject: VersionFilesData = null; + this.machineOsSuffixes.find((osSuffix) => { + downloadPackageInfoObject = versionInfo.getFiles().find((downloadPackageInfo: VersionFilesData) => { + if (downloadPackageInfo.rid && osSuffix && downloadPackageInfo.rid.toLowerCase() == osSuffix.toLowerCase()) { + + if ((osSuffix.split("-")[0] == "win" && downloadPackageInfo.name.endsWith(".zip")) || (osSuffix.split("-")[0] != "win" && downloadPackageInfo.name.endsWith("tar.gz"))) { + return true; + } + } + + return false; + }); + return !!downloadPackageInfoObject; + }); + + if (!!downloadPackageInfoObject && downloadPackageInfoObject.url) { + tl.debug("Got download URL for platform with rid: " + downloadPackageInfoObject.rid); + return downloadPackageInfoObject.url; + } + + throw tl.loc("DownloadUrlForMatchingOsNotFound", versionInfo.getPackageType(), versionInfo.getVersion(), this.machineOsSuffixes.toString()); + } + + private setReleasesIndex(): Promise { + return this.httpCallbackClient.get(DotNetCoreReleasesIndexUrl) + .then((response: httpClient.HttpClientResponse) => { + return response.readBody(); + }) + .then((body: string) => { + let parsedReleasesIndexBody = JSON.parse(body); + if (!parsedReleasesIndexBody || !parsedReleasesIndexBody["releases-index"] || parsedReleasesIndexBody["releases-index"].length < 1) { + throw tl.loc("ReleasesIndexBodyIncorrect") + } + + parsedReleasesIndexBody["releases-index"].forEach(channelRelease => { + if (channelRelease) { + try { + this.channels.push(new Channel(channelRelease)); + } + catch (ex) { + tl.debug("Channel information in releases-index.json was not proper. Error: " + JSON.stringify(ex)); + // do not fail, try to find version in the available channels. + } + } + }); + }) + .catch((ex) => { + throw tl.loc("ExceptionWhileDownloadOrReadReleasesIndex", JSON.stringify(ex)); + }); + } + + private getVersionChannel(versionSpec: string, includePreviewVersions: boolean): Channel { + let versionParts = new VersionParts(versionSpec, this.explicitVersioning); + + let requiredChannelVersion = `${versionParts.majorVersion}.${versionParts.minorVersion}`; + if (versionParts.minorVersion == "x") { + var latestChannelVersion: string = ""; + this.channels.forEach(channel => { + // Checks if the channel is in preview state, if so then only select the channel if includePreviewVersion should be true. + // As a channel with state in preview will only have preview releases. + // example: versionSpec: 3.x Channels: 3.0 (current), 3.1 (preview). + // if (includePreviewVersion == true) select 3.1 + // else select 3.0 + let satisfiesPreviewCheck: boolean = (includePreviewVersions || (!channel.supportPhase || channel.supportPhase.toLowerCase() !== "preview")); + if (satisfiesPreviewCheck && channel.channelVersion.startsWith(versionParts.majorVersion) && (!latestChannelVersion || utils.compareChannelVersion(channel.channelVersion, latestChannelVersion) > 0)) { + latestChannelVersion = channel.channelVersion; + } + }); + + requiredChannelVersion = latestChannelVersion; + } + + tl.debug(tl.loc("RequiredChannelVersionForSpec", requiredChannelVersion, versionSpec)); + if (!!requiredChannelVersion) { + return this.channels.find(channel => { + if (channel.channelVersion == requiredChannelVersion) { + return true + } + }); + } + } + + private getVersionFromChannel(channelInformation: Channel, versionSpec: string, vsVersionSpec: string, packageType: string, includePreviewVersions: boolean): Promise { + var releasesJsonUrl: string = channelInformation.releasesJsonUrl; + + if (releasesJsonUrl) { + return this.httpCallbackClient.get(releasesJsonUrl) + .then((response: httpClient.HttpClientResponse) => { + return response.readBody(); + }) + .then((body: string) => { + var channelReleases = JSON.parse(body).releases; + + let versionInfoList: VersionInfo[] = []; + channelReleases.forEach((release) => { + if (release && packageType === 'sdk' && release.sdks) { + try { + release.sdks.forEach((sdk) => { + let versionInfo: VersionInfo = new VersionInfo(sdk, packageType); + + if (!versionInfo.getvsVersion() || !vsVersionSpec || (vsVersionSpec == versionInfo.getvsVersion())) { + versionInfoList.push(versionInfo); + } + + }); + } + catch (err) { + tl.debug(tl.loc("VersionInformationNotComplete", release[packageType].version, err)); + } + } + if (release && release[packageType] && release[packageType].version && !versionInfoList.find((versionInfo) => { return versionInfo.getVersion() === release[packageType].version })) { + try { + let versionInfo: VersionInfo = new VersionInfo(release[packageType], packageType); + + if (!versionInfo.getvsVersion() || !vsVersionSpec || (vsVersionSpec == versionInfo.getvsVersion())) { + versionInfoList.push(versionInfo); + } + } + catch (err) { + tl.debug(tl.loc("VersionInformationNotComplete", release[packageType].version, err)); + } + } + }); + + return utils.getMatchingVersionFromList(versionInfoList, versionSpec, includePreviewVersions); + }) + .catch((ex) => { + tl.error(tl.loc("ErrorWhileGettingVersionFromChannel", versionSpec, channelInformation.channelVersion, JSON.stringify(ex))); + return null; + }); + } + else { + tl.error(tl.loc("UrlForReleaseChannelNotFound", channelInformation.channelVersion)); + } + } + + private async getVersionFromOtherChannels(version: string, vsVersionSpec: string, packageType: string, includePreviewVersions: boolean): Promise { + let fallbackChannels = this.getChannelsForMajorVersion(version); + if (!fallbackChannels && fallbackChannels.length < 1) { + throw tl.loc("NoSuitableChannelWereFound", version); + } + + var versionInfo: VersionInfo = null; + for (var i = 0; i < fallbackChannels.length; i++) { + console.log(tl.loc("LookingForVersionInChannel", (fallbackChannels[i]).channelVersion)); + versionInfo = await this.getVersionFromChannel(fallbackChannels[i], version, vsVersionSpec, packageType, includePreviewVersions); + + if (versionInfo) { + break; + } + } + + return versionInfo; + } + + private getChannelsForMajorVersion(version: string): Channel[] { + var versionParts = new VersionParts(version, this.explicitVersioning); + let adjacentChannels: Channel[] = []; + this.channels.forEach(channel => { + if (channel.channelVersion.startsWith(`${versionParts.majorVersion}`)) { + adjacentChannels.push(channel); + } + }); + + return adjacentChannels; + } + + private detectMachineOS(): void { + if (!this.machineOsSuffixes) { + let osSuffix = []; + let scriptRunner: trm.ToolRunner; + + try { + console.log(tl.loc("DetectingPlatform")); + if (tl.osType().match(/^Win/i)) { + let escapedScript = path.join(this.getCurrentDir(), 'externals', 'get-os-platform.ps1').replace(/'/g, "''"); + let command = `& '${escapedScript}'`; + + let powershellPath = tl.which('powershell', true); + scriptRunner = tl.tool(powershellPath) + .line('-NoLogo -Sta -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command') + .arg(command); + } + else { + let scriptPath = path.join(this.getCurrentDir(),'externals', 'get-os-distro.sh'); + this.setFileAttribute(scriptPath, "755"); + + scriptRunner = tl.tool(tl.which(scriptPath, true)); + } + let result: trm.IExecSyncResult = scriptRunner.execSync(); + if (result.code != 0) { + throw tl.loc("getMachinePlatformFailed", result.error ? result.error.message : result.stderr); + } + + let output: string = result.stdout; + + let index; + + if ((index = output.indexOf("Primary:")) >= 0) { + let primary = output.substr(index + "Primary:".length).split(os.EOL)[0]; + osSuffix.push(primary); + console.log(tl.loc("PrimaryPlatform", primary)); + } + + if ((index = output.indexOf("Legacy:")) >= 0) { + let legacy = output.substr(index + "Legacy:".length).split(os.EOL)[0]; + osSuffix.push(legacy); + console.log(tl.loc("LegacyPlatform", legacy)); + } + + if (osSuffix.length == 0) { + throw tl.loc("CouldNotDetectPlatform"); + } + } + catch (ex) { + throw tl.loc("FailedInDetectingMachineArch", JSON.stringify(ex)); + } + + this.machineOsSuffixes = osSuffix; + } + } + + private setFileAttribute(file: string, mode: string): void { + fs.chmodSync(file, mode); + } + + private getCurrentDir(): string { + return __dirname; + } +} + +const DotNetCoreReleasesIndexUrl: string = "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json"; diff --git a/_generated/UseDotNetV2_Node16/versioninstaller.ts b/_generated/UseDotNetV2_Node16/versioninstaller.ts new file mode 100644 index 000000000000..03c908951588 --- /dev/null +++ b/_generated/UseDotNetV2_Node16/versioninstaller.ts @@ -0,0 +1,181 @@ +"use strict"; +import * as path from 'path'; +import * as fs from "fs"; +import * as url from "url"; + +import * as tl from 'azure-pipelines-task-lib/task'; +import * as toolLib from 'azure-pipelines-tool-lib/tool'; + +import * as utils from "./versionutilities"; +import { VersionInfo } from "./models" +import { tinyGuid } from 'azure-pipelines-tasks-utility-common/tinyGuidUtility' + +export class VersionInstaller { + constructor(packageType: string, installationPath: string) { + try { + tl.exist(installationPath) || tl.mkdirP(installationPath); + } + catch (ex) { + throw tl.loc("UnableToAccessPath", installationPath, JSON.stringify(ex)); + } + + this.packageType = packageType; + this.installationPath = installationPath; + } + /** + * Install a single version from a versionInfo + * @param versionInfo the versionInfo object with all information from the version + * @param downloadUrl The download url of the sdk / runtime. + */ + public async downloadAndInstall(versionInfo: VersionInfo, downloadUrl: string): Promise { + if (!versionInfo || !versionInfo.getVersion() || !downloadUrl || !url.parse(downloadUrl)) { + throw tl.loc("VersionCanNotBeDownloadedFromUrl", versionInfo, downloadUrl); + } + let version = versionInfo.getVersion(); + + try { + try { + var downloadPath = await toolLib.downloadTool(downloadUrl) + } + catch (ex) { + tl.warning(tl.loc("CouldNotDownload", downloadUrl, ex)); + let fallBackUrl = `https://dotnetcli.azureedge.net/dotnet/${this.packageType === "runtime" ? "Runtime" : "Sdk"}/${version}/${downloadUrl.substring(downloadUrl.lastIndexOf('/') + 1)}`; + console.log("Using fallback url for download: " + fallBackUrl); + var downloadPath = await toolLib.downloadTool(fallBackUrl) + } + + // Extract + console.log(tl.loc("ExtractingPackage", downloadPath)); + try { + let tempDirectory = tl.getVariable('Agent.TempDirectory'); + let extDirectory = path.join(tempDirectory, tinyGuid()); + var extPath = tl.osType().match(/^Win/) ? await toolLib.extractZip(downloadPath, extDirectory) : await toolLib.extractTar(downloadPath); + } + catch (ex) { + throw tl.loc("FailedWhileExtractingPacakge", ex); + } + + // Copy folders + tl.debug(tl.loc("CopyingFoldersIntoPath", this.installationPath)); + var allRootLevelEnteriesInDir: string[] = tl.ls("", [extPath]).map(name => path.join(extPath, name)); + var directoriesTobeCopied: string[] = allRootLevelEnteriesInDir.filter(path => fs.lstatSync(path).isDirectory()); + directoriesTobeCopied.forEach((directoryPath) => { + tl.cp(directoryPath, this.installationPath, "-rf", false); + }); + + // Copy files + try { + if (this.packageType == utils.Constants.sdk && this.isLatestInstalledVersion(version)) { + tl.debug(tl.loc("CopyingFilesIntoPath", this.installationPath)); + var filesToBeCopied = allRootLevelEnteriesInDir.filter(path => !fs.lstatSync(path).isDirectory()); + filesToBeCopied.forEach((filePath) => { + tl.cp(filePath, this.installationPath, "-f", false); + }); + } + } + catch (ex) { + tl.warning(tl.loc("FailedToCopyTopLevelFiles", this.installationPath, ex)); + } + + // Cache tool + this.createInstallationCompleteFile(versionInfo); + + console.log(tl.loc("SuccessfullyInstalled", this.packageType, version)); + } + catch (ex) { + throw tl.loc("FailedWhileInstallingVersionAtPath", version, this.installationPath, ex); + } + } + + /** + * This checks if an explicit version is installed. + * This doesn't work with a search pattern like 1.0.x. + * @param version An explicit version. Like 1.0.1 + */ + public isVersionInstalled(version: string): boolean { + if (!toolLib.isExplicitVersion(version)) { + throw tl.loc("ExplicitVersionRequired", version); + } + + var isInstalled: boolean = false; + if (this.packageType == utils.Constants.sdk) { + isInstalled = tl.exist(path.join(this.installationPath, utils.Constants.relativeSdkPath, version)) && tl.exist(path.join(this.installationPath, utils.Constants.relativeSdkPath, `${version}.complete`)); + } + else { + isInstalled = tl.exist(path.join(this.installationPath, utils.Constants.relativeRuntimePath, version)) && tl.exist(path.join(this.installationPath, utils.Constants.relativeRuntimePath, `${version}.complete`)); + } + + isInstalled ? console.log(tl.loc("VersionFoundInCache", version)) : console.log(tl.loc("VersionNotFoundInCache", version)); + return isInstalled; + } + + private createInstallationCompleteFile(versionInfo: VersionInfo): void { + tl.debug(tl.loc("CreatingInstallationCompeleteFile", versionInfo.getVersion(), this.packageType)); + // always add for runtime as it is installed with sdk as well. + var pathToVersionCompleteFile: string = ""; + if (this.packageType == utils.Constants.sdk) { + let sdkVersion = versionInfo.getVersion(); + pathToVersionCompleteFile = path.join(this.installationPath, utils.Constants.relativeSdkPath, `${sdkVersion}.complete`); + tl.writeFile(pathToVersionCompleteFile, `{ "version": "${sdkVersion}" }`); + } + + let runtimeVersion = versionInfo.getRuntimeVersion(); + if (runtimeVersion) { + pathToVersionCompleteFile = path.join(this.installationPath, utils.Constants.relativeRuntimePath, `${runtimeVersion}.complete`); + tl.writeFile(pathToVersionCompleteFile, `{ "version": "${runtimeVersion}" }`); + } + else if (this.packageType == utils.Constants.runtime) { + throw tl.loc("CannotFindRuntimeVersionForCompletingInstallation", this.packageType, versionInfo.getVersion()); + } + } + + private isLatestInstalledVersion(version: string): boolean { + var pathTobeChecked = this.packageType == utils.Constants.sdk ? path.join(this.installationPath, utils.Constants.relativeSdkPath) : path.join(this.installationPath, utils.Constants.relativeRuntimePath); + if (!tl.exist(pathTobeChecked)) { + throw tl.loc("PathNotFoundException", pathTobeChecked); + } + + var allEnteries: string[] = tl.ls("", [pathTobeChecked]).map(name => path.join(pathTobeChecked, name)); + var folderPaths: string[] = allEnteries.filter(element => fs.lstatSync(element).isDirectory()); + var isLatest: boolean = folderPaths.findIndex(folderPath => { + try { + let versionFolderName = path.basename(folderPath); + tl.debug(tl.loc("ComparingInstalledFolderVersions", version, versionFolderName)); + return utils.versionCompareFunction(versionFolderName, version) > 0; + } + catch (ex) { + // no op, folder name might not be in version format + } + }) < 0; + + var filePaths: string[] = allEnteries.filter(element => !fs.lstatSync(element).isDirectory()); + isLatest = isLatest && filePaths.findIndex(filePath => { + try { + var versionCompleteFileName = this.getVersionCompleteFileName(path.basename(filePath)); + tl.debug(tl.loc("ComparingInstalledFileVersions", version, versionCompleteFileName)); + return utils.versionCompareFunction(versionCompleteFileName, version) > 0 + } + catch (ex) { + // no op, file name might not be in version format + } + }) < 0; + + isLatest ? tl.debug(tl.loc("VersionIsLocalLatest", version, this.installationPath)) : tl.debug(tl.loc("VersionIsNotLocalLatest", version, this.installationPath)); + return isLatest; + } + + private getVersionCompleteFileName(name: string): string { + if (name && name.endsWith(".complete")) { + var parts = name.split('.'); + var fileNameWithoutExtensionLength = name.length - (parts[parts.length - 1].length + 1); + if (fileNameWithoutExtensionLength > 0) { + return name.substr(0, fileNameWithoutExtensionLength); + } + } + + throw tl.loc("FileNameNotCorrectCompleteFileName", name); + } + + private packageType: string; + private installationPath: string; +} \ No newline at end of file diff --git a/_generated/UseDotNetV2_Node16/versionutilities.ts b/_generated/UseDotNetV2_Node16/versionutilities.ts new file mode 100644 index 000000000000..181310ff2e9d --- /dev/null +++ b/_generated/UseDotNetV2_Node16/versionutilities.ts @@ -0,0 +1,74 @@ +"use strict"; +import * as path from 'path'; +import * as semver from 'semver'; + +import * as tl from 'azure-pipelines-task-lib/task'; +import * as toolLib from 'azure-pipelines-tool-lib'; + +import { VersionInfo } from "./models" + +export function versionCompareFunction(versionA: string, versionB: string): number { + if (!toolLib.isExplicitVersion(versionA) || !toolLib.isExplicitVersion(versionB)) { + throw tl.loc("VersionsCanNotBeCompared", versionA, versionB); + } + + return semver.compare(versionA, versionB); +} + +export function compareChannelVersion(channelVersionA: string, channelVersionB: string): number { + if (!channelVersionA || !channelVersionB) { + throw "One channel version is missing" + } + + let channelVersionAParts = channelVersionA.split("."); + let channelVersionBParts = channelVersionB.split("."); + if (channelVersionAParts.length != 2 || channelVersionBParts.length != 2) { + throw tl.loc("ChannelVersionsNotComparable", channelVersionA, channelVersionB) + } + + let channelAMajorVersion = Number.parseInt(channelVersionAParts[0]); + let channelAMinorVersion = Number.parseInt(channelVersionAParts[1]); + let channelBMajorVersion = Number.parseInt(channelVersionBParts[0]); + let channelBMinorVersion = Number.parseInt(channelVersionBParts[1]); + + if (Number.isNaN(channelAMajorVersion) || Number.isNaN(channelAMinorVersion) || Number.isNaN(channelBMajorVersion) || Number.isNaN(channelBMinorVersion)) { + throw tl.loc("ChannelVersionsNotComparable", channelVersionA, channelVersionB); + } + + if (channelAMajorVersion != channelBMajorVersion) { + return channelAMajorVersion > channelBMajorVersion ? 1 : -1; + } + else if (channelAMinorVersion != channelBMinorVersion) { + return channelAMinorVersion > channelBMinorVersion ? 1 : -1; + } + + return 0; +} + +export function getMatchingVersionFromList(versionInfoList: VersionInfo[], versionSpec: string, includePreviewVersions: boolean = false): VersionInfo { + let versionList: string[] = []; + versionInfoList.forEach(versionInfo => { + if (versionInfo && versionInfo.getVersion()) { + versionList.push(versionInfo.getVersion()); + } + }); + + if (versionList.length > 0) { + let matchedVersion = semver.maxSatisfying(versionList, versionSpec, { includePrerelease: includePreviewVersions }); + if (matchedVersion) { + return versionInfoList.find(versionInfo => { + return versionInfo.getVersion() == matchedVersion + }); + } + } + + return null; +} + +export const Constants = { + "sdk": "sdk", + "runtime": "runtime", + "relativeRuntimePath": path.join("shared", "Microsoft.NETCore.App"), + "relativeSdkPath": "sdk", + "relativeGlobalToolPath": path.join(".dotnet", "tools") +} \ No newline at end of file diff --git a/make-options.json b/make-options.json index c33667888e18..e4528a2eaf16 100644 --- a/make-options.json +++ b/make-options.json @@ -226,6 +226,7 @@ "AndroidSigningV3" ], "Node16_225": [ + "UseDotNetV2", "KubernetesManifestV0", "KubernetesManifestV1", "AzureIoTEdgeV2",