diff --git a/.azure/pipelines/jobs/default-build.yml b/.azure/pipelines/jobs/default-build.yml
index 45d7bc6184..6004bc15a8 100644
--- a/.azure/pipelines/jobs/default-build.yml
+++ b/.azure/pipelines/jobs/default-build.yml
@@ -55,6 +55,7 @@ parameters:
artifacts: []
buildDirectory: ''
buildScript: ''
+ installTar: true
installNodeJs: true
installJdk: true
timeoutInMinutes: 180
@@ -146,6 +147,9 @@ jobs:
Write-Host "##vso[task.setvariable variable=SeleniumProcessTrackingFolder]$(BuildDirectory)\artifacts\tmp\selenium\"
./eng/scripts/InstallGoogleChrome.ps1
displayName: Install Chrome
+ - ${{ if and(eq(parameters.installTar, 'true'), eq(parameters.agentOs, 'Windows')) }}:
+ - powershell: ./eng/scripts/InstallTar.ps1
+ displayName: Find or install Tar
- ${{ parameters.beforeBuild }}
diff --git a/Directory.Build.props b/Directory.Build.props
index 66e5b316b1..3e016ff908 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -86,7 +86,7 @@
aspnetcore-targeting-pack
- false
+ false
@@ -17,57 +17,4 @@ Later on, this will be checked using this condition:
-
-
- @aspnet/signalr;
- Microsoft.AspNetCore.AspNetCoreModuleV2;
- Microsoft.AspNetCore.Authentication.Google;
- Microsoft.AspNetCore.Http;
- Microsoft.AspNetCore.Mvc.Core;
- Microsoft.AspNetCore.Routing;
- Microsoft.AspNetCore.Server.IIS;
- java:signalr;
-
-
-
-
- @aspnet/signalr;
- Microsoft.AspNetCore.AspNetCoreModuleV2;
-
-
-
-
- Microsoft.AspNetCore.AspNetCoreModule;
- Microsoft.AspNetCore.AspNetCoreModuleV2;
- Microsoft.AspNetCore.Identity.UI;
- java:signalr;
- Microsoft.AspNetCore.SignalR.Protocols.MessagePack;
- Microsoft.AspNetCore.SignalR.Redis;
- Microsoft.AspNetCore.SignalR.StackExchangeRedis;
- Microsoft.AspNetCore.DataProtection.StackExchangeRedis;
- Microsoft.AspNetCore.Mvc.Core;
- Microsoft.AspNetCore.Mvc.RazorPages;
- Microsoft.AspNetCore.AzureAppServicesIntegration;
- Microsoft.AspNetCore.AzureAppServices.HostingStartup;
- Microsoft.AspNetCore.AzureAppServices.SiteExtension;
-
-
-
-
- Microsoft.AspNetCore.Mvc.Api.Analyzers;
- Microsoft.AspNetCore.Server.HttpSys;
- Microsoft.AspNetCore.Server.IIS;
-
-
-
-
- Microsoft.AspNetCore.DataProtection.AzureStorage;
- Microsoft.AspNetCore.Hosting;
- Microsoft.AspNetCore.SpaServices;
-
-
-
-
-
-
diff --git a/eng/Versions.props b/eng/Versions.props
index 023598352f..a0c39b7f4e 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -8,27 +8,33 @@
3
0
- 0
- 2
+ 1
- true
+ false
release
true
false
- rc$(PreReleasePreviewNumber)
- Release Candidate $(PreReleasePreviewNumber)
+ servicing
+ Servicing
9
preview$(BlazorClientPreReleasePreviewNumber)
$(AspNetCoreMajorVersion).$(AspNetCoreMinorVersion)
false
+
+ true
- true
+ true
$(AspNetCoreMajorVersion).$(AspNetCoreMinorVersion).$(AspNetCorePatchVersion)
$(VersionPrefix)
diff --git a/eng/scripts/InstallTar.ps1 b/eng/scripts/InstallTar.ps1
new file mode 100644
index 0000000000..12159a8d0b
--- /dev/null
+++ b/eng/scripts/InstallTar.ps1
@@ -0,0 +1,74 @@
+<#
+.SYNOPSIS
+ Finds or installs the Tar command on this system.
+.DESCRIPTION
+ This script searches for Tar on this system. If not found, downloads and extracts Git to use its tar.exe. Prefers
+ global installation locations even if Git has been downloaded into this repo.
+.PARAMETER GitVersion
+ The version of the Git to install. If not set, the default value is read from global.json.
+.PARAMETER Force
+ Overwrite the existing installation if one exists in this repo and Tar isn't installed globally.
+#>
+param(
+ [string]$GitVersion,
+ [switch]$Force
+)
+
+$ErrorActionPreference = 'Stop'
+$ProgressPreference = 'SilentlyContinue' # Workaround PowerShell/PowerShell#2138
+
+Set-StrictMode -Version 1
+
+# Find tar. If not found, install Git to get it.
+$repoRoot = (Join-Path $PSScriptRoot "..\.." -Resolve)
+$installDir = "$repoRoot\.tools\Git\win-x64"
+$tarCommand = "$installDir\usr\bin\tar.exe"
+$finalCommand = "$repoRoot\.tools\tar.exe"
+
+Write-Host "Windows version and other information..."
+cmd.exe /c ver
+systeminfo.exe
+Write-Host "Processor Architecture: $env:PROCESSOR_ARCHITECTURE"
+
+Write-Host "Checking $env:SystemRoot\System32\tar.exe"
+Get-ChildItem "$env:SystemRoot\System32\ta*.exe"
+if (Test-Path "$env:SystemRoot\System32\tar.exe") {
+ Write-Host "Found $env:SystemRoot\System32\tar.exe"
+ $tarCommand = "$env:SystemRoot\System32\tar.exe"
+}
+elseif (Test-Path "$env:ProgramFiles\Git\usr\bin\tar.exe") {
+ $tarCommand = "$env:ProgramFiles\Git\usr\bin\tar.exe"
+}
+elseif (Test-Path "${env:ProgramFiles(x86)}\Git\usr\bin\tar.exe") {
+ $tarCommand = "${env:ProgramFiles(x86)}\Git\usr\bin\tar.exe"
+}
+elseif (Test-Path "$env:AGENT_HOMEDIRECTORY\externals\git\usr\bin\tar.exe") {
+ $tarCommand = "$env:AGENT_HOMEDIRECTORY\externals\git\usr\bin\tar.exe"
+}
+elseif ((Test-Path $tarCommand) -And (-Not $Force)) {
+ Write-Verbose "Repo-local Git installation and $tarCommand already exist, skipping Git install."
+}
+else {
+ if (-not $GitVersion) {
+ $globalJson = Get-Content "$repoRoot\global.json" | ConvertFrom-Json
+ $GitVersion = $globalJson.tools.Git
+ }
+
+ $Uri = "https://netcorenativeassets.blob.core.windows.net/resource-packages/external/windows/git/Git-${GitVersion}-64-bit.zip"
+
+ Import-Module -Name (Join-Path $PSScriptRoot "..\common\native\CommonLibrary.psm1" -Resolve)
+ $InstallStatus = CommonLibrary\DownloadAndExtract -Uri $Uri -InstallDirectory "$installDir\" -Force:$Force -Verbose
+
+ if ($InstallStatus -Eq $False) {
+ Write-Error "Installation failed"
+ exit 1
+ }
+}
+
+New-Item "$repoRoot\.tools\" -ErrorAction SilentlyContinue -ItemType Directory
+Copy-Item "$tarCommand" "$finalCommand" -Verbose
+Write-Host "Tar now available at '$finalCommand'"
+
+if ($tarCommand -like '*\Git\*') {
+ $null >.\.tools\tar.fromGit
+}
diff --git a/eng/targets/ResolveReferences.targets b/eng/targets/ResolveReferences.targets
index 263edf3eaa..4efbe58e97 100644
--- a/eng/targets/ResolveReferences.targets
+++ b/eng/targets/ResolveReferences.targets
@@ -36,7 +36,8 @@
-->
true
true
- true
+ true
false
- true
+ true
true
false
@@ -122,7 +123,7 @@
Text="Cannot reference "%(_InvalidReferenceToNonSharedFxAssembly.Identity)". This dependency is not in the shared framework. See docs/SharedFramework.md for instructions on how to modify what is in the shared framework." />
-
+
diff --git a/global.json b/global.json
index dcba24801f..e02636c9c6 100644
--- a/global.json
+++ b/global.json
@@ -12,6 +12,7 @@
"$(MicrosoftNETCoreAppRuntimeVersion)"
]
},
+ "Git": "2.22.0",
"jdk": "11.0.3",
"vs": {
"version": "16.0",
diff --git a/src/Framework/ref/Microsoft.AspNetCore.App.Ref.csproj b/src/Framework/ref/Microsoft.AspNetCore.App.Ref.csproj
index fafdf9a39a..ff5fa19191 100644
--- a/src/Framework/ref/Microsoft.AspNetCore.App.Ref.csproj
+++ b/src/Framework/ref/Microsoft.AspNetCore.App.Ref.csproj
@@ -169,14 +169,26 @@ This package is an internal implementation of the .NET Core SDK and is not meant
Inputs="@(RefPackContent)"
Outputs="$(ZipArchiveOutputPath);$(TarArchiveOutputPath)"
Condition="'$(IsPackable)' == 'true'">
+
+ <_TarCommand>tar
+ <_TarCommand Condition="Exists('$(RepoRoot).tools\tar.exe')">$(RepoRoot).tools\tar.exe
+
+
+ <_TarArchiveOutputPath>$(TarArchiveOutputPath)
+ <_TarArchiveOutputPath
+ Condition="Exists('$(repoRoot)\.tools\tar.fromGit')">/$(TarArchiveOutputPath.Replace('\','/').Replace(':',''))
+
+
+
-
+
+
+