From 254365013e9290f42d200e360d94b37c94d27c26 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Wed, 9 Jun 2021 16:08:15 +0000 Subject: [PATCH 1/2] Update dependencies from https://github.com/dotnet/arcade build 20210512.2 Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Build.Tasks.Packaging , Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk , Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk , Microsoft.DotNet.CodeAnalysis , Microsoft.DotNet.GenAPI , Microsoft.DotNet.GenFacades , Microsoft.DotNet.XUnitExtensions , Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.RemoteExecutor , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.XUnitConsoleRunner , Microsoft.DotNet.ApiCompat From Version 5.0.0-beta.21160.3 -> To Version 5.0.0-beta.21262.2 --- eng/Version.Details.xml | 56 ++++++------ eng/Versions.props | 20 ++--- eng/common/generate-locproject.ps1 | 110 +++++++++++++++++++++++ eng/common/templates/job/onelocbuild.yml | 83 +++++++++++++++++ global.json | 8 +- 5 files changed, 235 insertions(+), 42 deletions(-) create mode 100644 eng/common/generate-locproject.ps1 create mode 100644 eng/common/templates/job/onelocbuild.yml diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 8f8c16f4add8a..9310af7850a92 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -10,61 +10,61 @@ - + https://github.com/dotnet/arcade - 670382be6a978ba401c21c57ba44311199d2682a + dad4f3c62e24b94b1514427674af8ca899cddd5f - + https://github.com/dotnet/arcade - 670382be6a978ba401c21c57ba44311199d2682a + dad4f3c62e24b94b1514427674af8ca899cddd5f - + https://github.com/dotnet/arcade - 670382be6a978ba401c21c57ba44311199d2682a + dad4f3c62e24b94b1514427674af8ca899cddd5f - + https://github.com/dotnet/arcade - 670382be6a978ba401c21c57ba44311199d2682a + dad4f3c62e24b94b1514427674af8ca899cddd5f - + https://github.com/dotnet/arcade - 670382be6a978ba401c21c57ba44311199d2682a + dad4f3c62e24b94b1514427674af8ca899cddd5f - + https://github.com/dotnet/arcade - 670382be6a978ba401c21c57ba44311199d2682a + dad4f3c62e24b94b1514427674af8ca899cddd5f - + https://github.com/dotnet/arcade - 670382be6a978ba401c21c57ba44311199d2682a + dad4f3c62e24b94b1514427674af8ca899cddd5f - + https://github.com/dotnet/arcade - 670382be6a978ba401c21c57ba44311199d2682a + dad4f3c62e24b94b1514427674af8ca899cddd5f - + https://github.com/dotnet/arcade - 670382be6a978ba401c21c57ba44311199d2682a + dad4f3c62e24b94b1514427674af8ca899cddd5f - + https://github.com/dotnet/arcade - 670382be6a978ba401c21c57ba44311199d2682a + dad4f3c62e24b94b1514427674af8ca899cddd5f - + https://github.com/dotnet/arcade - 670382be6a978ba401c21c57ba44311199d2682a + dad4f3c62e24b94b1514427674af8ca899cddd5f - + https://github.com/dotnet/arcade - 670382be6a978ba401c21c57ba44311199d2682a + dad4f3c62e24b94b1514427674af8ca899cddd5f - + https://github.com/dotnet/arcade - 670382be6a978ba401c21c57ba44311199d2682a + dad4f3c62e24b94b1514427674af8ca899cddd5f - + https://github.com/dotnet/arcade - 670382be6a978ba401c21c57ba44311199d2682a + dad4f3c62e24b94b1514427674af8ca899cddd5f https://dev.azure.com/dnceng/internal/_git/dotnet-optimization diff --git a/eng/Versions.props b/eng/Versions.props index 17367bb60ca07..8c70101eb8b59 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -48,16 +48,16 @@ - 5.0.0-beta.21160.3 - 5.0.0-beta.21160.3 - 5.0.0-beta.21160.3 - 5.0.0-beta.21160.3 - 5.0.0-beta.21160.3 - 5.0.0-beta.21160.3 - 2.5.1-beta.21160.3 - 5.0.0-beta.21160.3 - 5.0.0-beta.21160.3 - 5.0.0-beta.21160.3 + 5.0.0-beta.21262.2 + 5.0.0-beta.21262.2 + 5.0.0-beta.21262.2 + 5.0.0-beta.21262.2 + 5.0.0-beta.21262.2 + 5.0.0-beta.21262.2 + 2.5.1-beta.21262.2 + 5.0.0-beta.21262.2 + 5.0.0-beta.21262.2 + 5.0.0-beta.21262.2 5.0.0-rc.1.20451.14 5.0.0-rc.1.20451.14 diff --git a/eng/common/generate-locproject.ps1 b/eng/common/generate-locproject.ps1 new file mode 100644 index 0000000000000..2907f916d6f3e --- /dev/null +++ b/eng/common/generate-locproject.ps1 @@ -0,0 +1,110 @@ +Param( + [Parameter(Mandatory=$true)][string] $SourcesDirectory, # Directory where source files live; if using a Localize directory it should live in here + [string] $LanguageSet = 'VS_Main_Languages', # Language set to be used in the LocProject.json + [switch] $UseCheckedInLocProjectJson, # When set, generates a LocProject.json and compares it to one that already exists in the repo; otherwise just generates one + [switch] $CreateNeutralXlfs # Creates neutral xlf files. Only set to false when running locally +) + +# Generates LocProject.json files for the OneLocBuild task. OneLocBuildTask is described here: +# https://ceapex.visualstudio.com/CEINTL/_wiki/wikis/CEINTL.wiki/107/Localization-with-OneLocBuild-Task + +Set-StrictMode -Version 2.0 +$ErrorActionPreference = "Stop" +. $PSScriptRoot\tools.ps1 + +Import-Module -Name (Join-Path $PSScriptRoot 'native\CommonLibrary.psm1') + +$exclusionsFilePath = "$SourcesDirectory\Localize\LocExclusions.json" +$exclusions = @{ Exclusions = @() } +if (Test-Path -Path $exclusionsFilePath) +{ + $exclusions = Get-Content "$exclusionsFilePath" | ConvertFrom-Json +} + +Push-Location "$SourcesDirectory" # push location for Resolve-Path -Relative to work + +# Template files +$jsonFiles = @() +$jsonFiles += Get-ChildItem -Recurse -Path "$SourcesDirectory" | Where-Object { $_.FullName -Match "\.template\.config\\localize\\en\..+\.json" } # .NET templating pattern +$jsonFiles += Get-ChildItem -Recurse -Path "$SourcesDirectory" | Where-Object { $_.FullName -Match "en\\strings\.json" } # current winforms pattern + +$xlfFiles = @() + +$allXlfFiles = Get-ChildItem -Recurse -Path "$SourcesDirectory\*\*.xlf" +$langXlfFiles = @() +if ($allXlfFiles) { + $null = $allXlfFiles[0].FullName -Match "\.([\w-]+)\.xlf" # matches '[langcode].xlf' + $firstLangCode = $Matches.1 + $langXlfFiles = Get-ChildItem -Recurse -Path "$SourcesDirectory\*\*.$firstLangCode.xlf" +} +$langXlfFiles | ForEach-Object { + $null = $_.Name -Match "(.+)\.[\w-]+\.xlf" # matches '[filename].[langcode].xlf' + + $destinationFile = "$($_.Directory.FullName)\$($Matches.1).xlf" + $xlfFiles += Copy-Item "$($_.FullName)" -Destination $destinationFile -PassThru +} + +$locFiles = $jsonFiles + $xlfFiles + +$locJson = @{ + Projects = @( + @{ + LanguageSet = $LanguageSet + LocItems = @( + $locFiles | ForEach-Object { + $outputPath = "$(($_.DirectoryName | Resolve-Path -Relative) + "\")" + $continue = $true + foreach ($exclusion in $exclusions.Exclusions) { + if ($outputPath.Contains($exclusion)) + { + $continue = $false + } + } + $sourceFile = ($_.FullName | Resolve-Path -Relative) + if (!$CreateNeutralXlfs -and $_.Extension -eq '.xlf') { + Remove-Item -Path $sourceFile + } + if ($continue) + { + if ($_.Directory.Name -eq 'en' -and $_.Extension -eq '.json') { + return @{ + SourceFile = $sourceFile + CopyOption = "LangIDOnPath" + OutputPath = "$($_.Directory.Parent.FullName | Resolve-Path -Relative)\" + } + } + else { + return @{ + SourceFile = $sourceFile + CopyOption = "LangIDOnName" + OutputPath = $outputPath + } + } + } + } + ) + } + ) +} + +$json = ConvertTo-Json $locJson -Depth 5 +Write-Host "LocProject.json generated:`n`n$json`n`n" +Pop-Location + +if (!$UseCheckedInLocProjectJson) { + New-Item "$SourcesDirectory\Localize\LocProject.json" -Force # Need this to make sure the Localize directory is created + Set-Content "$SourcesDirectory\Localize\LocProject.json" $json +} +else { + New-Item "$SourcesDirectory\Localize\LocProject-generated.json" -Force # Need this to make sure the Localize directory is created + Set-Content "$SourcesDirectory\Localize\LocProject-generated.json" $json + + if ((Get-FileHash "$SourcesDirectory\Localize\LocProject-generated.json").Hash -ne (Get-FileHash "$SourcesDirectory\Localize\LocProject.json").Hash) { + Write-PipelineTelemetryError -Category "OneLocBuild" -Message "Existing LocProject.json differs from generated LocProject.json. Download LocProject-generated.json and compare them." + + exit 1 + } + else { + Write-Host "Generated LocProject.json and current LocProject.json are identical." + } +} \ No newline at end of file diff --git a/eng/common/templates/job/onelocbuild.yml b/eng/common/templates/job/onelocbuild.yml new file mode 100644 index 0000000000000..b27d6faf3035d --- /dev/null +++ b/eng/common/templates/job/onelocbuild.yml @@ -0,0 +1,83 @@ +parameters: + # Optional: dependencies of the job + dependsOn: '' + + # Optional: A defined YAML pool - https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#pool + pool: + vmImage: vs2017-win2016 + + CeapexPat: $(dn-bot-ceapex-package-r) # PAT for the loc AzDO instance https://dev.azure.com/ceapex + GithubPat: $(BotAccount-dotnet-bot-repo-PAT) + + SourcesDirectory: $(Build.SourcesDirectory) + CreatePr: true + AutoCompletePr: false + UseCheckedInLocProjectJson: false + LanguageSet: VS_Main_Languages + LclSource: lclFilesInRepo + LclPackageId: '' + RepoType: gitHub + condition: '' + +jobs: +- job: OneLocBuild + + dependsOn: ${{ parameters.dependsOn }} + + displayName: OneLocBuild + + pool: ${{ parameters.pool }} + + variables: + - group: OneLocBuildVariables # Contains the CeapexPat and GithubPat + - name: _GenerateLocProjectArguments + value: -SourcesDirectory ${{ parameters.SourcesDirectory }} + -LanguageSet "${{ parameters.LanguageSet }}" + -CreateNeutralXlfs + - ${{ if eq(parameters.UseCheckedInLocProjectJson, 'true') }}: + - name: _GenerateLocProjectArguments + value: ${{ variables._GenerateLocProjectArguments }} -UseCheckedInLocProjectJson + + + steps: + - task: Powershell@2 + inputs: + filePath: $(Build.SourcesDirectory)/eng/common/generate-locproject.ps1 + arguments: $(_GenerateLocProjectArguments) + displayName: Generate LocProject.json + condition: ${{ parameters.condition }} + + - task: OneLocBuild@2 + displayName: OneLocBuild + env: + SYSTEM_ACCESSTOKEN: $(System.AccessToken) + inputs: + locProj: Localize/LocProject.json + outDir: $(Build.ArtifactStagingDirectory) + lclSource: ${{ parameters.LclSource }} + lclPackageId: ${{ parameters.LclPackageId }} + isCreatePrSelected: ${{ parameters.CreatePr }} + ${{ if eq(parameters.CreatePr, true) }}: + isAutoCompletePrSelected: ${{ parameters.AutoCompletePr }} + packageSourceAuth: patAuth + patVariable: ${{ parameters.CeapexPat }} + ${{ if eq(parameters.RepoType, 'gitHub') }}: + repoType: ${{ parameters.RepoType }} + gitHubPatVariable: "${{ parameters.GithubPat }}" + condition: ${{ parameters.condition }} + + - task: PublishBuildArtifacts@1 + displayName: Publish Localization Files + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)/loc' + PublishLocation: Container + ArtifactName: Loc + condition: ${{ parameters.condition }} + + - task: PublishBuildArtifacts@1 + displayName: Publish LocProject.json + inputs: + PathtoPublish: '$(Build.SourcesDirectory)/Localize/' + PublishLocation: Container + ArtifactName: Loc + condition: ${{ parameters.condition }} \ No newline at end of file diff --git a/global.json b/global.json index 4fb6c96213fc6..eebfb6844275e 100644 --- a/global.json +++ b/global.json @@ -12,10 +12,10 @@ "python3": "3.7.1" }, "msbuild-sdks": { - "Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk": "5.0.0-beta.21160.3", - "Microsoft.DotNet.Arcade.Sdk": "5.0.0-beta.21160.3", - "Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk": "5.0.0-beta.21160.3", - "Microsoft.DotNet.Helix.Sdk": "5.0.0-beta.21160.3", + "Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk": "5.0.0-beta.21262.2", + "Microsoft.DotNet.Arcade.Sdk": "5.0.0-beta.21262.2", + "Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk": "5.0.0-beta.21262.2", + "Microsoft.DotNet.Helix.Sdk": "5.0.0-beta.21262.2", "Microsoft.FIX-85B6-MERGE-9C38-CONFLICT": "1.0.0", "Microsoft.NET.Sdk.IL": "5.0.0-preview.8.20359.4", "Microsoft.Build.NoTargets": "2.0.1", From 14d99ac8a87e74ce809899bf51712e78564fb4c4 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Wed, 7 Jul 2021 17:12:46 +0000 Subject: [PATCH 2/2] Update dependencies from https://github.com/dotnet/arcade build 20210628.3 Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Build.Tasks.Packaging , Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk , Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk , Microsoft.DotNet.CodeAnalysis , Microsoft.DotNet.GenAPI , Microsoft.DotNet.GenFacades , Microsoft.DotNet.XUnitExtensions , Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.RemoteExecutor , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.XUnitConsoleRunner , Microsoft.DotNet.ApiCompat From Version 5.0.0-beta.21160.3 -> To Version 5.0.0-beta.21328.3 --- eng/Version.Details.xml | 56 ++++++++++++------------ eng/Versions.props | 20 ++++----- eng/common/generate-locproject.ps1 | 14 +++--- eng/common/templates/job/onelocbuild.yml | 14 +++++- eng/common/tools.ps1 | 13 +++++- global.json | 8 ++-- 6 files changed, 72 insertions(+), 53 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 9310af7850a92..97988db5dea5c 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -10,61 +10,61 @@ - + https://github.com/dotnet/arcade - dad4f3c62e24b94b1514427674af8ca899cddd5f + 5266aa9856457785b84739fda2616f21da7ee6b4 - + https://github.com/dotnet/arcade - dad4f3c62e24b94b1514427674af8ca899cddd5f + 5266aa9856457785b84739fda2616f21da7ee6b4 - + https://github.com/dotnet/arcade - dad4f3c62e24b94b1514427674af8ca899cddd5f + 5266aa9856457785b84739fda2616f21da7ee6b4 - + https://github.com/dotnet/arcade - dad4f3c62e24b94b1514427674af8ca899cddd5f + 5266aa9856457785b84739fda2616f21da7ee6b4 - + https://github.com/dotnet/arcade - dad4f3c62e24b94b1514427674af8ca899cddd5f + 5266aa9856457785b84739fda2616f21da7ee6b4 - + https://github.com/dotnet/arcade - dad4f3c62e24b94b1514427674af8ca899cddd5f + 5266aa9856457785b84739fda2616f21da7ee6b4 - + https://github.com/dotnet/arcade - dad4f3c62e24b94b1514427674af8ca899cddd5f + 5266aa9856457785b84739fda2616f21da7ee6b4 - + https://github.com/dotnet/arcade - dad4f3c62e24b94b1514427674af8ca899cddd5f + 5266aa9856457785b84739fda2616f21da7ee6b4 - + https://github.com/dotnet/arcade - dad4f3c62e24b94b1514427674af8ca899cddd5f + 5266aa9856457785b84739fda2616f21da7ee6b4 - + https://github.com/dotnet/arcade - dad4f3c62e24b94b1514427674af8ca899cddd5f + 5266aa9856457785b84739fda2616f21da7ee6b4 - + https://github.com/dotnet/arcade - dad4f3c62e24b94b1514427674af8ca899cddd5f + 5266aa9856457785b84739fda2616f21da7ee6b4 - + https://github.com/dotnet/arcade - dad4f3c62e24b94b1514427674af8ca899cddd5f + 5266aa9856457785b84739fda2616f21da7ee6b4 - + https://github.com/dotnet/arcade - dad4f3c62e24b94b1514427674af8ca899cddd5f + 5266aa9856457785b84739fda2616f21da7ee6b4 - + https://github.com/dotnet/arcade - dad4f3c62e24b94b1514427674af8ca899cddd5f + 5266aa9856457785b84739fda2616f21da7ee6b4 https://dev.azure.com/dnceng/internal/_git/dotnet-optimization diff --git a/eng/Versions.props b/eng/Versions.props index 8c70101eb8b59..02929131c1205 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -48,16 +48,16 @@ - 5.0.0-beta.21262.2 - 5.0.0-beta.21262.2 - 5.0.0-beta.21262.2 - 5.0.0-beta.21262.2 - 5.0.0-beta.21262.2 - 5.0.0-beta.21262.2 - 2.5.1-beta.21262.2 - 5.0.0-beta.21262.2 - 5.0.0-beta.21262.2 - 5.0.0-beta.21262.2 + 5.0.0-beta.21328.3 + 5.0.0-beta.21328.3 + 5.0.0-beta.21328.3 + 5.0.0-beta.21328.3 + 5.0.0-beta.21328.3 + 5.0.0-beta.21328.3 + 2.5.1-beta.21328.3 + 5.0.0-beta.21328.3 + 5.0.0-beta.21328.3 + 5.0.0-beta.21328.3 5.0.0-rc.1.20451.14 5.0.0-rc.1.20451.14 diff --git a/eng/common/generate-locproject.ps1 b/eng/common/generate-locproject.ps1 index 2907f916d6f3e..de348a2e225c0 100644 --- a/eng/common/generate-locproject.ps1 +++ b/eng/common/generate-locproject.ps1 @@ -14,7 +14,7 @@ $ErrorActionPreference = "Stop" Import-Module -Name (Join-Path $PSScriptRoot 'native\CommonLibrary.psm1') -$exclusionsFilePath = "$SourcesDirectory\Localize\LocExclusions.json" +$exclusionsFilePath = "$SourcesDirectory\eng\Localize\LocExclusions.json" $exclusions = @{ Exclusions = @() } if (Test-Path -Path $exclusionsFilePath) { @@ -38,7 +38,7 @@ if ($allXlfFiles) { $langXlfFiles = Get-ChildItem -Recurse -Path "$SourcesDirectory\*\*.$firstLangCode.xlf" } $langXlfFiles | ForEach-Object { - $null = $_.Name -Match "(.+)\.[\w-]+\.xlf" # matches '[filename].[langcode].xlf' + $null = $_.Name -Match "(.+)\.[\w-]+\.xlf" # matches '[filename].[langcode].xlf $destinationFile = "$($_.Directory.FullName)\$($Matches.1).xlf" $xlfFiles += Copy-Item "$($_.FullName)" -Destination $destinationFile -PassThru @@ -92,14 +92,14 @@ Write-Host "LocProject.json generated:`n`n$json`n`n" Pop-Location if (!$UseCheckedInLocProjectJson) { - New-Item "$SourcesDirectory\Localize\LocProject.json" -Force # Need this to make sure the Localize directory is created - Set-Content "$SourcesDirectory\Localize\LocProject.json" $json + New-Item "$SourcesDirectory\eng\Localize\LocProject.json" -Force # Need this to make sure the Localize directory is created + Set-Content "$SourcesDirectory\eng\Localize\LocProject.json" $json } else { - New-Item "$SourcesDirectory\Localize\LocProject-generated.json" -Force # Need this to make sure the Localize directory is created - Set-Content "$SourcesDirectory\Localize\LocProject-generated.json" $json + New-Item "$SourcesDirectory\eng\Localize\LocProject-generated.json" -Force # Need this to make sure the Localize directory is created + Set-Content "$SourcesDirectory\eng\Localize\LocProject-generated.json" $json - if ((Get-FileHash "$SourcesDirectory\Localize\LocProject-generated.json").Hash -ne (Get-FileHash "$SourcesDirectory\Localize\LocProject.json").Hash) { + if ((Get-FileHash "$SourcesDirectory\eng\Localize\LocProject-generated.json").Hash -ne (Get-FileHash "$SourcesDirectory\eng\Localize\LocProject.json").Hash) { Write-PipelineTelemetryError -Category "OneLocBuild" -Message "Existing LocProject.json differs from generated LocProject.json. Download LocProject-generated.json and compare them." exit 1 diff --git a/eng/common/templates/job/onelocbuild.yml b/eng/common/templates/job/onelocbuild.yml index b27d6faf3035d..e8bc77d2ebbe3 100644 --- a/eng/common/templates/job/onelocbuild.yml +++ b/eng/common/templates/job/onelocbuild.yml @@ -12,11 +12,15 @@ parameters: SourcesDirectory: $(Build.SourcesDirectory) CreatePr: true AutoCompletePr: false + UseLfLineEndings: true UseCheckedInLocProjectJson: false LanguageSet: VS_Main_Languages LclSource: lclFilesInRepo LclPackageId: '' RepoType: gitHub + GitHubOrg: dotnet + MirrorRepo: '' + MirrorBranch: main condition: '' jobs: @@ -52,18 +56,24 @@ jobs: env: SYSTEM_ACCESSTOKEN: $(System.AccessToken) inputs: - locProj: Localize/LocProject.json + locProj: eng/Localize/LocProject.json outDir: $(Build.ArtifactStagingDirectory) lclSource: ${{ parameters.LclSource }} lclPackageId: ${{ parameters.LclPackageId }} isCreatePrSelected: ${{ parameters.CreatePr }} ${{ if eq(parameters.CreatePr, true) }}: isAutoCompletePrSelected: ${{ parameters.AutoCompletePr }} + isUseLfLineEndingsSelected: ${{ parameters.UseLfLineEndings }} packageSourceAuth: patAuth patVariable: ${{ parameters.CeapexPat }} ${{ if eq(parameters.RepoType, 'gitHub') }}: repoType: ${{ parameters.RepoType }} gitHubPatVariable: "${{ parameters.GithubPat }}" + ${{ if ne(parameters.MirrorRepo, '') }}: + isMirrorRepoSelected: true + gitHubOrganization: ${{ parameters.GitHubOrg }} + mirrorRepo: ${{ parameters.MirrorRepo }} + mirrorBranch: ${{ parameters.MirrorBranch }} condition: ${{ parameters.condition }} - task: PublishBuildArtifacts@1 @@ -77,7 +87,7 @@ jobs: - task: PublishBuildArtifacts@1 displayName: Publish LocProject.json inputs: - PathtoPublish: '$(Build.SourcesDirectory)/Localize/' + PathtoPublish: '$(Build.SourcesDirectory)/eng/Localize/' PublishLocation: Container ArtifactName: Loc condition: ${{ parameters.condition }} \ No newline at end of file diff --git a/eng/common/tools.ps1 b/eng/common/tools.ps1 index 60eb601c8f300..eba7ed49d7841 100644 --- a/eng/common/tools.ps1 +++ b/eng/common/tools.ps1 @@ -371,7 +371,16 @@ function InitializeVisualStudioMSBuild([bool]$install, [object]$vsRequirements = } $msbuildVersionDir = if ([int]$vsMajorVersion -lt 16) { "$vsMajorVersion.0" } else { "Current" } - return $global:_MSBuildExe = Join-Path $vsInstallDir "MSBuild\$msbuildVersionDir\Bin\msbuild.exe" + + $local:BinFolder = Join-Path $vsInstallDir "MSBuild\$msbuildVersionDir\Bin" + $local:Prefer64bit = if (Get-Member -InputObject $vsRequirements -Name 'Prefer64bit') { $vsRequirements.Prefer64bit } else { $false } + if ($local:Prefer64bit -and (Test-Path(Join-Path $local:BinFolder "amd64"))) { + $global:_MSBuildExe = Join-Path $local:BinFolder "amd64\msbuild.exe" + } else { + $global:_MSBuildExe = Join-Path $local:BinFolder "msbuild.exe" + } + + return $global:_MSBuildExe } function InitializeVisualStudioEnvironmentVariables([string] $vsInstallDir, [string] $vsMajorVersion) { @@ -527,7 +536,7 @@ function GetDefaultMSBuildEngine() { function GetNuGetPackageCachePath() { if ($env:NUGET_PACKAGES -eq $null) { - # Use local cache on CI to ensure deterministic build. + # Use local cache on CI to ensure deterministic build. # Avoid using the http cache as workaround for https://github.com/NuGet/Home/issues/3116 # use global cache in dev builds to avoid cost of downloading packages. # For directory normalization, see also: https://github.com/NuGet/Home/issues/7968 diff --git a/global.json b/global.json index eebfb6844275e..d5459e34345fa 100644 --- a/global.json +++ b/global.json @@ -12,10 +12,10 @@ "python3": "3.7.1" }, "msbuild-sdks": { - "Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk": "5.0.0-beta.21262.2", - "Microsoft.DotNet.Arcade.Sdk": "5.0.0-beta.21262.2", - "Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk": "5.0.0-beta.21262.2", - "Microsoft.DotNet.Helix.Sdk": "5.0.0-beta.21262.2", + "Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk": "5.0.0-beta.21328.3", + "Microsoft.DotNet.Arcade.Sdk": "5.0.0-beta.21328.3", + "Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk": "5.0.0-beta.21328.3", + "Microsoft.DotNet.Helix.Sdk": "5.0.0-beta.21328.3", "Microsoft.FIX-85B6-MERGE-9C38-CONFLICT": "1.0.0", "Microsoft.NET.Sdk.IL": "5.0.0-preview.8.20359.4", "Microsoft.Build.NoTargets": "2.0.1",