<Dependencies>
<ProductDependencies>
- <Dependency Name="Microsoft.NETCore.Runtime.ICU.Transport" Version="6.0.0-preview.3.21165.1">
+ <Dependency Name="Microsoft.NETCore.Runtime.ICU.Transport" Version="6.0.0-preview.3.21167.1">
<Uri>https://github.com/dotnet/icu</Uri>
- <Sha>9ffb5011f22ed30f09edba7b88309d83d1d99682</Sha>
+ <Sha>4515910c7f374fe3332677b3a1b8321072d7f8de</Sha>
</Dependency>
</ProductDependencies>
<ToolsetDependencies>
- <Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="6.0.0-beta.21166.5">
+ <Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="6.0.0-beta.21167.3">
<Uri>https://github.com/dotnet/arcade</Uri>
- <Sha>b80229ca3c7bae93ff9b4a50807c7efb0518e771</Sha>
+ <Sha>0ca849f0b71866b007fedaaa938cee63f8d056a6</Sha>
</Dependency>
- <Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="6.0.0-beta.21166.5">
+ <Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="6.0.0-beta.21167.3">
<Uri>https://github.com/dotnet/arcade</Uri>
- <Sha>b80229ca3c7bae93ff9b4a50807c7efb0518e771</Sha>
+ <Sha>0ca849f0b71866b007fedaaa938cee63f8d056a6</Sha>
</Dependency>
- <Dependency Name="Microsoft.DotNet.ApiCompat" Version="6.0.0-beta.21166.5">
+ <Dependency Name="Microsoft.DotNet.ApiCompat" Version="6.0.0-beta.21167.3">
<Uri>https://github.com/dotnet/arcade</Uri>
- <Sha>b80229ca3c7bae93ff9b4a50807c7efb0518e771</Sha>
+ <Sha>0ca849f0b71866b007fedaaa938cee63f8d056a6</Sha>
</Dependency>
- <Dependency Name="Microsoft.DotNet.GenAPI" Version="6.0.0-beta.21166.5">
+ <Dependency Name="Microsoft.DotNet.GenAPI" Version="6.0.0-beta.21167.3">
<Uri>https://github.com/dotnet/arcade</Uri>
- <Sha>b80229ca3c7bae93ff9b4a50807c7efb0518e771</Sha>
+ <Sha>0ca849f0b71866b007fedaaa938cee63f8d056a6</Sha>
</Dependency>
- <Dependency Name="Microsoft.DotNet.GenFacades" Version="6.0.0-beta.21166.5">
+ <Dependency Name="Microsoft.DotNet.GenFacades" Version="6.0.0-beta.21167.3">
<Uri>https://github.com/dotnet/arcade</Uri>
- <Sha>b80229ca3c7bae93ff9b4a50807c7efb0518e771</Sha>
+ <Sha>0ca849f0b71866b007fedaaa938cee63f8d056a6</Sha>
</Dependency>
- <Dependency Name="Microsoft.DotNet.XUnitExtensions" Version="6.0.0-beta.21166.5">
+ <Dependency Name="Microsoft.DotNet.XUnitExtensions" Version="6.0.0-beta.21167.3">
<Uri>https://github.com/dotnet/arcade</Uri>
- <Sha>b80229ca3c7bae93ff9b4a50807c7efb0518e771</Sha>
+ <Sha>0ca849f0b71866b007fedaaa938cee63f8d056a6</Sha>
</Dependency>
- <Dependency Name="Microsoft.DotNet.XUnitConsoleRunner" Version="2.5.1-beta.21166.5">
+ <Dependency Name="Microsoft.DotNet.XUnitConsoleRunner" Version="2.5.1-beta.21167.3">
<Uri>https://github.com/dotnet/arcade</Uri>
- <Sha>b80229ca3c7bae93ff9b4a50807c7efb0518e771</Sha>
+ <Sha>0ca849f0b71866b007fedaaa938cee63f8d056a6</Sha>
</Dependency>
- <Dependency Name="Microsoft.DotNet.Build.Tasks.Archives" Version="6.0.0-beta.21166.5">
+ <Dependency Name="Microsoft.DotNet.Build.Tasks.Archives" Version="6.0.0-beta.21167.3">
<Uri>https://github.com/dotnet/arcade</Uri>
- <Sha>b80229ca3c7bae93ff9b4a50807c7efb0518e771</Sha>
+ <Sha>0ca849f0b71866b007fedaaa938cee63f8d056a6</Sha>
</Dependency>
- <Dependency Name="Microsoft.DotNet.Build.Tasks.Packaging" Version="6.0.0-beta.21166.5">
+ <Dependency Name="Microsoft.DotNet.Build.Tasks.Packaging" Version="6.0.0-beta.21167.3">
<Uri>https://github.com/dotnet/arcade</Uri>
- <Sha>b80229ca3c7bae93ff9b4a50807c7efb0518e771</Sha>
+ <Sha>0ca849f0b71866b007fedaaa938cee63f8d056a6</Sha>
</Dependency>
- <Dependency Name="Microsoft.DotNet.Build.Tasks.Installers" Version="6.0.0-beta.21166.5">
+ <Dependency Name="Microsoft.DotNet.Build.Tasks.Installers" Version="6.0.0-beta.21167.3">
<Uri>https://github.com/dotnet/arcade</Uri>
- <Sha>b80229ca3c7bae93ff9b4a50807c7efb0518e771</Sha>
+ <Sha>0ca849f0b71866b007fedaaa938cee63f8d056a6</Sha>
</Dependency>
- <Dependency Name="Microsoft.DotNet.CodeAnalysis" Version="6.0.0-beta.21166.5">
+ <Dependency Name="Microsoft.DotNet.CodeAnalysis" Version="6.0.0-beta.21167.3">
<Uri>https://github.com/dotnet/arcade</Uri>
- <Sha>b80229ca3c7bae93ff9b4a50807c7efb0518e771</Sha>
+ <Sha>0ca849f0b71866b007fedaaa938cee63f8d056a6</Sha>
</Dependency>
- <Dependency Name="Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk" Version="6.0.0-beta.21166.5">
+ <Dependency Name="Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk" Version="6.0.0-beta.21167.3">
<Uri>https://github.com/dotnet/arcade</Uri>
- <Sha>b80229ca3c7bae93ff9b4a50807c7efb0518e771</Sha>
+ <Sha>0ca849f0b71866b007fedaaa938cee63f8d056a6</Sha>
</Dependency>
- <Dependency Name="Microsoft.DotNet.RemoteExecutor" Version="6.0.0-beta.21166.5">
+ <Dependency Name="Microsoft.DotNet.RemoteExecutor" Version="6.0.0-beta.21167.3">
<Uri>https://github.com/dotnet/arcade</Uri>
- <Sha>b80229ca3c7bae93ff9b4a50807c7efb0518e771</Sha>
+ <Sha>0ca849f0b71866b007fedaaa938cee63f8d056a6</Sha>
</Dependency>
- <Dependency Name="Microsoft.DotNet.Build.Tasks.Feed" Version="6.0.0-beta.21166.5">
+ <Dependency Name="Microsoft.DotNet.Build.Tasks.Feed" Version="6.0.0-beta.21167.3">
<Uri>https://github.com/dotnet/arcade</Uri>
- <Sha>b80229ca3c7bae93ff9b4a50807c7efb0518e771</Sha>
+ <Sha>0ca849f0b71866b007fedaaa938cee63f8d056a6</Sha>
</Dependency>
- <Dependency Name="Microsoft.DotNet.VersionTools.Tasks" Version="6.0.0-beta.21166.5">
+ <Dependency Name="Microsoft.DotNet.VersionTools.Tasks" Version="6.0.0-beta.21167.3">
<Uri>https://github.com/dotnet/arcade</Uri>
- <Sha>b80229ca3c7bae93ff9b4a50807c7efb0518e771</Sha>
+ <Sha>0ca849f0b71866b007fedaaa938cee63f8d056a6</Sha>
</Dependency>
- <Dependency Name="Microsoft.DotNet.SharedFramework.Sdk" Version="6.0.0-beta.21166.5">
+ <Dependency Name="Microsoft.DotNet.SharedFramework.Sdk" Version="6.0.0-beta.21167.3">
<Uri>https://github.com/dotnet/arcade</Uri>
- <Sha>b80229ca3c7bae93ff9b4a50807c7efb0518e771</Sha>
+ <Sha>0ca849f0b71866b007fedaaa938cee63f8d056a6</Sha>
</Dependency>
<Dependency Name="optimization.windows_nt-x64.IBC.CoreFx" Version="99.99.99-master-20200806.6">
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-optimization</Uri>
<MicrosoftCodeAnalysisCSharpCodeStyleVersion>3.9.0-5.final</MicrosoftCodeAnalysisCSharpCodeStyleVersion>
<MicrosoftCodeAnalysisCSharpVersion>3.9.0-5.final</MicrosoftCodeAnalysisCSharpVersion>
<!-- Arcade dependencies -->
- <MicrosoftDotNetApiCompatVersion>6.0.0-beta.21166.5</MicrosoftDotNetApiCompatVersion>
- <MicrosoftDotNetBuildTasksFeedVersion>6.0.0-beta.21166.5</MicrosoftDotNetBuildTasksFeedVersion>
- <MicrosoftDotNetCodeAnalysisVersion>6.0.0-beta.21166.5</MicrosoftDotNetCodeAnalysisVersion>
- <MicrosoftDotNetGenAPIVersion>6.0.0-beta.21166.5</MicrosoftDotNetGenAPIVersion>
- <MicrosoftDotNetGenFacadesVersion>6.0.0-beta.21166.5</MicrosoftDotNetGenFacadesVersion>
- <MicrosoftDotNetXUnitExtensionsVersion>6.0.0-beta.21166.5</MicrosoftDotNetXUnitExtensionsVersion>
- <MicrosoftDotNetXUnitConsoleRunnerVersion>2.5.1-beta.21166.5</MicrosoftDotNetXUnitConsoleRunnerVersion>
- <MicrosoftDotNetBuildTasksArchivesVersion>6.0.0-beta.21166.5</MicrosoftDotNetBuildTasksArchivesVersion>
- <MicrosoftDotNetBuildTasksPackagingVersion>6.0.0-beta.21166.5</MicrosoftDotNetBuildTasksPackagingVersion>
- <MicrosoftDotNetBuildTasksInstallersVersion>6.0.0-beta.21166.5</MicrosoftDotNetBuildTasksInstallersVersion>
- <MicrosoftDotNetRemoteExecutorVersion>6.0.0-beta.21166.5</MicrosoftDotNetRemoteExecutorVersion>
- <MicrosoftDotNetVersionToolsTasksVersion>6.0.0-beta.21166.5</MicrosoftDotNetVersionToolsTasksVersion>
+ <MicrosoftDotNetApiCompatVersion>6.0.0-beta.21167.3</MicrosoftDotNetApiCompatVersion>
+ <MicrosoftDotNetBuildTasksFeedVersion>6.0.0-beta.21167.3</MicrosoftDotNetBuildTasksFeedVersion>
+ <MicrosoftDotNetCodeAnalysisVersion>6.0.0-beta.21167.3</MicrosoftDotNetCodeAnalysisVersion>
+ <MicrosoftDotNetGenAPIVersion>6.0.0-beta.21167.3</MicrosoftDotNetGenAPIVersion>
+ <MicrosoftDotNetGenFacadesVersion>6.0.0-beta.21167.3</MicrosoftDotNetGenFacadesVersion>
+ <MicrosoftDotNetXUnitExtensionsVersion>6.0.0-beta.21167.3</MicrosoftDotNetXUnitExtensionsVersion>
+ <MicrosoftDotNetXUnitConsoleRunnerVersion>2.5.1-beta.21167.3</MicrosoftDotNetXUnitConsoleRunnerVersion>
+ <MicrosoftDotNetBuildTasksArchivesVersion>6.0.0-beta.21167.3</MicrosoftDotNetBuildTasksArchivesVersion>
+ <MicrosoftDotNetBuildTasksPackagingVersion>6.0.0-beta.21167.3</MicrosoftDotNetBuildTasksPackagingVersion>
+ <MicrosoftDotNetBuildTasksInstallersVersion>6.0.0-beta.21167.3</MicrosoftDotNetBuildTasksInstallersVersion>
+ <MicrosoftDotNetRemoteExecutorVersion>6.0.0-beta.21167.3</MicrosoftDotNetRemoteExecutorVersion>
+ <MicrosoftDotNetVersionToolsTasksVersion>6.0.0-beta.21167.3</MicrosoftDotNetVersionToolsTasksVersion>
<!-- NuGet dependencies -->
<NuGetBuildTasksPackVersion>5.9.0-preview.2</NuGetBuildTasksPackVersion>
<!-- Installer dependencies -->
<!-- ILLink -->
<MicrosoftNETILLinkTasksVersion>6.0.100-preview.2.21167.1</MicrosoftNETILLinkTasksVersion>
<!-- ICU -->
- <MicrosoftNETCoreRuntimeICUTransportVersion>6.0.0-preview.3.21165.1</MicrosoftNETCoreRuntimeICUTransportVersion>
+ <MicrosoftNETCoreRuntimeICUTransportVersion>6.0.0-preview.3.21167.1</MicrosoftNETCoreRuntimeICUTransportVersion>
<!-- Mono LLVM -->
<runtimelinuxarm64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>9.0.1-alpha.1.21165.1</runtimelinuxarm64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>
<runtimelinuxarm64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>9.0.1-alpha.1.21165.1</runtimelinuxarm64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>
--- /dev/null
+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 = "Localize\$(($_.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)
+ {
+ return @{
+ SourceFile = $sourceFile
+ CopyOption = "LangIDOnName"
+ OutputPath = $outputPath
+ }
+ }
+ }
+ )
+ }
+ )
+}
+
+$json = ConvertTo-Json $locJson -Depth 5
+Write-Host "(NETCORE_ENGINEERING_TELEMETRY=Build) 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-PipelineTaskError -Type "warning" -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
--- /dev/null
+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
+ UseCheckedInLocProjectJson: false
+ LanguageSet: VS_Main_Languages
+ LclSource: lclFilesInRepo
+ LclPackageId: ''
+ RepoType: gitHub
+
+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
+
+ - task: OneLocBuild@2
+ displayName: OneLocBuild
+ inputs:
+ locProj: Localize/LocProject.json
+ outDir: $(Build.ArtifactStagingDirectory)
+ lclSource: ${{ parameters.LclSource }}
+ lclPackageId: ${{ parameters.LclPackageId }}
+ isCreatePrSelected: ${{ parameters.CreatePr }}
+ repoType: ${{ parameters.RepoType }}
+ gitHubPatVariable: "${{ parameters.GithubPat }}"
+ packageSourceAuth: patAuth
+ patVariable: ${{ parameters.CeapexPat }}
+ condition: always()
+
+ - task: PublishBuildArtifacts@1
+ displayName: Publish Localization Files
+ inputs:
+ PathtoPublish: '$(Build.ArtifactStagingDirectory)/loc'
+ PublishLocation: Container
+ ArtifactName: Loc
+ condition: always()
+
+ - task: PublishBuildArtifacts@1
+ displayName: Publish LocProject.json
+ inputs:
+ PathtoPublish: '$(Build.SourcesDirectory)/Localize/'
+ PublishLocation: Container
+ ArtifactName: Loc
+ condition: always()
\ No newline at end of file
"python3": "3.7.1"
},
"msbuild-sdks": {
- "Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk": "6.0.0-beta.21166.5",
- "Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.21166.5",
- "Microsoft.DotNet.Helix.Sdk": "6.0.0-beta.21166.5",
- "Microsoft.DotNet.SharedFramework.Sdk": "6.0.0-beta.21166.5",
+ "Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk": "6.0.0-beta.21167.3",
+ "Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.21167.3",
+ "Microsoft.DotNet.Helix.Sdk": "6.0.0-beta.21167.3",
+ "Microsoft.DotNet.SharedFramework.Sdk": "6.0.0-beta.21167.3",
"Microsoft.Build.NoTargets": "2.0.17",
"Microsoft.Build.Traversal": "2.1.1",
"Microsoft.NET.Sdk.IL": "6.0.0-preview.3.21157.6"