diff --git a/build/common.ps1 b/build/common.ps1
index e33dc49ddc3..62857e890eb 100644
--- a/build/common.ps1
+++ b/build/common.ps1
@@ -121,10 +121,6 @@ Function Invoke-BuildStep {
else {
Error-Log "[FAILED +$(Format-ElapsedTime $sw.Elapsed)] $BuildStep"
}
-
- if ($env:TEAMCITY_VERSION) {
- Write-Output "##teamcity[blockClosed name='$BuildStep']"
- }
}
}
else {
@@ -160,17 +156,17 @@ Function Install-DotnetCLI {
$vsMajorVersion = Get-VSMajorVersion
$MSBuildExe = Get-MSBuildExe $vsMajorVersion
$CliBranchListForTesting = & $msbuildExe $NuGetClientRoot\build\config.props /v:m /nologo /t:GetCliBranchForTesting
- $CliBranchList = $CliBranchListForTesting.Split(';');
+ $CliBranchList = $CliBranchListForTesting.Trim().Split(';');
$DotNetInstall = Join-Path $CLIRoot 'dotnet-install.ps1'
#If "-force" is specified, or dotnet.exe under cli folder doesn't exist, create cli folder and download dotnet-install.ps1 into cli folder.
if ($Force -or -not (Test-Path $DotNetExe)) {
- Trace-Log "Downloading .NET CLI $CliBranchForTesting"
+ Trace-Log "Downloading .NET CLI '$CliBranchList'"
New-Item -ItemType Directory -Force -Path $CLIRoot | Out-Null
- Invoke-WebRequest 'https://raw.githubusercontent.com/dotnet/cli/master/scripts/obtain/dotnet-install.ps1' -OutFile $DotNetInstall
+ Invoke-WebRequest 'https://dot.net/v1/dotnet-install.ps1' -OutFile $DotNetInstall
}
ForEach ($CliBranch in $CliBranchList) {
@@ -204,8 +200,22 @@ Function Install-DotnetCLI {
$env:DOTNET_INSTALL_DIR = $NuGetClientRoot
if ($Version -eq 'latest') {
- #Get the latest specific version number for a certain channel from url like : https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/3.0.1xx/latest.version"
- $httpGetUrl = "https://dotnetcli.blob.core.windows.net/dotnet/Sdk/" + $Channel + "/latest.version"
+
+ # When installing latest, we firstly check the latest version from the server against what we have installed locally. This also allows us to check the SDK was correctly installed.
+ # Get the latest specific version number for a certain channel from url like : https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/3.0.1xx/latest.version
+ $latestVersionLink = "https://dotnetcli.blob.core.windows.net/dotnet/Sdk/" + $Channel + "/latest.version"
+ $latestVersionFile = Invoke-RestMethod -Method Get -Uri $latestVersionLink
+
+ $stringReader = New-Object -TypeName System.IO.StringReader -ArgumentList $latestVersionFile
+ [int]$count = 0
+ while ( $line = $stringReader.ReadLine() ) {
+ if ($count -eq 1) {
+ $expectedVersion = $line.trim()
+ }
+ $count += 1
+ }
+
+ $httpGetUrl = "https://dotnetcli.blob.core.windows.net/dotnet/Sdk/" + $expectedVersion + "/productVersion.txt"
$versionFile = Invoke-RestMethod -Method Get -Uri $httpGetUrl
$stringReader = New-Object -TypeName System.IO.StringReader -ArgumentList $versionFile
@@ -229,6 +239,7 @@ Function Install-DotnetCLI {
#If "-force" is specified, or folder with specific version doesn't exist, the download command will run"
if ($Force -or -not (Test-Path $probeDotnetPath)) {
+ Trace-Log "$DotNetInstall -Channel $($cli.Channel) -i $($cli.Root) -Version $($cli.Version) -Architecture $arch -NoPath"
& $DotNetInstall -Channel $cli.Channel -i $cli.Root -Version $cli.Version -Architecture $arch -NoPath
}
@@ -245,7 +256,9 @@ Function Install-DotnetCLI {
# Install the 2.x runtime because our tests target netcoreapp2x
Trace-Log "$DotNetInstall -Runtime dotnet -Channel 2.2 -i $CLIRoot -NoPath"
- & $DotNetInstall -Runtime dotnet -Channel 2.2 -i $CLIRoot -NoPath
+ # Work around the following install script bug https://github.com/dotnet/install-scripts/issues/152.
+ # Start a new process to avoid the ev getting populated.
+ & powershell $DotNetInstall -Runtime dotnet -Channel 2.2 -i $CLIRoot -NoPath
# Display build info
& $DotNetExe --info
}
diff --git a/build/config.props b/build/config.props
index 0e2b269b614..887049fd577 100644
--- a/build/config.props
+++ b/build/config.props
@@ -31,18 +31,10 @@
rel/d$(VsTargetMajorVersion).$(MinorNuGetVersion)
int.d$(VsTargetMajorVersion).$(MinorNuGetVersion)
-
-
-
-
- true
-
- master 5.0.100
- "master 5.0.100"
- $(OverrideCliBranchForTesting)
- master
- $(OverrideCliTargetBranches)
- master
+
+ release/5.0.2xx 5.0.200-servicing.21120.4
@@ -82,13 +74,7 @@
-
-
-
-
-
-
diff --git a/eng/pipelines/templates/Apex_Tests_On_Windows.yml b/eng/pipelines/templates/Apex_Tests_On_Windows.yml
index 8337a155a88..66c3d55e817 100644
--- a/eng/pipelines/templates/Apex_Tests_On_Windows.yml
+++ b/eng/pipelines/templates/Apex_Tests_On_Windows.yml
@@ -17,24 +17,6 @@ steps:
artifactName: "$(VsixPublishDir)"
downloadPath: "$(Build.Repository.LocalPath)/artifacts"
-- task: NuGetToolInstaller@0
- displayName: "Use NuGet 4.5.0"
- inputs:
- versionSpec: "4.5.0"
-
-- task: PowerShell@1
- inputs:
- scriptName: "$(Build.Repository.LocalPath)\\scripts\\utils\\InstallCLIforBuild.ps1"
- arguments: '$(SDKVersionForBuild)'
- displayName: "Install .NET 5.0 for build"
-
-- task: PowerShell@1
- displayName: "Define variables"
- inputs:
- scriptType: "inlineScript"
- inlineScript: |
- Write-Host "##vso[task.setvariable variable=Path]${env:AGENT_TEMPDIRECTORY}\dotnet\;${env:Path}"
-
- task: MSBuild@1
displayName: "Bootstrap NuGet packages"
inputs:
diff --git a/eng/pipelines/templates/Build_and_UnitTest.yml b/eng/pipelines/templates/Build_and_UnitTest.yml
index e90ace59d6d..94da98731d5 100644
--- a/eng/pipelines/templates/Build_and_UnitTest.yml
+++ b/eng/pipelines/templates/Build_and_UnitTest.yml
@@ -1,10 +1,4 @@
steps:
-- task: PowerShell@1
- inputs:
- scriptName: "$(Build.Repository.LocalPath)\\scripts\\utils\\InstallCLIforBuild.ps1"
- arguments: '$(SDKVersionForBuild)'
- displayName: "Install .NET 5.0 for build"
-
- task: PowerShell@1
displayName: "Update Build Number"
inputs:
@@ -13,18 +7,6 @@ steps:
Write-Host "##vso[build.updatebuildnumber]$env:FullVstsBuildNumber"
Get-ChildItem Env: | Sort-Object Name | Format-Table -Wrap -AutoSize
-- task: PowerShell@1
- displayName: "Define variables"
- inputs:
- scriptType: "inlineScript"
- inlineScript: |
- Write-Host "##vso[task.setvariable variable=Path]${env:AGENT_TEMPDIRECTORY}\dotnet\;${env:Path}"
-
-- task: NuGetToolInstaller@0
- displayName: "Use NuGet 5.0.0"
- inputs:
- versionSpec: "5.0.0"
-
- task: PowerShell@1
inputs:
scriptName: "$(Build.Repository.LocalPath)\\configure.ps1"
diff --git a/eng/pipelines/templates/End_To_End_Tests_On_Windows.yml b/eng/pipelines/templates/End_To_End_Tests_On_Windows.yml
index f22aa7aa722..cb1abc63a38 100644
--- a/eng/pipelines/templates/End_To_End_Tests_On_Windows.yml
+++ b/eng/pipelines/templates/End_To_End_Tests_On_Windows.yml
@@ -1,16 +1,9 @@
steps:
-- task: PowerShell@1
- inputs:
- scriptName: "$(Build.Repository.LocalPath)\\scripts\\utils\\InstallCLIforBuild.ps1"
- arguments: '$(SDKVersionForBuild)'
- displayName: "Install .NET 5.0 for build"
-
- task: PowerShell@1
displayName: "Define variables"
inputs:
scriptType: "inlineScript"
inlineScript: |
- Write-Host "##vso[task.setvariable variable=Path]${env:AGENT_TEMPDIRECTORY}\dotnet\;${env:Path}"
$EndToEndTestCommandToRunPart = '"' + "Run-Test -Exclude '${env:PART}' -Verbose *>&1 | Tee-Object $(System.DefaultWorkingDirectory)\artifacts\EndToEnd\FullLog_$(Build.BuildNumber).txt" +'"'
Write-Host "##vso[task.setvariable variable=EndToEndTestCommandToRunPart]$EndToEndTestCommandToRunPart"
diff --git a/eng/pipelines/templates/Functional_Tests_On_Windows.yml b/eng/pipelines/templates/Functional_Tests_On_Windows.yml
index 4c26d7eac59..2d2e7ad1828 100644
--- a/eng/pipelines/templates/Functional_Tests_On_Windows.yml
+++ b/eng/pipelines/templates/Functional_Tests_On_Windows.yml
@@ -1,17 +1,4 @@
steps:
-- task: PowerShell@1
- inputs:
- scriptName: "$(Build.Repository.LocalPath)\\scripts\\utils\\InstallCLIforBuild.ps1"
- arguments: '$(SDKVersionForBuild)'
- displayName: "Install .NET 5.0 for build"
-
-- task: PowerShell@1
- displayName: "Define variables"
- inputs:
- scriptType: "inlineScript"
- inlineScript: |
- Write-Host "##vso[task.setvariable variable=Path]${env:AGENT_TEMPDIRECTORY}\dotnet\;${env:Path}"
-
- task: PowerShell@1
displayName: "Print Environment Variables"
inputs:
diff --git a/eng/pipelines/templates/Initialize_Build.yml b/eng/pipelines/templates/Initialize_Build.yml
index 72afd273de2..66af1d348f5 100644
--- a/eng/pipelines/templates/Initialize_Build.yml
+++ b/eng/pipelines/templates/Initialize_Build.yml
@@ -51,16 +51,6 @@ steps:
exit 1
}
-- task: PowerShell@1
- displayName: "Get SDK Version For Build"
- name: "getSDKVersionForBuild"
- inputs:
- scriptType: "inlineScript"
- inlineScript: |
- $msbuildExe = 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\bin\msbuild.exe'
- $SDKVersionForBuild = & $msbuildExe $env:BUILD_REPOSITORY_LOCALPATH\build\config.props /v:m /nologo /t:GetCliVersionForBuilding
- Write-Host "##vso[task.setvariable variable=SDKVersionForBuild;isOutput=true]$SDKVersionForBuild"
-
- task: PowerShell@1
displayName: "Add Build Tags"
inputs:
diff --git a/eng/pipelines/templates/Tests_On_Linux.yml b/eng/pipelines/templates/Tests_On_Linux.yml
index 243dd79ee8d..db7f48120dd 100644
--- a/eng/pipelines/templates/Tests_On_Linux.yml
+++ b/eng/pipelines/templates/Tests_On_Linux.yml
@@ -1,20 +1,4 @@
steps:
-- task: ShellScript@2
- displayName: "Install .NET 5.0 for build"
- continueOnError: "true"
- inputs:
- scriptPath: "scripts/utils/InstallCLIforBuild.sh"
- disableAutoCwd: "true"
- cwd: "$(Build.Repository.LocalPath)"
- args: '$(SDKVersionForBuild)'
-
-- task: PowerShell@2
- displayName: "Define variables"
- inputs:
- targetType: "inline"
- script: |
- Write-Host "##vso[task.setvariable variable=PATH]${env:AGENT_TEMPDIRECTORY}/dotnet/:${env:PATH}"
-
- task: PowerShell@2
displayName: "Update Build Number"
inputs:
diff --git a/eng/pipelines/templates/Tests_On_Mac.yml b/eng/pipelines/templates/Tests_On_Mac.yml
index 5c40a6c659f..b32079eaaed 100644
--- a/eng/pipelines/templates/Tests_On_Mac.yml
+++ b/eng/pipelines/templates/Tests_On_Mac.yml
@@ -1,13 +1,4 @@
steps:
-- task: ShellScript@2
- displayName: "Install .NET 5.0 for build"
- continueOnError: "true"
- inputs:
- scriptPath: "scripts/utils/InstallCLIforBuild.sh"
- disableAutoCwd: "true"
- cwd: "$(Build.Repository.LocalPath)"
- args: '$(SDKVersionForBuild)'
-
- task: PowerShell@2
displayName: "Update Build Number"
inputs:
@@ -17,13 +8,6 @@ steps:
failOnStderr: "true"
condition: "always()"
-- task: PowerShell@2
- displayName: "Define variables"
- inputs:
- targetType: "inline"
- script: |
- Write-Host "##vso[task.setvariable variable=PATH]${env:AGENT_TEMPDIRECTORY}/dotnet/:${env:PATH}"
-
- task: DownloadBuildArtifacts@0
displayName: "Download NuGet.CommandLine.Test artifacts"
inputs:
diff --git a/global.json b/global.json
deleted file mode 100644
index c6b29a36977..00000000000
--- a/global.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "sdk": {
- "version": "5.0.100-preview",
- "allowPrerelease": true,
- "rollForward": "major"
- }
-}
diff --git a/scripts/cibuild/ConfigureVstsBuild.ps1 b/scripts/cibuild/ConfigureVstsBuild.ps1
index f087f6210ae..89a910b8384 100644
--- a/scripts/cibuild/ConfigureVstsBuild.ps1
+++ b/scripts/cibuild/ConfigureVstsBuild.ps1
@@ -118,9 +118,6 @@ else
{
$newBuildCounter = $env:BUILD_BUILDNUMBER
$VsTargetBranch = & $msbuildExe $env:BUILD_REPOSITORY_LOCALPATH\build\config.props /v:m /nologo /t:GetVsTargetBranch
- $CliTargetBranches = & $msbuildExe $env:BUILD_REPOSITORY_LOCALPATH\build\config.props /v:m /nologo /t:GetCliTargetBranches
- $SdkTargetBranches = & $msbuildExe $env:BUILD_REPOSITORY_LOCALPATH\build\config.props /v:m /nologo /t:GetSdkTargetBranches
- $ToolsetTargetBranches = & $msbuildExe $env:BUILD_REPOSITORY_LOCALPATH\build\config.props /v:m /nologo /t:GetToolsetTargetBranches
Write-Host $VsTargetBranch
$jsonRepresentation = @{
BuildNumber = $newBuildCounter
@@ -129,9 +126,6 @@ else
LocalizationRepositoryBranch = $NuGetLocalizationRepoBranch
LocalizationRepositoryCommitHash = $LocalizationRepoCommitHash
VsTargetBranch = $VsTargetBranch.Trim()
- CliTargetBranches = $CliTargetBranches.Trim()
- SdkTargetBranches = $SdkTargetBranches.Trim()
- ToolsetTargetBranches = $ToolsetTargetBranches.Trim()
}
# First create the file locally so that we can laster publish it as a build artifact from a local source file instead of a remote source file.
diff --git a/scripts/utils/InsertNuGetIntoSdkAndCli.ps1 b/scripts/utils/InsertNuGetIntoSdkAndCli.ps1
deleted file mode 100644
index de72d7aa65d..00000000000
--- a/scripts/utils/InsertNuGetIntoSdkAndCli.ps1
+++ /dev/null
@@ -1,240 +0,0 @@
-<#
-.SYNOPSIS
-Script to insert NuGet into dotnet; CLI, SDK, and TOOLSET repos
-
-.DESCRIPTION
-Uses the Personal Access Token of NuGetLurker to automate the insertion process into CLI, SDK, and TOOLSET
-Note - This script can only be used from a VSTS Release Definition because of the env variables it
-depends on.
-
-.PARAMETER PersonalAccessToken
-PersonalAccessToken of the NuGetLurker account
-
-.PARAMETER RepositoryName
-The Repository to insert into (SDK, CLI, or TOOLSET)
-
-.PARAMETER BranchName
-Semicolon separated list of the repository's branches to insert into
-
-.PARAMETER NuGetTag
-The xml tag in the DependencyVersions.props file that defines the NuGet version
-
-.PARAMETER BuildOutputPath
-The output path for NuGet Build artifacts.
-
-#>
-
-[CmdletBinding()]
-param
-(
- [Parameter(Mandatory=$True)]
- [string]$PersonalAccessToken,
- [Parameter(Mandatory=$True)]
- [string]$RepositoryName,
- [Parameter(Mandatory=$True)]
- [string]$BranchName,
- [Parameter(Mandatory=$True)]
- [string]$FilePath,
- [Parameter(Mandatory=$True)]
- [string]$NuGetTag,
- [Parameter(Mandatory=$True)]
- [string]$BuildOutputPath
-)
-
-Function UpdateNuGetVersionInXmlFile {
- param(
- [string]$XmlContents,
- [string]$NuGetVersion,
- [string]$NuGetTag
- )
-
-$xmlString = $XmlContents.Split([environment]::NewLine) | Where-Object { $_ -cmatch "<$NuGetTag>" }
-Write-Host $xmlString
-$newXmlString = "<$NuGetTag>$NuGetVersion$NuGetTag>"
-Write-Host $newXmlString
-$updatedXml = $XmlContents.Replace($xmlString.Trim(), $newXmlString)
-Write-Host $updatedXml
-return $updatedXml
-
-}
-
-Function GetDependencyVersionPropsFile {
-param
-(
- [Parameter(Mandatory=$True)]
- [string]$RepositoryName,
- [Parameter(Mandatory=$True)]
- [string]$BranchName,
- [Parameter(Mandatory=$True)]
- [string]$FilePath
-)
-
-$url = "https://raw.githubusercontent.com/$repoOwner/$RepositoryName/$BranchName/$FilePath"
-Write-Host $url
-$xmlContent = Invoke-WebRequest -Uri $url -UseBasicParsing
-
-return $xmlContent
-
-}
-
-Function CreateBranchForPullRequest {
-param
-(
- [Parameter(Mandatory=$True)]
- [string]$RepositoryName,
- [Parameter(Mandatory=$True)]
- [System.Collections.IDictionary]$Headers,
- [Parameter(Mandatory=$True)]
- [string]$BranchName,
- [Parameter(Mandatory=$True)]
- [string]$BranchNameToCreate
-)
-
-$commits = Invoke-RestMethod -Method Get -Uri "https://api.github.com/repos/$repoOwner/$RepositoryName/commits?sha=$BranchName"
-$headSha = $commits[0].sha
-$refName = "refs/heads/$BranchNameToCreate"
-
-$Body = @{
-sha = $headSha;
-ref = $refName;
-} | ConvertTo-Json;
-
-$r1 = Invoke-RestMethod -Headers $Headers -Method Post -Uri "https://api.github.com/repos/$repoOwner/$RepositoryName/git/refs" -Body $Body
-Write-Host $r1
-}
-
-Function UpdateFileContent {
-param
-(
- [Parameter(Mandatory=$True)]
- [string]$RepositoryName,
- [Parameter(Mandatory=$True)]
- [System.Collections.IDictionary]$Headers,
- [Parameter(Mandatory=$True)]
- [string]$FilePath,
- [Parameter(Mandatory=$True)]
- [string]$FileContent,
- [Parameter(Mandatory=$True)]
- [string]$CreatedBranchName
-)
-$params = "?ref=$CreatedBranchName"
-$httpGetUrl = "https://api.github.com/repos/$repoOwner/$RepositoryName/contents/$FilePath$Params"
-$content = Invoke-RestMethod -Method Get -Uri $httpGetUrl
-$shaBlob = $content.sha
-$commitMessage = "Insert NuGet Build $ProductVersion into $RepositoryName"
-
-$base64Content = [System.Convert]::ToBase64String([char[]]$FileContent)
-$Uri = "https://api.github.com/repos/$repoOwner/$RepositoryName/contents/$FilePath"
-
-$Body = @{
-path = $FilePath;
-sha = $shaBlob;
-branch = $CreatedBranchName;
-message = $commitMessage;
-content = $base64Content;
-} | ConvertTo-Json;
-
-$r1 = Invoke-RestMethod -Headers $Headers -Method Put -Uri $Uri -Body $Body
-Write-Host $r1
-}
-
-Function CreatePullRequest {
-param
-(
- [Parameter(Mandatory=$True)]
- [string]$RepositoryName,
- [Parameter(Mandatory=$True)]
- [System.Collections.IDictionary]$Headers,
- [Parameter(Mandatory=$True)]
- [string]$CreatedBranchName,
- [Parameter(Mandatory=$True)]
- [string]$BaseBranch
-
-)
-
-$Uri = "https://api.github.com/repos/$repoOwner/$RepositoryName/pulls"
-$Title = "Insert NuGet Build $ProductVersion into $RepositoryName"
-$PrMessage = "$Title $BaseBranch branch"
-
-$Body = @{
-title = $Title;
-head = $CreatedBranchName;
-base = $BaseBranch;
-body = $PrMessage;
-} | ConvertTo-Json;
-
-Write-Host $Body
-
-$r1 = Invoke-RestMethod -Headers $Headers -Method Post -Uri $Uri -Body $Body
-Write-Host $r1.html_url
-return $r1.html_url
-}
-
-Function PrintPullRequestsUrlToVsts {
-param
-(
- [Parameter(Mandatory=$True)]
- [string]$RepositoryName,
- [Parameter(Mandatory=$True)]
- [string]$PullRequestsUrl
-
-)
-
-$mdFolder = Join-Path $env:SYSTEM_DEFAULTWORKINGDIRECTORY (Join-Path 'MicroBuild' 'Output')
-New-Item -ItemType Directory -Force -Path $mdFolder | Out-Null
-$fileExtension = "_Url.md"
-$mdFile = Join-Path $mdFolder "$RepositoryName$fileExtension"
-$PullRequestsUrl | Set-Content $mdFile
-Write-Host "##vso[task.addattachment type=Distributedtask.Core.Summary;name=$RepositoryName Pull Requests Url;]$mdFile"
-}
-
-## This is where the script logic beings.
-
-# Set security protocol to tls1.2 for Invoke-RestMethod powershell cmdlet
-[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
-
-$repoOwner = "dotnet"
-$Base64Token = [System.Convert]::ToBase64String([char[]]$PersonalAccessToken)
-
-$Headers= @{
- Authorization='Basic {0}' -f $Base64Token;
-}
-
-$Build = ${env:BUILD_BUILDNUMBER}
-$Branch = ${env:BUILD_SOURCEBRANCHNAME}
-$AttemptNum = ${env:RELEASE_ATTEMPTNUMBER}
-$Release = ${env:RELEASE_RELEASENAME}
-$NuGetExePath = [System.IO.Path]::Combine($BuildOutputPath, $Branch, $Build, 'artifacts', 'VS15', "NuGet.exe")
-
-$ProductVersion = [System.Diagnostics.FileVersionInfo]::GetVersionInfo($NuGetExePath).ProductVersion
-$index = $ProductVersion.LastIndexOf('+')
-if($index -ne '-1')
-{
- $ProductVersion = $ProductVersion.Substring(0,$index).Trim()
-}
-
-$BranchesToInsert = $BranchName.Split(';')
-$AllPullRequestsUrls = ""
-ForEach ($Branch in $BranchesToInsert) {
-
- $VersionsFilePath = $FilePath
- # Hack to allow us to specify the arcade version props location if the branch is 3.0 or later.
- # We can remove this when we stop inserting into 2.x
- if($Branch.StartsWith("master") -or $Branch.StartsWith("release/3")){
- $VersionsFilePath = "eng/Versions.props"
- }
-
- $xml = GetDependencyVersionPropsFile -RepositoryName $RepositoryName -BranchName $Branch -FilePath $VersionsFilePath
- Write-Host $xml
-
- $updatedXml = UpdateNuGetVersionInXmlFile -XmlContents $xml -NuGetVersion $ProductVersion -NuGetTag $NuGetTag
-
- $CreatedBranchName = "$Release-$Branch-$AttemptNum"
-
- CreateBranchForPullRequest -RepositoryName $RepositoryName -Headers $Headers -BranchName $Branch -BranchNameToCreate $CreatedBranchName
- UpdateFileContent -RepositoryName $RepositoryName -Headers $Headers -FilePath $VersionsFilePath -FileContent $updatedXml -CreatedBranchName $CreatedBranchName
- $PullRequestUrl = CreatePullRequest -RepositoryName $RepositoryName -Headers $Headers -CreatedBranchName $CreatedBranchName -BaseBranch $Branch
- $AllPullRequestsUrls = $AllPullRequestsUrls + "$PullRequestUrl`n"
-}
-
-PrintPullRequestsUrlToVsts -RepositoryName $RepositoryName -PullRequestsUrl $AllPullRequestsUrls
diff --git a/scripts/utils/InstallCLIforBuild.ps1 b/scripts/utils/InstallCLIforBuild.ps1
deleted file mode 100644
index c59900e911d..00000000000
--- a/scripts/utils/InstallCLIforBuild.ps1
+++ /dev/null
@@ -1,48 +0,0 @@
-# Download the CLI install script to Agent.TempDirectory
-
-#Write-Host "Installing dotnet CLI into $Env:AGENT_TEMPDIRECTORY folder for building"
-
-[CmdletBinding(SupportsShouldProcess=$True)]
-Param (
- [string]$SDKVersionForBuild
-)
-
-# Get version from SDKVersionForBuild, if only branch name specified, use the latest version for this branch
-$CliBranch = $SDKVersionForBuild.trim()
-$CliChannelAndVersion = $CliBranch -split "\s+"
-
-$Channel = $CliChannelAndVersion[0].trim()
-if ($CliChannelAndVersion.count -eq 1) {
- $Version = 'latest'
-}else {
- $Version = $CliChannelAndVersion[1].trim()
-}
-
-Write-Host "Channel is : $Channel Version is : $Version" -ForegroundColor Cyan
-
-$InstallDir = Join-Path $Env:AGENT_TEMPDIRECTORY 'dotnet'
-
-New-Item -ItemType Directory -Force -Path $InstallDir | Out-Null
-
-$DotNetInstall = Join-Path $InstallDir 'dotnet-install.ps1'
-
-[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
-
-Invoke-WebRequest 'https://dot.net/v1/dotnet-install.ps1' -OutFile $DotNetInstall
-
-
-if ([Environment]::Is64BitOperatingSystem)
-{
- $arch = "x64";
-}
-else
-{
- $arch = "x86";
-}
-
-& $DotNetInstall -Channel $Channel -Version $Version -i $InstallDir -Architecture $arch
-
-$Env:PATH
-
-# Display build info
-& dotnet --info
\ No newline at end of file
diff --git a/scripts/utils/InstallCLIforBuild.sh b/scripts/utils/InstallCLIforBuild.sh
deleted file mode 100644
index cfa5c2c78ed..00000000000
--- a/scripts/utils/InstallCLIforBuild.sh
+++ /dev/null
@@ -1,55 +0,0 @@
-#!/usr/bin/env bash
-
-# Download the CLI install script to Agent.TempDirectory
-
-env
-
-installVersion=$1
-
-echo $installVersion
-ChannelAndVersion=($installVersion)
-Channel=${ChannelAndVersion[0]}
-if [ ${#ChannelAndVersion[@]} -eq 1 ]
-then
- Version="latest"
-else
- Version=${ChannelAndVersion[1]}
-fi
-echo "Channel is: $Channel Version is: $Version"
-
-echo "Installing dotnet CLI into ${AGENT_TEMPDIRECTORY} folder for building"
-
-installDir="${AGENT_TEMPDIRECTORY}/dotnet"
-
-mkdir -p $installDir
-
-curl -o $installDir/dotnet-install.sh -L https://dot.net/v1/dotnet-install.sh
-
-# Run install.sh for cli
-
-chmod +x $installDir/dotnet-install.sh
-
-
-# install master channel to get latest .NET 5 sdks
-
-# Issue 8936 - DISABLED TEMPORARILY $installDir/dotnet-install.sh -i $installDir -c $Channel -v $Version
-chmod +x scripts/funcTests/dotnet-install.sh
-scripts/funcTests/dotnet-install.sh -i $installDir -c $Channel -v $Version
-
-echo "Add ${installDir} to PATH"
-PATH=$PATH:${installDir}
-
-echo $PATH
-
-echo "Deleting .NET Core temporary files"
-rm -rf "/tmp/"dotnet.*
-
-
-# Display current version
-
-dotnet --info
-
-
-
-echo "================="
-
diff --git a/scripts/utils/LockNuGetCoreVersion.ps1 b/scripts/utils/LockNuGetCoreVersion.ps1
deleted file mode 100644
index 47a7afdede7..00000000000
--- a/scripts/utils/LockNuGetCoreVersion.ps1
+++ /dev/null
@@ -1,68 +0,0 @@
-<#
-.SYNOPSIS
-Replaces floating version of NuGet core dependencies in NuGet clients projects to "{semver}-{label}-*".
-Mostly needed for release branches when dev builds in myget feed have more advanced version.
-
-.PARAMETER LockVersion
-Optional. New version of NuGet core packages.
-Defaults to current "{semver}-{labe}-*" from .teamcity.properties
-
-.PARAMETER OldVersion
-Optional. Old version string to look for when scanning project.json's.
-Will use default version "{semver}-*" from .teamcity.properties file if not specified.
-
-.PARAMETER NuGetRoot
-Optional. NuGet client repository root.
-
-.PARAMETER Force
-Optional switch to force replacing text when new and old versions are the same
-#>
-[CmdletBinding(SupportsShouldProcess=$True)]
-Param (
- [Parameter(Mandatory=$false, Position=0)]
- [Alias('version')]
- [string]$LockVersion,
- [Parameter(Mandatory=$false, Position=1)]
- [string]$OldVersion,
- [Parameter(Mandatory=$false, Position=2)]
- [string]$NuGetRoot,
- [switch]$Force)
-
-. "$PSScriptRoot\..\common.ps1"
-
-if (-not $NuGetRoot -and (Test-Path Env:\NuGetRoot)) {
- $NuGetRoot = $env:NuGetRoot
-}
-
-if (-not $NuGetRoot) {
- $NuGetRoot = Join-Path $PSScriptRoot '..\..\' -Resolve
-}
-
-if (Test-Path "$NuGetRoot\.teamcity.properties") {
- $properties = ReadPropertiesFile "$NuGetRoot\.teamcity.properties"
-}
-
-if (-not $LockVersion -and $properties) {
- $LockVersion = "$($properties['ReleaseProductVersion'])-$($properties['ReleaseLabel'])-*"
-}
-
-if (-not $LockVersion) {
- throw "LOCK version string can't be found"
-}
-
-if (-not $OldVersion -and $properties) {
- $OldVersion = "$($properties['ReleaseProductVersion'])-*"
-}
-
-if (-not $OldVersion) {
- throw "OLD version string can't be found"
-}
-
-if ($OldVersion -eq $LockVersion -and -not $Force) {
- Write-Output "NO-OP [$OldVersion == $LockVersion]"
- exit 0
-}
-
-Write-Output "Locking NuGet core projects version [$OldVersion => $LockVersion]"
-
-gci "$NuGetRoot\src\NuGet.Clients" -include project.json -r | %{ $_.FullName } | ReplaceTextInFiles -old $OldVersion -new $LockVersion
diff --git a/src/NuGet.Core/NuGet.CommandLine.XPlat/Commands/PackageReferenceCommands/ListPackage/ListPackageCommand.cs b/src/NuGet.Core/NuGet.CommandLine.XPlat/Commands/PackageReferenceCommands/ListPackage/ListPackageCommand.cs
index 47c74768824..d8a2ecb137b 100644
--- a/src/NuGet.Core/NuGet.CommandLine.XPlat/Commands/PackageReferenceCommands/ListPackage/ListPackageCommand.cs
+++ b/src/NuGet.Core/NuGet.CommandLine.XPlat/Commands/PackageReferenceCommands/ListPackage/ListPackageCommand.cs
@@ -154,21 +154,7 @@ private static ReportType GetReportType(bool isDeprecated, bool isOutdated, bool
return isDeprecated ? ReportType.Deprecated : isOutdated ? ReportType.Outdated : ReportType.Vulnerable;
}
- // We have a conflict - throw with appropriate message
- var firstOption = string.Empty;
- var incompatibleOption = string.Empty;
- if (isOutdated)
- {
- firstOption = "--outdated";
- incompatibleOption = isDeprecated ? "--deprecated" : "--vulnerable";
- }
- else if (isDeprecated)
- {
- firstOption = "--deprecated";
- incompatibleOption = "--vulnerable";
- }
-
- throw new ArgumentException(string.Format(Strings.ListPkg_InvalidOptions, firstOption, incompatibleOption));
+ throw new ArgumentException(string.Format(Strings.ListPkg_InvalidOptions));
}
private static void DisplayMessages(ListPackageArgs packageRefArgs)
diff --git a/src/NuGet.Core/NuGet.CommandLine.XPlat/Strings.Designer.cs b/src/NuGet.Core/NuGet.CommandLine.XPlat/Strings.Designer.cs
index c045389924b..f36ac633190 100644
--- a/src/NuGet.Core/NuGet.CommandLine.XPlat/Strings.Designer.cs
+++ b/src/NuGet.Core/NuGet.CommandLine.XPlat/Strings.Designer.cs
@@ -718,7 +718,7 @@ internal static string ListPkg_InvalidFramework {
}
///
- /// Looks up a localized string similar to Option '{0}' and '{1}' cannot be combined..
+ /// Looks up a localized string similar to Options '--outdated', '--deprecated' and '--vulnerable' cannot be combined..
///
internal static string ListPkg_InvalidOptions {
get {
diff --git a/src/NuGet.Core/NuGet.CommandLine.XPlat/Strings.resx b/src/NuGet.Core/NuGet.CommandLine.XPlat/Strings.resx
index beef2f6e263..80d16086207 100644
--- a/src/NuGet.Core/NuGet.CommandLine.XPlat/Strings.resx
+++ b/src/NuGet.Core/NuGet.CommandLine.XPlat/Strings.resx
@@ -583,7 +583,7 @@ For more information, visit https://docs.nuget.org/docs/reference/command-line-r
The following sources were used:
- Option '{0}' and '{1}' cannot be combined.
+ Options '--outdated', '--deprecated' and '--vulnerable' cannot be combined.
The given project `{0}` has no deprecated packages given the current sources.
@@ -770,4 +770,4 @@ For more information, visit https://docs.nuget.org/docs/reference/command-line-r
Specify the path to the package
-
+
\ No newline at end of file