[
  {
    "path": ".azuredevops/dependabot.yml",
    "content": "version: 2\r\n\r\n# Disabling dependabot on Azure DevOps as this is a mirrored repo. Updates should go through github.\r\nenable-campaigned-updates: false\r\nenable-security-updates: false\r\n"
  },
  {
    "path": ".config/1espt/PipelineAutobaseliningConfig.yml",
    "content": "## DO NOT MODIFY THIS FILE MANUALLY. This is part of auto-baselining from 1ES Pipeline Templates. Go to [https://aka.ms/1espt-autobaselining] for more details.\n\npipelines:\n  621:\n    retail:\n      source:\n        credscan:\n          lastModifiedDate: 2024-04-13\n        eslint:\n          lastModifiedDate: 2024-04-13\n        psscriptanalyzer:\n          lastModifiedDate: 2024-04-13\n        armory:\n          lastModifiedDate: 2024-04-13\n      binary:\n        credscan:\n          lastModifiedDate: 2024-04-13\n        binskim:\n          lastModifiedDate: 2024-04-13\n        spotbugs:\n          lastModifiedDate: 2024-04-13\n"
  },
  {
    "path": ".gitattributes",
    "content": "###############################################################################\n# Set default behavior to:\n#   automatically normalize line endings on check-in, and\n#   convert to Windows-style line endings on check-out\n###############################################################################\n* text=auto encoding=UTF-8\n*.sh text eol=lf\n\n###############################################################################\n# Set file behavior to:\n#   treat as text, and\n#   diff as C# source code\n###############################################################################\n*.cs                text        diff=csharp\n\n###############################################################################\n# Set file behavior to:\n#   treat as text\n###############################################################################\n*.cmd               text\n*.config            text\n*.csproj            text\n*.groovy            text\n*.json              text\n*.md                text\n*.nuspec            text\n*.pkgdef            text\n*.proj              text\n*.projitems         text\n*.props             text\n*.ps1               text\n*.resx              text\n*.ruleset           text\n*.shproj            text\n*.sln               text\n*.targets           text\n*.vb                text\n*.vbproj            text\n*.vcxproj           text\n*.vcxproj.filters   text\n*.vsct              text\n*.vsixmanifest      text\n\n###############################################################################\n# Set file behavior to:\n#   treat as binary\n###############################################################################\n*.png               binary\n*.snk               binary\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/01_bug_report.md",
    "content": "---\nname: Bug report\nabout: Create a report to help us improve\ntitle: ''\nlabels: ''\nassignees: ''\n\n---\n\n<!--This is just a template - feel free to delete any and all of it and replace as appropriate.-->\n\n### Description\n\n<!--\n* Please share a clear and concise description of the problem.\n* Include minimal steps to reproduce the problem if possible. E.g.: the smallest possible code snippet; or a small repo to clone, with steps to run it.\n* What behavior are you seeing, and what behavior would you expect?\n  -->\n\n### Configuration\n\n<!--\n* Which version of .NET is the code running on?\n* What OS and version, and what distro if applicable?\n* What is the architecture (x64, x86, ARM, ARM64)?\n* Do you know whether it is specific to that configuration?\n  -->\n\n### Regression?\n\n<!--\n* Did this work in a previous build or release of .NET Core, or from .NET Framework? If you can try a previous release or build to find out, that can help us narrow down the problem. If you don't know, that's OK.\n  -->\n\n### Other information\n\n<!--\n* Please include any relevant stack traces or error messages. If possible please include text as text rather than images (so it shows up in searches).\n* If you have an idea where the problem might lie, let us know that here. Please include any pointers to code, relevant changes, or related issues you know of.\n* Do you know of any workarounds?\n  -->\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/config.yml",
    "content": "blank_issues_enabled: true\ncontact_links:\n  - name: Issue with Windows Forms\n    url:  https://github.com/dotnet/winforms/issues/new/choose\n    about: Please open issues relating to Windows Forms in dotnet/winforms.\n  - name: Issue with WPF\n    url:  https://github.com/dotnet/wpf/issues/new/choose\n    about: Please open issues relating to WPF in dotnet/wpf.\n  - name: Issue with .NET SDK\n    url:  https://github.com/dotnet/sdk/issues/new/choose\n    about: Please open issues relating to the .NET SDK in dotnet/sdk.\n  - name: Issue with .NET runtime or core .NET libraries\n    url:  https://github.com/dotnet/runtime/issues/new/choose\n    about: Please open issues relating to the .NET runtime or core .NET libraries in dotnet/runtime.\n\n"
  },
  {
    "path": ".github/policies/resourceManagement.yml",
    "content": "name: GitOps.PullRequestIssueManagement\ndescription: GitOps.PullRequestIssueManagement primitive\n\nresource: repository\n\nconfiguration:\n  resourceManagementConfiguration:\n    eventResponderTasks:\n    - if:\n      - payloadType: Pull_Request\n      - isActivitySender:\n          user: dotnet-maestro[bot]\n          issueAuthor: False\n      - isAction:\n          action: Opened\n      then:\n      - approvePullRequest:\n          comment: Approved by FabricService.\n      description: Auto-approve maestro PRs\n\n"
  },
  {
    "path": ".github/workflows/backport.yml",
    "content": "name: Backport PR to branch\r\non:\r\n  issue_comment:\r\n    types: [created]\r\n  schedule:\r\n    # once a day at 13:00 UTC to cleanup old runs\r\n    - cron: '0 13 * * *'\r\n\r\npermissions:\r\n  contents: write\r\n  issues: write\r\n  pull-requests: write\r\n  actions: write\r\n\r\njobs:\r\n  backport:\r\n    uses: dotnet/arcade/.github/workflows/backport-base.yml@main"
  },
  {
    "path": ".github/workflows/inter-branch-merge-flow.yml",
    "content": "name: Inter-branch merge workflow\r\non:\r\n  push:\r\n    branches:\r\n      - release/**\r\n\r\npermissions:\r\n  contents: write\r\n  pull-requests: write\r\n\r\njobs:\r\n  Merge:\r\n    uses: dotnet/arcade/.github/workflows/inter-branch-merge-base.yml@main"
  },
  {
    "path": ".gitignore",
    "content": "# Arcade directories\n.dotnet/\n.packages/\n.tools/\nartifacts/\n\n# MSBuild log files\nmsbuild.log\nmsbuild.err\nmsbuild.wrn\n\n# Cross building rootfs\ncross/rootfs/\ncross/android-rootfs/\n# add x86 as it is ignored in 'Build results'\n!cross/x86\n\n# Others\n[Ss]tyle[Cc]op.*\nnode_modules/\n*.metaproj\n*.metaproj.tmp\nbin.localpkg/\n\n# Windows image file caches\nThumbs.db\nehthumbs.db\n\n# Folder config file\nDesktop.ini\n\n# Recycle Bin used on file shares\n$RECYCLE.BIN/\n\n# Windows Installer files\n*.cab\n*.msi\n*.msm\n*.msp\n\n# Windows shortcuts\n*.lnk\n\n# KDE directory preferences\n.directory\n\n### OSX ###\n.DS_Store\n.AppleDouble\n.LSOverride\n\n# Icon must end with two \\r\nIcon\n\n# Thumbnails\n._*\n\n# Files that might appear on external disk\n.Spotlight-V100\n.Trashes\n\n# Directories potentially created on remote AFP share\n.AppleDB\n.AppleDesktop\nNetwork Trash Folder\nTemporary Items\n.apdisk\n\n# vim temporary files\n[._]*.s[a-w][a-z]\n[._]s[a-w][a-z]\n*.un~\nSession.vim\n.netrwhist\n*~\n\n# Visual Studio Code\n.vscode/\n\n# Private test configuration and binaries.\nconfig.ps1\n**/IISApplications\n\n# VS generated files\nlaunchSettings.json\n\n# Snapcraft files\n.snapcraft\n*.snap\nparts/\nprime/\nstage/\n\n################################################################################\n\n## Ignore Visual Studio temporary files, build results, and\n## files generated by popular Visual Studio add-ons.\n##\n## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore\n\n# User-specific files\n*.suo\n*.user\n*.userosscache\n*.sln.docstates\n\n# User-specific files (MonoDevelop/Xamarin Studio)\n*.userprefs\n\n# Build results\n[Dd]ebug/\n[Dd]ebugPublic/\n[Rr]elease/\n[Rr]eleases/\nx64/\nx86/\nbld/\n[Bb]in/\n[Oo]bj/\n[Ll]og/\n\n# Visual Studio 2015/2017 cache/options directory\n.vs/\n# Uncomment if you have tasks that create the project's static files in wwwroot\n#wwwroot/\n\n# Visual Studio 2017 auto generated files\nGenerated\\ Files/\n\n# MSTest test Results\n[Tt]est[Rr]esult*/\n[Bb]uild[Ll]og.*\n\n# NUNIT\n*.VisualState.xml\nTestResult.xml\n\n# Build Results of an ATL Project\n[Dd]ebugPS/\n[Rr]eleasePS/\ndlldata.c\n\n# Benchmark Results\nBenchmarkDotNet.Artifacts/\n\n# .NET Core\nproject.lock.json\nproject.fragment.lock.json\nartifacts/\n**/Properties/launchSettings.json\n\n# StyleCop\nStyleCopReport.xml\n\n# Files built by Visual Studio\n*_i.c\n*_p.c\n*_i.h\n*.ilk\n*.meta\n*.obj\n*.iobj\n*.pch\n*.pdb\n*.ipdb\n*.pgc\n*.pgd\n*.rsp\n*.sbr\n*.tlb\n*.tli\n*.tlh\n*.tmp\n*.tmp_proj\n*.log\n*.vspscc\n*.vssscc\n.builds\n*.pidb\n*.svclog\n*.scc\n\n# Chutzpah Test files\n_Chutzpah*\n\n# Visual C++ cache files\nipch/\n*.aps\n*.ncb\n*.opendb\n*.opensdf\n*.sdf\n*.cachefile\n*.VC.db\n*.VC.VC.opendb\n\n# Visual Studio profiler\n*.psess\n*.vsp\n*.vspx\n*.sap\n\n# Visual Studio Trace Files\n*.e2e\n\n# TFS 2012 Local Workspace\n$tf/\n\n# Guidance Automation Toolkit\n*.gpState\n\n# ReSharper is a .NET coding add-in\n_ReSharper*/\n*.[Rr]e[Ss]harper\n*.DotSettings.user\n\n# JustCode is a .NET coding add-in\n.JustCode\n\n# TeamCity is a build add-in\n_TeamCity*\n\n# DotCover is a Code Coverage Tool\n*.dotCover\n\n# AxoCover is a Code Coverage Tool\n.axoCover/*\n!.axoCover/settings.json\n\n# Visual Studio code coverage results\n*.coverage\n*.coveragexml\n\n# NCrunch\n_NCrunch_*\n.*crunch*.local.xml\nnCrunchTemp_*\n\n# MightyMoose\n*.mm.*\nAutoTest.Net/\n\n# Web workbench (sass)\n.sass-cache/\n\n# Installshield output folder\n[Ee]xpress/\n\n# DocProject is a documentation generator add-in\nDocProject/buildhelp/\nDocProject/Help/*.HxT\nDocProject/Help/*.HxC\nDocProject/Help/*.hhc\nDocProject/Help/*.hhk\nDocProject/Help/*.hhp\nDocProject/Help/Html2\nDocProject/Help/html\n\n# Publish Web Output\n*.[Pp]ublish.xml\n*.azurePubxml\n# Note: Comment the next line if you want to checkin your web deploy settings,\n# but database connection strings (with potential passwords) will be unencrypted\n*.pubxml\n*.publishproj\n\n# Microsoft Azure Web App publish settings. Comment the next line if you want to\n# checkin your Azure Web App publish settings, but sensitive information contained\n# in these scripts will be unencrypted\nPublishScripts/\n\n# NuGet Packages\n*.nupkg\n# The packages folder can be ignored because of Package Restore\n**/[Pp]ackages/*\n# except build/, which is used as an MSBuild target.\n!**/[Pp]ackages/build/\n# Uncomment if necessary however generally it will be regenerated when needed\n#!**/[Pp]ackages/repositories.config\n# NuGet v3's project.json files produces more ignorable files\n*.nuget.props\n*.nuget.targets\n\n# Microsoft Azure Build Output\ncsx/\n*.build.csdef\n\n# Microsoft Azure Emulator\necf/\nrcf/\n\n# Windows Store app package directories and files\nAppPackages/\nBundleArtifacts/\nPackage.StoreAssociation.xml\n_pkginfo.txt\n*.appx\n\n# Visual Studio cache files\n# files ending in .cache can be ignored\n*.[Cc]ache\n# but keep track of directories ending in .cache\n!*.[Cc]ache/\n\n# Others\nClientBin/\n~$*\n*~\n*.dbmdl\n*.dbproj.schemaview\n*.jfm\n*.pfx\n*.publishsettings\norleans.codegen.cs\n\n# Including strong name files can present a security risk \n# (https://github.com/github/gitignore/pull/2483#issue-259490424)\n#*.snk\n\n# Since there are multiple workflows, uncomment next line to ignore bower_components\n# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)\n#bower_components/\n\n# RIA/Silverlight projects\nGenerated_Code/\n\n# Backup & report files from converting an old project file\n# to a newer Visual Studio version. Backup files are not needed,\n# because we have git ;-)\n_UpgradeReport_Files/\nBackup*/\nUpgradeLog*.XML\nUpgradeLog*.htm\nServiceFabricBackup/\n*.rptproj.bak\n\n# SQL Server files\n*.mdf\n*.ldf\n*.ndf\n\n# Business Intelligence projects\n*.rdl.data\n*.bim.layout\n*.bim_*.settings\n*.rptproj.rsuser\n\n# Microsoft Fakes\nFakesAssemblies/\n\n# GhostDoc plugin setting file\n*.GhostDoc.xml\n\n# Node.js Tools for Visual Studio\n.ntvs_analysis.dat\nnode_modules/\n\n# Visual Studio 6 build log\n*.plg\n\n# Visual Studio 6 workspace options file\n*.opt\n\n# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)\n*.vbw\n\n# Visual Studio LightSwitch build output\n**/*.HTMLClient/GeneratedArtifacts\n**/*.DesktopClient/GeneratedArtifacts\n**/*.DesktopClient/ModelManifest.xml\n**/*.Server/GeneratedArtifacts\n**/*.Server/ModelManifest.xml\n_Pvt_Extensions\n\n# Paket dependency manager\n.paket/paket.exe\npaket-files/\n\n# FAKE - F# Make\n.fake/\n\n# JetBrains Rider\n.idea/\n*.sln.iml\n\n# CodeRush\n.cr/\n\n# Python Tools for Visual Studio (PTVS)\n__pycache__/\n*.pyc\n\n# Cake - Uncomment if you are using it\n# tools/**\n# !tools/packages.config\n\n# Tabs Studio\n*.tss\n\n# Telerik's JustMock configuration file\n*.jmconfig\n\n# BizTalk build output\n*.btp.cs\n*.btm.cs\n*.odx.cs\n*.xsd.cs\n\n# OpenCover UI analysis results\nOpenCover/\n\n# Azure Stream Analytics local run output \nASALocalRun/\n\n# MSBuild Binary and Structured Log\n*.binlog\n\n# NVidia Nsight GPU debugger configuration file\n*.nvuser\n\n# MFractors (Xamarin productivity tool) working folder \n.mfractor/\n"
  },
  {
    "path": "Build.proj",
    "content": "<Project Sdk=\"Microsoft.Build.Traversal\">\n\n  <PropertyGroup>\n    <TargetFramework>$(NetCurrent)</TargetFramework>\n  </PropertyGroup>\n\n  <ItemGroup>\n    <!-- Microsoft.WindowsDesktop.App shared framework -->\n    <ProjectReference Include=\"src\\windowsdesktop\\src\\sfx\\**\\*.sfxproj\" />\n    <!-- Windows Desktop Runtime Bundle -->\n    <ProjectReference Include=\"src\\windowsdesktop\\src\\bundle\\**\\*.wixproj\" />\n    <ProjectReference Include=\"src\\windowsdesktop\\tests\\**\\*.Tests.csproj\" />\n\n    <!-- Microsoft.Windows.Compatibility nuget meta package -->\n    <ProjectReference Include=\"src\\Microsoft.Windows.Compatibility\\src\\Microsoft.Windows.Compatibility.csproj\" />\n  </ItemGroup>\n\n  <!-- Build the stub windowsdesktop targeting pack on non-Windows as its shipping version number gets used in sdk\n       when generating the BundledSdkVersions.props to download windowsdesktop packs on Unix.\n       Don't do this outside of the product build as this repository is fully buildable on Unix outside of a VMR vertical slice. -->\n  <ItemGroup Condition=\"'$(OS)' != 'Windows_NT' and '$(DotNetBuild)' == 'true'\">\n    <ProjectReference Remove=\"@(ProjectReference)\" />\n    <ProjectReference Include=\"src\\windowsdesktop\\src\\Microsoft.WindowsDesktop.App.Ref.stub.proj\" />\n  </ItemGroup>\n\n  <ItemGroup>\n    <!-- Internal sentil project for transporting a non-stable version. -->\n    <ProjectReference Include=\"src\\Microsoft.WindowsDesktop.App.Internal\\Microsoft.WindowsDesktop.App.Internal.proj\" />\n  </ItemGroup>\n\n</Project>\n"
  },
  {
    "path": "CODE-OF-CONDUCT.md",
    "content": "# Code of Conduct\n\nThis project has adopted the code of conduct defined by the Contributor Covenant\nto clarify expected behavior in our community.\n\nFor more information, see the [.NET Foundation Code of Conduct](https://dotnetfoundation.org/code-of-conduct).\n"
  },
  {
    "path": "CODEOWNERS",
    "content": "# Lines starting with '#' are comments.\n# Each line is a file pattern followed by one or more owners.\n\n# These owners will automatically be added as reviewers to all pull requests.\n*       @dotnet/dotnet-winforms\n"
  },
  {
    "path": "CONTRIBUTING.md",
    "content": "Contributing\n============\n\nSee [Contributing](https://github.com/dotnet/corefx/blob/master/Documentation/project-docs/contributing.md) for information about coding styles, source structure, making pull requests, and more.\n"
  },
  {
    "path": "Directory.Build.props",
    "content": "<Project>\n  <Import Project=\"Sdk.props\" Sdk=\"Microsoft.DotNet.Arcade.Sdk\" />\n  <PropertyGroup>\n    <!-- WiX v5 Configuration -->\n    <UseWix5>true</UseWix5>\n    \n    <!-- WiX v5 PDB Type Fix -->\n    <WixToolsetCompilerPdbType>full</WixToolsetCompilerPdbType>\n    <WixToolsetLinkerPdbType>full</WixToolsetLinkerPdbType>\n    \n    \n  <RunWixpackTargets>true</RunWixpackTargets>\n    \n    <!-- Packaging properties -->\n    <RepositoryUrl>https://github.com/dotnet/windowsdesktop</RepositoryUrl>\n    <PackageProjectUrl>https://dot.net</PackageProjectUrl>\n    <Owners>microsoft,dotnetframework</Owners>\n    <IncludeSymbols>true</IncludeSymbols>\n    <LicenseFile>$(MSBuildThisFileDirectory)LICENSE</LicenseFile>\n    <PackageLicenseExpression>MIT</PackageLicenseExpression>\n    <PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>\n    <Copyright>$(CopyrightNetFoundation)</Copyright>\n    <PackageThirdPartyNoticesFile>$(MSBuildThisFileDirectory)THIRD-PARTY-NOTICES.TXT</PackageThirdPartyNoticesFile>\n    <PackageReleaseNotes>https://go.microsoft.com/fwlink/?LinkID=799421</PackageReleaseNotes>\n\n    <!-- Set up handling of build warnings -->\n    <WarningLevel>4</WarningLevel>\n    <TreatWarningsAsErrors>true</TreatWarningsAsErrors>\n\n    <!-- Platform detection -->\n    <!-- Map Platform property to TargetArchitecture, but skip AnyCPU which is not valid for WiX -->\n    <TargetArchitecture Condition=\"'$(TargetArchitecture)' == '' AND '$(Platform)' != '' AND '$(Platform)' != 'AnyCPU'\">$(Platform)</TargetArchitecture>\n    <TargetArchitecture Condition=\"'$(TargetArchitecture)' == ''\">x64</TargetArchitecture>\n\n    <!-- Only upgrade NuGetAudit warnings to errors for official builds. -->\n    <WarningsNotAsErrors Condition=\"'$(OfficialBuild)' != 'true'\">$(WarningsNotAsErrors);NU1901;NU1902;NU1903;NU1904</WarningsNotAsErrors>\n\n    <!-- Builds are portable by default -->\n    <PortableBuild Condition=\"'$(PortableBuild)' != 'false'\">true</PortableBuild>\n  </PropertyGroup>\n\n  <PropertyGroup>\n    <OfficialBaseURL>https://builds.dotnet.microsoft.com/dotnet/</OfficialBaseURL>\n    <!-- Allow overriding the public base URL for Unified Build scenarios to pull assets from a local build. -->\n    <PublicBaseURL Condition=\"'$(PublicBaseURL)' == ''\">https://ci.dot.net/public/</PublicBaseURL>\n    <InternalBaseURL>https://ci.dot.net/internal/</InternalBaseURL>\n    <!-- Allow overriding where installers are pulled in from previously completed jobs in Unified Build scenarios. -->\n    <AddVersionToCrossArchitectureInstallerBasePath Condition=\"'$(CrossArchitectureInstallerBasePath)' != ''\">true</AddVersionToCrossArchitectureInstallerBasePath>\n    <CrossArchitectureInstallerBasePath Condition=\"'$(CrossArchitectureInstallerBasePath)' == ''\">$(ArtifactsShippingPackagesDir)</CrossArchitectureInstallerBasePath>\n  </PropertyGroup>\n\n  <!-- Try various places to find the runtime. It's either released (use official version),\n        public but un-released (use dotnetbuilds/public), or internal and unreleased (use dotnetbuilds/internal) -->\n  <ItemGroup Condition=\"'$(DotNetBuild)' != 'true'\">\n    <RemoteAssetBaseURL Include=\"$(OfficialBaseURL)\" />\n    <RemoteAssetBaseURL Include=\"$(PublicBaseURL)\" />\n    <!-- Include the token here as we'll generate the URLs to download based on this item group. -->\n    <RemoteAssetBaseURL Include=\"$(InternalBaseURL)\"\n                        Condition=\" '$(DotnetRuntimeSourceFeedKey)' != '' \">\n      <token>$(DotnetRuntimeSourceFeedKey)</token>\n    </RemoteAssetBaseURL>\n  </ItemGroup>\n\n  <!--\n    Only try downloading from the \"public\" base URL when doing a vertical build.\n    In a vertical build, the public URL will be overwritten to point to local build artifacts.\n  -->\n  <ItemGroup Condition=\"'$(DotNetBuild)' == 'true'\">\n    <!-- MSBuild removes the '//' slashes when passing PublicBaseURL from the outer to the inner build. -->\n    <RemoteAssetBaseURL Condition=\"$(PublicBaseURL.StartsWith('file:')) and '$(OS)' != 'Windows_NT'\" Include=\"$([System.Text.RegularExpressions.Regex]::Replace('$(PublicBaseURL)', '%28file:\\/{1,}%29%28.+%29', 'file:///%242'))\" />\n    <RemoteAssetBaseURL Condition=\"!$(PublicBaseURL.StartsWith('file:')) or '$(OS)' == 'Windows_NT'\" Include=\"$(PublicBaseURL)\" />\n  </ItemGroup>\n\n</Project>\n"
  },
  {
    "path": "Directory.Build.targets",
    "content": "<Project>\n\n  <Import Project=\"Sdk.targets\" Sdk=\"Microsoft.DotNet.Arcade.Sdk\" />\n \n  <PropertyGroup>\n    <!--\n      Define this here (not just in Versions.props) because the SDK resets it\n      unconditionally in Microsoft.NETCoreSdk.BundledVersions.props.\n    -->\n    <NETCoreAppMaximumVersion>$(MajorVersion).$(MinorVersion)</NETCoreAppMaximumVersion>\n  </PropertyGroup>\n\n</Project>\n"
  },
  {
    "path": "Directory.Packages.props",
    "content": "<Project>\n\n  <PropertyGroup>\n    <ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>\n    <CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled>\n    <!-- Using multiple feeds isn't supported by Maestro: https://github.com/dotnet/arcade/issues/14155. -->\n    <NoWarn>$(NoWarn);NU1507</NoWarn>\n  </PropertyGroup>\n\n  <ItemGroup>\n    <!-- Arcade dependencies -->\n    <PackageVersion Include=\"Microsoft.DotNet.Build.Tasks.Archives\" Version=\"$(MicrosoftDotNetBuildTasksArchivesVersion)\" />\n    <PackageVersion Include=\"Microsoft.DotNet.Build.Tasks.Installers\" Version=\"$(MicrosoftDotNetBuildTasksInstallersVersion)\" />\n    <PackageVersion Include=\"Microsoft.DotNet.Build.Tasks.Templating\" Version=\"$(MicrosoftDotNetBuildTasksTemplatingVersion)\" />\n\n    <!-- CoreFx dependencies -->\n    <PackageVersion Include=\"System.Data.DataSetExtensions\" Version=\"$(SystemDataDataSetExtensionsVersion)\" />\n    <PackageVersion Include=\"System.Data.SqlClient\" Version=\"$(SystemDataSqlClientVersion)\" />\n    <PackageVersion Include=\"System.Reflection.Emit.ILGeneration\" Version=\"$(SystemReflectionEmitILGenerationVersion)\" />\n    <PackageVersion Include=\"System.Reflection.Emit.Lightweight\" Version=\"$(SystemReflectionEmitLightweightVersion)\" />\n    <PackageVersion Include=\"System.Reflection.Emit\" Version=\"$(SystemReflectionEmitVersion)\" />\n\n    <!-- NuGet dependencies -->\n    <PackageVersion Include=\"NuGet.Packaging\" Version=\"$(NuGetPackagingVersion)\" />\n\n    <!-- Runtime dependencies -->\n    <PackageVersion Include=\"Microsoft.Win32.Registry.AccessControl\" Version=\"$(MicrosoftWin32RegistryAccessControlVersion)\" />\n    <PackageVersion Include=\"Microsoft.Win32.Registry\" Version=\"$(MicrosoftWin32RegistryVersion)\" />\n    <PackageVersion Include=\"Microsoft.Win32.SystemEvents\" Version=\"$(MicrosoftWin32SystemEventsVersion)\" />\n    <PackageVersion Include=\"System.CodeDom\" Version=\"$(SystemCodeDomVersion)\" />\n    <PackageVersion Include=\"System.ComponentModel.Composition.Registration\" Version=\"$(SystemComponentModelCompositionRegistrationVersion)\" />\n    <PackageVersion Include=\"System.ComponentModel.Composition\" Version=\"$(SystemComponentModelCompositionVersion)\" />\n    <PackageVersion Include=\"System.Configuration.ConfigurationManager\" Version=\"$(SystemConfigurationConfigurationManagerVersion)\" />\n    <PackageVersion Include=\"System.Data.Odbc\" Version=\"$(SystemDataOdbcVersion)\" />\n    <PackageVersion Include=\"System.Data.OleDb\" Version=\"$(SystemDataOleDbVersion)\" />\n    <PackageVersion Include=\"System.Diagnostics.EventLog\" Version=\"$(SystemDiagnosticsEventLogVersion)\" />\n    <PackageVersion Include=\"System.Diagnostics.PerformanceCounter\" Version=\"$(SystemDiagnosticsPerformanceCounterVersion)\" />\n    <PackageVersion Include=\"System.DirectoryServices.AccountManagement\" Version=\"$(SystemDirectoryServicesAccountManagementVersion)\" />\n    <PackageVersion Include=\"System.DirectoryServices.Protocols\" Version=\"$(SystemDirectoryServicesProtocolsVersion)\" />\n    <PackageVersion Include=\"System.DirectoryServices\" Version=\"$(SystemDirectoryServicesVersion)\" />\n    <PackageVersion Include=\"System.IO.FileSystem.AccessControl\" Version=\"$(SystemIOFileSystemAccessControlVersion)\" />\n    <PackageVersion Include=\"System.IO.Packaging\" Version=\"$(SystemIOPackagingVersion)\" />\n    <PackageVersion Include=\"System.IO.Pipes.AccessControl\" Version=\"$(SystemIOPipesAccessControlVersion)\" />\n    <PackageVersion Include=\"System.IO.Ports\" Version=\"$(SystemIOPortsVersion)\" />\n    <PackageVersion Include=\"System.Management\" Version=\"$(SystemManagementVersion)\" />\n    <PackageVersion Include=\"System.Reflection.Context\" Version=\"$(SystemReflectionContextVersion)\" />\n    <PackageVersion Include=\"System.Runtime.Caching\" Version=\"$(SystemRuntimeCachingVersion)\" />\n    <PackageVersion Include=\"System.Security.AccessControl\" Version=\"$(SystemSecurityAccessControlVersion)\" />\n    <PackageVersion Include=\"System.Security.Cryptography.Cng\" Version=\"$(SystemSecurityCryptographyCngVersion)\" />\n    <PackageVersion Include=\"System.Security.Cryptography.Pkcs\" Version=\"$(SystemSecurityCryptographyPkcsVersion)\" />\n    <PackageVersion Include=\"System.Security.Cryptography.ProtectedData\" Version=\"$(SystemSecurityCryptographyProtectedDataVersion)\" />\n    <PackageVersion Include=\"System.Security.Cryptography.Xml\" Version=\"$(SystemSecurityCryptographyXmlVersion)\" />\n    <PackageVersion Include=\"System.Security.Permissions\" Version=\"$(SystemSecurityPermissionsVersion)\" />\n    <PackageVersion Include=\"System.Security.Principal.Windows\" Version=\"$(SystemSecurityPrincipalWindowsVersion)\" />\n    <PackageVersion Include=\"System.ServiceModel.Syndication\" Version=\"$(SystemServiceModelSyndicationVersion)\" />\n    <PackageVersion Include=\"System.ServiceProcess.ServiceController\" Version=\"$(SystemServiceProcessServiceControllerVersion)\" />\n    <PackageVersion Include=\"System.Speech\" Version=\"$(SystemSpeechVersion)\" />\n    <PackageVersion Include=\"System.Text.Encoding.CodePages\" Version=\"$(SystemTextEncodingCodePagesVersion)\" />\n    <PackageVersion Include=\"System.Threading.AccessControl\" Version=\"$(SystemThreadingAccessControlVersion)\" />\n\n    <!-- WCF dependencies -->\n    <PackageVersion Include=\"System.ServiceModel.Http\" Version=\"$(SystemServiceModelVersion)\" />\n    <PackageVersion Include=\"System.ServiceModel.NetTcp\" Version=\"$(SystemServiceModelVersion)\" />\n    <PackageVersion Include=\"System.ServiceModel.Primitives\" Version=\"$(SystemServiceModelVersion)\" />\n    <PackageVersion Include=\"System.Web.Services.Description\" Version=\"$(SystemServiceModelVersion)\" />\n\n    <!-- WinForms dependencies -->\n    <PackageVersion Include=\"Microsoft.Private.Winforms\" Version=\"$(MicrosoftPrivateWinformsVersion)\" />\n    <PackageVersion Include=\"System.Drawing.Common\" Version=\"$(SystemDrawingCommonVersion)\" />\n\n    <!-- WPF dependencies-->\n    <PackageVersion Include=\"Microsoft.DotNet.Wpf.GitHub\" Version=\"$(MicrosoftDotNetWpfGitHubVersion)\" />\n    <PackageVersion Include=\"Microsoft.Internal.Runtime.WindowsDesktop.Transport\" Version=\"$(MicrosoftInternalRuntimeWindowsDesktopTransportVersion)\" />\n\n    <!-- WiX dependencies -->\n    <PackageVersion Include=\"Microsoft.Wix\" Version=\"$(MicrosoftWixToolsetSdkVersion)\" />\n    <PackageVersion Include=\"Microsoft.WixToolset.Bal.wixext\" Version=\"$(MicrosoftWixToolsetSdkVersion)\" />\n    <PackageVersion Include=\"Microsoft.WixToolset.Dependency.wixext\" Version=\"$(MicrosoftWixToolsetSdkVersion)\" />\n    <PackageVersion Include=\"Microsoft.WixToolset.Heat\" Version=\"$(MicrosoftWixToolsetSdkVersion)\" />\n    <PackageVersion Include=\"Microsoft.WixToolset.UI.wixext\" Version=\"$(MicrosoftWixToolsetSdkVersion)\" />\n    <PackageVersion Include=\"Microsoft.WixToolset.Util.wixext\" Version=\"$(MicrosoftWixToolsetSdkVersion)\" />\n    \n  </ItemGroup>\n\n</Project>\n"
  },
  {
    "path": "LICENSE",
    "content": "The MIT License (MIT)\n\nCopyright (c) .NET Foundation and Contributors\n\nAll rights reserved.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE."
  },
  {
    "path": "NuGet.config",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<configuration>\n  <!-- Don't use any higher level config files.\n       Our builds need to be isolated from user/machine state -->\n  <fallbackPackageFolders>\n    <clear />\n  </fallbackPackageFolders>\n  <packageSources>\n    <clear />\n    <add key=\"dotnet-eng\" value=\"https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json\" />\n    <add key=\"dotnet-tools\" value=\"https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json\" />\n    <add key=\"dotnet9\" value=\"https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet9/nuget/v3/index.json\" />\n    <add key=\"dotnet9-transport\" value=\"https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet9-transport/nuget/v3/index.json\" />\n    <add key=\"dotnet10\" value=\"https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet10/nuget/v3/index.json\" />\n    <add key=\"dotnet10-transport\" value=\"https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet10-transport/nuget/v3/index.json\" />\n    <add key=\"dotnet11\" value=\"https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet11/nuget/v3/index.json\" />\n    <add key=\"dotnet11-transport\" value=\"https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet11-transport/nuget/v3/index.json\" />\n    <add key=\"dotnet-public\" value=\"https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json\" />\n  </packageSources>\n  <disabledPackageSources>\n    <clear />\n  </disabledPackageSources>\n</configuration>\n"
  },
  {
    "path": "README.md",
    "content": "# .NET Windows Desktop Runtime\n\nThis repo contains the code to build the .NET Windows Desktop Runtime for all\nsupported platforms.\n\n## Getting started\n\n* [.NET 9 SDK](https://dotnet.microsoft.com/en-us/download/dotnet)\n* [Windows Forms repository](https://github.com/dotnet/winforms)\n* [WPF repository](https://github.com/dotnet/wpf)\n\n## How to Engage, Contribute and Provide Feedback\n\nSome of the best ways to contribute are to try things out, file bugs, join in\ndesign conversations, and fix issues.\n\n* This repo defines [contributing guidelines](CONTRIBUTING.md) and also follows\n  the more general [.NET Core contributing\n  guide](https://github.com/dotnet/runtime/blob/master/CONTRIBUTING.md).\n* If you have a question or have found a bug, [file an\n  issue](https://github.com/dotnet/windowsdesktop/issues/new).\n\n### Reporting security issues and security bugs\n\nSecurity issues and bugs should be reported privately, via email, to the\nMicrosoft Security Response Center (MSRC) <secure@microsoft.com>. You should\nreceive a response within 24 hours. If for some reason you do not, please follow\nup via email to ensure we received your original message. Further information,\nincluding the MSRC PGP key, can be found in the [Security\nTechCenter](https://www.microsoft.com/msrc/faqs-report-an-issue).\n\nAlso see info about related [Microsoft .NET Core and ASP.NET Core Bug Bounty\nProgram](https://www.microsoft.com/msrc/bounty-dot-net-core).\n\n### .NET Framework issues\n\nIssues with .NET Framework should be filed on [VS developer\ncommunity](https://developercommunity.visualstudio.com/spaces/61/index.html), or\n[Product Support](https://support.microsoft.com/en-us/contactus?ws=support).\nThey should not be filed on this repo.\n\n## Code of Conduct\n\nThis project uses the [.NET Foundation Code of\nConduct](https://dotnetfoundation.org/code-of-conduct) to define expected\nconduct in our community. Instances of abusive, harassing, or otherwise\nunacceptable behavior may be reported by contacting a project maintainer at\nconduct@dotnetfoundation.org.\n\n## License\n\n.NET (including the WindowsDesktop repo) is licensed under the [MIT license](LICENSE.TXT).\n\n## Officially Released Builds\n\nDownload official .NET releases [here](https://www.microsoft.com/net/download#core).\n"
  },
  {
    "path": "WindowsDesktop.sln",
    "content": "Microsoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio Version 17\nVisualStudioVersion = 17.5.2.0\nMinimumVisualStudioVersion = 10.0.40219.1\nProject(\"{2150E333-8FDC-42A3-9474-1A3956D46DE8}\") = \"eng\", \"eng\", \"{7525B257-249C-EE79-B10A-65D0BC27ABA9}\"\nEndProject\nProject(\"{2150E333-8FDC-42A3-9474-1A3956D46DE8}\") = \"src\", \"src\", \"{827E0CD3-B72D-47B6-A68D-7590B98EB39B}\"\nEndProject\nProject(\"{2150E333-8FDC-42A3-9474-1A3956D46DE8}\") = \"common\", \"common\", \"{C3C130B5-2C3F-D4B2-E3F3-EC385075C7AB}\"\nEndProject\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"Tools\", \"eng\\common\\internal\\Tools.csproj\", \"{4F21FD48-C11F-D5EF-ADE2-1691A92E45C5}\"\nEndProject\nProject(\"{2150E333-8FDC-42A3-9474-1A3956D46DE8}\") = \"Microsoft.Windows.Compatibility\", \"Microsoft.Windows.Compatibility\", \"{292A50E1-7820-1638-6BA6-14FBE6B99F15}\"\nEndProject\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"runtime.native.System.IO.Ports\", \"src\\Microsoft.Windows.Compatibility\\package\\runtime.native.System.IO.Ports.csproj\", \"{E47F785E-FA7A-58A1-D296-8C8F02432E6F}\"\nEndProject\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"Microsoft.Windows.Compatibility\", \"src\\Microsoft.Windows.Compatibility\\src\\Microsoft.Windows.Compatibility.csproj\", \"{B4E26156-D23F-346E-920D-DB46A8C16C8E}\"\nEndProject\nProject(\"{2150E333-8FDC-42A3-9474-1A3956D46DE8}\") = \"windowsdesktop\", \"windowsdesktop\", \"{B1DEBE5E-C067-B350-5F22-0DD39AD9FFE8}\"\nEndProject\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"Microsoft.WindowsDesktop.App.Tests\", \"src\\windowsdesktop\\tests\\Microsoft.WindowsDesktop.App.Tests.csproj\", \"{DDF86961-3AF2-FBA0-E08B-F367E1ABC517}\"\nEndProject\nGlobal\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n\t\tDebug|Any CPU = Debug|Any CPU\n\t\tRelease|Any CPU = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n\t\t{4F21FD48-C11F-D5EF-ADE2-1691A92E45C5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{4F21FD48-C11F-D5EF-ADE2-1691A92E45C5}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{4F21FD48-C11F-D5EF-ADE2-1691A92E45C5}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{4F21FD48-C11F-D5EF-ADE2-1691A92E45C5}.Release|Any CPU.Build.0 = Release|Any CPU\n\t\t{E47F785E-FA7A-58A1-D296-8C8F02432E6F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{E47F785E-FA7A-58A1-D296-8C8F02432E6F}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{E47F785E-FA7A-58A1-D296-8C8F02432E6F}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{E47F785E-FA7A-58A1-D296-8C8F02432E6F}.Release|Any CPU.Build.0 = Release|Any CPU\n\t\t{B4E26156-D23F-346E-920D-DB46A8C16C8E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{B4E26156-D23F-346E-920D-DB46A8C16C8E}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{B4E26156-D23F-346E-920D-DB46A8C16C8E}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{B4E26156-D23F-346E-920D-DB46A8C16C8E}.Release|Any CPU.Build.0 = Release|Any CPU\n\t\t{DDF86961-3AF2-FBA0-E08B-F367E1ABC517}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{DDF86961-3AF2-FBA0-E08B-F367E1ABC517}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{DDF86961-3AF2-FBA0-E08B-F367E1ABC517}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{DDF86961-3AF2-FBA0-E08B-F367E1ABC517}.Release|Any CPU.Build.0 = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(SolutionProperties) = preSolution\n\t\tHideSolutionNode = FALSE\n\tEndGlobalSection\n\tGlobalSection(NestedProjects) = preSolution\n\t\t{C3C130B5-2C3F-D4B2-E3F3-EC385075C7AB} = {7525B257-249C-EE79-B10A-65D0BC27ABA9}\n\t\t{4F21FD48-C11F-D5EF-ADE2-1691A92E45C5} = {C3C130B5-2C3F-D4B2-E3F3-EC385075C7AB}\n\t\t{292A50E1-7820-1638-6BA6-14FBE6B99F15} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B}\n\t\t{E47F785E-FA7A-58A1-D296-8C8F02432E6F} = {292A50E1-7820-1638-6BA6-14FBE6B99F15}\n\t\t{B4E26156-D23F-346E-920D-DB46A8C16C8E} = {292A50E1-7820-1638-6BA6-14FBE6B99F15}\n\t\t{B1DEBE5E-C067-B350-5F22-0DD39AD9FFE8} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B}\n\t\t{DDF86961-3AF2-FBA0-E08B-F367E1ABC517} = {B1DEBE5E-C067-B350-5F22-0DD39AD9FFE8}\n\tEndGlobalSection\n\tGlobalSection(ExtensibilityGlobals) = postSolution\n\t\tSolutionGuid = {B96CF507-B5D5-4809-9C1C-7948C55C80FB}\n\tEndGlobalSection\nEndGlobal\n"
  },
  {
    "path": "azure-pipelines-PR.yml",
    "content": "trigger:\n  batch: true\n  branches:\n    include:\n    - main\n    - release/*\n\npr:\n- main\n- release/*\n\nvariables:\n  - name: TeamName\n    value: dotnet-core-acquisition\n  # Skip Running CI tests\n  - name: SkipTests\n    value: false\n  # Produce test-signed build for PR and Public builds\n  - name: SignType\n    value: test\n\nstages:\n- stage: Build\n  jobs:\n\n  # Windows x64\n  - template: /eng/pipelines/jobs/windows-build-PR.yml\n    parameters:\n      name: win_x64\n      displayName: win-x64\n      targetArchitecture: x64\n\n  # Windows x86\n  - template: /eng/pipelines/jobs/windows-build-PR.yml\n    parameters:\n      name: win_x86\n      displayName: win-x86\n      targetArchitecture: x86\n\n  # Windows arm64\n  - template: /eng/pipelines/jobs/windows-build-PR.yml\n    parameters:\n      name: win_arm64\n      displayName: win-arm64\n      targetArchitecture: arm64\n"
  },
  {
    "path": "azure-pipelines.yml",
    "content": "variables:\n  - name: _PublishUsingPipelines\n    value: false\n  - template: /eng/common/templates-official/variables/pool-providers.yml@self\n\ntrigger:\n  batch: true\n  branches:\n    include:\n      - main\n      - release/*\n\npr: none\n\nresources:\n  repositories:\n  - repository: 1ESPipelineTemplates\n    type: git\n    name: 1ESPipelineTemplates/1ESPipelineTemplates\n    ref: refs/tags/release\nextends:\n  template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates\n  parameters:\n    sdl:\n      createAdoIssuesForJustificationsForDisablement: false\n      sourceAnalysisPool:\n        name: $(DncEngInternalBuildPool)\n        image: 1es-windows-2022\n        os: windows\n    stages:\n    - stage: build\n      displayName: Build\n      jobs:\n      - template: /eng/common/templates-official/jobs/jobs.yml@self\n        parameters:\n          enablePublishBuildArtifacts: true\n          enablePublishBuildAssets: false\n          enablePublishTestResults: false\n          publishAssetsImmediately: true\n          isAssetlessBuild: true\n          enableTelemetry: true"
  },
  {
    "path": "build.cmd",
    "content": "@echo off\npowershell -ExecutionPolicy ByPass -NoProfile -command \"& \"\"\"%~dp0eng\\common\\Build.ps1\"\"\" -restore -build %*\"\n"
  },
  {
    "path": "build.sh",
    "content": "#!/usr/bin/env bash\n\nsource=\"${BASH_SOURCE[0]}\"\n\n# resolve $SOURCE until the file is no longer a symlink\nwhile [[ -h $source ]]; do\n  scriptroot=\"$( cd -P \"$( dirname \"$source\" )\" && pwd )\"\n  source=\"$(readlink \"$source\")\"\n\n  # if $source was a relative symlink, we need to resolve it relative to the path where the\n  # symlink file was located\n  [[ $source != /* ]] && source=\"$scriptroot/$source\"\ndone\n\nscriptroot=\"$( cd -P \"$( dirname \"$source\" )\" && pwd )\"\n\"$scriptroot/eng/common/build.sh\" --restore --build $@"
  },
  {
    "path": "eng/Build.props",
    "content": "<Project>\n\n  <ItemGroup>\n    <ProjectToBuild Include=\"$(RepoRoot)Build.proj\" />\n  </ItemGroup>\n\n</Project>\n"
  },
  {
    "path": "eng/Publishing.props",
    "content": "<Project>\n\n  <PropertyGroup>\n    <ProducesDotNetReleaseShippingAssets>true</ProducesDotNetReleaseShippingAssets>\n    <!-- This avoids creating VS.*.symbols.nupkg packages that are identical to the original package. -->\n    <AutoGenerateSymbolPackages>false</AutoGenerateSymbolPackages>\n    <!-- Set PlatformName to TargetArchitecture to create unique build manifest files. -->\n    <PlatformName Condition=\"'$(TargetArchitecture)' != ''\">$(TargetArchitecture)</PlatformName>\n  </PropertyGroup>\n\n  <!--\n    Only generate the productVersion.txt and windowsdesktop-productVersion.txt files when we're building\n    the .NET product (DotNetBuild=true) in BP1 or when building the repository standalone not as part of the .NET product.\n  -->\n  <PropertyGroup>\n    <ShouldGenerateProductVersionFiles Condition=\"'$(DotNetBuild)' == 'true' and '$(EnableDefaultRidSpecificArtifacts)' != 'true' and ('$(DotNetBuildPass)' == '' or '$(DotNetBuildPass)' == '1')\">true</ShouldGenerateProductVersionFiles>\n    <ShouldGenerateProductVersionFiles Condition=\"'$(DotNetBuild)' != 'true' and '$(EnableDefaultArtifacts)' == 'true'\">true</ShouldGenerateProductVersionFiles>\n  </PropertyGroup>\n\n  <Target Name=\"GetNonStableProductVersion\">\n    <!-- Retrieve the non-stable runtime pack product version.\n         Don't stabilize the package version in order to retrieve the VersionSuffix. -->\n    <MSBuild Projects=\"$(RepoRoot)src/windowsdesktop/src/sfx/Microsoft.WindowsDesktop.App.Runtime.sfxproj\"\n             Targets=\"ReturnProductVersion\"\n             Properties=\"IsShipping=false\">\n      <Output TaskParameter=\"TargetOutputs\" PropertyName=\"NonStableProductVersion\" />\n    </MSBuild>\n  </Target>\n\n  <!-- This target only runs when EnableDefaultArtifacts=true which is a single build leg in CI. -->\n  <Target Name=\"GenerateProductVersionFiles\"\n          DependsOnTargets=\"GetNonStableProductVersion\"\n          BeforeTargets=\"AddRelativeBlobPathToBlobArtifacts;PublishToAzureDevOpsArtifacts\"\n          Condition=\"'$(ShouldGenerateProductVersionFiles)' == 'true'\">\n    <!-- Retrieve the runtime pack version -->\n    <MSBuild Projects=\"$(RepoRoot)src/windowsdesktop/src/sfx/Microsoft.WindowsDesktop.App.Runtime.sfxproj\"\n             Targets=\"ReturnProductVersion\">\n      <Output TaskParameter=\"TargetOutputs\" PropertyName=\"ProductVersion\" />\n    </MSBuild>\n\n    <ItemGroup>\n      <ProductVersionFile Include=\"$(ArtifactsShippingPackagesDir)productVersion.txt\" />\n      <ProductVersionFile Include=\"$(ArtifactsShippingPackagesDir)windowsdesktop-productVersion.txt\" />\n    </ItemGroup>\n\n    <!-- Generate productVersion.txt file containing the product version. -->\n    <WriteLinesToFile File=\"%(ProductVersionFile.Identity)\"\n                      Lines=\"$(ProductVersion)\"\n                      Overwrite=\"true\"\n                      Encoding=\"ASCII\" />\n\n    <ItemGroup>\n      <Artifact Include=\"@(ProductVersionFile)\" Kind=\"Blob\" />\n    </ItemGroup>\n  </Target>\n\n  <Target Name=\"AddRelativeBlobPathToBlobArtifacts\"\n          DependsOnTargets=\"GetNonStableProductVersion\"\n          BeforeTargets=\"PublishToAzureDevOpsArtifacts\"\n          AfterTargets=\"GenerateChecksumsFromArtifacts\">\n    <ItemGroup>\n      <Artifact Condition=\"'%(Artifact.Kind)' == 'Blob' and '%(Artifact.RelativeBlobPath)' == ''\"\n                RelativeBlobPath=\"WindowsDesktop/$(NonStableProductVersion)/%(Filename)%(Extension)\" />\n    </ItemGroup>\n  </Target>\n\n</Project>\n"
  },
  {
    "path": "eng/Signing.props",
    "content": "<Project>\n\n  <PropertyGroup>\n    <UseDotNetCertificate>true</UseDotNetCertificate>\n    <!-- Don't sign and publish rid agnostic nuget packages from other builds than win-x64 when not building inside the VMR. -->\n    <EnableDefaultArtifacts Condition=\"'$(DotNetBuild)' != 'true' and\n                                       '$(TargetArchitecture)' != 'x64' and\n                                       '$(TargetArchitecture)' != ''\">false</EnableDefaultArtifacts>\n  </PropertyGroup>\n\n  <!-- Include installers -->\n  <ItemGroup>\n    <Artifact Include=\"$(ArtifactsPackagesDir)**\\*.tar.gz;\n                       $(ArtifactsPackagesDir)**\\*.zip;\n                       $(ArtifactsPackagesDir)**\\*.exe;\n                       $(ArtifactsPackagesDir)**\\*.msi\"\n              Kind=\"Blob\"\n              IsShipping=\"$([System.String]::Copy('%(RecursiveDir)').StartsWith('Shipping'))\">\n      <!-- Exclude wixpack.zip files from checksum generation -->\n      <ChecksumPath Condition=\"$([System.String]::Copy('%(Filename)%(Extension)').EndsWith('.wixpack.zip')) != 'true'\">%(FullPath).sha512</ChecksumPath>\n    </Artifact>\n  </ItemGroup>\n\n  <!-- Include RID specific packages when default items are disabled. -->\n  <ItemGroup Condition=\"'$(EnableDefaultArtifacts)' != 'true'\">\n    <Artifact Include=\"$(ArtifactsPackagesDir)**\\Microsoft.WindowsDesktop.App.Runtime.*.nupkg;\n                       $(ArtifactsPackagesDir)**\\VS.Redist.Common.WindowsDesktop.*.nupkg\"\n              IsShipping=\"$([System.String]::Copy('%(RecursiveDir)').StartsWith('Shipping'))\"\n              Kind=\"Package\" />\n  </ItemGroup>\n\n</Project>\n"
  },
  {
    "path": "eng/Version.Details.props",
    "content": "<!--\nThis file is auto-generated by the Maestro dependency flow system.\nDo not edit it manually, as it will get overwritten by automation.\nThis file should be imported by eng/Versions.props\n-->\n<Project>\n  <PropertyGroup>\n    <!-- dotnet-dotnet dependencies -->\n    <MicrosoftDotNetArcadeSdkPackageVersion>11.0.0-beta.26230.101</MicrosoftDotNetArcadeSdkPackageVersion>\n    <MicrosoftDotNetBuildTasksArchivesPackageVersion>11.0.0-beta.26230.101</MicrosoftDotNetBuildTasksArchivesPackageVersion>\n    <MicrosoftDotNetBuildTasksFeedPackageVersion>11.0.0-beta.26230.101</MicrosoftDotNetBuildTasksFeedPackageVersion>\n    <MicrosoftDotNetBuildTasksInstallersPackageVersion>11.0.0-beta.26230.101</MicrosoftDotNetBuildTasksInstallersPackageVersion>\n    <MicrosoftDotNetBuildTasksTemplatingPackageVersion>11.0.0-beta.26230.101</MicrosoftDotNetBuildTasksTemplatingPackageVersion>\n    <MicrosoftDotNetSharedFrameworkSdkPackageVersion>11.0.0-beta.26230.101</MicrosoftDotNetSharedFrameworkSdkPackageVersion>\n    <MicrosoftDotnetWinFormsProjectTemplatesPackageVersion>11.0.0-preview.5.26230.101</MicrosoftDotnetWinFormsProjectTemplatesPackageVersion>\n    <MicrosoftDotNetWpfGitHubPackageVersion>11.0.0-preview.5.26230.101</MicrosoftDotNetWpfGitHubPackageVersion>\n    <MicrosoftDotNetWpfProjectTemplatesPackageVersion>11.0.0-preview.5.26230.101</MicrosoftDotNetWpfProjectTemplatesPackageVersion>\n    <MicrosoftInternalRuntimeWindowsDesktopTransportPackageVersion>11.0.0-preview.5.26230.101</MicrosoftInternalRuntimeWindowsDesktopTransportPackageVersion>\n    <MicrosoftNETSdkWindowsDesktopPackageVersion>11.0.0-preview.5.26230.101</MicrosoftNETSdkWindowsDesktopPackageVersion>\n    <MicrosoftNETCoreAppRefPackageVersion>11.0.0-preview.5.26230.101</MicrosoftNETCoreAppRefPackageVersion>\n    <MicrosoftNETCorePlatformsPackageVersion>11.0.0-preview.5.26230.101</MicrosoftNETCorePlatformsPackageVersion>\n    <MicrosoftPrivateWinformsPackageVersion>11.0.0-preview.5.26230.101</MicrosoftPrivateWinformsPackageVersion>\n    <MicrosoftWin32RegistryAccessControlPackageVersion>11.0.0-preview.5.26230.101</MicrosoftWin32RegistryAccessControlPackageVersion>\n    <MicrosoftWin32SystemEventsPackageVersion>11.0.0-preview.5.26230.101</MicrosoftWin32SystemEventsPackageVersion>\n    <SystemCodeDomPackageVersion>11.0.0-preview.5.26230.101</SystemCodeDomPackageVersion>\n    <SystemComponentModelCompositionPackageVersion>11.0.0-preview.5.26230.101</SystemComponentModelCompositionPackageVersion>\n    <SystemComponentModelCompositionRegistrationPackageVersion>11.0.0-preview.5.26230.101</SystemComponentModelCompositionRegistrationPackageVersion>\n    <SystemConfigurationConfigurationManagerPackageVersion>11.0.0-preview.5.26230.101</SystemConfigurationConfigurationManagerPackageVersion>\n    <SystemDataOdbcPackageVersion>11.0.0-preview.5.26230.101</SystemDataOdbcPackageVersion>\n    <SystemDataOleDbPackageVersion>11.0.0-preview.5.26230.101</SystemDataOleDbPackageVersion>\n    <SystemDiagnosticsEventLogPackageVersion>11.0.0-preview.5.26230.101</SystemDiagnosticsEventLogPackageVersion>\n    <SystemDiagnosticsPerformanceCounterPackageVersion>11.0.0-preview.5.26230.101</SystemDiagnosticsPerformanceCounterPackageVersion>\n    <SystemDirectoryServicesPackageVersion>11.0.0-preview.5.26230.101</SystemDirectoryServicesPackageVersion>\n    <SystemDirectoryServicesAccountManagementPackageVersion>11.0.0-preview.5.26230.101</SystemDirectoryServicesAccountManagementPackageVersion>\n    <SystemDirectoryServicesProtocolsPackageVersion>11.0.0-preview.5.26230.101</SystemDirectoryServicesProtocolsPackageVersion>\n    <SystemDrawingCommonPackageVersion>11.0.0-preview.5.26230.101</SystemDrawingCommonPackageVersion>\n    <SystemIOPackagingPackageVersion>11.0.0-preview.5.26230.101</SystemIOPackagingPackageVersion>\n    <SystemIOPortsPackageVersion>11.0.0-preview.5.26230.101</SystemIOPortsPackageVersion>\n    <SystemManagementPackageVersion>11.0.0-preview.5.26230.101</SystemManagementPackageVersion>\n    <SystemReflectionContextPackageVersion>11.0.0-preview.5.26230.101</SystemReflectionContextPackageVersion>\n    <SystemRuntimeCachingPackageVersion>11.0.0-preview.5.26230.101</SystemRuntimeCachingPackageVersion>\n    <SystemSecurityCryptographyPkcsPackageVersion>11.0.0-preview.5.26230.101</SystemSecurityCryptographyPkcsPackageVersion>\n    <SystemSecurityCryptographyProtectedDataPackageVersion>11.0.0-preview.5.26230.101</SystemSecurityCryptographyProtectedDataPackageVersion>\n    <SystemSecurityCryptographyXmlPackageVersion>11.0.0-preview.5.26230.101</SystemSecurityCryptographyXmlPackageVersion>\n    <SystemSecurityPermissionsPackageVersion>11.0.0-preview.5.26230.101</SystemSecurityPermissionsPackageVersion>\n    <SystemServiceModelSyndicationPackageVersion>11.0.0-preview.5.26230.101</SystemServiceModelSyndicationPackageVersion>\n    <SystemServiceProcessServiceControllerPackageVersion>11.0.0-preview.5.26230.101</SystemServiceProcessServiceControllerPackageVersion>\n    <SystemSpeechPackageVersion>11.0.0-preview.5.26230.101</SystemSpeechPackageVersion>\n    <SystemTextEncodingCodePagesPackageVersion>11.0.0-preview.5.26230.101</SystemTextEncodingCodePagesPackageVersion>\n    <SystemThreadingAccessControlPackageVersion>11.0.0-preview.5.26230.101</SystemThreadingAccessControlPackageVersion>\n  </PropertyGroup>\n  <!--Property group for alternate package version names-->\n  <PropertyGroup>\n    <!-- dotnet-dotnet dependencies -->\n    <MicrosoftDotNetArcadeSdkVersion>$(MicrosoftDotNetArcadeSdkPackageVersion)</MicrosoftDotNetArcadeSdkVersion>\n    <MicrosoftDotNetBuildTasksArchivesVersion>$(MicrosoftDotNetBuildTasksArchivesPackageVersion)</MicrosoftDotNetBuildTasksArchivesVersion>\n    <MicrosoftDotNetBuildTasksFeedVersion>$(MicrosoftDotNetBuildTasksFeedPackageVersion)</MicrosoftDotNetBuildTasksFeedVersion>\n    <MicrosoftDotNetBuildTasksInstallersVersion>$(MicrosoftDotNetBuildTasksInstallersPackageVersion)</MicrosoftDotNetBuildTasksInstallersVersion>\n    <MicrosoftDotNetBuildTasksTemplatingVersion>$(MicrosoftDotNetBuildTasksTemplatingPackageVersion)</MicrosoftDotNetBuildTasksTemplatingVersion>\n    <MicrosoftDotNetSharedFrameworkSdkVersion>$(MicrosoftDotNetSharedFrameworkSdkPackageVersion)</MicrosoftDotNetSharedFrameworkSdkVersion>\n    <MicrosoftDotnetWinFormsProjectTemplatesVersion>$(MicrosoftDotnetWinFormsProjectTemplatesPackageVersion)</MicrosoftDotnetWinFormsProjectTemplatesVersion>\n    <MicrosoftDotNetWpfGitHubVersion>$(MicrosoftDotNetWpfGitHubPackageVersion)</MicrosoftDotNetWpfGitHubVersion>\n    <MicrosoftDotNetWpfProjectTemplatesVersion>$(MicrosoftDotNetWpfProjectTemplatesPackageVersion)</MicrosoftDotNetWpfProjectTemplatesVersion>\n    <MicrosoftInternalRuntimeWindowsDesktopTransportVersion>$(MicrosoftInternalRuntimeWindowsDesktopTransportPackageVersion)</MicrosoftInternalRuntimeWindowsDesktopTransportVersion>\n    <MicrosoftNETSdkWindowsDesktopVersion>$(MicrosoftNETSdkWindowsDesktopPackageVersion)</MicrosoftNETSdkWindowsDesktopVersion>\n    <MicrosoftNETCoreAppRefVersion>$(MicrosoftNETCoreAppRefPackageVersion)</MicrosoftNETCoreAppRefVersion>\n    <MicrosoftNETCorePlatformsVersion>$(MicrosoftNETCorePlatformsPackageVersion)</MicrosoftNETCorePlatformsVersion>\n    <MicrosoftPrivateWinformsVersion>$(MicrosoftPrivateWinformsPackageVersion)</MicrosoftPrivateWinformsVersion>\n    <MicrosoftWin32RegistryAccessControlVersion>$(MicrosoftWin32RegistryAccessControlPackageVersion)</MicrosoftWin32RegistryAccessControlVersion>\n    <MicrosoftWin32SystemEventsVersion>$(MicrosoftWin32SystemEventsPackageVersion)</MicrosoftWin32SystemEventsVersion>\n    <SystemCodeDomVersion>$(SystemCodeDomPackageVersion)</SystemCodeDomVersion>\n    <SystemComponentModelCompositionVersion>$(SystemComponentModelCompositionPackageVersion)</SystemComponentModelCompositionVersion>\n    <SystemComponentModelCompositionRegistrationVersion>$(SystemComponentModelCompositionRegistrationPackageVersion)</SystemComponentModelCompositionRegistrationVersion>\n    <SystemConfigurationConfigurationManagerVersion>$(SystemConfigurationConfigurationManagerPackageVersion)</SystemConfigurationConfigurationManagerVersion>\n    <SystemDataOdbcVersion>$(SystemDataOdbcPackageVersion)</SystemDataOdbcVersion>\n    <SystemDataOleDbVersion>$(SystemDataOleDbPackageVersion)</SystemDataOleDbVersion>\n    <SystemDiagnosticsEventLogVersion>$(SystemDiagnosticsEventLogPackageVersion)</SystemDiagnosticsEventLogVersion>\n    <SystemDiagnosticsPerformanceCounterVersion>$(SystemDiagnosticsPerformanceCounterPackageVersion)</SystemDiagnosticsPerformanceCounterVersion>\n    <SystemDirectoryServicesVersion>$(SystemDirectoryServicesPackageVersion)</SystemDirectoryServicesVersion>\n    <SystemDirectoryServicesAccountManagementVersion>$(SystemDirectoryServicesAccountManagementPackageVersion)</SystemDirectoryServicesAccountManagementVersion>\n    <SystemDirectoryServicesProtocolsVersion>$(SystemDirectoryServicesProtocolsPackageVersion)</SystemDirectoryServicesProtocolsVersion>\n    <SystemDrawingCommonVersion>$(SystemDrawingCommonPackageVersion)</SystemDrawingCommonVersion>\n    <SystemIOPackagingVersion>$(SystemIOPackagingPackageVersion)</SystemIOPackagingVersion>\n    <SystemIOPortsVersion>$(SystemIOPortsPackageVersion)</SystemIOPortsVersion>\n    <SystemManagementVersion>$(SystemManagementPackageVersion)</SystemManagementVersion>\n    <SystemReflectionContextVersion>$(SystemReflectionContextPackageVersion)</SystemReflectionContextVersion>\n    <SystemRuntimeCachingVersion>$(SystemRuntimeCachingPackageVersion)</SystemRuntimeCachingVersion>\n    <SystemSecurityCryptographyPkcsVersion>$(SystemSecurityCryptographyPkcsPackageVersion)</SystemSecurityCryptographyPkcsVersion>\n    <SystemSecurityCryptographyProtectedDataVersion>$(SystemSecurityCryptographyProtectedDataPackageVersion)</SystemSecurityCryptographyProtectedDataVersion>\n    <SystemSecurityCryptographyXmlVersion>$(SystemSecurityCryptographyXmlPackageVersion)</SystemSecurityCryptographyXmlVersion>\n    <SystemSecurityPermissionsVersion>$(SystemSecurityPermissionsPackageVersion)</SystemSecurityPermissionsVersion>\n    <SystemServiceModelSyndicationVersion>$(SystemServiceModelSyndicationPackageVersion)</SystemServiceModelSyndicationVersion>\n    <SystemServiceProcessServiceControllerVersion>$(SystemServiceProcessServiceControllerPackageVersion)</SystemServiceProcessServiceControllerVersion>\n    <SystemSpeechVersion>$(SystemSpeechPackageVersion)</SystemSpeechVersion>\n    <SystemTextEncodingCodePagesVersion>$(SystemTextEncodingCodePagesPackageVersion)</SystemTextEncodingCodePagesVersion>\n    <SystemThreadingAccessControlVersion>$(SystemThreadingAccessControlPackageVersion)</SystemThreadingAccessControlVersion>\n  </PropertyGroup>\n</Project>\n"
  },
  {
    "path": "eng/Version.Details.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Dependencies>\n  <Source Uri=\"https://github.com/dotnet/dotnet\" Mapping=\"windowsdesktop\" Sha=\"5d0de746ed8accbd81c2a5c3c7bfa4e70b2df80e\" BarId=\"312557\" />\n  <ProductDependencies>\n    <Dependency Name=\"Microsoft.Internal.Runtime.WindowsDesktop.Transport\" Version=\"11.0.0-preview.5.26230.101\">\n      <Uri>https://github.com/dotnet/dotnet</Uri>\n      <Sha>5d0de746ed8accbd81c2a5c3c7bfa4e70b2df80e</Sha>\n    </Dependency>\n    <Dependency Name=\"Microsoft.Private.Winforms\" Version=\"11.0.0-preview.5.26230.101\">\n      <Uri>https://github.com/dotnet/dotnet</Uri>\n      <Sha>5d0de746ed8accbd81c2a5c3c7bfa4e70b2df80e</Sha>\n    </Dependency>\n    <Dependency Name=\"Microsoft.DotNet.Wpf.GitHub\" Version=\"11.0.0-preview.5.26230.101\">\n      <Uri>https://github.com/dotnet/dotnet</Uri>\n      <Sha>5d0de746ed8accbd81c2a5c3c7bfa4e70b2df80e</Sha>\n    </Dependency>\n    <Dependency Name=\"Microsoft.NET.Sdk.WindowsDesktop\" Version=\"11.0.0-preview.5.26230.101\">\n      <Uri>https://github.com/dotnet/dotnet</Uri>\n      <Sha>5d0de746ed8accbd81c2a5c3c7bfa4e70b2df80e</Sha>\n    </Dependency>\n    <Dependency Name=\"Microsoft.NETCore.App.Ref\" Version=\"11.0.0-preview.5.26230.101\">\n      <Uri>https://github.com/dotnet/dotnet</Uri>\n      <Sha>5d0de746ed8accbd81c2a5c3c7bfa4e70b2df80e</Sha>\n    </Dependency>\n    <Dependency Name=\"Microsoft.NETCore.Platforms\" Version=\"11.0.0-preview.5.26230.101\">\n      <Uri>https://github.com/dotnet/dotnet</Uri>\n      <Sha>5d0de746ed8accbd81c2a5c3c7bfa4e70b2df80e</Sha>\n    </Dependency>\n    <Dependency Name=\"Microsoft.Dotnet.WinForms.ProjectTemplates\" Version=\"11.0.0-preview.5.26230.101\">\n      <Uri>https://github.com/dotnet/dotnet</Uri>\n      <Sha>5d0de746ed8accbd81c2a5c3c7bfa4e70b2df80e</Sha>\n    </Dependency>\n    <Dependency Name=\"Microsoft.DotNet.Wpf.ProjectTemplates\" Version=\"11.0.0-preview.5.26230.101\">\n      <Uri>https://github.com/dotnet/dotnet</Uri>\n      <Sha>5d0de746ed8accbd81c2a5c3c7bfa4e70b2df80e</Sha>\n    </Dependency>\n    <Dependency Name=\"Microsoft.Win32.Registry.AccessControl\" Version=\"11.0.0-preview.5.26230.101\">\n      <Uri>https://github.com/dotnet/dotnet</Uri>\n      <Sha>5d0de746ed8accbd81c2a5c3c7bfa4e70b2df80e</Sha>\n    </Dependency>\n    <Dependency Name=\"Microsoft.Win32.SystemEvents\" Version=\"11.0.0-preview.5.26230.101\">\n      <Uri>https://github.com/dotnet/dotnet</Uri>\n      <Sha>5d0de746ed8accbd81c2a5c3c7bfa4e70b2df80e</Sha>\n    </Dependency>\n    <Dependency Name=\"System.CodeDom\" Version=\"11.0.0-preview.5.26230.101\">\n      <Uri>https://github.com/dotnet/dotnet</Uri>\n      <Sha>5d0de746ed8accbd81c2a5c3c7bfa4e70b2df80e</Sha>\n    </Dependency>\n    <Dependency Name=\"System.ComponentModel.Composition\" Version=\"11.0.0-preview.5.26230.101\">\n      <Uri>https://github.com/dotnet/dotnet</Uri>\n      <Sha>5d0de746ed8accbd81c2a5c3c7bfa4e70b2df80e</Sha>\n    </Dependency>\n    <Dependency Name=\"System.Configuration.ConfigurationManager\" Version=\"11.0.0-preview.5.26230.101\">\n      <Uri>https://github.com/dotnet/dotnet</Uri>\n      <Sha>5d0de746ed8accbd81c2a5c3c7bfa4e70b2df80e</Sha>\n    </Dependency>\n    <Dependency Name=\"System.Data.Odbc\" Version=\"11.0.0-preview.5.26230.101\">\n      <Uri>https://github.com/dotnet/dotnet</Uri>\n      <Sha>5d0de746ed8accbd81c2a5c3c7bfa4e70b2df80e</Sha>\n    </Dependency>\n    <Dependency Name=\"System.Data.OleDb\" Version=\"11.0.0-preview.5.26230.101\">\n      <Uri>https://github.com/dotnet/dotnet</Uri>\n      <Sha>5d0de746ed8accbd81c2a5c3c7bfa4e70b2df80e</Sha>\n    </Dependency>\n    <Dependency Name=\"System.Diagnostics.EventLog\" Version=\"11.0.0-preview.5.26230.101\">\n      <Uri>https://github.com/dotnet/dotnet</Uri>\n      <Sha>5d0de746ed8accbd81c2a5c3c7bfa4e70b2df80e</Sha>\n    </Dependency>\n    <Dependency Name=\"System.Diagnostics.PerformanceCounter\" Version=\"11.0.0-preview.5.26230.101\">\n      <Uri>https://github.com/dotnet/dotnet</Uri>\n      <Sha>5d0de746ed8accbd81c2a5c3c7bfa4e70b2df80e</Sha>\n    </Dependency>\n    <Dependency Name=\"System.DirectoryServices.AccountManagement\" Version=\"11.0.0-preview.5.26230.101\">\n      <Uri>https://github.com/dotnet/dotnet</Uri>\n      <Sha>5d0de746ed8accbd81c2a5c3c7bfa4e70b2df80e</Sha>\n    </Dependency>\n    <Dependency Name=\"System.DirectoryServices.Protocols\" Version=\"11.0.0-preview.5.26230.101\">\n      <Uri>https://github.com/dotnet/dotnet</Uri>\n      <Sha>5d0de746ed8accbd81c2a5c3c7bfa4e70b2df80e</Sha>\n    </Dependency>\n    <Dependency Name=\"System.DirectoryServices\" Version=\"11.0.0-preview.5.26230.101\">\n      <Uri>https://github.com/dotnet/dotnet</Uri>\n      <Sha>5d0de746ed8accbd81c2a5c3c7bfa4e70b2df80e</Sha>\n    </Dependency>\n    <Dependency Name=\"System.IO.Packaging\" Version=\"11.0.0-preview.5.26230.101\">\n      <Uri>https://github.com/dotnet/dotnet</Uri>\n      <Sha>5d0de746ed8accbd81c2a5c3c7bfa4e70b2df80e</Sha>\n    </Dependency>\n    <Dependency Name=\"System.IO.Ports\" Version=\"11.0.0-preview.5.26230.101\">\n      <Uri>https://github.com/dotnet/dotnet</Uri>\n      <Sha>5d0de746ed8accbd81c2a5c3c7bfa4e70b2df80e</Sha>\n    </Dependency>\n    <Dependency Name=\"System.Management\" Version=\"11.0.0-preview.5.26230.101\">\n      <Uri>https://github.com/dotnet/dotnet</Uri>\n      <Sha>5d0de746ed8accbd81c2a5c3c7bfa4e70b2df80e</Sha>\n    </Dependency>\n    <Dependency Name=\"System.Reflection.Context\" Version=\"11.0.0-preview.5.26230.101\">\n      <Uri>https://github.com/dotnet/dotnet</Uri>\n      <Sha>5d0de746ed8accbd81c2a5c3c7bfa4e70b2df80e</Sha>\n    </Dependency>\n    <Dependency Name=\"System.Runtime.Caching\" Version=\"11.0.0-preview.5.26230.101\">\n      <Uri>https://github.com/dotnet/dotnet</Uri>\n      <Sha>5d0de746ed8accbd81c2a5c3c7bfa4e70b2df80e</Sha>\n    </Dependency>\n    <Dependency Name=\"System.Security.Cryptography.Pkcs\" Version=\"11.0.0-preview.5.26230.101\">\n      <Uri>https://github.com/dotnet/dotnet</Uri>\n      <Sha>5d0de746ed8accbd81c2a5c3c7bfa4e70b2df80e</Sha>\n    </Dependency>\n    <Dependency Name=\"System.Security.Cryptography.ProtectedData\" Version=\"11.0.0-preview.5.26230.101\">\n      <Uri>https://github.com/dotnet/dotnet</Uri>\n      <Sha>5d0de746ed8accbd81c2a5c3c7bfa4e70b2df80e</Sha>\n    </Dependency>\n    <Dependency Name=\"System.Security.Cryptography.Xml\" Version=\"11.0.0-preview.5.26230.101\">\n      <Uri>https://github.com/dotnet/dotnet</Uri>\n      <Sha>5d0de746ed8accbd81c2a5c3c7bfa4e70b2df80e</Sha>\n    </Dependency>\n    <Dependency Name=\"System.Security.Permissions\" Version=\"11.0.0-preview.5.26230.101\">\n      <Uri>https://github.com/dotnet/dotnet</Uri>\n      <Sha>5d0de746ed8accbd81c2a5c3c7bfa4e70b2df80e</Sha>\n    </Dependency>\n    <Dependency Name=\"System.ServiceModel.Syndication\" Version=\"11.0.0-preview.5.26230.101\">\n      <Uri>https://github.com/dotnet/dotnet</Uri>\n      <Sha>5d0de746ed8accbd81c2a5c3c7bfa4e70b2df80e</Sha>\n    </Dependency>\n    <Dependency Name=\"System.ServiceProcess.ServiceController\" Version=\"11.0.0-preview.5.26230.101\">\n      <Uri>https://github.com/dotnet/dotnet</Uri>\n      <Sha>5d0de746ed8accbd81c2a5c3c7bfa4e70b2df80e</Sha>\n    </Dependency>\n    <Dependency Name=\"System.Speech\" Version=\"11.0.0-preview.5.26230.101\">\n      <Uri>https://github.com/dotnet/dotnet</Uri>\n      <Sha>5d0de746ed8accbd81c2a5c3c7bfa4e70b2df80e</Sha>\n    </Dependency>\n    <Dependency Name=\"System.Text.Encoding.CodePages\" Version=\"11.0.0-preview.5.26230.101\">\n      <Uri>https://github.com/dotnet/dotnet</Uri>\n      <Sha>5d0de746ed8accbd81c2a5c3c7bfa4e70b2df80e</Sha>\n    </Dependency>\n    <Dependency Name=\"System.Threading.AccessControl\" Version=\"11.0.0-preview.5.26230.101\">\n      <Uri>https://github.com/dotnet/dotnet</Uri>\n      <Sha>5d0de746ed8accbd81c2a5c3c7bfa4e70b2df80e</Sha>\n    </Dependency>\n    <Dependency Name=\"System.ComponentModel.Composition.Registration\" Version=\"11.0.0-preview.5.26230.101\">\n      <Uri>https://github.com/dotnet/dotnet</Uri>\n      <Sha>5d0de746ed8accbd81c2a5c3c7bfa4e70b2df80e</Sha>\n    </Dependency>\n    <Dependency Name=\"System.Drawing.Common\" Version=\"11.0.0-preview.5.26230.101\">\n      <Uri>https://github.com/dotnet/dotnet</Uri>\n      <Sha>5d0de746ed8accbd81c2a5c3c7bfa4e70b2df80e</Sha>\n    </Dependency>\n  </ProductDependencies>\n  <ToolsetDependencies>\n    <Dependency Name=\"Microsoft.DotNet.Arcade.Sdk\" Version=\"11.0.0-beta.26230.101\">\n      <Uri>https://github.com/dotnet/dotnet</Uri>\n      <Sha>5d0de746ed8accbd81c2a5c3c7bfa4e70b2df80e</Sha>\n    </Dependency>\n    <Dependency Name=\"Microsoft.DotNet.Build.Tasks.Feed\" Version=\"11.0.0-beta.26230.101\">\n      <Uri>https://github.com/dotnet/dotnet</Uri>\n      <Sha>5d0de746ed8accbd81c2a5c3c7bfa4e70b2df80e</Sha>\n    </Dependency>\n    <Dependency Name=\"Microsoft.DotNet.SharedFramework.Sdk\" Version=\"11.0.0-beta.26230.101\">\n      <Uri>https://github.com/dotnet/dotnet</Uri>\n      <Sha>5d0de746ed8accbd81c2a5c3c7bfa4e70b2df80e</Sha>\n    </Dependency>\n    <Dependency Name=\"Microsoft.DotNet.Build.Tasks.Templating\" Version=\"11.0.0-beta.26230.101\">\n      <Uri>https://github.com/dotnet/dotnet</Uri>\n      <Sha>5d0de746ed8accbd81c2a5c3c7bfa4e70b2df80e</Sha>\n    </Dependency>\n    <Dependency Name=\"Microsoft.DotNet.Build.Tasks.Archives\" Version=\"11.0.0-beta.26230.101\">\n      <Uri>https://github.com/dotnet/dotnet</Uri>\n      <Sha>5d0de746ed8accbd81c2a5c3c7bfa4e70b2df80e</Sha>\n    </Dependency>\n    <Dependency Name=\"Microsoft.DotNet.Build.Tasks.Installers\" Version=\"11.0.0-beta.26230.101\">\n      <Uri>https://github.com/dotnet/dotnet</Uri>\n      <Sha>5d0de746ed8accbd81c2a5c3c7bfa4e70b2df80e</Sha>\n    </Dependency>\n  </ToolsetDependencies>\n</Dependencies>\n"
  },
  {
    "path": "eng/Versions.props",
    "content": "<Project>\n\n  <Import Project=\"Version.Details.props\" />\n\n  <PropertyGroup>\n    <MajorVersion>11</MajorVersion>\n    <MinorVersion>0</MinorVersion>\n    <PatchVersion>0</PatchVersion>\n    <PreReleaseVersionLabel>preview</PreReleaseVersionLabel>\n    <PreReleaseVersionIteration>5</PreReleaseVersionIteration>\n    <!-- Allowed values: '', 'prerelease', 'release'. Set to 'release' when stabilizing. -->\n    <DotNetFinalVersionKind></DotNetFinalVersionKind>\n  </PropertyGroup>\n\n  <PropertyGroup>\n    <!-- corefx -->\n    <SystemDataDataSetExtensionsVersion>4.5.0</SystemDataDataSetExtensionsVersion>\n    <SystemReflectionEmitVersion>4.7.0</SystemReflectionEmitVersion>\n    <SystemReflectionEmitILGenerationVersion>4.7.0</SystemReflectionEmitILGenerationVersion>\n    <SystemReflectionEmitLightweightVersion>4.7.0</SystemReflectionEmitLightweightVersion>\n    <!-- nuget -->\n    <NuGetPackagingVersion>6.12.1</NuGetPackagingVersion>\n    <!-- runtime -->\n    <MicrosoftWin32RegistryVersion>5.0.0</MicrosoftWin32RegistryVersion>\n    <SystemIOFileSystemAccessControlVersion>5.0.0</SystemIOFileSystemAccessControlVersion>\n    <SystemIOPipesAccessControlVersion>5.0.0</SystemIOPipesAccessControlVersion>\n    <SystemSecurityAccessControlVersion>6.0.0</SystemSecurityAccessControlVersion>\n    <SystemSecurityCryptographyCngVersion>5.0.0</SystemSecurityCryptographyCngVersion>\n    <SystemSecurityPrincipalWindowsVersion>5.0.0</SystemSecurityPrincipalWindowsVersion>\n    <!-- wcf -->\n    <SystemServiceModelVersion>8.1.2</SystemServiceModelVersion>\n  </PropertyGroup>\n\n</Project>\n"
  },
  {
    "path": "eng/common/BuildConfiguration/build-configuration.json",
    "content": "{\n  \"RetryCountLimit\": 1,\n  \"RetryByAnyError\": false\n}\n"
  },
  {
    "path": "eng/common/CIBuild.cmd",
    "content": "@echo off\npowershell -ExecutionPolicy ByPass -NoProfile -command \"& \"\"\"%~dp0Build.ps1\"\"\" -restore -build -test -sign -pack -publish -ci %*\"\n"
  },
  {
    "path": "eng/common/PSScriptAnalyzerSettings.psd1",
    "content": "@{\n    IncludeRules=@('PSAvoidUsingCmdletAliases',\n                   'PSAvoidUsingWMICmdlet',\n                   'PSAvoidUsingPositionalParameters',\n                   'PSAvoidUsingInvokeExpression',\n                   'PSUseDeclaredVarsMoreThanAssignments',\n                   'PSUseCmdletCorrectly',\n                   'PSStandardDSCFunctionsInResource',\n                   'PSUseIdenticalMandatoryParametersForDSC',\n                   'PSUseIdenticalParametersForDSC')\n}"
  },
  {
    "path": "eng/common/README.md",
    "content": "# Don't touch this folder\n\n                uuuuuuuuuuuuuuuuuuuu\n              u\" uuuuuuuuuuuuuuuuuu \"u\n            u\" u$$$$$$$$$$$$$$$$$$$$u \"u\n          u\" u$$$$$$$$$$$$$$$$$$$$$$$$u \"u\n        u\" u$$$$$$$$$$$$$$$$$$$$$$$$$$$$u \"u\n      u\" u$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$u \"u\n    u\" u$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$u \"u\n    $ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $\n    $ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $\n    $ $$$\" ... \"$...  ...$\" ... \"$$$  ... \"$$$ $\n    $ $$$u `\"$$$$$$$  $$$  $$$$$  $$  $$$  $$$ $\n    $ $$$$$$uu \"$$$$  $$$  $$$$$  $$  \"\"\" u$$$ $\n    $ $$$\"\"$$$  $$$$  $$$u \"$$$\" u$$  $$$$$$$$ $\n    $ $$$$....,$$$$$..$$$$$....,$$$$..$$$$$$$$ $\n    $ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $\n    \"u \"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$\" u\"\n      \"u \"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$\" u\"\n        \"u \"$$$$$$$$$$$$$$$$$$$$$$$$$$$$\" u\"\n          \"u \"$$$$$$$$$$$$$$$$$$$$$$$$\" u\"\n            \"u \"$$$$$$$$$$$$$$$$$$$$\" u\"\n              \"u \"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\" u\"\n                \"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n\n!!! Changes made in this directory are subject to being overwritten by automation !!!\n\nThe files in this directory are shared by all Arcade repos and managed by automation. If you need to make changes to these files, open an issue or submit a pull request to https://github.com/dotnet/arcade first.\n"
  },
  {
    "path": "eng/common/SetupNugetSources.ps1",
    "content": "# This script adds internal feeds required to build commits that depend on internal package sources. For instance,\n# dotnet6-internal would be added automatically if dotnet6 was found in the nuget.config file. In addition also enables\n# disabled internal Maestro (darc-int*) feeds.\n#\n# Optionally, this script also adds a credential entry for each of the internal feeds if supplied.\n#\n# See example call for this script below.\n#\n#  - task: PowerShell@2\n#    displayName: Setup internal Feeds Credentials\n#    condition: eq(variables['Agent.OS'], 'Windows_NT')\n#    inputs:\n#      filePath: $(System.DefaultWorkingDirectory)/eng/common/SetupNugetSources.ps1\n#      arguments: -ConfigFile $(System.DefaultWorkingDirectory)/NuGet.config -Password $Env:Token\n#    env:\n#      Token: $(dn-bot-dnceng-artifact-feeds-rw)\n#\n# Note that the NuGetAuthenticate task should be called after SetupNugetSources.\n# This ensures that:\n# - Appropriate creds are set for the added internal feeds (if not supplied to the scrupt)\n# - The credential provider is installed.\n#\n# This logic is also abstracted into enable-internal-sources.yml.\n\n[CmdletBinding()]\nparam (\n    [Parameter(Mandatory = $true)][string]$ConfigFile,\n    $Password\n)\n\n$ErrorActionPreference = \"Stop\"\nSet-StrictMode -Version 2.0\n[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12\n\n. $PSScriptRoot\\tools.ps1\n\n# Adds or enables the package source with the given name\nfunction AddOrEnablePackageSource($sources, $disabledPackageSources, $SourceName, $SourceEndPoint, $creds, $Username, $pwd) {\n    if ($disabledPackageSources -eq $null -or -not (EnableInternalPackageSource -DisabledPackageSources $disabledPackageSources -Creds $creds -PackageSourceName $SourceName)) {\n        AddPackageSource -Sources $sources -SourceName $SourceName -SourceEndPoint $SourceEndPoint -Creds $creds -Username $userName -pwd $Password\n    }\n}\n\n# Add source entry to PackageSources\nfunction AddPackageSource($sources, $SourceName, $SourceEndPoint, $creds, $Username, $pwd) {\n    $packageSource = $sources.SelectSingleNode(\"add[@key='$SourceName']\")\n    \n    if ($packageSource -eq $null)\n    {\n        Write-Host \"Adding package source $SourceName\"\n\n        $packageSource = $doc.CreateElement(\"add\")\n        $packageSource.SetAttribute(\"key\", $SourceName)\n        $packageSource.SetAttribute(\"value\", $SourceEndPoint)\n        $sources.AppendChild($packageSource) | Out-Null\n    }\n    else {\n        Write-Host \"Package source $SourceName already present and enabled.\"\n    }\n\n    AddCredential -Creds $creds -Source $SourceName -Username $Username -pwd $pwd\n}\n\n# Add a credential node for the specified source\nfunction AddCredential($creds, $source, $username, $pwd) {\n    # If no cred supplied, don't do anything.\n    if (!$pwd) {\n        return;\n    }\n\n    Write-Host \"Inserting credential for feed: \" $source\n\n    # Looks for credential configuration for the given SourceName. Create it if none is found.\n    $sourceElement = $creds.SelectSingleNode($Source)\n    if ($sourceElement -eq $null)\n    {\n        $sourceElement = $doc.CreateElement($Source)\n        $creds.AppendChild($sourceElement) | Out-Null\n    }\n\n    # Add the <Username> node to the credential if none is found.\n    $usernameElement = $sourceElement.SelectSingleNode(\"add[@key='Username']\")\n    if ($usernameElement -eq $null)\n    {\n        $usernameElement = $doc.CreateElement(\"add\")\n        $usernameElement.SetAttribute(\"key\", \"Username\")\n        $sourceElement.AppendChild($usernameElement) | Out-Null\n    }\n    $usernameElement.SetAttribute(\"value\", $Username)\n\n    # Add the <ClearTextPassword> to the credential if none is found.\n    # Add it as a clear text because there is no support for encrypted ones in non-windows .Net SDKs.\n    #   -> https://github.com/NuGet/Home/issues/5526\n    $passwordElement = $sourceElement.SelectSingleNode(\"add[@key='ClearTextPassword']\")\n    if ($passwordElement -eq $null)\n    {\n        $passwordElement = $doc.CreateElement(\"add\")\n        $passwordElement.SetAttribute(\"key\", \"ClearTextPassword\")\n        $sourceElement.AppendChild($passwordElement) | Out-Null\n    }\n    \n    $passwordElement.SetAttribute(\"value\", $pwd)\n}\n\n# Enable all darc-int package sources.\nfunction EnableMaestroInternalPackageSources($DisabledPackageSources, $Creds) {\n    $maestroInternalSources = $DisabledPackageSources.SelectNodes(\"add[contains(@key,'darc-int')]\")\n    ForEach ($DisabledPackageSource in $maestroInternalSources) {\n        EnableInternalPackageSource -DisabledPackageSources $DisabledPackageSources -Creds $Creds -PackageSourceName $DisabledPackageSource.key\n    }\n}\n\n# Enables an internal package source by name, if found. Returns true if the package source was found and enabled, false otherwise.\nfunction EnableInternalPackageSource($DisabledPackageSources, $Creds, $PackageSourceName) {\n    $DisabledPackageSource = $DisabledPackageSources.SelectSingleNode(\"add[@key='$PackageSourceName']\")\n    if ($DisabledPackageSource) {\n        Write-Host \"Enabling internal source '$($DisabledPackageSource.key)'.\"\n        \n        # Due to https://github.com/NuGet/Home/issues/10291, we must actually remove the disabled entries\n        $DisabledPackageSources.RemoveChild($DisabledPackageSource)\n\n        AddCredential -Creds $creds -Source $DisabledPackageSource.Key -Username $userName -pwd $Password\n        return $true\n    }\n    return $false\n}\n\nif (!(Test-Path $ConfigFile -PathType Leaf)) {\n  Write-PipelineTelemetryError -Category 'Build' -Message \"Eng/common/SetupNugetSources.ps1 returned a non-zero exit code. Couldn't find the NuGet config file: $ConfigFile\"\n  ExitWithExitCode 1\n}\n\n# Load NuGet.config\n$doc = New-Object System.Xml.XmlDocument\n$filename = (Get-Item $ConfigFile).FullName\n$doc.Load($filename)\n\n# Get reference to <PackageSources> - fail if none exist\n$sources = $doc.DocumentElement.SelectSingleNode(\"packageSources\")\nif ($sources -eq $null) {\n    Write-PipelineTelemetryError -Category 'Build' -Message \"Eng/common/SetupNugetSources.ps1 returned a non-zero exit code. NuGet config file must contain a packageSources section: $ConfigFile\"\n    ExitWithExitCode 1\n}\n\n$creds = $null\n$feedSuffix = \"v3/index.json\"\nif ($Password) {\n    $feedSuffix = \"v2\"\n    # Looks for a <PackageSourceCredentials> node. Create it if none is found.\n    $creds = $doc.DocumentElement.SelectSingleNode(\"packageSourceCredentials\")\n    if ($creds -eq $null) {\n        $creds = $doc.CreateElement(\"packageSourceCredentials\")\n        $doc.DocumentElement.AppendChild($creds) | Out-Null\n    }\n}\n\n$userName = \"dn-bot\"\n\n# Check for disabledPackageSources; we'll enable any darc-int ones we find there\n$disabledSources = $doc.DocumentElement.SelectSingleNode(\"disabledPackageSources\")\nif ($disabledSources -ne $null) {\n    Write-Host \"Checking for any darc-int disabled package sources in the disabledPackageSources node\"\n    EnableMaestroInternalPackageSources -DisabledPackageSources $disabledSources -Creds $creds\n}\n$dotnetVersions = @('5','6','7','8','9','10')\n\nforeach ($dotnetVersion in $dotnetVersions) {\n    $feedPrefix = \"dotnet\" + $dotnetVersion;\n    $dotnetSource = $sources.SelectSingleNode(\"add[@key='$feedPrefix']\")\n    if ($dotnetSource -ne $null) {\n        AddOrEnablePackageSource -Sources $sources -DisabledPackageSources $disabledSources -SourceName \"$feedPrefix-internal\" -SourceEndPoint \"https://pkgs.dev.azure.com/dnceng/internal/_packaging/$feedPrefix-internal/nuget/$feedSuffix\" -Creds $creds -Username $userName -pwd $Password\n        AddOrEnablePackageSource -Sources $sources -DisabledPackageSources $disabledSources -SourceName \"$feedPrefix-internal-transport\" -SourceEndPoint \"https://pkgs.dev.azure.com/dnceng/internal/_packaging/$feedPrefix-internal-transport/nuget/$feedSuffix\" -Creds $creds -Username $userName -pwd $Password\n    }\n}\n\n$doc.Save($filename)\n"
  },
  {
    "path": "eng/common/SetupNugetSources.sh",
    "content": "#!/usr/bin/env bash\n\n# This script adds internal feeds required to build commits that depend on internal package sources. For instance,\n# dotnet6-internal would be added automatically if dotnet6 was found in the nuget.config file. In addition also enables\n# disabled internal Maestro (darc-int*) feeds.\n# \n# Optionally, this script also adds a credential entry for each of the internal feeds if supplied.\n#\n# See example call for this script below.\n#\n#  - task: Bash@3\n#    displayName: Setup Internal Feeds\n#    inputs:\n#      filePath: $(System.DefaultWorkingDirectory)/eng/common/SetupNugetSources.sh\n#      arguments: $(System.DefaultWorkingDirectory)/NuGet.config\n#    condition: ne(variables['Agent.OS'], 'Windows_NT')\n#  - task: NuGetAuthenticate@1\n#\n# Note that the NuGetAuthenticate task should be called after SetupNugetSources.\n# This ensures that:\n# - Appropriate creds are set for the added internal feeds (if not supplied to the scrupt)\n# - The credential provider is installed.\n#\n# This logic is also abstracted into enable-internal-sources.yml.\n\nConfigFile=$1\nCredToken=$2\nNL='\\n'\nTB='    '\n\nsource=\"${BASH_SOURCE[0]}\"\n\n# resolve $source until the file is no longer a symlink\nwhile [[ -h \"$source\" ]]; do\n  scriptroot=\"$( cd -P \"$( dirname \"$source\" )\" && pwd )\"\n  source=\"$(readlink \"$source\")\"\n  # if $source was a relative symlink, we need to resolve it relative to the path where the\n  # symlink file was located\n  [[ $source != /* ]] && source=\"$scriptroot/$source\"\ndone\nscriptroot=\"$( cd -P \"$( dirname \"$source\" )\" && pwd )\"\n\n. \"$scriptroot/tools.sh\"\n\nif [ ! -f \"$ConfigFile\" ]; then\n    Write-PipelineTelemetryError -Category 'Build' \"Error: Eng/common/SetupNugetSources.sh returned a non-zero exit code. Couldn't find the NuGet config file: $ConfigFile\"\n    ExitWithExitCode 1\nfi\n\nif [[ `uname -s` == \"Darwin\" ]]; then\n    NL=$'\\\\\\n'\n    TB=''\nfi\n\n# Enables an internal package source by name, if found. Returns 0 if found and enabled, 1 if not found.\nEnableInternalPackageSource() {\n    local PackageSourceName=\"$1\"\n    \n    # Check if disabledPackageSources section exists\n    grep -i \"<disabledPackageSources>\" \"$ConfigFile\" > /dev/null\n    if [ \"$?\" != \"0\" ]; then\n        return 1  # No disabled sources section\n    fi\n    \n    # Check if this source name is disabled\n    grep -i \"<add key=\\\"$PackageSourceName\\\" value=\\\"true\\\"\" \"$ConfigFile\" > /dev/null\n    if [ \"$?\" == \"0\" ]; then\n        echo \"Enabling internal source '$PackageSourceName'.\"\n        # Remove the disabled entry (including any surrounding comments or whitespace on the same line)\n        sed -i.bak \"/<add key=\\\"$PackageSourceName\\\" value=\\\"true\\\" \\/>/d\" \"$ConfigFile\"\n        \n        # Add the source name to PackageSources for credential handling\n        PackageSources+=(\"$PackageSourceName\")\n        return 0  # Found and enabled\n    fi\n    \n    return 1  # Not found in disabled sources\n}\n\n# Add source entry to PackageSources\nAddPackageSource() {\n    local SourceName=\"$1\"\n    local SourceEndPoint=\"$2\"\n    \n    # Check if source already exists\n    grep -i \"<add key=\\\"$SourceName\\\"\" \"$ConfigFile\" > /dev/null\n    if [ \"$?\" == \"0\" ]; then\n        echo \"Package source $SourceName already present and enabled.\"\n        PackageSources+=(\"$SourceName\")\n        return\n    fi\n    \n    echo \"Adding package source $SourceName\"\n    PackageSourcesNodeFooter=\"</packageSources>\"\n    PackageSourceTemplate=\"${TB}<add key=\\\"$SourceName\\\" value=\\\"$SourceEndPoint\\\" />\"\n    \n    sed -i.bak \"s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|\" \"$ConfigFile\"\n    PackageSources+=(\"$SourceName\")\n}\n\n# Adds or enables the package source with the given name\nAddOrEnablePackageSource() {\n    local SourceName=\"$1\"\n    local SourceEndPoint=\"$2\"\n    \n    # Try to enable if disabled, if not found then add new source\n    EnableInternalPackageSource \"$SourceName\"\n    if [ \"$?\" != \"0\" ]; then\n        AddPackageSource \"$SourceName\" \"$SourceEndPoint\"\n    fi\n}\n\n# Enable all darc-int package sources\nEnableMaestroInternalPackageSources() {\n    # Check if disabledPackageSources section exists\n    grep -i \"<disabledPackageSources>\" \"$ConfigFile\" > /dev/null\n    if [ \"$?\" != \"0\" ]; then\n        return  # No disabled sources section\n    fi\n    \n    # Find all darc-int disabled sources\n    local DisabledDarcIntSources=()\n    DisabledDarcIntSources+=$(grep -oh '\"darc-int-[^\"]*\" value=\"true\"' \"$ConfigFile\" | tr -d '\"')\n    \n    for DisabledSourceName in ${DisabledDarcIntSources[@]} ; do\n        if [[ $DisabledSourceName == darc-int* ]]; then\n            EnableInternalPackageSource \"$DisabledSourceName\"\n        fi\n    done\n}\n\n# Ensure there is a <packageSources>...</packageSources> section.\ngrep -i \"<packageSources>\" $ConfigFile\nif [ \"$?\" != \"0\" ]; then\n    Write-PipelineTelemetryError -Category 'Build' \"Error: Eng/common/SetupNugetSources.sh returned a non-zero exit code. NuGet config file must contain a packageSources section: $ConfigFile\"\n    ExitWithExitCode 1\nfi\n\nPackageSources=()\n\n# Set feed suffix based on whether credentials are provided\nFeedSuffix=\"v3/index.json\"\nif [ -n \"$CredToken\" ]; then\n    FeedSuffix=\"v2\"\n    \n    # Ensure there is a <packageSourceCredentials>...</packageSourceCredentials> section.\n    grep -i \"<packageSourceCredentials>\" $ConfigFile\n    if [ \"$?\" != \"0\" ]; then\n        echo \"Adding <packageSourceCredentials>...</packageSourceCredentials> section.\"\n\n        PackageSourcesNodeFooter=\"</packageSources>\"\n        PackageSourceCredentialsTemplate=\"${TB}<packageSourceCredentials>${NL}${TB}</packageSourceCredentials>\"\n\n        sed -i.bak \"s|$PackageSourcesNodeFooter|$PackageSourcesNodeFooter${NL}$PackageSourceCredentialsTemplate|\" $ConfigFile\n    fi\nfi\n\n# Check for disabledPackageSources; we'll enable any darc-int ones we find there\ngrep -i \"<disabledPackageSources>\" $ConfigFile > /dev/null\nif [ \"$?\" == \"0\" ]; then\n    echo \"Checking for any darc-int disabled package sources in the disabledPackageSources node\"\n    EnableMaestroInternalPackageSources\nfi\n\nDotNetVersions=('5' '6' '7' '8' '9' '10')\n\nfor DotNetVersion in ${DotNetVersions[@]} ; do\n    FeedPrefix=\"dotnet${DotNetVersion}\";\n    grep -i \"<add key=\\\"$FeedPrefix\\\"\" $ConfigFile > /dev/null\n    if [ \"$?\" == \"0\" ]; then\n        AddOrEnablePackageSource \"$FeedPrefix-internal\" \"https://pkgs.dev.azure.com/dnceng/internal/_packaging/$FeedPrefix-internal/nuget/$FeedSuffix\"\n        AddOrEnablePackageSource \"$FeedPrefix-internal-transport\" \"https://pkgs.dev.azure.com/dnceng/internal/_packaging/$FeedPrefix-internal-transport/nuget/$FeedSuffix\"\n    fi\ndone\n\n# I want things split line by line\nPrevIFS=$IFS\nIFS=$'\\n'\nPackageSources+=\"$IFS\"\nPackageSources+=$(grep -oh '\"darc-int-[^\"]*\"' $ConfigFile | tr -d '\"')\nIFS=$PrevIFS\n\nif [ \"$CredToken\" ]; then\n    for FeedName in ${PackageSources[@]} ; do\n        # Check if there is no existing credential for this FeedName\n        grep -i \"<$FeedName>\" $ConfigFile \n        if [ \"$?\" != \"0\" ]; then\n            echo \"\tInserting credential for feed: $FeedName\"\n\n            PackageSourceCredentialsNodeFooter=\"</packageSourceCredentials>\"\n            NewCredential=\"${TB}${TB}<$FeedName>${NL}${TB}<add key=\\\"Username\\\" value=\\\"dn-bot\\\" />${NL}${TB}${TB}<add key=\\\"ClearTextPassword\\\" value=\\\"$CredToken\\\" />${NL}${TB}${TB}</$FeedName>\"\n\n            sed -i.bak \"s|$PackageSourceCredentialsNodeFooter|$NewCredential${NL}$PackageSourceCredentialsNodeFooter|\" $ConfigFile\n        fi\n    done\nfi\n"
  },
  {
    "path": "eng/common/build.cmd",
    "content": "@echo off\npowershell -ExecutionPolicy ByPass -NoProfile -command \"& \"\"\"%~dp0build.ps1\"\"\" %*\"\nexit /b %ErrorLevel%\n"
  },
  {
    "path": "eng/common/build.ps1",
    "content": "[CmdletBinding(PositionalBinding=$false)]\nParam(\n  [string][Alias('c')]$configuration = \"Debug\",\n  [string]$platform = $null,\n  [string] $projects,\n  [string][Alias('v')]$verbosity = \"minimal\",\n  [string] $msbuildEngine = $null,\n  [bool] $warnAsError = $true,\n  [string] $warnNotAsError = '',\n  [bool] $nodeReuse = $true,\n  [switch] $buildCheck = $false,\n  [switch][Alias('r')]$restore,\n  [switch] $deployDeps,\n  [switch][Alias('b')]$build,\n  [switch] $rebuild,\n  [switch] $deploy,\n  [switch][Alias('t')]$test,\n  [switch] $integrationTest,\n  [switch] $performanceTest,\n  [switch] $sign,\n  [switch] $pack,\n  [switch] $publish,\n  [switch] $clean,\n  [switch][Alias('pb')]$productBuild,\n  [switch]$fromVMR,\n  [switch][Alias('bl')]$binaryLog,\n  [switch][Alias('nobl')]$excludeCIBinarylog,\n  [switch] $ci,\n  [switch] $prepareMachine,\n  [string] $runtimeSourceFeed = '',\n  [string] $runtimeSourceFeedKey = '',\n  [switch] $excludePrereleaseVS,\n  [switch] $nativeToolsOnMachine,\n  [switch] $help,\n  [Parameter(ValueFromRemainingArguments=$true)][String[]]$properties\n)\n\n# Unset 'Platform' environment variable to avoid unwanted collision in InstallDotNetCore.targets file\n# some computer has this env var defined (e.g. Some HP)\nif($env:Platform) {\n  $env:Platform=\"\"  \n}\nfunction Print-Usage() {\n  Write-Host \"Common settings:\"\n  Write-Host \"  -configuration <value>  Build configuration: 'Debug' or 'Release' (short: -c)\"\n  Write-Host \"  -platform <value>       Platform configuration: 'x86', 'x64' or any valid Platform value to pass to msbuild\"\n  Write-Host \"  -verbosity <value>      Msbuild verbosity: q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic] (short: -v)\"\n  Write-Host \"  -binaryLog              Output binary log (short: -bl)\"\n  Write-Host \"  -help                   Print help and exit\"\n  Write-Host \"\"\n\n  Write-Host \"Actions:\"\n  Write-Host \"  -restore                Restore dependencies (short: -r)\"\n  Write-Host \"  -build                  Build solution (short: -b)\"\n  Write-Host \"  -rebuild                Rebuild solution\"\n  Write-Host \"  -deploy                 Deploy built VSIXes\"\n  Write-Host \"  -deployDeps             Deploy dependencies (e.g. VSIXes for integration tests)\"\n  Write-Host \"  -test                   Run all unit tests in the solution (short: -t)\"\n  Write-Host \"  -integrationTest        Run all integration tests in the solution\"\n  Write-Host \"  -performanceTest        Run all performance tests in the solution\"\n  Write-Host \"  -pack                   Package build outputs into NuGet packages and Willow components\"\n  Write-Host \"  -sign                   Sign build outputs\"\n  Write-Host \"  -publish                Publish artifacts (e.g. symbols)\"\n  Write-Host \"  -clean                  Clean the solution\"\n  Write-Host \"  -productBuild           Build the solution in the way it will be built in the full .NET product (VMR) build (short: -pb)\"\n  Write-Host \"\"\n\n  Write-Host \"Advanced settings:\"\n  Write-Host \"  -projects <value>       Semi-colon delimited list of sln/proj's to build. Globbing is supported (*.sln)\"\n  Write-Host \"  -ci                     Set when running on CI server\"\n  Write-Host \"  -excludeCIBinarylog     Don't output binary log (short: -nobl)\"\n  Write-Host \"  -prepareMachine         Prepare machine for CI run, clean up processes after build\"\n  Write-Host \"  -warnAsError <value>    Sets warnaserror msbuild parameter ('true' or 'false')\"\n  Write-Host \"  -warnNotAsError <value> Sets a semi-colon delimited list of warning codes that should not be treated as errors\"\n  Write-Host \"  -msbuildEngine <value>  Msbuild engine to use to run build ('dotnet', 'vs', or unspecified).\"\n  Write-Host \"  -excludePrereleaseVS    Set to exclude build engines in prerelease versions of Visual Studio\"\n  Write-Host \"  -nativeToolsOnMachine   Sets the native tools on machine environment variable (indicating that the script should use native tools on machine)\"\n  Write-Host \"  -nodeReuse <value>      Sets nodereuse msbuild parameter ('true' or 'false')\"\n  Write-Host \"  -buildCheck             Sets /check msbuild parameter\"\n  Write-Host \"  -fromVMR                Set when building from within the VMR\"\n  Write-Host \"\"\n\n  Write-Host \"Command line arguments not listed above are passed thru to msbuild.\"\n  Write-Host \"The above arguments can be shortened as much as to be unambiguous (e.g. -co for configuration, -t for test, etc.).\"\n}\n\n. $PSScriptRoot\\tools.ps1\n\nfunction InitializeCustomToolset {\n  if (-not $restore) {\n    return\n  }\n\n  $script = Join-Path $EngRoot 'restore-toolset.ps1'\n\n  if (Test-Path $script) {\n    . $script\n  }\n}\n\nfunction Build {\n  $toolsetBuildProj = InitializeToolset\n  InitializeCustomToolset\n\n  $bl = if ($binaryLog) { '/bl:' + (Join-Path $LogDir 'Build.binlog') } else { '' }\n  $platformArg = if ($platform) { \"/p:Platform=$platform\" } else { '' }\n  $check = if ($buildCheck) { '/check' } else { '' }\n\n  if ($projects) {\n    # Re-assign properties to a new variable because PowerShell doesn't let us append properties directly for unclear reasons.\n    # Explicitly set the type as string[] because otherwise PowerShell would make this char[] if $properties is empty.\n    [string[]] $msbuildArgs = $properties\n    \n    # Resolve relative project paths into full paths \n    $projects = ($projects.Split(';').ForEach({Resolve-Path $_}) -join ';')\n    \n    $msbuildArgs += \"/p:Projects=$projects\"\n    $properties = $msbuildArgs\n  }\n\n  MSBuild $toolsetBuildProj `\n    $bl `\n    $platformArg `\n    $check `\n    /p:Configuration=$configuration `\n    /p:RepoRoot=$RepoRoot `\n    /p:Restore=$restore `\n    /p:DeployDeps=$deployDeps `\n    /p:Build=$build `\n    /p:Rebuild=$rebuild `\n    /p:Deploy=$deploy `\n    /p:Test=$test `\n    /p:Pack=$pack `\n    /p:DotNetBuild=$productBuild `\n    /p:DotNetBuildFromVMR=$fromVMR `\n    /p:IntegrationTest=$integrationTest `\n    /p:PerformanceTest=$performanceTest `\n    /p:Sign=$sign `\n    /p:Publish=$publish `\n    /p:RestoreStaticGraphEnableBinaryLogger=$binaryLog `\n    @properties\n}\n\ntry {\n  if ($clean) {\n    if (Test-Path $ArtifactsDir) {\n      Remove-Item -Recurse -Force $ArtifactsDir\n      Write-Host 'Artifacts directory deleted.'\n    }\n    exit 0\n  }\n\n  if ($help -or (($null -ne $properties) -and ($properties.Contains('/help') -or $properties.Contains('/?')))) {\n    Print-Usage\n    exit 0\n  }\n\n  if ($ci) {\n    if (-not $excludeCIBinarylog) {\n      $binaryLog = $true\n    }\n    $nodeReuse = $false\n  }\n\n  if ($nativeToolsOnMachine) {\n    $env:NativeToolsOnMachine = $true\n  }\n  if ($restore) {\n    InitializeNativeTools\n  }\n\n  Build\n}\ncatch {\n  Write-Host $_.ScriptStackTrace\n  Write-PipelineTelemetryError -Category 'InitializeToolset' -Message $_\n  ExitWithExitCode 1\n}\n\nExitWithExitCode 0\n"
  },
  {
    "path": "eng/common/build.sh",
    "content": "#!/usr/bin/env bash\n\n# Stop script if unbound variable found (use ${var:-} if intentional)\nset -u\n\n# Stop script if command returns non-zero exit code.\n# Prevents hidden errors caused by missing error code propagation.\nset -e\n\nusage()\n{\n  echo \"Common settings:\"\n  echo \"  --configuration <value>    Build configuration: 'Debug' or 'Release' (short: -c)\"\n  echo \"  --verbosity <value>        Msbuild verbosity: q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic] (short: -v)\"\n  echo \"  --binaryLog                Create MSBuild binary log (short: -bl)\"\n  echo \"  --help                     Print help and exit (short: -h)\"\n  echo \"\"\n\n  echo \"Actions:\"\n  echo \"  --restore                  Restore dependencies (short: -r)\"\n  echo \"  --build                    Build solution (short: -b)\"\n  echo \"  --sourceBuild              Source-build the solution (short: -sb)\"\n  echo \"                             Will additionally trigger the following actions: --restore, --build, --pack\"\n  echo \"                             If --configuration is not set explicitly, will also set it to 'Release'\"\n  echo \"  --productBuild             Build the solution in the way it will be built in the full .NET product (VMR) build (short: -pb)\"\n  echo \"                             Will additionally trigger the following actions: --restore, --build, --pack\"\n  echo \"                             If --configuration is not set explicitly, will also set it to 'Release'\"\n  echo \"  --rebuild                  Rebuild solution\"\n  echo \"  --test                     Run all unit tests in the solution (short: -t)\"\n  echo \"  --integrationTest          Run all integration tests in the solution\"\n  echo \"  --performanceTest          Run all performance tests in the solution\"\n  echo \"  --pack                     Package build outputs into NuGet packages and Willow components\"\n  echo \"  --sign                     Sign build outputs\"\n  echo \"  --publish                  Publish artifacts (e.g. symbols)\"\n  echo \"  --clean                    Clean the solution\"\n  echo \"\"\n\n  echo \"Advanced settings:\"\n  echo \"  --projects <value>       Project or solution file(s) to build\"\n  echo \"  --ci                     Set when running on CI server\"\n  echo \"  --excludeCIBinarylog     Don't output binary log (short: -nobl)\"\n  echo \"  --prepareMachine         Prepare machine for CI run, clean up processes after build\"\n  echo \"  --nodeReuse <value>      Sets nodereuse msbuild parameter ('true' or 'false')\"\n  echo \"  --warnAsError <value>    Sets warnaserror msbuild parameter ('true' or 'false')\"\n  echo \"  --warnNotAsError <value> Sets a semi-colon delimited list of warning codes that should not be treated as errors\"\n  echo \"  --buildCheck <value>     Sets /check msbuild parameter\"\n  echo \"  --fromVMR                Set when building from within the VMR\"\n  echo \"\"\n  echo \"Command line arguments not listed above are passed thru to msbuild.\"\n  echo \"Arguments can also be passed in with a single hyphen.\"\n}\n\nsource=\"${BASH_SOURCE[0]}\"\n\n# resolve $source until the file is no longer a symlink\nwhile [[ -h \"$source\" ]]; do\n  scriptroot=\"$( cd -P \"$( dirname \"$source\" )\" && pwd )\"\n  source=\"$(readlink \"$source\")\"\n  # if $source was a relative symlink, we need to resolve it relative to the path where the\n  # symlink file was located\n  [[ $source != /* ]] && source=\"$scriptroot/$source\"\ndone\nscriptroot=\"$( cd -P \"$( dirname \"$source\" )\" && pwd )\"\n\nrestore=false\nbuild=false\nsource_build=false\nproduct_build=false\nfrom_vmr=false\nrebuild=false\ntest=false\nintegration_test=false\nperformance_test=false\npack=false\npublish=false\nsign=false\npublic=false\nci=false\nclean=false\n\nwarn_as_error=true\nwarn_not_as_error=''\nnode_reuse=true\nbuild_check=false\nbinary_log=false\nexclude_ci_binary_log=false\npipelines_log=false\n\nprojects=''\nconfiguration=''\nprepare_machine=false\nverbosity='minimal'\nruntime_source_feed=''\nruntime_source_feed_key=''\n\nproperties=()\nwhile [[ $# -gt 0 ]]; do\n  opt=\"$(echo \"${1/#--/-}\" | tr \"[:upper:]\" \"[:lower:]\")\"\n  case \"$opt\" in\n    -help|-h)\n      usage\n      exit 0\n      ;;\n    -clean)\n      clean=true\n      ;;\n    -configuration|-c)\n      configuration=$2\n      shift\n      ;;\n    -verbosity|-v)\n      verbosity=$2\n      shift\n      ;;\n    -binarylog|-bl)\n      binary_log=true\n      ;;\n    -excludecibinarylog|-nobl)\n      exclude_ci_binary_log=true\n      ;;\n    -pipelineslog|-pl)\n      pipelines_log=true\n      ;;\n    -restore|-r)\n      restore=true\n      ;;\n    -build|-b)\n      build=true\n      ;;\n    -rebuild)\n      rebuild=true\n      ;;\n    -pack)\n      pack=true\n      ;;\n    -sourcebuild|-source-build|-sb)\n      build=true\n      source_build=true\n      product_build=true\n      restore=true\n      pack=true\n      ;;\n    -productbuild|-product-build|-pb)\n      build=true\n      product_build=true\n      restore=true\n      pack=true\n      ;;\n    -fromvmr|-from-vmr)\n      from_vmr=true\n      ;;\n    -test|-t)\n      test=true\n      ;;\n    -integrationtest)\n      integration_test=true\n      ;;\n    -performancetest)\n      performance_test=true\n      ;;\n    -sign)\n      sign=true\n      ;;\n    -publish)\n      publish=true\n      ;;\n    -preparemachine)\n      prepare_machine=true\n      ;;\n    -projects)\n      projects=$2\n      shift\n      ;;\n    -ci)\n      ci=true\n      ;;\n    -warnaserror)\n      warn_as_error=$2\n      shift\n      ;;\n    -warnnotaserror)\n      warn_not_as_error=$2\n      shift\n      ;;\n    -nodereuse)\n      node_reuse=$2\n      shift\n      ;;\n    -buildcheck)\n      build_check=true\n      ;;\n    -runtimesourcefeed)\n      runtime_source_feed=$2\n      shift\n      ;;\n     -runtimesourcefeedkey)\n      runtime_source_feed_key=$2\n      shift\n      ;;\n    *)\n      properties+=(\"$1\")\n      ;;\n  esac\n\n  shift\ndone\n\nif [[ -z \"$configuration\" ]]; then\n  if [[ \"$source_build\" = true ]]; then configuration=\"Release\"; else configuration=\"Debug\"; fi\nfi\n\nif [[ \"$ci\" == true ]]; then\n  pipelines_log=true\n  node_reuse=false\n  if [[ \"$exclude_ci_binary_log\" == false ]]; then\n    binary_log=true\n  fi\nfi\n\n. \"$scriptroot/tools.sh\"\n\nfunction InitializeCustomToolset {\n  local script=\"$eng_root/restore-toolset.sh\"\n\n  if [[ -a \"$script\" ]]; then\n    . \"$script\"\n  fi\n}\n\nfunction Build {\n  InitializeToolset\n  InitializeCustomToolset\n\n  if [[ ! -z \"$projects\" ]]; then\n    properties+=(\"/p:Projects=$projects\")\n  fi\n\n  local bl=\"\"\n  if [[ \"$binary_log\" == true ]]; then\n    bl=\"/bl:\\\"$log_dir/Build.binlog\\\"\"\n  fi\n\n  local check=\"\"\n  if [[ \"$build_check\" == true ]]; then\n    check=\"/check\"\n  fi\n\n  MSBuild $_InitializeToolset \\\n    $bl \\\n    $check \\\n    /p:Configuration=$configuration \\\n    /p:RepoRoot=\"$repo_root\" \\\n    /p:Restore=$restore \\\n    /p:Build=$build \\\n    /p:DotNetBuild=$product_build \\\n    /p:DotNetBuildSourceOnly=$source_build \\\n    /p:DotNetBuildFromVMR=$from_vmr \\\n    /p:Rebuild=$rebuild \\\n    /p:Test=$test \\\n    /p:Pack=$pack \\\n    /p:IntegrationTest=$integration_test \\\n    /p:PerformanceTest=$performance_test \\\n    /p:Sign=$sign \\\n    /p:Publish=$publish \\\n    /p:RestoreStaticGraphEnableBinaryLogger=$binary_log \\\n    ${properties[@]+\"${properties[@]}\"}\n\n  ExitWithExitCode 0\n}\n\nif [[ \"$clean\" == true ]]; then\n  if [ -d \"$artifacts_dir\" ]; then\n    rm -rf $artifacts_dir\n    echo \"Artifacts directory deleted.\"\n  fi\n  exit 0\nfi\n\nif [[ \"$restore\" == true ]]; then\n  InitializeNativeTools\nfi\n\nBuild\n"
  },
  {
    "path": "eng/common/cibuild.sh",
    "content": "#!/usr/bin/env bash\n\nsource=\"${BASH_SOURCE[0]}\"\n\n# resolve $SOURCE until the file is no longer a symlink\nwhile [[ -h $source ]]; do\n  scriptroot=\"$( cd -P \"$( dirname \"$source\" )\" && pwd )\"\n  source=\"$(readlink \"$source\")\"\n\n  # if $source was a relative symlink, we need to resolve it relative to the path where \n  # the symlink file was located\n  [[ $source != /* ]] && source=\"$scriptroot/$source\"\ndone\nscriptroot=\"$( cd -P \"$( dirname \"$source\" )\" && pwd )\"\n\n. \"$scriptroot/build.sh\" --restore --build --test --pack --publish --ci $@\n"
  },
  {
    "path": "eng/common/core-templates/job/job.yml",
    "content": "parameters:\n# Job schema parameters - https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#job\n  cancelTimeoutInMinutes: ''\n  condition: ''\n  container: ''\n  continueOnError: false\n  dependsOn: ''\n  displayName: ''\n  pool: ''\n  steps: []\n  strategy: ''\n  timeoutInMinutes: ''\n  variables: []\n  workspace: ''\n  templateContext: {}\n\n# Job base template specific parameters\n  # See schema documentation - https://github.com/dotnet/arcade/blob/master/Documentation/AzureDevOps/TemplateSchema.md\n  # publishing defaults\n  artifacts: ''\n  enableMicrobuild: false\n  enablePreviewMicrobuild: false\n  microbuildPluginVersion: 'latest'\n  enableMicrobuildForMacAndLinux: false\n  microbuildUseESRP: true\n  enablePublishBuildArtifacts: false\n  enablePublishBuildAssets: false\n  enablePublishTestResults: false\n  enablePublishing: false\n  enableBuildRetry: false\n  mergeTestResults: false\n  testRunTitle: ''\n  testResultsFormat: ''\n  name: ''\n  preSteps: []\n  artifactPublishSteps: []\n  runAsPublic: false\n\n# 1es specific parameters\n  is1ESPipeline: ''\n\njobs:\n- job: ${{ parameters.name }}\n\n  ${{ if ne(parameters.cancelTimeoutInMinutes, '') }}:\n    cancelTimeoutInMinutes: ${{ parameters.cancelTimeoutInMinutes }}\n\n  ${{ if ne(parameters.condition, '') }}:\n    condition: ${{ parameters.condition }}\n\n  ${{ if ne(parameters.container, '') }}:\n    container: ${{ parameters.container }}\n\n  ${{ if ne(parameters.continueOnError, '') }}:\n    continueOnError: ${{ parameters.continueOnError }}\n\n  ${{ if ne(parameters.dependsOn, '') }}:\n    dependsOn: ${{ parameters.dependsOn }}\n\n  ${{ if ne(parameters.displayName, '') }}:\n    displayName: ${{ parameters.displayName }}\n\n  ${{ if ne(parameters.pool, '') }}:\n    pool: ${{ parameters.pool }}\n\n  ${{ if ne(parameters.strategy, '') }}:\n    strategy: ${{ parameters.strategy }}\n\n  ${{ if ne(parameters.timeoutInMinutes, '') }}:\n    timeoutInMinutes: ${{ parameters.timeoutInMinutes }}\n\n  ${{ if ne(parameters.templateContext, '') }}:\n    templateContext: ${{ parameters.templateContext }}\n\n  variables:\n  - name: AllowPtrToDetectTestRunRetryFiles\n    value: true\n  - ${{ if ne(parameters.enableTelemetry, 'false') }}:\n    - name: DOTNET_CLI_TELEMETRY_PROFILE\n      value: '$(Build.Repository.Uri)'\n  # Retry signature validation up to three times, waiting 2 seconds between attempts.\n  # See https://learn.microsoft.com/en-us/nuget/reference/errors-and-warnings/nu3028#retry-untrusted-root-failures\n  - name: NUGET_EXPERIMENTAL_CHAIN_BUILD_RETRY_POLICY\n    value: 3,2000\n  - ${{ each variable in parameters.variables }}:\n    # handle name-value variable syntax\n    # example:\n    # - name: [key]\n    #   value: [value]\n    - ${{ if ne(variable.name, '') }}:\n      - name: ${{ variable.name }}\n        value: ${{ variable.value }}\n\n    # handle variable groups\n    - ${{ if ne(variable.group, '') }}:\n      - group: ${{ variable.group }}\n\n    # handle template variable syntax\n    # example:\n    # - template: path/to/template.yml\n    #   parameters:\n    #     [key]: [value]\n    - ${{ if ne(variable.template, '') }}:\n      - template: ${{ variable.template }}\n        ${{ if ne(variable.parameters, '') }}:\n          parameters: ${{ variable.parameters }}\n\n    # handle key-value variable syntax.\n    # example:\n    # - [key]: [value]\n    - ${{ if and(eq(variable.name, ''), eq(variable.group, ''), eq(variable.template, '')) }}:\n      - ${{ each pair in variable }}:\n        - name: ${{ pair.key }}\n          value: ${{ pair.value }}\n\n  # DotNet-HelixApi-Access provides 'HelixApiAccessToken' for internal builds\n  - ${{ if and(eq(parameters.enableTelemetry, 'true'), eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:\n    - group: DotNet-HelixApi-Access\n\n  ${{ if ne(parameters.workspace, '') }}:\n    workspace: ${{ parameters.workspace }}\n\n  steps:\n  - ${{ if eq(parameters.is1ESPipeline, '') }}:\n    - 'Illegal entry point, is1ESPipeline is not defined. Repository yaml should not directly reference templates in core-templates folder.': error\n\n  - ${{ if ne(parameters.preSteps, '') }}:\n    - ${{ each preStep in parameters.preSteps }}:\n      - ${{ preStep }}\n\n  - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:\n    - template: /eng/common/core-templates/steps/install-microbuild.yml\n      parameters:\n        enableMicrobuild: ${{ parameters.enableMicrobuild }}\n        enablePreviewMicrobuild: ${{ parameters.enablePreviewMicrobuild }}\n        microbuildPluginVersion: ${{ parameters.microbuildPluginVersion }}\n        enableMicrobuildForMacAndLinux: ${{ parameters.enableMicrobuildForMacAndLinux }}\n        microbuildUseESRP: ${{ parameters.microbuildUseESRP }}\n        continueOnError: ${{ parameters.continueOnError }}\n\n  - ${{ if and(eq(parameters.runAsPublic, 'false'), eq(variables['System.TeamProject'], 'internal')) }}:\n    - task: NuGetAuthenticate@1\n\n  - ${{ if and(ne(parameters.artifacts.download, 'false'), ne(parameters.artifacts.download, '')) }}:\n    - task: DownloadPipelineArtifact@2\n      inputs:\n        buildType: current\n        artifactName: ${{ coalesce(parameters.artifacts.download.name, 'Artifacts_$(Agent.OS)_$(_BuildConfig)') }}\n        targetPath: ${{ coalesce(parameters.artifacts.download.path, 'artifacts') }}\n        itemPattern: ${{ coalesce(parameters.artifacts.download.pattern, '**') }}\n\n  - ${{ each step in parameters.steps }}:\n    - ${{ step }}\n\n  - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:\n    - template: /eng/common/core-templates/steps/cleanup-microbuild.yml\n      parameters:\n        enableMicrobuild: ${{ parameters.enableMicrobuild }}\n        enablePreviewMicrobuild: ${{ parameters.enablePreviewMicrobuild }}\n        microbuildPluginVersion: ${{ parameters.microbuildPluginVersion }}\n        enableMicrobuildForMacAndLinux: ${{ parameters.enableMicrobuildForMacAndLinux }}\n        continueOnError: ${{ parameters.continueOnError }}\n\n  # Publish test results\n  - ${{ if or(and(eq(parameters.enablePublishTestResults, 'true'), eq(parameters.testResultsFormat, '')), eq(parameters.testResultsFormat, 'xunit')) }}:\n    - task: PublishTestResults@2\n      displayName: Publish XUnit Test Results\n      inputs:\n        testResultsFormat: 'xUnit'\n        testResultsFiles: '*.xml'\n        searchFolder: '$(System.DefaultWorkingDirectory)/artifacts/TestResults/$(_BuildConfig)'\n        testRunTitle: ${{ coalesce(parameters.testRunTitle, parameters.name, '$(System.JobName)') }}-xunit\n        mergeTestResults: ${{ parameters.mergeTestResults }}\n      continueOnError: true\n      condition: always()\n  - ${{ if or(and(eq(parameters.enablePublishTestResults, 'true'), eq(parameters.testResultsFormat, '')), eq(parameters.testResultsFormat, 'vstest')) }}:\n    - task: PublishTestResults@2\n      displayName: Publish TRX Test Results\n      inputs:\n        testResultsFormat: 'VSTest'\n        testResultsFiles: '*.trx'\n        searchFolder: '$(System.DefaultWorkingDirectory)/artifacts/TestResults/$(_BuildConfig)'\n        testRunTitle: ${{ coalesce(parameters.testRunTitle, parameters.name, '$(System.JobName)') }}-trx\n        mergeTestResults: ${{ parameters.mergeTestResults }}\n      continueOnError: true\n      condition: always()\n\n  # gather artifacts\n  - ${{ if ne(parameters.artifacts.publish, '') }}:\n    - ${{ if and(ne(parameters.artifacts.publish.artifacts, 'false'), ne(parameters.artifacts.publish.artifacts, '')) }}:\n      - task: CopyFiles@2\n        displayName: Gather binaries for publish to artifacts\n        inputs:\n          SourceFolder: 'artifacts/bin'\n          Contents: '**'\n          TargetFolder: '$(Build.ArtifactStagingDirectory)/artifacts/bin'\n      - task: CopyFiles@2\n        displayName: Gather packages for publish to artifacts\n        inputs:\n          SourceFolder: 'artifacts/packages'\n          Contents: '**'\n          TargetFolder: '$(Build.ArtifactStagingDirectory)/artifacts/packages'\n    - ${{ if and(ne(parameters.artifacts.publish.logs, 'false'), ne(parameters.artifacts.publish.logs, '')) }}:\n      - task: CopyFiles@2\n        displayName: Gather logs for publish to artifacts\n        inputs:\n          SourceFolder: 'artifacts/log'\n          Contents: '**'\n          TargetFolder: '$(Build.ArtifactStagingDirectory)/artifacts/log'\n        continueOnError: true\n        condition: always()\n      \n  - ${{ if eq(parameters.enablePublishBuildArtifacts, 'true') }}:\n    - task: CopyFiles@2\n      displayName: Gather logs for publish to artifacts\n      inputs:\n        SourceFolder: 'artifacts/log/$(_BuildConfig)'\n        Contents: '**'\n        TargetFolder: '$(Build.ArtifactStagingDirectory)/artifacts/log/$(_BuildConfig)'\n      continueOnError: true\n      condition: always()\n  - ${{ if eq(parameters.enableBuildRetry, 'true') }}:\n    - task: CopyFiles@2\n      displayName: Gather buildconfiguration for build retry\n      inputs:\n        SourceFolder: '$(System.DefaultWorkingDirectory)/eng/common/BuildConfiguration'\n        Contents: '**'\n        TargetFolder: '$(Build.ArtifactStagingDirectory)/eng/common/BuildConfiguration'\n      continueOnError: true\n      condition: always()\n  - ${{ each step in parameters.artifactPublishSteps }}:\n    - ${{ step }}\n"
  },
  {
    "path": "eng/common/core-templates/job/onelocbuild.yml",
    "content": "parameters:\n  # Optional: dependencies of the job\n  dependsOn: ''\n\n  # Optional: A defined YAML pool - https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#pool\n  pool: ''\n\n  CeapexPat: $(dn-bot-ceapex-package-r) # PAT for the loc AzDO instance https://dev.azure.com/ceapex\n  GithubPat: $(BotAccount-dotnet-bot-repo-PAT)\n\n  SourcesDirectory: $(System.DefaultWorkingDirectory)\n  CreatePr: true\n  AutoCompletePr: false\n  ReusePr: true\n  UseLfLineEndings: true\n  UseCheckedInLocProjectJson: false\n  SkipLocProjectJsonGeneration: false\n  LanguageSet: VS_Main_Languages\n  LclSource: lclFilesInRepo\n  LclPackageId: ''\n  RepoType: gitHub\n  GitHubOrg: dotnet\n  MirrorRepo: ''\n  MirrorBranch: main\n  condition: ''\n  JobNameSuffix: ''\n  is1ESPipeline: ''\njobs:\n- job: OneLocBuild${{ parameters.JobNameSuffix }}\n\n  dependsOn: ${{ parameters.dependsOn }}\n\n  displayName: OneLocBuild${{ parameters.JobNameSuffix }}\n\n  variables:\n    - group: OneLocBuildVariables # Contains the CeapexPat and GithubPat\n    - name: _GenerateLocProjectArguments\n      value: -SourcesDirectory ${{ parameters.SourcesDirectory }}\n        -LanguageSet \"${{ parameters.LanguageSet }}\"\n        -CreateNeutralXlfs\n    - ${{ if eq(parameters.UseCheckedInLocProjectJson, 'true') }}:\n      - name: _GenerateLocProjectArguments\n        value: ${{ variables._GenerateLocProjectArguments }} -UseCheckedInLocProjectJson\n    - template: /eng/common/core-templates/variables/pool-providers.yml\n      parameters:\n        is1ESPipeline: ${{ parameters.is1ESPipeline }}\n\n  ${{ if ne(parameters.pool, '') }}:\n    pool: ${{ parameters.pool }}\n  ${{ if eq(parameters.pool, '') }}:\n    pool:\n      # We don't use the collection uri here because it might vary (.visualstudio.com vs. dev.azure.com)\n      ${{ if eq(variables['System.TeamProject'], 'DevDiv') }}:\n        name: AzurePipelines-EO\n        image: 1ESPT-Windows2025\n        demands: Cmd\n        os: windows\n      # If it's not devdiv, it's dnceng\n      ${{ if ne(variables['System.TeamProject'], 'DevDiv') }}:\n        name: $(DncEngInternalBuildPool)\n        image: windows.vs2026.amd64\n        os: windows\n\n  steps:\n    - ${{ if eq(parameters.is1ESPipeline, '') }}:\n      - 'Illegal entry point, is1ESPipeline is not defined. Repository yaml should not directly reference templates in core-templates folder.': error\n\n    - ${{ if ne(parameters.SkipLocProjectJsonGeneration, 'true') }}:\n      - task: Powershell@2\n        inputs:\n          filePath: $(System.DefaultWorkingDirectory)/eng/common/generate-locproject.ps1\n          arguments: $(_GenerateLocProjectArguments)\n        displayName: Generate LocProject.json\n        condition: ${{ parameters.condition }}\n\n    - task: OneLocBuild@2\n      displayName: OneLocBuild\n      env:\n        SYSTEM_ACCESSTOKEN: $(System.AccessToken)\n      inputs:\n        locProj: eng/Localize/LocProject.json\n        outDir: $(Build.ArtifactStagingDirectory)\n        lclSource: ${{ parameters.LclSource }}\n        lclPackageId: ${{ parameters.LclPackageId }}\n        isCreatePrSelected: ${{ parameters.CreatePr }}\n        isAutoCompletePrSelected: ${{ parameters.AutoCompletePr }}\n        ${{ if eq(parameters.CreatePr, true) }}:\n          isUseLfLineEndingsSelected: ${{ parameters.UseLfLineEndings }}\n          isShouldReusePrSelected: ${{ parameters.ReusePr }}\n        packageSourceAuth: patAuth\n        patVariable: ${{ parameters.CeapexPat }}\n        ${{ if eq(parameters.RepoType, 'gitHub') }}:\n          repoType: ${{ parameters.RepoType }}\n          gitHubPatVariable: \"${{ parameters.GithubPat }}\"\n        ${{ if ne(parameters.MirrorRepo, '') }}:\n          isMirrorRepoSelected: true\n          gitHubOrganization: ${{ parameters.GitHubOrg }}\n          mirrorRepo: ${{ parameters.MirrorRepo }}\n          mirrorBranch: ${{ parameters.MirrorBranch }}\n      condition: ${{ parameters.condition }}\n\n    # Copy the locProject.json to the root of the Loc directory, then publish a pipeline artifact\n    - task: CopyFiles@2\n      displayName: Copy LocProject.json\n      inputs:\n        SourceFolder: '$(System.DefaultWorkingDirectory)/eng/Localize/'\n        Contents: 'LocProject.json'\n        TargetFolder: '$(Build.ArtifactStagingDirectory)/loc'\n      condition: ${{ parameters.condition }}\n\n    - template: /eng/common/core-templates/steps/publish-pipeline-artifacts.yml\n      parameters:\n        is1ESPipeline: ${{ parameters.is1ESPipeline }}\n        args:\n          targetPath: '$(Build.ArtifactStagingDirectory)/loc'\n          artifactName: 'Loc'\n          displayName: 'Publish Localization Files'\n          condition: ${{ parameters.condition }}\n"
  },
  {
    "path": "eng/common/core-templates/job/publish-build-assets.yml",
    "content": "parameters:\n  configuration: 'Debug'\n\n  # Optional: condition for the job to run\n  condition: ''\n\n  # Optional: 'true' if future jobs should run even if this job fails\n  continueOnError: false\n\n  # Optional: dependencies of the job\n  dependsOn: ''\n\n  # Optional: Include PublishBuildArtifacts task\n  enablePublishBuildArtifacts: false\n\n  # Optional: A defined YAML pool - https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#pool\n  pool: {}\n\n  # Optional: should run as a public build even in the internal project\n  #           if 'true', the build won't run any of the internal only steps, even if it is running in non-public projects.\n  runAsPublic: false\n\n  # Optional: whether the build's artifacts will be published using release pipelines or direct feed publishing\n  publishAssetsImmediately: false\n\n  artifactsPublishingAdditionalParameters: ''\n\n  signingValidationAdditionalParameters: ''\n\n  is1ESPipeline: ''\n\n  # Optional: 🌤️ or not the build has assets it wants to publish to BAR\n  isAssetlessBuild: false\n\n  # Optional, publishing version\n  publishingVersion: 3\n\n  # Optional: A minimatch pattern for the asset manifests to publish to BAR\n  assetManifestsPattern: '*/manifests/**/*.xml'\n\n  repositoryAlias: self\n\n  officialBuildId: ''\n\njobs:\n- job: Asset_Registry_Publish\n\n  dependsOn: ${{ parameters.dependsOn }}\n  timeoutInMinutes: 150\n\n  ${{ if eq(parameters.publishAssetsImmediately, 'true') }}:\n    displayName: Publish Assets\n  ${{ else }}:\n    displayName: Publish to Build Asset Registry\n\n  variables:\n  - template: /eng/common/core-templates/variables/pool-providers.yml\n    parameters:\n      is1ESPipeline: ${{ parameters.is1ESPipeline }}\n  - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:\n    - group: Publish-Build-Assets\n    - group: AzureDevOps-Artifact-Feeds-Pats\n    - name: runCodesignValidationInjection\n      value: false\n    # unconditional - needed for logs publishing (redactor tool version)\n    - template: /eng/common/core-templates/post-build/common-variables.yml\n  - name: OfficialBuildId\n    ${{ if ne(parameters.officialBuildId, '') }}:\n      value: ${{ parameters.officialBuildId }}\n    ${{ else }}:\n      value: $(Build.BuildNumber)\n\n  pool:\n    # We don't use the collection uri here because it might vary (.visualstudio.com vs. dev.azure.com)\n    ${{ if eq(variables['System.TeamProject'], 'DevDiv') }}:\n      name: AzurePipelines-EO\n      image: 1ESPT-Windows2025\n      demands: Cmd\n      os: windows\n    # If it's not devdiv, it's dnceng\n    ${{ if ne(variables['System.TeamProject'], 'DevDiv') }}:\n      name: NetCore1ESPool-Publishing-Internal\n      image: windows.vs2026.amd64\n      os: windows\n  steps:\n  - ${{ if eq(parameters.is1ESPipeline, '') }}:\n    - 'Illegal entry point, is1ESPipeline is not defined. Repository yaml should not directly reference templates in core-templates folder.': error\n\n  - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:\n    - checkout: ${{ parameters.repositoryAlias }}\n      fetchDepth: 3\n      clean: true\n\n    - ${{ if eq(parameters.isAssetlessBuild, 'false') }}:\n      - ${{ if eq(parameters.publishingVersion, 3) }}:\n        - task: DownloadPipelineArtifact@2\n          displayName: Download Asset Manifests\n          inputs:\n            artifactName: AssetManifests\n            targetPath: '$(Build.StagingDirectory)/AssetManifests'\n          condition: ${{ parameters.condition }}\n          continueOnError: ${{ parameters.continueOnError }}\n      - ${{ if eq(parameters.publishingVersion, 4) }}:\n        - task: DownloadPipelineArtifact@2\n          displayName: Download V4 asset manifests\n          inputs:\n            itemPattern: '*/manifests/**/*.xml'\n            targetPath: '$(Build.StagingDirectory)/AllAssetManifests'\n          condition: ${{ parameters.condition }}\n          continueOnError: ${{ parameters.continueOnError }}\n        - task: CopyFiles@2\n          displayName: Copy V4 asset manifests to AssetManifests\n          inputs:\n            SourceFolder: '$(Build.StagingDirectory)/AllAssetManifests'\n            Contents: ${{ parameters.assetManifestsPattern }}\n            TargetFolder: '$(Build.StagingDirectory)/AssetManifests'\n            flattenFolders: true\n          condition: ${{ parameters.condition }}\n          continueOnError: ${{ parameters.continueOnError }}\n\n    - task: NuGetAuthenticate@1\n\n    # Populate internal runtime variables.\n    - template: /eng/common/templates/steps/enable-internal-sources.yml\n      ${{ if eq(variables['System.TeamProject'], 'DevDiv') }}:\n        parameters:\n            legacyCredential: $(dn-bot-dnceng-artifact-feeds-rw)\n\n    - template: /eng/common/templates/steps/enable-internal-runtimes.yml\n\n    - task: AzureCLI@2\n      displayName: Publish Build Assets\n      inputs:\n        azureSubscription: \"Darc: Maestro Production\"\n        scriptType: ps\n        scriptLocation: scriptPath\n        scriptPath: $(System.DefaultWorkingDirectory)/eng/common/sdk-task.ps1\n        arguments: -task PublishBuildAssets -restore -msbuildEngine dotnet\n          /p:ManifestsPath='$(Build.StagingDirectory)/AssetManifests'\n          /p:IsAssetlessBuild=${{ parameters.isAssetlessBuild }}\n          /p:MaestroApiEndpoint=https://maestro.dot.net\n          /p:OfficialBuildId=$(OfficialBuildId)\n          -runtimeSourceFeed https://ci.dot.net/internal\n          -runtimeSourceFeedKey '$(dotnetbuilds-internal-container-read-token-base64)'\n\n      condition: ${{ parameters.condition }}\n      continueOnError: ${{ parameters.continueOnError }}\n\n    - task: powershell@2\n      displayName: Create ReleaseConfigs Artifact\n      inputs:\n        targetType: inline\n        script: |\n          New-Item -Path \"$(Build.StagingDirectory)/ReleaseConfigs\" -ItemType Directory -Force\n          $filePath = \"$(Build.StagingDirectory)/ReleaseConfigs/ReleaseConfigs.txt\"\n          Add-Content -Path $filePath -Value $(BARBuildId)\n          Add-Content -Path $filePath -Value \"$(DefaultChannels)\"\n          Add-Content -Path $filePath -Value $(IsStableBuild)\n\n          $symbolExclusionfile = \"$(System.DefaultWorkingDirectory)/eng/SymbolPublishingExclusionsFile.txt\"\n          if (Test-Path -Path $symbolExclusionfile)\n          {\n            Write-Host \"SymbolExclusionFile exists\"\n            Copy-Item -Path $symbolExclusionfile -Destination \"$(Build.StagingDirectory)/ReleaseConfigs\"\n          }\n\n    - ${{ if eq(parameters.publishingVersion, 4) }}:\n      - template: /eng/common/core-templates/steps/publish-pipeline-artifacts.yml\n        parameters:\n          is1ESPipeline: ${{ parameters.is1ESPipeline }}\n          args:\n            targetPath: '$(Build.ArtifactStagingDirectory)/MergedManifest.xml'\n            artifactName: AssetManifests\n            displayName: 'Publish Merged Manifest'\n            retryCountOnTaskFailure: 10 # for any files being locked\n            isProduction: false # just metadata for publishing\n\n    - template: /eng/common/core-templates/steps/publish-pipeline-artifacts.yml\n      parameters:\n        is1ESPipeline: ${{ parameters.is1ESPipeline }}\n        args:\n          displayName: Publish ReleaseConfigs Artifact\n          targetPath: '$(Build.StagingDirectory)/ReleaseConfigs'\n          artifactName: ReleaseConfigs\n          retryCountOnTaskFailure: 10 # for any files being locked\n          isProduction: false # just metadata for publishing\n\n    - ${{ if or(eq(parameters.publishAssetsImmediately, 'true'), eq(parameters.isAssetlessBuild, 'true')) }}:\n      - template: /eng/common/core-templates/post-build/setup-maestro-vars.yml\n        parameters:\n          BARBuildId: ${{ parameters.BARBuildId }}\n          PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }}\n          is1ESPipeline: ${{ parameters.is1ESPipeline }}\n          \n      # Darc is targeting 8.0, so make sure it's installed\n      - task: UseDotNet@2\n        inputs:\n          version: 8.0.x\n\n      - task: AzureCLI@2\n        displayName: Publish Using Darc\n        inputs:\n          azureSubscription: \"Darc: Maestro Production\"\n          scriptType: ps\n          scriptLocation: scriptPath\n          scriptPath: $(System.DefaultWorkingDirectory)/eng/common/post-build/publish-using-darc.ps1\n          arguments: >\n            -BuildId $(BARBuildId)\n            -PublishingInfraVersion 3\n            -AzdoToken '$(System.AccessToken)'\n            -WaitPublishingFinish true\n            -ArtifactsPublishingAdditionalParameters '${{ parameters.artifactsPublishingAdditionalParameters }}'\n            -SymbolPublishingAdditionalParameters '${{ parameters.symbolPublishingAdditionalParameters }}'\n            -SkipAssetsPublishing '${{ parameters.isAssetlessBuild }}'\n            -runtimeSourceFeed https://ci.dot.net/internal\n            -runtimeSourceFeedKey '$(dotnetbuilds-internal-container-read-token-base64)'\n\n    - ${{ if eq(parameters.enablePublishBuildArtifacts, 'true') }}:\n      - template: /eng/common/core-templates/steps/publish-logs.yml\n        parameters:\n          is1ESPipeline: ${{ parameters.is1ESPipeline }}\n          StageLabel: 'BuildAssetRegistry'\n          JobLabel: 'Publish_Artifacts_Logs'\n"
  },
  {
    "path": "eng/common/core-templates/job/renovate.yml",
    "content": "# --------------------------------------------------------------------------------------\n# Renovate Bot Job Template\n# --------------------------------------------------------------------------------------\n# This Azure DevOps pipeline job template runs Renovate (https://docs.renovatebot.com/)\n# to automatically update dependencies in a GitHub repository.\n#\n# Renovate scans the repository for dependency files and creates pull requests to update\n# outdated dependencies based on the configuration specified in the renovateConfigPath\n# parameter.\n#\n# Usage:\n#   For each product repo wanting to make use of Renovate, this template is called from\n#   an internal Azure DevOps pipeline, typically with a schedule trigger, to check for\n#   and propose dependency updates.\n#\n# For more info, see https://github.com/dotnet/arcade/blob/main/Documentation/Renovate.md\n# --------------------------------------------------------------------------------------\n\nparameters:\n\n# Path to the Renovate configuration file within the repository.\n- name: renovateConfigPath\n  type: string\n  default: 'eng/renovate.json'\n\n# GitHub repository to run Renovate against, in the format 'owner/repo'.\n# This could technically be any repo but convention is to target the same\n# repo that contains the calling pipeline. The Renovate config file would\n# be co-located with the pipeline's repo and, in most cases, the config\n# file is specific to the repo being targeted.\n- name: gitHubRepo\n  type: string\n\n# List of base branches to target for Renovate PRs.\n# NOTE: The Renovate configuration file is always read from the branch where the\n# pipeline is run, NOT from the target branches specified here. If you need different\n# configurations for different branches, run the pipeline from each branch separately.\n- name: baseBranches\n  type: object\n  default:\n  - main\n\n# When true, Renovate will run in dry run mode, which previews changes without creating PRs.\n# See the 'Run Renovate' step log output for details of what would have been changed.\n- name: dryRun\n  type: boolean\n  default: false\n\n# By default, Renovate will not recreate a PR for a given dependency/version pair that was\n# previously closed. This allows opting in to always recreating PRs even if they were\n# previously closed.\n- name: forceRecreatePR\n  type: boolean\n  default: false\n\n# Name of the arcade repository resource in the pipeline.\n# This allows repos which haven't been onboarded to Arcade to still use this \n# template by checking out the repo as a resource with a custom name and pointing\n# this parameter to it.\n- name: arcadeRepoResource\n  type: string\n  default: self\n\n# Directory name for the self repo under $(Build.SourcesDirectory) in multi-checkout.\n# In multi-checkout (when arcadeRepoResource != 'self'), Azure DevOps checks out the\n# self repo to $(Build.SourcesDirectory)/<repoName>. Set this to match the auto-generated\n# directory name. Using the auto-generated name is necessary rather than explicitly\n# defining a checkout path because container jobs expect repos to live under the agent's\n# workspace ($(Pipeline.Workspace)). On some self-hosted setups the host path\n# (e.g., /mnt/vss/_work) differs from the container path (e.g., /__w), and a custom checkout\n# path can fail validation. Using the default checkout location keeps the paths consistent\n# and avoids this issue.\n- name: selfRepoName\n  type: string\n  default: ''\n- name: arcadeRepoName\n  type: string\n  default: ''\n\n# Pool configuration for the job.\n- name: pool\n  type: object\n  default:\n    name: NetCore1ESPool-Internal\n    image: build.azurelinux.3.amd64\n    os: linux\n\njobs:\n- job: Renovate\n  displayName: Run Renovate\n  container: RenovateContainer\n  variables:\n  - group: dotnet-renovate-bot\n  # The Renovate version is automatically updated by https://github.com/dotnet/arcade/blob/main/azure-pipelines-renovate.yml.\n  # Changing the variable name here would require updating the name in https://github.com/dotnet/arcade/blob/main/eng/renovate.json as well.\n  - name: renovateVersion\n    value: '42'\n    readonly: true\n  - name: renovateLogFilePath\n    value: '$(Build.ArtifactStagingDirectory)/renovate.json'\n    readonly: true\n  - name: dryRunArg\n    readonly: true\n    ${{ if eq(parameters.dryRun, true) }}:\n      value: 'full'\n    ${{ else }}:\n      value: ''\n  - name: recreateWhenArg\n    readonly: true\n    ${{ if eq(parameters.forceRecreatePR, true) }}:\n      value: 'always'\n    ${{ else }}:\n      value: ''\n  # In multi-checkout (without custom paths), Azure DevOps places each repo under\n  # $(Build.SourcesDirectory)/<repoName>. selfRepoName must be provided in that case.\n  - name: selfRepoPath\n    readonly: true\n    ${{ if eq(parameters.arcadeRepoResource, 'self') }}:\n      value: '$(Build.SourcesDirectory)'\n    ${{ else }}:\n      value: '$(Build.SourcesDirectory)/${{ parameters.selfRepoName }}'\n  - name: arcadeRepoPath\n    readonly: true\n    ${{ if eq(parameters.arcadeRepoResource, 'self') }}:\n      value: '$(Build.SourcesDirectory)'\n    ${{ else }}:\n      value: '$(Build.SourcesDirectory)/${{ parameters.arcadeRepoName }}'\n  pool: ${{ parameters.pool }}\n  \n  templateContext:\n    outputParentDirectory: $(Build.ArtifactStagingDirectory)\n    outputs:\n    - output: pipelineArtifact\n      displayName: Publish Renovate Log\n      condition: succeededOrFailed()\n      targetPath: $(Build.ArtifactStagingDirectory)\n      artifactName: $(Agent.JobName)_Logs_Attempt$(System.JobAttempt)\n      isProduction: false # logs are non-production artifacts\n\n  steps:\n  - checkout: self\n    fetchDepth: 1\n  \n  - ${{ if ne(parameters.arcadeRepoResource, 'self') }}:\n    - checkout: ${{ parameters.arcadeRepoResource }}\n      fetchDepth: 1\n\n  - script: |\n      renovate-config-validator $(selfRepoPath)/${{parameters.renovateConfigPath}} 2>&1 | tee /tmp/renovate-config-validator.out\n      validatorExit=${PIPESTATUS[0]}\n      if grep -q '^ WARN:' /tmp/renovate-config-validator.out; then\n        echo \"##vso[task.logissue type=warning]Renovate config validator produced warnings.\"\n        echo \"##vso[task.complete result=SucceededWithIssues]\"\n      fi\n      exit $validatorExit\n    displayName: Validate Renovate config\n    env:\n      LOG_LEVEL: info\n      LOG_FILE_LEVEL: debug\n      LOG_FILE: $(Build.ArtifactStagingDirectory)/renovate-config-validator.json\n  \n  - script: |\n      . $(arcadeRepoPath)/eng/common/renovate.env\n      renovate 2>&1 | tee /tmp/renovate.out\n      renovateExit=${PIPESTATUS[0]}\n      if grep -q '^ WARN:' /tmp/renovate.out; then\n        echo \"##vso[task.logissue type=warning]Renovate produced warnings.\"\n        echo \"##vso[task.complete result=SucceededWithIssues]\"\n      fi\n      exit $renovateExit\n    displayName: Run Renovate\n    env:\n      RENOVATE_FORK_TOKEN: $(BotAccount-dotnet-renovate-bot-PAT)\n      RENOVATE_TOKEN: $(BotAccount-dotnet-renovate-bot-PAT)\n      RENOVATE_REPOSITORIES: ${{parameters.gitHubRepo}}\n      RENOVATE_BASE_BRANCHES: ${{ convertToJson(parameters.baseBranches) }}\n      RENOVATE_DRY_RUN: $(dryRunArg)\n      RENOVATE_RECREATE_WHEN: $(recreateWhenArg)\n      LOG_LEVEL: info\n      LOG_FILE_LEVEL: debug\n      LOG_FILE: $(renovateLogFilePath)\n      RENOVATE_CONFIG_FILE: $(selfRepoPath)/${{parameters.renovateConfigPath}}\n  \n  - script: |\n      echo \"PRs created by Renovate:\"\n      if [ -s \"$(renovateLogFilePath)\" ]; then\n        if ! jq -r 'select(.msg == \"PR created\" and .pr != null) | \"https://github.com/\\(.repository)/pull/\\(.pr)\"' \"$(renovateLogFilePath)\" | sort -u; then\n          echo \"##vso[task.logissue type=warning]Failed to parse Renovate log file with jq.\"\n          echo \"##vso[task.complete result=SucceededWithIssues]\"\n        fi\n      else\n        echo \"##vso[task.logissue type=warning]No Renovate log file found or file is empty.\"\n        echo \"##vso[task.complete result=SucceededWithIssues]\"\n      fi\n    displayName: List created PRs\n    condition: and(succeededOrFailed(), eq('${{ parameters.dryRun }}', false))\n"
  },
  {
    "path": "eng/common/core-templates/job/source-build.yml",
    "content": "parameters:\n  # This template adds arcade-powered source-build to CI. The template produces a server job with a\n  # default ID 'Source_Build_Complete' to put in a dependency list if necessary.\n\n  # Specifies the prefix for source-build jobs added to pipeline. Use this if disambiguation needed.\n  jobNamePrefix: 'Source_Build'\n\n  # Defines the platform on which to run the job. By default, a linux-x64 machine, suitable for\n  # managed-only repositories. This is an object with these properties:\n  #\n  # name: ''\n  #   The name of the job. This is included in the job ID.\n  # targetRID: ''\n  #   The name of the target RID to use, instead of the one auto-detected by Arcade.\n  # portableBuild: false\n  #   Enables non-portable mode. This means a more specific RID (e.g. fedora.32-x64 rather than\n  #   linux-x64), and compiling against distro-provided packages rather than portable ones. The\n  #   default is portable mode.\n  # skipPublishValidation: false\n  #   Disables publishing validation.  By default, a check is performed to ensure no packages are\n  #   published by source-build.\n  # container: ''\n  #   A container to use. Runs in docker.\n  # pool: {}\n  #   A pool to use. Runs directly on an agent.\n  # buildScript: ''\n  #   Specifies the build script to invoke to perform the build in the repo. The default\n  #   './build.sh' should work for typical Arcade repositories, but this is customizable for\n  #   difficult situations.\n  # buildArguments: ''\n  #   Specifies additional build arguments to pass to the build script.\n  # jobProperties: {}\n  #   A list of job properties to inject at the top level, for potential extensibility beyond\n  #   container and pool.\n  platform: {}\n\n  is1ESPipeline: ''\n\n  # If set to true and running on a non-public project,\n  # Internal nuget and blob storage locations will be enabled.\n  # This is not enabled by default because many repositories do not need internal sources\n  # and do not need to have the required service connections approved in the pipeline.\n  enableInternalSources: false\n\njobs:\n- job: ${{ parameters.jobNamePrefix }}_${{ parameters.platform.name }}\n  displayName: Source-Build (${{ parameters.platform.name }})\n\n  ${{ each property in parameters.platform.jobProperties }}:\n    ${{ property.key }}: ${{ property.value }}\n\n  ${{ if ne(parameters.platform.container, '') }}:\n    container: ${{ parameters.platform.container }}\n\n  ${{ if eq(parameters.platform.pool, '') }}:\n    # The default VM host AzDO pool. This should be capable of running Docker containers: almost all\n    # source-build builds run in Docker, including the default managed platform.\n    # /eng/common/core-templates/variables/pool-providers.yml can't be used here (some customers declare variables already), so duplicate its logic\n    ${{ if eq(parameters.is1ESPipeline, 'true') }}:\n      pool:\n        ${{ if eq(variables['System.TeamProject'], 'public') }}:\n          name: $[replace(replace(eq(contains(coalesce(variables['System.PullRequest.TargetBranch'], variables['Build.SourceBranch'], 'refs/heads/main'), 'release'), 'true'), True, 'NetCore-Svc-Public' ), False, 'NetCore-Public')]\n          demands: ImageOverride -equals build.azurelinux.3.amd64.open\n        ${{ if eq(variables['System.TeamProject'], 'internal') }}:\n          name: $[replace(replace(eq(contains(coalesce(variables['System.PullRequest.TargetBranch'], variables['Build.SourceBranch'], 'refs/heads/main'), 'release'), 'true'), True, 'NetCore1ESPool-Svc-Internal'), False, 'NetCore1ESPool-Internal')]\n          image: build.azurelinux.3.amd64\n          os: linux\n    ${{ else }}:\n      pool:\n        ${{ if eq(variables['System.TeamProject'], 'public') }}:\n          name: $[replace(replace(eq(contains(coalesce(variables['System.PullRequest.TargetBranch'], variables['Build.SourceBranch'], 'refs/heads/main'), 'release'), 'true'), True, 'NetCore-Svc-Public' ), False, 'NetCore-Public')]\n          demands: ImageOverride -equals build.azurelinux.3.amd64.open\n        ${{ if eq(variables['System.TeamProject'], 'internal') }}:\n          name: $[replace(replace(eq(contains(coalesce(variables['System.PullRequest.TargetBranch'], variables['Build.SourceBranch'], 'refs/heads/main'), 'release'), 'true'), True, 'NetCore1ESPool-Svc-Internal'), False, 'NetCore1ESPool-Internal')]\n          demands: ImageOverride -equals build.azurelinux.3.amd64\n  ${{ if ne(parameters.platform.pool, '') }}:\n    pool: ${{ parameters.platform.pool }}\n\n  workspace:\n    clean: all\n\n  steps:\n  - ${{ if eq(parameters.is1ESPipeline, '') }}:\n    - 'Illegal entry point, is1ESPipeline is not defined. Repository yaml should not directly reference templates in core-templates folder.': error\n\n  - ${{ if eq(parameters.enableInternalSources, true) }}:\n    - template: /eng/common/core-templates/steps/enable-internal-sources.yml\n      parameters:\n        is1ESPipeline: ${{ parameters.is1ESPipeline }}\n    - template: /eng/common/core-templates/steps/enable-internal-runtimes.yml\n      parameters:\n        is1ESPipeline: ${{ parameters.is1ESPipeline }}\n  - template: /eng/common/core-templates/steps/source-build.yml\n    parameters:\n      is1ESPipeline: ${{ parameters.is1ESPipeline }}\n      platform: ${{ parameters.platform }}\n"
  },
  {
    "path": "eng/common/core-templates/job/source-index-stage1.yml",
    "content": "parameters:\n  runAsPublic: false\n  sourceIndexBuildCommand: powershell -NoLogo -NoProfile -ExecutionPolicy Bypass -Command \"eng/common/build.ps1 -restore -build -binarylog -ci\"\n  preSteps: []\n  binlogPath: artifacts/log/Debug/Build.binlog\n  condition: eq(variables['Build.SourceBranch'], 'refs/heads/main')\n  dependsOn: ''\n  pool: ''\n  is1ESPipeline: ''\n\njobs:\n- job: SourceIndexStage1\n  dependsOn: ${{ parameters.dependsOn }}\n  condition: ${{ parameters.condition }}\n  variables:\n  - name: BinlogPath\n    value: ${{ parameters.binlogPath }}\n  - name: skipComponentGovernanceDetection\n    value: true\n  - template: /eng/common/core-templates/variables/pool-providers.yml\n    parameters:\n      is1ESPipeline: ${{ parameters.is1ESPipeline }}\n\n  ${{ if ne(parameters.pool, '') }}:\n    pool: ${{ parameters.pool }}\n  ${{ if eq(parameters.pool, '') }}:\n    pool:\n      ${{ if eq(variables['System.TeamProject'], 'public') }}:\n        name: $(DncEngPublicBuildPool)\n        image: windows.vs2026.amd64.open\n      ${{ if eq(variables['System.TeamProject'], 'internal') }}:\n        name: $(DncEngInternalBuildPool)\n        image: windows.vs2026.amd64\n\n  steps:\n  - ${{ if eq(parameters.is1ESPipeline, '') }}:\n    - 'Illegal entry point, is1ESPipeline is not defined. Repository yaml should not directly reference templates in core-templates folder.': error\n\n  - ${{ each preStep in parameters.preSteps }}:\n    - ${{ preStep }}\n  - script: ${{ parameters.sourceIndexBuildCommand }}\n    displayName: Build Repository\n\n  - template: /eng/common/core-templates/steps/source-index-stage1-publish.yml\n    parameters:\n      binLogPath: ${{ parameters.binLogPath }}\n"
  },
  {
    "path": "eng/common/core-templates/jobs/jobs.yml",
    "content": "parameters:\n  # See schema documentation in /Documentation/AzureDevOps/TemplateSchema.md\n  continueOnError: false\n\n  # Optional: Include PublishBuildArtifacts task\n  enablePublishBuildArtifacts: false\n\n  # Optional: Enable running the source-build jobs to build repo from source\n  enableSourceBuild: false\n\n  # Optional: Parameters for source-build template.\n  #           See /eng/common/core-templates/jobs/source-build.yml for options\n  sourceBuildParameters: []\n\n  graphFileGeneration:\n    # Optional: Enable generating the graph files at the end of the build\n    enabled: false\n    # Optional: Include toolset dependencies in the generated graph files\n    includeToolset: false\n    \n  # Required: A collection of jobs to run - https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#job\n  jobs: []\n\n  # Optional: Override automatically derived dependsOn value for \"publish build assets\" job\n  publishBuildAssetsDependsOn: ''\n\n  # Optional: Publish the assets as soon as the publish to BAR stage is complete, rather doing so in a separate stage.\n  publishAssetsImmediately: false\n\n  # Optional: 🌤️ or not the build has assets it wants to publish to BAR\n  isAssetlessBuild: false\n\n  # Optional: If using publishAssetsImmediately and additional parameters are needed, can be used to send along additional parameters (normally sent to post-build.yml)\n  artifactsPublishingAdditionalParameters: ''\n  signingValidationAdditionalParameters: ''\n\n  # Optional: should run as a public build even in the internal project\n  #           if 'true', the build won't run any of the internal only steps, even if it is running in non-public projects.\n  runAsPublic: false\n\n  enableSourceIndex: false\n  sourceIndexParams: {}\n\n  artifacts: {}\n  is1ESPipeline: ''\n\n  # Publishing version w/default.\n  publishingVersion: 3\n\n  repositoryAlias: self\n  officialBuildId: ''\n\n# Internal resources (telemetry, microbuild) can only be accessed from non-public projects,\n# and some (Microbuild) should only be applied to non-PR cases for internal builds.\n\njobs:\n- ${{ each job in parameters.jobs }}:\n  - ${{ if eq(parameters.is1ESPipeline, 'true') }}:\n    - template: /eng/common/templates-official/job/job.yml\n      parameters: \n        # pass along parameters\n        ${{ each parameter in parameters }}:\n          ${{ if ne(parameter.key, 'jobs') }}:\n            ${{ parameter.key }}: ${{ parameter.value }}\n\n        # pass along job properties\n        ${{ each property in job }}:\n          ${{ if ne(property.key, 'job') }}:\n            ${{ property.key }}: ${{ property.value }}\n\n        name: ${{ job.job }}\n\n  - ${{ else }}:\n    - template: /eng/common/templates/job/job.yml\n      parameters: \n        # pass along parameters\n        ${{ each parameter in parameters }}:\n          ${{ if ne(parameter.key, 'jobs') }}:\n            ${{ parameter.key }}: ${{ parameter.value }}\n\n        # pass along job properties\n        ${{ each property in job }}:\n          ${{ if ne(property.key, 'job') }}:\n            ${{ property.key }}: ${{ property.value }}\n\n        name: ${{ job.job }}\n\n- ${{ if eq(parameters.enableSourceBuild, true) }}:\n  - template: /eng/common/core-templates/jobs/source-build.yml\n    parameters:\n      is1ESPipeline: ${{ parameters.is1ESPipeline }}\n      ${{ each parameter in parameters.sourceBuildParameters }}:\n        ${{ parameter.key }}: ${{ parameter.value }}\n\n- ${{ if eq(parameters.enableSourceIndex, 'true') }}:\n  - template: ../job/source-index-stage1.yml\n    parameters:\n      is1ESPipeline: ${{ parameters.is1ESPipeline }}\n      runAsPublic: ${{ parameters.runAsPublic }}\n      ${{ each parameter in parameters.sourceIndexParams }}:\n        ${{ parameter.key }}: ${{ parameter.value }}\n\n- ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:\n  - ${{ if or(eq(parameters.enablePublishBuildAssets, true), eq(parameters.artifacts.publish.manifests, 'true'), ne(parameters.artifacts.publish.manifests, ''), eq(parameters.isAssetlessBuild, true)) }}:\n    - template: ../job/publish-build-assets.yml\n      parameters:\n        is1ESPipeline: ${{ parameters.is1ESPipeline }}\n        continueOnError: ${{ parameters.continueOnError }}\n        publishingVersion: ${{ parameters.publishingVersion }}\n        dependsOn:\n        - ${{ if ne(parameters.publishBuildAssetsDependsOn, '') }}:\n          - ${{ each job in parameters.publishBuildAssetsDependsOn }}:\n            - ${{ job.job }}\n        - ${{ if eq(parameters.publishBuildAssetsDependsOn, '') }}:\n          - ${{ each job in parameters.jobs }}:\n            - ${{ job.job }}\n\n        runAsPublic: ${{ parameters.runAsPublic }}\n        publishAssetsImmediately: ${{ or(parameters.publishAssetsImmediately, parameters.isAssetlessBuild) }}\n        isAssetlessBuild: ${{ parameters.isAssetlessBuild }}\n        enablePublishBuildArtifacts: ${{ parameters.enablePublishBuildArtifacts }}\n        artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}\n        signingValidationAdditionalParameters: ${{ parameters.signingValidationAdditionalParameters }}\n        repositoryAlias: ${{ parameters.repositoryAlias }}\n        officialBuildId: ${{ parameters.officialBuildId }}\n"
  },
  {
    "path": "eng/common/core-templates/jobs/source-build.yml",
    "content": "parameters:\n  # This template adds arcade-powered source-build to CI. A job is created for each platform, as\n  # well as an optional server job that completes when all platform jobs complete.\n\n  # See /eng/common/core-templates/job/source-build.yml\n  jobNamePrefix: 'Source_Build'\n\n  # This is the default platform provided by Arcade, intended for use by a managed-only repo.\n  defaultManagedPlatform:\n    name: 'Managed'\n    container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream-10-amd64'\n\n  # Defines the platforms on which to run build jobs. One job is created for each platform, and the\n  # object in this array is sent to the job template as 'platform'. If no platforms are specified,\n  # one job runs on 'defaultManagedPlatform'.\n  platforms: []\n\n  is1ESPipeline: ''\n\n  # If set to true and running on a non-public project,\n  # Internal nuget and blob storage locations will be enabled.\n  # This is not enabled by default because many repositories do not need internal sources\n  # and do not need to have the required service connections approved in the pipeline.\n  enableInternalSources: false\n\njobs:\n\n- ${{ each platform in parameters.platforms }}:\n  - template: /eng/common/core-templates/job/source-build.yml\n    parameters:\n      is1ESPipeline: ${{ parameters.is1ESPipeline }}\n      jobNamePrefix: ${{ parameters.jobNamePrefix }}\n      platform: ${{ platform }}\n      enableInternalSources: ${{ parameters.enableInternalSources }}\n\n- ${{ if eq(length(parameters.platforms), 0) }}:\n  - template: /eng/common/core-templates/job/source-build.yml\n    parameters:\n      is1ESPipeline: ${{ parameters.is1ESPipeline }}\n      jobNamePrefix: ${{ parameters.jobNamePrefix }}\n      platform: ${{ parameters.defaultManagedPlatform }}\n      enableInternalSources: ${{ parameters.enableInternalSources }}\n"
  },
  {
    "path": "eng/common/core-templates/post-build/common-variables.yml",
    "content": "variables:\n  - group: Publish-Build-Assets\n\n  # Whether the build is internal or not\n  - name: IsInternalBuild\n    value: ${{ and(ne(variables['System.TeamProject'], 'public'), contains(variables['Build.SourceBranch'], 'internal')) }}\n\n  # Default Maestro++ API Endpoint and API Version\n  - name: MaestroApiEndPoint\n    value: \"https://maestro.dot.net\"\n  - name: MaestroApiVersion\n    value: \"2020-02-20\"\n\n  - name: SymbolToolVersion\n    value: 1.0.1\n  - name: BinlogToolVersion\n    value: 1.0.11\n\n  - name: runCodesignValidationInjection\n    value: false\n"
  },
  {
    "path": "eng/common/core-templates/post-build/post-build.yml",
    "content": "parameters:\n# Which publishing infra should be used. THIS SHOULD MATCH THE VERSION ON THE BUILD MANIFEST.\n# Publishing V1 is no longer supported\n# Publishing V2 is no longer supported\n# Publishing V3 is the default\n- name: publishingInfraVersion\n  displayName: Which version of publishing should be used to promote the build definition?\n  type: number\n  default: 3\n  values:\n  - 3\n  - 4\n\n- name: BARBuildId\n  displayName: BAR Build Id\n  type: number\n  default: 0\n\n- name: PromoteToChannelIds\n  displayName: Channel to promote BARBuildId to\n  type: string\n  default: ''\n\n- name: enableSourceLinkValidation\n  displayName: Enable SourceLink validation\n  type: boolean\n  default: false\n\n- name: enableSigningValidation\n  displayName: Enable signing validation\n  type: boolean\n  default: true\n\n- name: enableSymbolValidation\n  displayName: Enable symbol validation\n  type: boolean\n  default: false\n\n- name: enableNugetValidation\n  displayName: Enable NuGet validation\n  type: boolean\n  default: true\n\n- name: publishInstallersAndChecksums\n  displayName: Publish installers and checksums\n  type: boolean\n  default: true\n\n- name: requireDefaultChannels\n  displayName: Fail the build if there are no default channel(s) registrations for the current build\n  type: boolean\n  default: false\n\n- name: isAssetlessBuild\n  type: boolean\n  displayName: Is Assetless Build\n  default: false\n\n# These parameters let the user customize the call to sdk-task.ps1 for publishing\n# symbols & general artifacts as well as for signing validation\n- name: symbolPublishingAdditionalParameters\n  displayName: Symbol publishing additional parameters\n  type: string\n  default: ''\n\n- name: artifactsPublishingAdditionalParameters\n  displayName: Artifact publishing additional parameters\n  type: string\n  default: ''\n\n- name: signingValidationAdditionalParameters\n  displayName: Signing validation additional parameters\n  type: string\n  default: ''\n\n# Which stages should finish execution before post-build stages start\n- name: validateDependsOn\n  type: object\n  default:\n  - build\n\n- name: publishDependsOn\n  type: object\n  default:\n  - Validate\n\n# Optional: Call asset publishing rather than running in a separate stage\n- name: publishAssetsImmediately\n  type: boolean\n  default: false\n\n- name: is1ESPipeline\n  type: boolean\n  default: false\n\nstages:\n- ${{ if or(eq( parameters.enableNugetValidation, 'true'), eq(parameters.enableSigningValidation, 'true'), eq(parameters.enableSourceLinkValidation, 'true')) }}:\n  - stage: Validate\n    dependsOn: ${{ parameters.validateDependsOn }}\n    displayName: Validate Build Assets\n    variables:\n    - template: /eng/common/core-templates/post-build/common-variables.yml\n    - template: /eng/common/core-templates/variables/pool-providers.yml\n      parameters:\n        is1ESPipeline: ${{ parameters.is1ESPipeline }}\n    jobs:\n    - job:\n      displayName: NuGet Validation\n      condition: and(succeededOrFailed(), eq( ${{ parameters.enableNugetValidation }}, 'true'))\n      pool:\n        # We don't use the collection uri here because it might vary (.visualstudio.com vs. dev.azure.com)\n        ${{ if eq(variables['System.TeamProject'], 'DevDiv') }}:\n          name: AzurePipelines-EO\n          image: 1ESPT-Windows2025\n          demands: Cmd\n          os: windows\n        # If it's not devdiv, it's dnceng\n        ${{ else }}:\n          ${{ if eq(parameters.is1ESPipeline, true) }}:\n            name: $(DncEngInternalBuildPool)\n            image: windows.vs2026.amd64\n            os: windows\n          ${{ else }}:\n            name: $(DncEngInternalBuildPool)\n            demands: ImageOverride -equals windows.vs2026.amd64\n\n      steps:\n      - template: /eng/common/core-templates/post-build/setup-maestro-vars.yml\n        parameters:\n          BARBuildId: ${{ parameters.BARBuildId }}\n          PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }}\n          is1ESPipeline: ${{ parameters.is1ESPipeline }}\n\n      - ${{ if ne(parameters.publishingInfraVersion, 4) }}:\n        - task: DownloadBuildArtifacts@0\n          displayName: Download Package Artifacts\n          inputs:\n            buildType: specific\n            buildVersionToDownload: specific\n            project: $(AzDOProjectName)\n            pipeline: $(AzDOPipelineId)\n            buildId: $(AzDOBuildId)\n            artifactName: PackageArtifacts\n            checkDownloadedFiles: true\n      - ${{ if eq(parameters.publishingInfraVersion, 4) }}:\n        - task: DownloadPipelineArtifact@2\n          displayName: Download Pipeline Artifacts (V4)\n          inputs:\n            itemPattern: '*/packages/**/*.nupkg'\n            targetPath: '$(Build.ArtifactStagingDirectory)/PipelineArtifactsDownload'\n        - task: CopyFiles@2\n          displayName: Flatten packages to PackageArtifacts\n          inputs:\n            SourceFolder: '$(Build.ArtifactStagingDirectory)/PipelineArtifactsDownload'\n            Contents: '**/*.nupkg'\n            TargetFolder: '$(Build.ArtifactStagingDirectory)/PackageArtifacts'\n            flattenFolders: true\n\n      - task: PowerShell@2\n        displayName: Validate\n        inputs:\n          filePath: $(System.DefaultWorkingDirectory)/eng/common/post-build/nuget-validation.ps1\n          arguments: -PackagesPath $(Build.ArtifactStagingDirectory)/PackageArtifacts/\n\n    - job:\n      displayName: Signing Validation\n      condition: and( eq( ${{ parameters.enableSigningValidation }}, 'true'), ne( variables['PostBuildSign'], 'true'))\n      pool:\n        # We don't use the collection uri here because it might vary (.visualstudio.com vs. dev.azure.com)\n        ${{ if eq(variables['System.TeamProject'], 'DevDiv') }}:\n          name: AzurePipelines-EO\n          image: 1ESPT-Windows2025\n          demands: Cmd\n          os: windows\n        # If it's not devdiv, it's dnceng\n        ${{ else }}:\n          ${{ if eq(parameters.is1ESPipeline, true) }}:\n            name: $(DncEngInternalBuildPool)\n            image: windows.vs2026.amd64\n            os: windows\n          ${{ else }}:\n            name: $(DncEngInternalBuildPool)\n            demands: ImageOverride -equals windows.vs2026.amd64\n      steps:\n      - template: /eng/common/core-templates/post-build/setup-maestro-vars.yml\n        parameters:\n          BARBuildId: ${{ parameters.BARBuildId }}\n          PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }}\n          is1ESPipeline: ${{ parameters.is1ESPipeline }}\n\n      - ${{ if ne(parameters.publishingInfraVersion, 4) }}:\n        - task: DownloadBuildArtifacts@0\n          displayName: Download Package Artifacts\n          inputs:\n            buildType: specific\n            buildVersionToDownload: specific\n            project: $(AzDOProjectName)\n            pipeline: $(AzDOPipelineId)\n            buildId: $(AzDOBuildId)\n            artifactName: PackageArtifacts\n            checkDownloadedFiles: true\n      - ${{ if eq(parameters.publishingInfraVersion, 4) }}:\n        - task: DownloadPipelineArtifact@2\n          displayName: Download Pipeline Artifacts (V4)\n          inputs:\n            itemPattern: '*/packages/**/*.nupkg'\n            targetPath: '$(Build.ArtifactStagingDirectory)/PipelineArtifactsDownload'\n        - task: CopyFiles@2\n          displayName: Flatten packages to PackageArtifacts\n          inputs:\n            SourceFolder: '$(Build.ArtifactStagingDirectory)/PipelineArtifactsDownload'\n            Contents: '**/*.nupkg'\n            TargetFolder: '$(Build.ArtifactStagingDirectory)/PackageArtifacts'\n            flattenFolders: true\n\n      # This is necessary whenever we want to publish/restore to an AzDO private feed\n      # Since sdk-task.ps1 tries to restore packages we need to do this authentication here\n      # otherwise it'll complain about accessing a private feed.\n      - task: NuGetAuthenticate@1\n        displayName: 'Authenticate to AzDO Feeds'\n\n      # Signing validation will optionally work with the buildmanifest file which is downloaded from\n      # Azure DevOps above.\n      - task: PowerShell@2\n        displayName: Validate\n        inputs:\n          filePath: eng\\common\\sdk-task.ps1\n          arguments: -task SigningValidation -restore -msbuildEngine dotnet\n            /p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts'\n            /p:SignCheckExclusionsFile='$(System.DefaultWorkingDirectory)/eng/SignCheckExclusionsFile.txt'\n            ${{ parameters.signingValidationAdditionalParameters }}\n\n      - template: /eng/common/core-templates/steps/publish-logs.yml\n        parameters:\n          is1ESPipeline: ${{ parameters.is1ESPipeline }}\n          StageLabel: 'Validation'\n          JobLabel: 'Signing'\n          BinlogToolVersion: $(BinlogToolVersion)\n\n    # SourceLink validation has been removed — the underlying CLI tool\n    # (targeting netcoreapp2.1) has not functioned for years.\n    # The enableSourceLinkValidation parameter is kept but ignored so\n    # existing pipelines that pass it are not broken.\n    # See https://github.com/dotnet/arcade/issues/16647\n    - ${{ if eq(parameters.enableSourceLinkValidation, 'true') }}:\n      - job:\n        displayName: 'SourceLink Validation Removed - please remove enableSourceLinkValidation from your pipeline'\n        pool: server\n        steps:\n        - task: Delay@1\n          displayName: 'Warning: SourceLink validation removed (see https://github.com/dotnet/arcade/issues/16647)'\n          inputs:\n            delayForMinutes: '0'\n\n- ${{ if ne(parameters.publishAssetsImmediately, 'true') }}:\n  - stage: publish_using_darc\n    ${{ if or(eq(parameters.enableNugetValidation, 'true'), eq(parameters.enableSigningValidation, 'true'), eq(parameters.enableSourceLinkValidation, 'true')) }}:\n      dependsOn: ${{ parameters.publishDependsOn }}\n    ${{ else }}:\n      dependsOn: ${{ parameters.validateDependsOn }}\n    displayName: Publish using Darc\n    variables:\n    - template: /eng/common/core-templates/post-build/common-variables.yml\n    - template: /eng/common/core-templates/variables/pool-providers.yml\n      parameters:\n        is1ESPipeline: ${{ parameters.is1ESPipeline }}\n    jobs:\n    - job:\n      displayName: Publish Using Darc\n      timeoutInMinutes: 120\n      pool:\n        # We don't use the collection uri here because it might vary (.visualstudio.com vs. dev.azure.com)\n        ${{ if eq(variables['System.TeamProject'], 'DevDiv') }}:\n          name: AzurePipelines-EO\n          image: 1ESPT-Windows2025\n          demands: Cmd\n          os: windows\n        # If it's not devdiv, it's dnceng\n        ${{ else }}:\n          ${{ if eq(parameters.is1ESPipeline, true) }}:\n            name: NetCore1ESPool-Publishing-Internal\n            image: windows.vs2026.amd64\n            os: windows\n          ${{ else }}:\n            name: NetCore1ESPool-Publishing-Internal\n            demands: ImageOverride -equals windows.vs2026.amd64\n      steps:\n      - template: /eng/common/core-templates/post-build/setup-maestro-vars.yml\n        parameters:\n          BARBuildId: ${{ parameters.BARBuildId }}\n          PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }}\n          is1ESPipeline: ${{ parameters.is1ESPipeline }}\n\n      - task: NuGetAuthenticate@1\n\n      # Populate internal runtime variables.\n      - template: /eng/common/templates/steps/enable-internal-sources.yml\n        parameters:\n          legacyCredential: $(dn-bot-dnceng-artifact-feeds-rw)\n\n      - template: /eng/common/templates/steps/enable-internal-runtimes.yml\n\n      - task: UseDotNet@2\n        inputs:\n          version: 8.0.x\n\n      - task: AzureCLI@2\n        displayName: Publish Using Darc\n        inputs:\n          azureSubscription: \"Darc: Maestro Production\"\n          scriptType: ps\n          scriptLocation: scriptPath\n          scriptPath: $(System.DefaultWorkingDirectory)/eng/common/post-build/publish-using-darc.ps1\n          arguments: >\n              -BuildId $(BARBuildId)\n              -PublishingInfraVersion 3\n              -AzdoToken '$(System.AccessToken)'\n              -WaitPublishingFinish true\n              -RequireDefaultChannels ${{ parameters.requireDefaultChannels }}\n              -ArtifactsPublishingAdditionalParameters '${{ parameters.artifactsPublishingAdditionalParameters }}'\n              -SymbolPublishingAdditionalParameters '${{ parameters.symbolPublishingAdditionalParameters }}'\n              -SkipAssetsPublishing '${{ parameters.isAssetlessBuild }}'\n              -runtimeSourceFeed https://ci.dot.net/internal \n              -runtimeSourceFeedKey '$(dotnetbuilds-internal-container-read-token-base64)'\n"
  },
  {
    "path": "eng/common/core-templates/post-build/setup-maestro-vars.yml",
    "content": "parameters:\n  BARBuildId: ''\n  PromoteToChannelIds: ''\n  is1ESPipeline: ''\n\nsteps:\n  - ${{ if eq(parameters.is1ESPipeline, '') }}:\n    - 'Illegal entry point, is1ESPipeline is not defined. Repository yaml should not directly reference templates in core-templates folder.': error\n\n  - ${{ if eq(coalesce(parameters.PromoteToChannelIds, 0), 0) }}:\n    - task: DownloadPipelineArtifact@2\n      displayName: Download Release Configs\n      inputs:\n        artifactName: ReleaseConfigs\n        targetPath: '$(Build.StagingDirectory)/ReleaseConfigs'\n\n  - task: AzureCLI@2\n    name: setReleaseVars\n    displayName: Set Release Configs Vars\n    inputs:\n      azureSubscription: \"Darc: Maestro Production\"\n      scriptType: pscore\n      scriptLocation: inlineScript\n      inlineScript: |\n        try {\n          if (!$Env:PromoteToMaestroChannels -or $Env:PromoteToMaestroChannels.Trim() -eq '') {\n            $Content = Get-Content $(Build.StagingDirectory)/ReleaseConfigs/ReleaseConfigs.txt\n\n            $BarId = $Content | Select -Index 0\n            $Channels = $Content | Select -Index 1\n            $IsStableBuild = $Content | Select -Index 2\n\n            $AzureDevOpsProject = $Env:System_TeamProject\n            $AzureDevOpsBuildDefinitionId = $Env:System_DefinitionId\n            $AzureDevOpsBuildId = $Env:Build_BuildId\n          }\n          else {\n            . $(System.DefaultWorkingDirectory)\\eng\\common\\tools.ps1\n            $darc = Get-Darc\n            $buildInfo = & $darc get-build `\n              --id ${{ parameters.BARBuildId }} `\n              --extended `\n              --output-format json `\n              --ci `\n              | convertFrom-Json\n\n            $BarId = ${{ parameters.BARBuildId }}\n            $Channels = $Env:PromoteToMaestroChannels -split \",\"\n            $Channels = $Channels -join \"][\"\n            $Channels = \"[$Channels]\"\n\n            $IsStableBuild = $buildInfo.stable\n            $AzureDevOpsProject = $buildInfo.azureDevOpsProject\n            $AzureDevOpsBuildDefinitionId = $buildInfo.azureDevOpsBuildDefinitionId\n            $AzureDevOpsBuildId = $buildInfo.azureDevOpsBuildId\n          }\n\n          Write-Host \"##vso[task.setvariable variable=BARBuildId]$BarId\"\n          Write-Host \"##vso[task.setvariable variable=TargetChannels]$Channels\"\n          Write-Host \"##vso[task.setvariable variable=IsStableBuild]$IsStableBuild\"\n\n          Write-Host \"##vso[task.setvariable variable=AzDOProjectName]$AzureDevOpsProject\"\n          Write-Host \"##vso[task.setvariable variable=AzDOPipelineId]$AzureDevOpsBuildDefinitionId\"\n          Write-Host \"##vso[task.setvariable variable=AzDOBuildId]$AzureDevOpsBuildId\"\n        }\n        catch {\n          Write-Host $_\n          Write-Host $_.Exception\n          Write-Host $_.ScriptStackTrace\n          exit 1\n        }\n    env:\n      PromoteToMaestroChannels: ${{ parameters.PromoteToChannelIds }}\n"
  },
  {
    "path": "eng/common/core-templates/stages/renovate.yml",
    "content": "# --------------------------------------------------------------------------------------\n# Renovate Pipeline Template\n# --------------------------------------------------------------------------------------\n# This template provides a complete reusable pipeline definition for running Renovate\n# in a 1ES Official pipeline. Pipelines can extend from this template and only need\n# to pass the Renovate job parameters.\n#\n# For more info, see https://github.com/dotnet/arcade/blob/main/Documentation/Renovate.md\n# --------------------------------------------------------------------------------------\n\nparameters:\n\n# Path to the Renovate configuration file within the repository.\n- name: renovateConfigPath\n  type: string\n  default: 'eng/renovate.json'\n\n# GitHub repository to run Renovate against, in the format 'owner/repo'.\n- name: gitHubRepo\n  type: string\n\n# List of base branches to target for Renovate PRs.\n- name: baseBranches\n  type: object\n  default:\n  - main\n\n# When true, Renovate will run in dry run mode.\n- name: dryRun\n  type: boolean\n  default: false\n\n# When true, Renovate will recreate PRs even if they were previously closed.\n- name: forceRecreatePR\n  type: boolean\n  default: false\n\n# Name of the arcade repository resource in the pipeline.\n# This allows repos which haven't been onboarded to Arcade to still use this \n# template by checking out the repo as a resource with a custom name and pointing\n# this parameter to it.\n- name: arcadeRepoResource\n  type: string\n  default: 'self'\n\n- name: selfRepoName\n  type: string\n  default: ''\n- name: arcadeRepoName\n  type: string\n  default: ''\n\n# Pool configuration for the pipeline.\n- name: pool\n  type: object\n  default:\n    name: NetCore1ESPool-Internal\n    image: build.azurelinux.3.amd64\n    os: linux\n\n# Renovate version used in the container image tag.\n- name: renovateVersion\n  default: 43\n  type: number\n\n# Pool configuration for SDL analysis.\n- name: sdlPool\n  type: object\n  default:\n    name: NetCore1ESPool-Internal\n    image: windows.vs2026.amd64\n    os: windows\n\nresources:\n  repositories:\n  - repository: 1ESPipelineTemplates\n    type: git\n    name: 1ESPipelineTemplates/1ESPipelineTemplates\n    ref: refs/tags/release\n\nextends:\n  template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates\n  parameters:\n    pool: ${{ parameters.pool }}\n    sdl:\n      sourceAnalysisPool: ${{ parameters.sdlPool }}\n      # When repos that aren't onboarded to Arcade use this template, they set the\n      # arcadeRepoResource parameter to point to their Arcade repo resource. In that case,\n      # Aracde will be excluded from SDL analysis.\n      ${{ if ne(parameters.arcadeRepoResource, 'self') }}:\n        sourceRepositoriesToScan:\n          exclude:\n          - repository: ${{ parameters.arcadeRepoResource }}\n    containers:\n      RenovateContainer:\n        image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-renovate-${{ parameters.renovateVersion }}-amd64\n    stages:\n    - stage: Renovate\n      displayName: Run Renovate\n      jobs:\n      - template: /eng/common/core-templates/job/renovate.yml@${{ parameters.arcadeRepoResource }}\n        parameters:\n          renovateConfigPath: ${{ parameters.renovateConfigPath }}\n          gitHubRepo: ${{ parameters.gitHubRepo }}\n          baseBranches: ${{ parameters.baseBranches }}\n          dryRun: ${{ parameters.dryRun }}\n          forceRecreatePR: ${{ parameters.forceRecreatePR }}\n          pool: ${{ parameters.pool }}\n          arcadeRepoResource: ${{ parameters.arcadeRepoResource }}\n          selfRepoName: ${{ parameters.selfRepoName }}\n          arcadeRepoName: ${{ parameters.arcadeRepoName }}\n"
  },
  {
    "path": "eng/common/core-templates/steps/cleanup-microbuild.yml",
    "content": "parameters:\n  # Enable cleanup tasks for MicroBuild\n  enableMicrobuild: false\n  # Enable cleanup tasks for MicroBuild on Mac and Linux\n  # Will be ignored if 'enableMicrobuild' is false or 'Agent.Os' is 'Windows_NT'\n  enableMicrobuildForMacAndLinux: false\n  continueOnError: false\n\nsteps:\n  - ${{ if eq(parameters.enableMicrobuild, 'true') }}:\n    - task: MicroBuildCleanup@1\n      displayName: Execute Microbuild cleanup tasks\n      condition: and(\n        always(),\n        or(\n          and(\n            eq(variables['Agent.Os'], 'Windows_NT'),\n            in(variables['_SignType'], 'real', 'test')\n          ),\n          and(\n            ${{ eq(parameters.enableMicrobuildForMacAndLinux, true) }},\n            ne(variables['Agent.Os'], 'Windows_NT'),\n            eq(variables['_SignType'], 'real')\n          )\n        ))\n      continueOnError: ${{ parameters.continueOnError }}\n      env:\n        TeamName: $(_TeamName)\n"
  },
  {
    "path": "eng/common/core-templates/steps/enable-internal-runtimes.yml",
    "content": "# Obtains internal runtime download credentials and populates the 'dotnetbuilds-internal-container-read-token-base64'\n# variable with the base64-encoded SAS token, by default\n\nparameters:\n- name: federatedServiceConnection\n  type: string\n  default: 'dotnetbuilds-internal-read'\n- name: outputVariableName\n  type: string\n  default: 'dotnetbuilds-internal-container-read-token-base64'\n- name: expiryInHours\n  type: number\n  default: 1\n- name: base64Encode\n  type: boolean\n  default: true\n- name: is1ESPipeline\n  type: boolean\n  default: false\n\nsteps:\n- ${{ if ne(variables['System.TeamProject'], 'public') }}:\n  - template: /eng/common/core-templates/steps/get-delegation-sas.yml\n    parameters:\n      federatedServiceConnection: ${{ parameters.federatedServiceConnection }}\n      outputVariableName: ${{ parameters.outputVariableName }}\n      expiryInHours: ${{ parameters.expiryInHours }}\n      base64Encode: ${{ parameters.base64Encode }}\n      storageAccount: dotnetbuilds\n      container: internal\n      permissions: rl\n      is1ESPipeline: ${{ parameters.is1ESPipeline }}"
  },
  {
    "path": "eng/common/core-templates/steps/enable-internal-sources.yml",
    "content": "parameters:\n# This is the Azure federated service connection that we log into to get an access token.\n- name: nugetFederatedServiceConnection\n  type: string\n  default: 'dnceng-artifacts-feeds-read'\n- name: is1ESPipeline\n  type: boolean\n  default: false\n# Legacy parameters to allow for PAT usage\n- name: legacyCredential\n  type: string\n  default: ''\n\nsteps:\n- ${{ if ne(variables['System.TeamProject'], 'public') }}:\n  - ${{ if ne(parameters.legacyCredential, '') }}:\n    - task: PowerShell@2\n      displayName: Setup Internal Feeds\n      inputs:\n        filePath: $(System.DefaultWorkingDirectory)/eng/common/SetupNugetSources.ps1\n        arguments: -ConfigFile $(System.DefaultWorkingDirectory)/NuGet.config -Password $Env:Token\n      env:\n        Token: ${{ parameters.legacyCredential }}\n  # If running on dnceng (internal project), just use the default behavior for NuGetAuthenticate.\n  # If running on DevDiv, NuGetAuthenticate is not really an option. It's scoped to a single feed, and we have many feeds that\n  # may be added. Instead, we'll use the traditional approach (add cred to nuget.config), but use an account token.\n  - ${{ else }}:\n    - ${{ if eq(variables['System.TeamProject'], 'internal') }}:\n      - task: PowerShell@2\n        displayName: Setup Internal Feeds\n        inputs:\n          filePath: $(System.DefaultWorkingDirectory)/eng/common/SetupNugetSources.ps1\n          arguments: -ConfigFile $(System.DefaultWorkingDirectory)/NuGet.config\n    - ${{ else }}:\n      - template: /eng/common/templates/steps/get-federated-access-token.yml\n        parameters:\n          federatedServiceConnection: ${{ parameters.nugetFederatedServiceConnection }}\n          outputVariableName: 'dnceng-artifacts-feeds-read-access-token'\n      - task: PowerShell@2\n        displayName: Setup Internal Feeds\n        inputs:\n          filePath: $(System.DefaultWorkingDirectory)/eng/common/SetupNugetSources.ps1\n          arguments: -ConfigFile $(System.DefaultWorkingDirectory)/NuGet.config -Password $(dnceng-artifacts-feeds-read-access-token)\n  # This is required in certain scenarios to install the ADO credential provider.\n  # It installed by default in some msbuild invocations (e.g. VS msbuild), but needs to be installed for others\n  # (e.g. dotnet msbuild).\n  - task: NuGetAuthenticate@1\n"
  },
  {
    "path": "eng/common/core-templates/steps/generate-sbom.yml",
    "content": "parameters:\n  PackageVersion: unused\n  BuildDropPath: unused\n  PackageName: unused\n  ManifestDirPath: unused\n  IgnoreDirectories: unused\n  sbomContinueOnError: unused\n  is1ESPipeline: unused\n  publishArtifacts: unused\n\nsteps:\n- script: |\n    echo \"##vso[task.logissue type=warning]Including generate-sbom.yml is deprecated, SBOM generation is handled 1ES PT now. Remove this include.\"\n  displayName: Issue generate-sbom.yml deprecation warning\n"
  },
  {
    "path": "eng/common/core-templates/steps/get-delegation-sas.yml",
    "content": "parameters:\n- name: federatedServiceConnection\n  type: string\n- name: outputVariableName\n  type: string\n- name: expiryInHours\n  type: number\n  default: 1\n- name: base64Encode\n  type: boolean\n  default: false\n- name: storageAccount\n  type: string\n- name: container\n  type: string\n- name: permissions\n  type: string\n  default: 'rl'\n- name: is1ESPipeline\n  type: boolean\n  default: false\n\nsteps:\n- task: AzureCLI@2\n  displayName: 'Generate delegation SAS Token for ${{ parameters.storageAccount }}/${{ parameters.container }}'\n  inputs:\n    azureSubscription: ${{ parameters.federatedServiceConnection }}\n    scriptType: 'pscore'\n    scriptLocation: 'inlineScript'\n    inlineScript: |\n      # Calculate the expiration of the SAS token and convert to UTC\n      $expiry = (Get-Date).AddHours(${{ parameters.expiryInHours }}).ToUniversalTime().ToString(\"yyyy-MM-ddTHH:mm:ssZ\")\n\n      $sas = az storage container generate-sas --account-name ${{ parameters.storageAccount }} --name ${{ parameters.container }} --permissions ${{ parameters.permissions }} --expiry $expiry --auth-mode login --as-user -o tsv\n\n      if ($LASTEXITCODE -ne 0) {\n        Write-Error \"Failed to generate SAS token.\"\n        exit 1\n      }\n\n      if ('${{ parameters.base64Encode }}' -eq 'true') {\n        $sas = [Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes($sas))\n      }\n\n      Write-Host \"Setting '${{ parameters.outputVariableName }}' with the access token value\"\n      Write-Host \"##vso[task.setvariable variable=${{ parameters.outputVariableName }};issecret=true]$sas\"\n"
  },
  {
    "path": "eng/common/core-templates/steps/get-federated-access-token.yml",
    "content": "parameters:\n- name: federatedServiceConnection\n  type: string\n- name: outputVariableName\n  type: string\n- name: is1ESPipeline\n  type: boolean\n- name: stepName\n  type: string\n  default: 'getFederatedAccessToken'\n- name: condition\n  type: string\n  default: ''\n# Resource to get a token for. Common values include:\n# - '499b84ac-1321-427f-aa17-267ca6975798' for Azure DevOps\n# - 'https://storage.azure.com/' for storage\n# Defaults to Azure DevOps\n- name: resource\n  type: string\n  default: '499b84ac-1321-427f-aa17-267ca6975798'\n- name: isStepOutputVariable\n  type: boolean\n  default: false\n\nsteps:\n- task: AzureCLI@2\n  displayName: 'Getting federated access token for feeds'\n  name: ${{ parameters.stepName }}\n  ${{ if ne(parameters.condition, '') }}:\n    condition: ${{ parameters.condition }}\n  inputs:\n    azureSubscription: ${{ parameters.federatedServiceConnection }}\n    scriptType: 'pscore'\n    scriptLocation: 'inlineScript'\n    inlineScript: |\n      $accessToken = az account get-access-token --query accessToken --resource ${{ parameters.resource }} --output tsv\n      if ($LASTEXITCODE -ne 0) {\n        Write-Error \"Failed to get access token for resource '${{ parameters.resource }}'\"\n        exit 1\n      }\n      Write-Host \"Setting '${{ parameters.outputVariableName }}' with the access token value\"\n      Write-Host \"##vso[task.setvariable variable=${{ parameters.outputVariableName }};issecret=true;isOutput=${{ parameters.isStepOutputVariable }}]$accessToken\""
  },
  {
    "path": "eng/common/core-templates/steps/install-microbuild-impl.yml",
    "content": "parameters:\n  - name: microbuildTaskInputs\n    type: object\n    default: {}\n\n  - name: microbuildEnv\n    type: object\n    default: {}\n\n  - name: enablePreviewMicrobuild\n    type: boolean\n    default: false\n\n  - name: condition\n    type: string\n\n  - name: continueOnError\n    type: boolean\n\nsteps:\n- ${{ if eq(parameters.enablePreviewMicrobuild, true) }}:\n    - task: MicroBuildSigningPluginPreview@4\n      displayName: Install Preview MicroBuild plugin\n      inputs: ${{ parameters.microbuildTaskInputs }}\n      env: ${{ parameters.microbuildEnv }}\n      continueOnError: ${{ parameters.continueOnError }}\n      condition: ${{ parameters.condition }}\n- ${{ else }}:\n  - task: MicroBuildSigningPlugin@4\n    displayName: Install MicroBuild plugin\n    inputs: ${{ parameters.microbuildTaskInputs }}\n    env: ${{ parameters.microbuildEnv }}\n    continueOnError: ${{ parameters.continueOnError }}\n    condition: ${{ parameters.condition }}\n"
  },
  {
    "path": "eng/common/core-templates/steps/install-microbuild.yml",
    "content": "parameters:\n  # Enable install tasks for MicroBuild\n  enableMicrobuild: false\n  # Enable install tasks for MicroBuild on Mac and Linux\n  # Will be ignored if 'enableMicrobuild' is false or 'Agent.Os' is 'Windows_NT'\n  enableMicrobuildForMacAndLinux: false\n  # Enable preview version of MB signing plugin\n  enablePreviewMicrobuild: false\n  # Determines whether the ESRP service connection information should be passed to the signing plugin.\n  # This overlaps with _SignType to some degree. We only need the service connection for real signing.\n  # It's important that the service connection not be passed to the MicroBuildSigningPlugin task in this place.\n  # Doing so will cause the service connection to be authorized for the pipeline, which isn't allowed and won't work for non-prod.\n  # Unfortunately, _SignType can't be used to exclude the use of the service connection in non-real sign scenarios. The\n  # variable is not available in template expression. _SignType has a very large proliferation across .NET, so replacing it is tough.\n  microbuildUseESRP: true\n  # Microbuild installation directory\n  microBuildOutputFolder: $(Agent.TempDirectory)/MicroBuild\n  # Microbuild version\n  microbuildPluginVersion: 'latest'\n\n  continueOnError: false\n\nsteps:\n  - ${{ if eq(parameters.enableMicrobuild, 'true') }}:\n    - ${{ if eq(parameters.enableMicrobuildForMacAndLinux, 'true') }}:\n      # Needed to download the MicroBuild plugin nupkgs on Mac and Linux when nuget.exe is unavailable\n      - task: UseDotNet@2\n        displayName: Install .NET 8.0 SDK for MicroBuild Plugin\n        inputs:\n          packageType: sdk\n          version: 8.0.x\n          installationPath: ${{ parameters.microBuildOutputFolder }}/.dotnet-microbuild\n        condition: and(succeeded(), ne(variables['Agent.Os'], 'Windows_NT'))\n\n      - script: |\n          set -euo pipefail\n\n          # UseDotNet@2 prepends the dotnet executable path to the PATH variable, so we can call dotnet directly\n          version=$(dotnet --version)\n          cat << 'EOF' > ${{ parameters.microBuildOutputFolder }}/global.json\n          {\n            \"sdk\": {\n              \"version\": \"$version\",\n              \"paths\": [\n                \"${{ parameters.microBuildOutputFolder }}/.dotnet-microbuild\"\n              ],\n              \"errorMessage\": \"The .NET SDK version $version is required to install the MicroBuild signing plugin.\"\n            }\n          }\n          EOF\n        displayName: 'Add global.json to MicroBuild Installation path'\n        workingDirectory: ${{ parameters.microBuildOutputFolder }}\n        condition: and(succeeded(), ne(variables['Agent.Os'], 'Windows_NT'))\n\n    - script: |\n        REM Check if ESRP is disabled while SignType is real\n        if /I \"${{ parameters.microbuildUseESRP }}\"==\"false\" if /I \"$(_SignType)\"==\"real\" (\n          echo Error: ESRP must be enabled when SignType is real.\n          exit /b 1\n        )\n      displayName: 'Validate ESRP usage (Windows)'\n      condition: and(succeeded(), eq(variables['Agent.Os'], 'Windows_NT'))\n    - script: |\n        # Check if ESRP is disabled while SignType is real\n        if [ \"${{ parameters.microbuildUseESRP }}\" = \"false\" ] && [ \"$(_SignType)\" = \"real\" ]; then\n          echo \"Error: ESRP must be enabled when SignType is real.\"\n          exit 1\n        fi\n      displayName: 'Validate ESRP usage (Non-Windows)'\n      condition: and(succeeded(), ne(variables['Agent.Os'], 'Windows_NT'))\n\n    # Two different MB install steps. This is due to not being able to use the agent OS during\n    # YAML expansion, and Windows vs. Linux/Mac uses different service connections. However,\n    # we can avoid including the MB install step if not enabled at all. This avoids a bunch of\n    # extra pipeline authorizations, since most pipelines do not sign on non-Windows.\n    - template: /eng/common/core-templates/steps/install-microbuild-impl.yml\n      parameters:\n        enablePreviewMicrobuild: ${{ parameters.enablePreviewMicrobuild }}\n        microbuildTaskInputs:\n          signType: $(_SignType)\n          zipSources: false\n          feedSource: https://dnceng.pkgs.visualstudio.com/_packaging/MicroBuildToolset/nuget/v3/index.json\n          version: ${{ parameters.microbuildPluginVersion }}\n          ${{ if eq(parameters.microbuildUseESRP, true) }}:\n            ConnectedServiceName: 'MicroBuild Signing Task (DevDiv)'\n            ${{ if eq(variables['System.TeamProject'], 'DevDiv') }}:\n              ConnectedPMEServiceName: 6cc74545-d7b9-4050-9dfa-ebefcc8961ea\n            ${{ else }}:\n              ConnectedPMEServiceName: 248d384a-b39b-46e3-8ad5-c2c210d5e7ca\n        microbuildEnv:\n          TeamName: $(_TeamName)\n          MicroBuildOutputFolderOverride: ${{ parameters.microBuildOutputFolder }}\n          SYSTEM_ACCESSTOKEN: $(System.AccessToken)\n        continueOnError: ${{ parameters.continueOnError }}\n        condition: and(succeeded(), eq(variables['Agent.Os'], 'Windows_NT'), in(variables['_SignType'], 'real', 'test'))\n\n    - ${{ if eq(parameters.enableMicrobuildForMacAndLinux, true) }}:\n      - template: /eng/common/core-templates/steps/install-microbuild-impl.yml\n        parameters:\n          enablePreviewMicrobuild: ${{ parameters.enablePreviewMicrobuild }}\n          microbuildTaskInputs:\n            signType: $(_SignType)\n            zipSources: false\n            feedSource: https://dnceng.pkgs.visualstudio.com/_packaging/MicroBuildToolset/nuget/v3/index.json\n            version: ${{ parameters.microbuildPluginVersion }}\n            workingDirectory: ${{ parameters.microBuildOutputFolder }}\n            ${{ if eq(parameters.microbuildUseESRP, true) }}:\n              ConnectedServiceName: 'MicroBuild Signing Task (DevDiv)'\n              ${{ if eq(variables['System.TeamProject'], 'DevDiv') }}:\n                ConnectedPMEServiceName: beb8cb23-b303-4c95-ab26-9e44bc958d39\n              ${{ else }}:\n                ConnectedPMEServiceName: c24de2a5-cc7a-493d-95e4-8e5ff5cad2bc\n          microbuildEnv:\n            TeamName: $(_TeamName)\n            MicroBuildOutputFolderOverride: ${{ parameters.microBuildOutputFolder }}\n            SYSTEM_ACCESSTOKEN: $(System.AccessToken)\n          continueOnError: ${{ parameters.continueOnError }}\n          condition: and(succeeded(), ne(variables['Agent.Os'], 'Windows_NT'),  eq(variables['_SignType'], 'real'))\n"
  },
  {
    "path": "eng/common/core-templates/steps/publish-build-artifacts.yml",
    "content": "parameters:\n- name: is1ESPipeline\n  type: boolean\n  default: false\n- name: args\n  type: object\n  default: {}\nsteps:\n- ${{ if ne(parameters.is1ESPipeline, true) }}:\n  - template: /eng/common/templates/steps/publish-build-artifacts.yml\n    parameters:\n      is1ESPipeline: ${{ parameters.is1ESPipeline }}\n      ${{ each parameter in parameters.args }}:\n        ${{ parameter.key }}: ${{ parameter.value }}\n- ${{ else }}:\n  - template: /eng/common/templates-official/steps/publish-build-artifacts.yml\n    parameters:\n      is1ESPipeline: ${{ parameters.is1ESPipeline }}\n      ${{ each parameter in parameters.args }}:\n        ${{ parameter.key }}: ${{ parameter.value }}"
  },
  {
    "path": "eng/common/core-templates/steps/publish-logs.yml",
    "content": "parameters:\n  StageLabel: ''\n  JobLabel: ''\n  CustomSensitiveDataList: ''\n  # A default - in case value from eng/common/core-templates/post-build/common-variables.yml is not passed\n  BinlogToolVersion: '1.0.11'\n  is1ESPipeline: false\n\nsteps:\n- task: Powershell@2\n  displayName: Prepare Binlogs to Upload\n  inputs:\n    targetType: inline\n    script: |\n      New-Item -ItemType Directory $(System.DefaultWorkingDirectory)/PostBuildLogs/${{parameters.StageLabel}}/${{parameters.JobLabel}}/\n      Move-Item -Path $(System.DefaultWorkingDirectory)/artifacts/log/Debug/* $(System.DefaultWorkingDirectory)/PostBuildLogs/${{parameters.StageLabel}}/${{parameters.JobLabel}}/\n  continueOnError: true\n  condition: always()\n    \n- task: PowerShell@2\n  displayName: Redact Logs\n  inputs:\n    filePath: $(System.DefaultWorkingDirectory)/eng/common/post-build/redact-logs.ps1\n    # For now this needs to have explicit list of all sensitive data. Taken from eng/publishing/v3/publish.yml\n    # Sensitive data can as well be added to $(System.DefaultWorkingDirectory)/eng/BinlogSecretsRedactionFile.txt'\n    #  If the file exists - sensitive data for redaction will be sourced from it\n    #  (single entry per line, lines starting with '# ' are considered comments and skipped)\n    arguments: -InputPath '$(System.DefaultWorkingDirectory)/PostBuildLogs' \n      -BinlogToolVersion '${{parameters.BinlogToolVersion}}'\n      -TokensFilePath '$(System.DefaultWorkingDirectory)/eng/BinlogSecretsRedactionFile.txt'\n      -runtimeSourceFeed https://ci.dot.net/internal \n      -runtimeSourceFeedKey '$(dotnetbuilds-internal-container-read-token-base64)'\n      '$(publishing-dnceng-devdiv-code-r-build-re)'\n      '$(dn-bot-all-orgs-artifact-feeds-rw)'\n      '$(akams-client-id)'\n      '$(microsoft-symbol-server-pat)'\n      '$(symweb-symbol-server-pat)'\n      '$(dnceng-symbol-server-pat)'\n      '$(dn-bot-all-orgs-build-rw-code-rw)'\n      '$(System.AccessToken)'\n      ${{parameters.CustomSensitiveDataList}}\n  continueOnError: true\n  condition: always()\n\n- task: CopyFiles@2\n  displayName: Gather post build logs\n  inputs:\n    SourceFolder: '$(System.DefaultWorkingDirectory)/PostBuildLogs'\n    Contents: '**'\n    TargetFolder: '$(Build.ArtifactStagingDirectory)/PostBuildLogs'\n  condition: always()\n\n- template: /eng/common/core-templates/steps/publish-pipeline-artifacts.yml\n  parameters:\n    is1ESPipeline: ${{ parameters.is1ESPipeline }}\n    args:\n      displayName: Publish Logs\n      targetPath: '$(Build.ArtifactStagingDirectory)/PostBuildLogs'\n      artifactName: PostBuildLogs_${{ parameters.StageLabel }}_${{ parameters.JobLabel }}_Attempt$(System.JobAttempt)\n      continueOnError: true\n      condition: always()\n      retryCountOnTaskFailure: 10 # for any files being locked\n      isProduction: false # logs are non-production artifacts\n\n"
  },
  {
    "path": "eng/common/core-templates/steps/publish-pipeline-artifacts.yml",
    "content": "parameters:\n- name: is1ESPipeline\n  type: boolean\n  default: false\n\n- name: args\n  type: object\n  default: {}  \n\nsteps:\n- ${{ if ne(parameters.is1ESPipeline, true) }}:\n  - template: /eng/common/templates/steps/publish-pipeline-artifacts.yml\n    parameters:\n      ${{ each parameter in parameters }}:\n        ${{ parameter.key }}: ${{ parameter.value }}\n- ${{ else }}:\n  - template: /eng/common/templates-official/steps/publish-pipeline-artifacts.yml\n    parameters:\n      ${{ each parameter in parameters }}:\n        ${{ parameter.key }}: ${{ parameter.value }}\n"
  },
  {
    "path": "eng/common/core-templates/steps/retain-build.yml",
    "content": "parameters:\n  # Optional azure devops PAT with build execute permissions for the build's organization,\n  # only needed if the build that should be retained ran on a different organization than \n  # the pipeline where this template is executing from\n  Token: ''\n  # Optional BuildId to retain, defaults to the current running build\n  BuildId: ''\n  # Azure devops Organization URI for the build in the https://dev.azure.com/<organization> format.\n  # Defaults to the organization the current pipeline is running on\n  AzdoOrgUri: '$(System.CollectionUri)'\n  # Azure devops project for the build. Defaults to the project the current pipeline is running on\n  AzdoProject: '$(System.TeamProject)'\n\nsteps:\n  - task: powershell@2\n    inputs:\n      targetType: 'filePath'\n      filePath: eng/common/retain-build.ps1\n      pwsh: true\n      arguments: >\n        -AzdoOrgUri: ${{parameters.AzdoOrgUri}}\n        -AzdoProject ${{parameters.AzdoProject}}\n        -Token ${{coalesce(parameters.Token, '$env:SYSTEM_ACCESSTOKEN') }}\n        -BuildId ${{coalesce(parameters.BuildId, '$env:BUILD_ID')}}\n    displayName: Enable permanent build retention\n    env:\n      SYSTEM_ACCESSTOKEN: $(System.AccessToken)\n      BUILD_ID: $(Build.BuildId)"
  },
  {
    "path": "eng/common/core-templates/steps/send-to-helix.yml",
    "content": "# Please remember to update the documentation if you make changes to these parameters!\nparameters:\n  HelixSource: 'pr/default'              # required -- sources must start with pr/, official/, prodcon/, or agent/\n  HelixType: 'tests/default/'            # required -- Helix telemetry which identifies what type of data this is; should include \"test\" for clarity and must end in '/'\n  HelixBuild: $(Build.BuildNumber)       # required -- the build number Helix will use to identify this -- automatically set to the AzDO build number\n  HelixTargetQueues: ''                  # required -- semicolon-delimited list of Helix queues to test on; see https://helix.dot.net/ for a list of queues\n  HelixAccessToken: ''                   # required -- access token to make Helix API requests; should be provided by the appropriate variable group\n  HelixProjectPath: 'eng/common/helixpublish.proj'  # optional -- path to the project file to build relative to BUILD_SOURCESDIRECTORY\n  HelixProjectArguments: ''              # optional -- arguments passed to the build command\n  HelixConfiguration: ''                 # optional -- additional property attached to a job\n  HelixPreCommands: ''                   # optional -- commands to run before Helix work item execution\n  HelixPostCommands: ''                  # optional -- commands to run after Helix work item execution\n  WorkItemDirectory: ''                  # optional -- a payload directory to zip up and send to Helix; requires WorkItemCommand; incompatible with XUnitProjects\n  WorkItemCommand: ''                    # optional -- a command to execute on the payload; requires WorkItemDirectory; incompatible with XUnitProjects\n  WorkItemTimeout: ''                    # optional -- a timeout in TimeSpan.Parse-ready value (e.g. 00:02:00) for the work item command; requires WorkItemDirectory; incompatible with XUnitProjects\n  CorrelationPayloadDirectory: ''        # optional -- a directory to zip up and send to Helix as a correlation payload\n  XUnitProjects: ''                      # optional -- semicolon-delimited list of XUnitProjects to parse and send to Helix; requires XUnitRuntimeTargetFramework, XUnitPublishTargetFramework, XUnitRunnerVersion, and IncludeDotNetCli=true\n  XUnitWorkItemTimeout: ''               # optional -- the workitem timeout in seconds for all workitems created from the xUnit projects specified by XUnitProjects\n  XUnitPublishTargetFramework: ''        # optional -- framework to use to publish your xUnit projects\n  XUnitRuntimeTargetFramework: ''        # optional -- framework to use for the xUnit console runner\n  XUnitRunnerVersion: ''                 # optional -- version of the xUnit nuget package you wish to use on Helix; required for XUnitProjects\n  IncludeDotNetCli: false                # optional -- true will download a version of the .NET CLI onto the Helix machine as a correlation payload; requires DotNetCliPackageType and DotNetCliVersion\n  DotNetCliPackageType: ''               # optional -- either 'sdk', 'runtime' or 'aspnetcore-runtime'; determines whether the sdk or runtime will be sent to Helix; see https://raw.githubusercontent.com/dotnet/core/main/release-notes/releases-index.json\n  DotNetCliVersion: ''                   # optional -- version of the CLI to send to Helix; based on this: https://raw.githubusercontent.com/dotnet/core/main/release-notes/releases-index.json\n  WaitForWorkItemCompletion: true        # optional -- true will make the task wait until work items have been completed and fail the build if work items fail. False is \"fire and forget.\"\n  IsExternal: false                      # [DEPRECATED] -- doesn't do anything, jobs are external if HelixAccessToken is empty and Creator is set\n  HelixBaseUri: 'https://helix.dot.net/' # optional -- sets the Helix API base URI (allows targeting https://helix.int-dot.net )\n  Creator: ''                            # optional -- if the build is external, use this to specify who is sending the job\n  DisplayNamePrefix: 'Run Tests'         # optional -- rename the beginning of the displayName of the steps in AzDO \n  condition: succeeded()                 # optional -- condition for step to execute; defaults to succeeded()\n  continueOnError: false                 # optional -- determines whether to continue the build if the step errors; defaults to false\n\nsteps:\n  - powershell: 'powershell \"$env:BUILD_SOURCESDIRECTORY\\eng\\common\\msbuild.ps1 $env:BUILD_SOURCESDIRECTORY/${{ parameters.HelixProjectPath }} /restore /p:TreatWarningsAsErrors=false ${{ parameters.HelixProjectArguments }} /t:Test /bl:$env:BUILD_SOURCESDIRECTORY\\artifacts\\log\\$env:BuildConfig\\SendToHelix.binlog\"'\n    displayName: ${{ parameters.DisplayNamePrefix }} (Windows)\n    env:\n      BuildConfig: $(_BuildConfig)\n      HelixSource: ${{ parameters.HelixSource }}\n      HelixType: ${{ parameters.HelixType }}\n      HelixBuild: ${{ parameters.HelixBuild }}\n      HelixConfiguration:  ${{ parameters.HelixConfiguration }}\n      HelixTargetQueues: ${{ parameters.HelixTargetQueues }}\n      HelixAccessToken: ${{ parameters.HelixAccessToken }}\n      HelixPreCommands: ${{ parameters.HelixPreCommands }}\n      HelixPostCommands: ${{ parameters.HelixPostCommands }}\n      WorkItemDirectory: ${{ parameters.WorkItemDirectory }}\n      WorkItemCommand: ${{ parameters.WorkItemCommand }}\n      WorkItemTimeout: ${{ parameters.WorkItemTimeout }}\n      CorrelationPayloadDirectory: ${{ parameters.CorrelationPayloadDirectory }}\n      XUnitProjects: ${{ parameters.XUnitProjects }}\n      XUnitWorkItemTimeout: ${{ parameters.XUnitWorkItemTimeout }}\n      XUnitPublishTargetFramework: ${{ parameters.XUnitPublishTargetFramework }}\n      XUnitRuntimeTargetFramework: ${{ parameters.XUnitRuntimeTargetFramework }}\n      XUnitRunnerVersion: ${{ parameters.XUnitRunnerVersion }}\n      IncludeDotNetCli: ${{ parameters.IncludeDotNetCli }}\n      DotNetCliPackageType: ${{ parameters.DotNetCliPackageType }}\n      DotNetCliVersion: ${{ parameters.DotNetCliVersion }}\n      WaitForWorkItemCompletion: ${{ parameters.WaitForWorkItemCompletion }}\n      HelixBaseUri: ${{ parameters.HelixBaseUri }}\n      Creator: ${{ parameters.Creator }}\n      SYSTEM_ACCESSTOKEN: $(System.AccessToken)\n    condition: and(${{ parameters.condition }}, eq(variables['Agent.Os'], 'Windows_NT'))\n    continueOnError: ${{ parameters.continueOnError }}\n  - script: $BUILD_SOURCESDIRECTORY/eng/common/msbuild.sh $BUILD_SOURCESDIRECTORY/${{ parameters.HelixProjectPath }} /restore /p:TreatWarningsAsErrors=false ${{ parameters.HelixProjectArguments }} /t:Test /bl:$BUILD_SOURCESDIRECTORY/artifacts/log/$BuildConfig/SendToHelix.binlog\n    displayName: ${{ parameters.DisplayNamePrefix }} (Unix)\n    env:\n      BuildConfig: $(_BuildConfig)\n      HelixSource: ${{ parameters.HelixSource }}\n      HelixType: ${{ parameters.HelixType }}\n      HelixBuild: ${{ parameters.HelixBuild }}\n      HelixConfiguration:  ${{ parameters.HelixConfiguration }}\n      HelixTargetQueues: ${{ parameters.HelixTargetQueues }}\n      HelixAccessToken: ${{ parameters.HelixAccessToken }}\n      HelixPreCommands: ${{ parameters.HelixPreCommands }}\n      HelixPostCommands: ${{ parameters.HelixPostCommands }}\n      WorkItemDirectory: ${{ parameters.WorkItemDirectory }}\n      WorkItemCommand: ${{ parameters.WorkItemCommand }}\n      WorkItemTimeout: ${{ parameters.WorkItemTimeout }}\n      CorrelationPayloadDirectory: ${{ parameters.CorrelationPayloadDirectory }}\n      XUnitProjects: ${{ parameters.XUnitProjects }}\n      XUnitWorkItemTimeout: ${{ parameters.XUnitWorkItemTimeout }}\n      XUnitPublishTargetFramework: ${{ parameters.XUnitPublishTargetFramework }}\n      XUnitRuntimeTargetFramework: ${{ parameters.XUnitRuntimeTargetFramework }}\n      XUnitRunnerVersion: ${{ parameters.XUnitRunnerVersion }}\n      IncludeDotNetCli: ${{ parameters.IncludeDotNetCli }}\n      DotNetCliPackageType: ${{ parameters.DotNetCliPackageType }}\n      DotNetCliVersion: ${{ parameters.DotNetCliVersion }}\n      WaitForWorkItemCompletion: ${{ parameters.WaitForWorkItemCompletion }}\n      HelixBaseUri: ${{ parameters.HelixBaseUri }}\n      Creator: ${{ parameters.Creator }}\n      SYSTEM_ACCESSTOKEN: $(System.AccessToken)\n    condition: and(${{ parameters.condition }}, ne(variables['Agent.Os'], 'Windows_NT'))\n    continueOnError: ${{ parameters.continueOnError }}\n"
  },
  {
    "path": "eng/common/core-templates/steps/source-build.yml",
    "content": "parameters:\n  # This template adds arcade-powered source-build to CI.\n\n  # This is a 'steps' template, and is intended for advanced scenarios where the existing build\n  # infra has a careful build methodology that must be followed. For example, a repo\n  # (dotnet/runtime) might choose to clone the GitHub repo only once and store it as a pipeline\n  # artifact for all subsequent jobs to use, to reduce dependence on a strong network connection to\n  # GitHub. Using this steps template leaves room for that infra to be included.\n\n  # Defines the platform on which to run the steps. See 'eng/common/core-templates/job/source-build.yml'\n  # for details. The entire object is described in the 'job' template for simplicity, even though\n  # the usage of the properties on this object is split between the 'job' and 'steps' templates.\n  platform: {}\n  is1ESPipeline: false\n\nsteps:\n# Build. Keep it self-contained for simple reusability. (No source-build-specific job variables.)\n- script: |\n    set -x\n    df -h\n\n    # If building on the internal project, the internal storage variable may be available (usually only if needed)\n    # In that case, add variables to allow the download of internal runtimes if the specified versions are not found\n    # in the default public locations.\n    internalRuntimeDownloadArgs=\n    if [ '$(dotnetbuilds-internal-container-read-token-base64)' != '$''(dotnetbuilds-internal-container-read-token-base64)' ]; then\n      internalRuntimeDownloadArgs='/p:DotNetRuntimeSourceFeed=https://ci.dot.net/internal /p:DotNetRuntimeSourceFeedKey=$(dotnetbuilds-internal-container-read-token-base64) --runtimesourcefeed https://ci.dot.net/internal --runtimesourcefeedkey $(dotnetbuilds-internal-container-read-token-base64)'\n    fi\n\n    buildConfig=Release\n    # Check if AzDO substitutes in a build config from a variable, and use it if so.\n    if [ '$(_BuildConfig)' != '$''(_BuildConfig)' ]; then\n      buildConfig='$(_BuildConfig)'\n    fi\n\n    targetRidArgs=\n    if [ '${{ parameters.platform.targetRID }}' != '' ]; then\n      targetRidArgs='/p:TargetRid=${{ parameters.platform.targetRID }}'\n    fi\n\n    portableBuildArgs=\n    if [ '${{ parameters.platform.portableBuild }}' != '' ]; then\n      portableBuildArgs='/p:PortableBuild=${{ parameters.platform.portableBuild }}'\n    fi\n\n    ${{ coalesce(parameters.platform.buildScript, './build.sh') }} --ci \\\n      --configuration $buildConfig \\\n      --restore --build --pack -bl \\\n      --source-build \\\n      ${{ parameters.platform.buildArguments }} \\\n      $internalRuntimeDownloadArgs \\\n      $targetRidArgs \\\n      $portableBuildArgs \\\n  displayName: Build\n\n- template: /eng/common/core-templates/steps/publish-pipeline-artifacts.yml\n  parameters:\n    is1ESPipeline: ${{ parameters.is1ESPipeline }}\n    args:\n      displayName: Publish BuildLogs\n      targetPath: artifacts/log/${{ coalesce(variables._BuildConfig, 'Release') }}\n      artifactName: BuildLogs_SourceBuild_${{ parameters.platform.name }}_Attempt$(System.JobAttempt)\n      continueOnError: true\n      condition: succeededOrFailed()\n      isProduction: false # logs are non-production artifacts\n"
  },
  {
    "path": "eng/common/core-templates/steps/source-index-stage1-publish.yml",
    "content": "parameters:\n  sourceIndexUploadPackageVersion: 2.0.0-20250906.1\n  sourceIndexProcessBinlogPackageVersion: 1.0.1-20250906.1\n  sourceIndexPackageSource: https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json\n  binlogPath: artifacts/log/Debug/Build.binlog\n\nsteps:\n- task: UseDotNet@2\n  displayName: \"Source Index: Use .NET 9 SDK\"\n  inputs:\n    packageType: sdk\n    version: 9.0.x\n    installationPath: $(Agent.TempDirectory)/dotnet\n    workingDirectory: $(Agent.TempDirectory)\n\n- script: |\n    $(Agent.TempDirectory)/dotnet/dotnet tool install BinLogToSln --version ${{parameters.sourceIndexProcessBinlogPackageVersion}} --source ${{parameters.sourceIndexPackageSource}} --tool-path $(Agent.TempDirectory)/.source-index/tools\n    $(Agent.TempDirectory)/dotnet/dotnet tool install UploadIndexStage1 --version ${{parameters.sourceIndexUploadPackageVersion}} --source ${{parameters.sourceIndexPackageSource}} --tool-path $(Agent.TempDirectory)/.source-index/tools\n  displayName: \"Source Index: Download netsourceindex Tools\"\n  # Set working directory to temp directory so 'dotnet' doesn't try to use global.json and use the repo's sdk.\n  workingDirectory: $(Agent.TempDirectory)\n\n- script: $(Agent.TempDirectory)/.source-index/tools/BinLogToSln -i ${{parameters.BinlogPath}} -r $(System.DefaultWorkingDirectory) -n $(Build.Repository.Name) -o .source-index/stage1output\n  displayName: \"Source Index: Process Binlog into indexable sln\"\n\n- ${{ if and(ne(parameters.runAsPublic, 'true'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:\n  - task: AzureCLI@2\n    displayName: \"Source Index: Upload Source Index stage1 artifacts to Azure\"\n    inputs:\n      azureSubscription: 'SourceDotNet Stage1 Publish'\n      addSpnToEnvironment: true\n      scriptType: 'ps'\n      scriptLocation: 'inlineScript'\n      inlineScript: |\n        $(Agent.TempDirectory)/.source-index/tools/UploadIndexStage1 -i .source-index/stage1output -n $(Build.Repository.Name) -s netsourceindexstage1 -b stage1\n"
  },
  {
    "path": "eng/common/core-templates/variables/pool-providers.yml",
    "content": "parameters:\n  is1ESPipeline: false\n\nvariables:\n  - ${{ if eq(parameters.is1ESPipeline, 'true') }}:\n    - template: /eng/common/templates-official/variables/pool-providers.yml\n  - ${{ else }}:\n    - template: /eng/common/templates/variables/pool-providers.yml"
  },
  {
    "path": "eng/common/cross/arm/tizen/tizen.patch",
    "content": "diff -u -r a/usr/lib/libc.so b/usr/lib/libc.so\n--- a/usr/lib/libc.so\t2016-12-30 23:00:08.284951863 +0900\n+++ b/usr/lib/libc.so\t2016-12-30 23:00:32.140951815 +0900\n@@ -2,4 +2,4 @@\n    Use the shared library, but some functions are only in\n    the static library, so try that secondarily.  */\n OUTPUT_FORMAT(elf32-littlearm)\n-GROUP ( /lib/libc.so.6 /usr/lib/libc_nonshared.a  AS_NEEDED ( /lib/ld-linux-armhf.so.3 ) )\n+GROUP ( libc.so.6 libc_nonshared.a  AS_NEEDED ( ld-linux-armhf.so.3 ) )\n"
  },
  {
    "path": "eng/common/cross/arm64/tizen/tizen.patch",
    "content": "diff -u -r a/usr/lib/libc.so b/usr/lib/libc.so\n--- a/usr/lib64/libc.so\t2016-12-30 23:00:08.284951863 +0900\n+++ b/usr/lib64/libc.so\t2016-12-30 23:00:32.140951815 +0900\n@@ -2,4 +2,4 @@\n    Use the shared library, but some functions are only in\n    the static library, so try that secondarily.  */\n OUTPUT_FORMAT(elf64-littleaarch64)\n-GROUP ( /lib64/libc.so.6 /usr/lib64/libc_nonshared.a  AS_NEEDED ( /lib64/ld-linux-aarch64.so.1 ) )\n+GROUP ( libc.so.6 libc_nonshared.a  AS_NEEDED ( ld-linux-aarch64.so.1 ) )\n"
  },
  {
    "path": "eng/common/cross/armel/tizen/tizen.patch",
    "content": "diff -u -r a/usr/lib/libc.so b/usr/lib/libc.so\n--- a/usr/lib/libc.so\t2016-12-30 23:00:08.284951863 +0900\n+++ b/usr/lib/libc.so\t2016-12-30 23:00:32.140951815 +0900\n@@ -2,4 +2,4 @@\n    Use the shared library, but some functions are only in\n    the static library, so try that secondarily.  */\n OUTPUT_FORMAT(elf32-littlearm)\n-GROUP ( /lib/libc.so.6 /usr/lib/libc_nonshared.a  AS_NEEDED ( /lib/ld-linux.so.3 ) )\n+GROUP ( libc.so.6 libc_nonshared.a  AS_NEEDED ( ld-linux.so.3 ) )\n"
  },
  {
    "path": "eng/common/cross/build-android-rootfs.sh",
    "content": "#!/usr/bin/env bash\nset -e\n__NDK_Version=r21\n\nusage()\n{\n    echo \"Creates a toolchain and sysroot used for cross-compiling for Android.\"\n    echo\n    echo \"Usage: $0 [BuildArch] [ApiLevel] [--ndk NDKVersion]\"\n    echo\n    echo \"BuildArch is the target architecture of Android. Currently only arm64 is supported.\"\n    echo \"ApiLevel is the target Android API level. API levels usually match to Android releases. See https://source.android.com/source/build-numbers.html\"\n    echo \"NDKVersion is the version of Android NDK. The default is r21. See https://developer.android.com/ndk/downloads/revision_history\"\n    echo\n    echo \"By default, the toolchain and sysroot will be generated in cross/android-rootfs/toolchain/[BuildArch]. You can change this behavior\"\n    echo \"by setting the TOOLCHAIN_DIR environment variable\"\n    echo\n    echo \"By default, the NDK will be downloaded into the cross/android-rootfs/android-ndk-$__NDK_Version directory. If you already have an NDK installation,\"\n    echo \"you can set the NDK_DIR environment variable to have this script use that installation of the NDK.\"\n    echo \"By default, this script will generate a file, android_platform, in the root of the ROOTFS_DIR directory that contains the RID for the supported and tested Android build: android.28-arm64. This file is to replace '/etc/os-release', which is not available for Android.\"\n    exit 1\n}\n\n__ApiLevel=28 # The minimum platform for arm64 is API level 21 but the minimum version that support glob(3) is 28. See $ANDROID_NDK/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/glob.h\n__BuildArch=arm64\n__AndroidArch=aarch64\n__AndroidToolchain=aarch64-linux-android\n\nwhile :; do\n    if [[ \"$#\" -le 0 ]]; then\n        break\n    fi\n\n    i=$1\n\n    lowerI=\"$(echo $i | tr \"[:upper:]\" \"[:lower:]\")\"\n    case $lowerI in\n        -?|-h|--help)\n            usage\n            exit 1\n            ;;\n        arm64)\n            __BuildArch=arm64\n            __AndroidArch=aarch64\n            __AndroidToolchain=aarch64-linux-android\n            ;;\n        arm)\n            __BuildArch=arm\n            __AndroidArch=arm\n            __AndroidToolchain=arm-linux-androideabi\n            ;;\n        --ndk)\n            shift\n            __NDK_Version=$1\n            ;;\n        *[0-9])\n            __ApiLevel=$i\n            ;;\n        *)\n            __UnprocessedBuildArgs=\"$__UnprocessedBuildArgs $i\"\n            ;;\n    esac\n    shift\ndone\n\nif [[ \"$__NDK_Version\" == \"r21\" ]] || [[ \"$__NDK_Version\" == \"r22\" ]]; then\n    __NDK_File_Arch_Spec=-x86_64\n    __SysRoot=sysroot\nelse\n    __NDK_File_Arch_Spec=\n    __SysRoot=toolchains/llvm/prebuilt/linux-x86_64/sysroot\nfi\n\n# Obtain the location of the bash script to figure out where the root of the repo is.\n__ScriptBaseDir=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" && pwd )\"\n\n__CrossDir=\"$__ScriptBaseDir/../../../.tools/android-rootfs\"\n\nif [[ ! -f \"$__CrossDir\" ]]; then\n    mkdir -p \"$__CrossDir\"\nfi\n\n# Resolve absolute path to avoid `../` in build logs\n__CrossDir=\"$( cd \"$__CrossDir\" && pwd )\"\n\n__NDK_Dir=\"$__CrossDir/android-ndk-$__NDK_Version\"\n__lldb_Dir=\"$__CrossDir/lldb\"\n__ToolchainDir=\"$__CrossDir/android-ndk-$__NDK_Version\"\n\nif [[ -n \"$TOOLCHAIN_DIR\" ]]; then\n    __ToolchainDir=$TOOLCHAIN_DIR\nfi\n\nif [[ -n \"$NDK_DIR\" ]]; then\n    __NDK_Dir=$NDK_DIR\nfi\n\necho \"Target API level: $__ApiLevel\"\necho \"Target architecture: $__BuildArch\"\necho \"NDK version: $__NDK_Version\"\necho \"NDK location: $__NDK_Dir\"\necho \"Target Toolchain location: $__ToolchainDir\"\n\n# Download the NDK if required\nif [ ! -d $__NDK_Dir ]; then\n    echo Downloading the NDK into $__NDK_Dir\n    mkdir -p $__NDK_Dir\n    wget -q --progress=bar:force:noscroll --show-progress https://dl.google.com/android/repository/android-ndk-$__NDK_Version-linux$__NDK_File_Arch_Spec.zip -O $__CrossDir/android-ndk-$__NDK_Version-linux.zip\n    unzip -q $__CrossDir/android-ndk-$__NDK_Version-linux.zip -d $__CrossDir\nfi\n\nif [ ! -d $__lldb_Dir ]; then\n    mkdir -p $__lldb_Dir\n    echo Downloading LLDB into $__lldb_Dir\n    wget -q --progress=bar:force:noscroll --show-progress https://dl.google.com/android/repository/lldb-2.3.3614996-linux-x86_64.zip -O $__CrossDir/lldb-2.3.3614996-linux-x86_64.zip\n    unzip -q $__CrossDir/lldb-2.3.3614996-linux-x86_64.zip -d $__lldb_Dir\nfi\n\necho \"Download dependencies...\"\n__TmpDir=$__CrossDir/tmp/$__BuildArch/\nmkdir -p \"$__TmpDir\"\n\n# combined dependencies for coreclr, installer and libraries\n__AndroidPackages=\"libicu\"\n__AndroidPackages+=\" libandroid-glob\"\n__AndroidPackages+=\" liblzma\"\n__AndroidPackages+=\" krb5\"\n__AndroidPackages+=\" openssl\"\n\nfor path in $(wget -qO- https://packages.termux.dev/termux-main-21/dists/stable/main/binary-$__AndroidArch/Packages |\\\n    grep -A15 \"Package: \\(${__AndroidPackages// /\\\\|}\\)\" | grep -v \"static\\|tool\" | grep Filename); do\n\n    if [[ \"$path\" != \"Filename:\" ]]; then\n        echo \"Working on: $path\"\n        wget -qO- https://packages.termux.dev/termux-main-21/$path | dpkg -x - \"$__TmpDir\"\n    fi\ndone\n\ncp -R \"$__TmpDir/data/data/com.termux/files/usr/\"* \"$__ToolchainDir/$__SysRoot/usr/\"\n\n# Generate platform file for build.sh script to assign to __DistroRid\necho \"Generating platform file...\"\necho \"RID=android.${__ApiLevel}-${__BuildArch}\" > $__ToolchainDir/$__SysRoot/android_platform\n\necho \"Now to build coreclr, libraries and host; run:\"\necho ROOTFS_DIR=$(realpath $__ToolchainDir/$__SysRoot) ./build.sh clr+libs+host --cross --arch $__BuildArch\n"
  },
  {
    "path": "eng/common/cross/build-rootfs.sh",
    "content": "#!/usr/bin/env bash\n\nset -e\n\nusage()\n{\n    echo \"Usage: $0 [BuildArch] [CodeName] [lldbx.y] [llvmx[.y]] [--skipunmount] --rootfsdir <directory>]\"\n    echo \"BuildArch can be: arm(default), arm64, armel, armv6, loongarch64, ppc64le, riscv64, s390x, x64, x86\"\n    echo \"CodeName - optional, Code name for Linux, can be: xenial(default), zesty, bionic, alpine\"\n    echo \"                               for alpine can be specified with version: alpineX.YY or alpineedge\"\n    echo \"                               for FreeBSD can be: freebsd13, freebsd14\"\n    echo \"                               for OpenBSD can be: openbsd\"\n    echo \"                               for illumos can be: illumos\"\n    echo \"                               for Haiku can be: haiku.\"\n    echo \"lldbx.y - optional, LLDB version, can be: lldb3.9(default), lldb4.0, lldb5.0, lldb6.0 no-lldb. Ignored for alpine and FreeBSD\"\n    echo \"llvmx[.y] - optional, LLVM version for LLVM related packages.\"\n    echo \"--skipunmount - optional, will skip the unmount of rootfs folder.\"\n    echo \"--skipsigcheck - optional, will skip package signature checks (allowing untrusted packages).\"\n    echo \"--skipemulation - optional, will skip qemu and debootstrap requirement when building environment for debian based systems.\"\n    echo \"--use-mirror - optional, use mirror URL to fetch resources, when available.\"\n    echo \"--jobs N - optional, restrict to N jobs.\"\n    exit 1\n}\n\n__CodeName=xenial\n__CrossDir=$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" && pwd )\n__BuildArch=arm\n__AlpineArch=armv7\n__FreeBSDArch=arm\n__FreeBSDMachineArch=armv7\n__OpenBSDArch=arm\n__OpenBSDMachineArch=armv7\n__IllumosArch=arm7\n__HaikuArch=arm\n__QEMUArch=arm\n__UbuntuArch=armhf\n__UbuntuRepo=\n__UbuntuSuites=\"updates security backports\"\n__LLDB_Package=\"liblldb-3.9-dev\"\n__SkipUnmount=0\n\n# base development support\n__UbuntuPackages=\"build-essential\"\n\n__AlpinePackages=\"alpine-base\"\n__AlpinePackages+=\" build-base\"\n__AlpinePackages+=\" linux-headers\"\n__AlpinePackages+=\" lldb-dev\"\n__AlpinePackages+=\" python3\"\n__AlpinePackages+=\" libedit\"\n\n# symlinks fixer\n__UbuntuPackages+=\" symlinks\"\n\n# runtime dependencies\n__UbuntuPackages+=\" libicu-dev\"\n__UbuntuPackages+=\" liblttng-ust-dev\"\n__UbuntuPackages+=\" libunwind8-dev\"\n\n__AlpinePackages+=\" gettext-dev\"\n__AlpinePackages+=\" icu-dev\"\n__AlpinePackages+=\" libunwind-dev\"\n__AlpinePackages+=\" lttng-ust-dev\"\n__AlpinePackages+=\" compiler-rt\"\n\n# runtime libraries' dependencies\n__UbuntuPackages+=\" libcurl4-openssl-dev\"\n__UbuntuPackages+=\" libkrb5-dev\"\n__UbuntuPackages+=\" libssl-dev\"\n__UbuntuPackages+=\" zlib1g-dev\"\n__UbuntuPackages+=\" libbrotli-dev\"\n\n__AlpinePackages+=\" curl-dev\"\n__AlpinePackages+=\" krb5-dev\"\n__AlpinePackages+=\" openssl-dev\"\n__AlpinePackages+=\" zlib-dev\"\n\n__FreeBSDBase=\"13.5-RELEASE\"\n__FreeBSDPkg=\"1.21.3\"\n__FreeBSDABI=\"13\"\n__FreeBSDPackages=\"libunwind\"\n__FreeBSDPackages+=\" icu\"\n__FreeBSDPackages+=\" libinotify\"\n__FreeBSDPackages+=\" openssl\"\n__FreeBSDPackages+=\" krb5\"\n__FreeBSDPackages+=\" terminfo-db\"\n\n__OpenBSDVersion=\"7.8\"\n__OpenBSDPackages=\"heimdal-libs\"\n__OpenBSDPackages+=\" icu4c\"\n__OpenBSDPackages+=\" inotify-tools\"\n__OpenBSDPackages+=\" openssl\"\n\n__IllumosPackages=\"icu\"\n__IllumosPackages+=\" mit-krb5\"\n__IllumosPackages+=\" openssl\"\n__IllumosPackages+=\" zlib\"\n\n__HaikuPackages=\"gcc_syslibs\"\n__HaikuPackages+=\" gcc_syslibs_devel\"\n__HaikuPackages+=\" gmp\"\n__HaikuPackages+=\" gmp_devel\"\n__HaikuPackages+=\" icu[0-9]+\"\n__HaikuPackages+=\" icu[0-9]*_devel\"\n__HaikuPackages+=\" krb5\"\n__HaikuPackages+=\" krb5_devel\"\n__HaikuPackages+=\" libiconv\"\n__HaikuPackages+=\" libiconv_devel\"\n__HaikuPackages+=\" llvm[0-9]*_libunwind\"\n__HaikuPackages+=\" llvm[0-9]*_libunwind_devel\"\n__HaikuPackages+=\" mpfr\"\n__HaikuPackages+=\" mpfr_devel\"\n__HaikuPackages+=\" openssl3\"\n__HaikuPackages+=\" openssl3_devel\"\n__HaikuPackages+=\" zlib\"\n__HaikuPackages+=\" zlib_devel\"\n\n# ML.NET dependencies\n__UbuntuPackages+=\" libomp5\"\n__UbuntuPackages+=\" libomp-dev\"\n\n# Taken from https://github.com/alpinelinux/alpine-chroot-install/blob/6d08f12a8a70dd9b9dc7d997c88aa7789cc03c42/alpine-chroot-install#L85-L133\n__AlpineKeys='\n4a6a0840:MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA1yHJxQgsHQREclQu4Ohe\\nqxTxd1tHcNnvnQTu/UrTky8wWvgXT+jpveroeWWnzmsYlDI93eLI2ORakxb3gA2O\\nQ0Ry4ws8vhaxLQGC74uQR5+/yYrLuTKydFzuPaS1dK19qJPXB8GMdmFOijnXX4SA\\njixuHLe1WW7kZVtjL7nufvpXkWBGjsfrvskdNA/5MfxAeBbqPgaq0QMEfxMAn6/R\\nL5kNepi/Vr4S39Xvf2DzWkTLEK8pcnjNkt9/aafhWqFVW7m3HCAII6h/qlQNQKSo\\nGuH34Q8GsFG30izUENV9avY7hSLq7nggsvknlNBZtFUcmGoQrtx3FmyYsIC8/R+B\\nywIDAQAB\n5243ef4b:MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvNijDxJ8kloskKQpJdx+\\nmTMVFFUGDoDCbulnhZMJoKNkSuZOzBoFC94omYPtxnIcBdWBGnrm6ncbKRlR+6oy\\nDO0W7c44uHKCFGFqBhDasdI4RCYP+fcIX/lyMh6MLbOxqS22TwSLhCVjTyJeeH7K\\naA7vqk+QSsF4TGbYzQDDpg7+6aAcNzg6InNePaywA6hbT0JXbxnDWsB+2/LLSF2G\\nmnhJlJrWB1WGjkz23ONIWk85W4S0XB/ewDefd4Ly/zyIciastA7Zqnh7p3Ody6Q0\\nsS2MJzo7p3os1smGjUF158s6m/JbVh4DN6YIsxwl2OjDOz9R0OycfJSDaBVIGZzg\\ncQIDAQAB\n524d27bb:MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAr8s1q88XpuJWLCZALdKj\\nlN8wg2ePB2T9aIcaxryYE/Jkmtu+ZQ5zKq6BT3y/udt5jAsMrhHTwroOjIsF9DeG\\ne8Y3vjz+Hh4L8a7hZDaw8jy3CPag47L7nsZFwQOIo2Cl1SnzUc6/owoyjRU7ab0p\\niWG5HK8IfiybRbZxnEbNAfT4R53hyI6z5FhyXGS2Ld8zCoU/R4E1P0CUuXKEN4p0\\n64dyeUoOLXEWHjgKiU1mElIQj3k/IF02W89gDj285YgwqA49deLUM7QOd53QLnx+\\nxrIrPv3A+eyXMFgexNwCKQU9ZdmWa00MjjHlegSGK8Y2NPnRoXhzqSP9T9i2HiXL\\nVQIDAQAB\n5261cecb:MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwlzMkl7b5PBdfMzGdCT0\\ncGloRr5xGgVmsdq5EtJvFkFAiN8Ac9MCFy/vAFmS8/7ZaGOXoCDWbYVLTLOO2qtX\\nyHRl+7fJVh2N6qrDDFPmdgCi8NaE+3rITWXGrrQ1spJ0B6HIzTDNEjRKnD4xyg4j\\ng01FMcJTU6E+V2JBY45CKN9dWr1JDM/nei/Pf0byBJlMp/mSSfjodykmz4Oe13xB\\nCa1WTwgFykKYthoLGYrmo+LKIGpMoeEbY1kuUe04UiDe47l6Oggwnl+8XD1MeRWY\\nsWgj8sF4dTcSfCMavK4zHRFFQbGp/YFJ/Ww6U9lA3Vq0wyEI6MCMQnoSMFwrbgZw\\nwwIDAQAB\n58199dcc:MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA3v8/ye/V/t5xf4JiXLXa\\nhWFRozsnmn3hobON20GdmkrzKzO/eUqPOKTpg2GtvBhK30fu5oY5uN2ORiv2Y2ht\\neLiZ9HVz3XP8Fm9frha60B7KNu66FO5P2o3i+E+DWTPqqPcCG6t4Znk2BypILcit\\nwiPKTsgbBQR2qo/cO01eLLdt6oOzAaF94NH0656kvRewdo6HG4urbO46tCAizvCR\\nCA7KGFMyad8WdKkTjxh8YLDLoOCtoZmXmQAiwfRe9pKXRH/XXGop8SYptLqyVVQ+\\ntegOD9wRs2tOlgcLx4F/uMzHN7uoho6okBPiifRX+Pf38Vx+ozXh056tjmdZkCaV\\naQIDAQAB\n58cbb476:MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAoSPnuAGKtRIS5fEgYPXD\\n8pSGvKAmIv3A08LBViDUe+YwhilSHbYXUEAcSH1KZvOo1WT1x2FNEPBEFEFU1Eyc\\n+qGzbA03UFgBNvArurHQ5Z/GngGqE7IarSQFSoqewYRtFSfp+TL9CUNBvM0rT7vz\\n2eMu3/wWG+CBmb92lkmyWwC1WSWFKO3x8w+Br2IFWvAZqHRt8oiG5QtYvcZL6jym\\nY8T6sgdDlj+Y+wWaLHs9Fc+7vBuyK9C4O1ORdMPW15qVSl4Lc2Wu1QVwRiKnmA+c\\nDsH/m7kDNRHM7TjWnuj+nrBOKAHzYquiu5iB3Qmx+0gwnrSVf27Arc3ozUmmJbLj\\nzQIDAQAB\n58e4f17d:MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvBxJN9ErBgdRcPr5g4hV\\nqyUSGZEKuvQliq2Z9SRHLh2J43+EdB6A+yzVvLnzcHVpBJ+BZ9RV30EM9guck9sh\\nr+bryZcRHyjG2wiIEoduxF2a8KeWeQH7QlpwGhuobo1+gA8L0AGImiA6UP3LOirl\\nI0G2+iaKZowME8/tydww4jx5vG132JCOScMjTalRsYZYJcjFbebQQolpqRaGB4iG\\nWqhytWQGWuKiB1A22wjmIYf3t96l1Mp+FmM2URPxD1gk/BIBnX7ew+2gWppXOK9j\\n1BJpo0/HaX5XoZ/uMqISAAtgHZAqq+g3IUPouxTphgYQRTRYpz2COw3NF43VYQrR\\nbQIDAQAB\n60ac2099:MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwR4uJVtJOnOFGchnMW5Y\\nj5/waBdG1u5BTMlH+iQMcV5+VgWhmpZHJCBz3ocD+0IGk2I68S5TDOHec/GSC0lv\\n6R9o6F7h429GmgPgVKQsc8mPTPtbjJMuLLs4xKc+viCplXc0Nc0ZoHmCH4da6fCV\\ntdpHQjVe6F9zjdquZ4RjV6R6JTiN9v924dGMAkbW/xXmamtz51FzondKC52Gh8Mo\\n/oA0/T0KsCMCi7tb4QNQUYrf+Xcha9uus4ww1kWNZyfXJB87a2kORLiWMfs2IBBJ\\nTmZ2Fnk0JnHDb8Oknxd9PvJPT0mvyT8DA+KIAPqNvOjUXP4bnjEHJcoCP9S5HkGC\\nIQIDAQAB\n6165ee59:MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAutQkua2CAig4VFSJ7v54\\nALyu/J1WB3oni7qwCZD3veURw7HxpNAj9hR+S5N/pNeZgubQvJWyaPuQDm7PTs1+\\ntFGiYNfAsiibX6Rv0wci3M+z2XEVAeR9Vzg6v4qoofDyoTbovn2LztaNEjTkB+oK\\ntlvpNhg1zhou0jDVYFniEXvzjckxswHVb8cT0OMTKHALyLPrPOJzVtM9C1ew2Nnc\\n3848xLiApMu3NBk0JqfcS3Bo5Y2b1FRVBvdt+2gFoKZix1MnZdAEZ8xQzL/a0YS5\\nHd0wj5+EEKHfOd3A75uPa/WQmA+o0cBFfrzm69QDcSJSwGpzWrD1ScH3AK8nWvoj\\nv7e9gukK/9yl1b4fQQ00vttwJPSgm9EnfPHLAtgXkRloI27H6/PuLoNvSAMQwuCD\\nhQRlyGLPBETKkHeodfLoULjhDi1K2gKJTMhtbnUcAA7nEphkMhPWkBpgFdrH+5z4\\nLxy+3ek0cqcI7K68EtrffU8jtUj9LFTUC8dERaIBs7NgQ/LfDbDfGh9g6qVj1hZl\\nk9aaIPTm/xsi8v3u+0qaq7KzIBc9s59JOoA8TlpOaYdVgSQhHHLBaahOuAigH+VI\\nisbC9vmqsThF2QdDtQt37keuqoda2E6sL7PUvIyVXDRfwX7uMDjlzTxHTymvq2Ck\\nhtBqojBnThmjJQFgZXocHG8CAwEAAQ==\n61666e3f:MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAlEyxkHggKCXC2Wf5Mzx4\\nnZLFZvU2bgcA3exfNPO/g1YunKfQY+Jg4fr6tJUUTZ3XZUrhmLNWvpvSwDS19ZmC\\nIXOu0+V94aNgnhMsk9rr59I8qcbsQGIBoHzuAl8NzZCgdbEXkiY90w1skUw8J57z\\nqCsMBydAueMXuWqF5nGtYbi5vHwK42PffpiZ7G5Kjwn8nYMW5IZdL6ZnMEVJUWC9\\nI4waeKg0yskczYDmZUEAtrn3laX9677ToCpiKrvmZYjlGl0BaGp3cxggP2xaDbUq\\nqfFxWNgvUAb3pXD09JM6Mt6HSIJaFc9vQbrKB9KT515y763j5CC2KUsilszKi3mB\\nHYe5PoebdjS7D1Oh+tRqfegU2IImzSwW3iwA7PJvefFuc/kNIijfS/gH/cAqAK6z\\nbhdOtE/zc7TtqW2Wn5Y03jIZdtm12CxSxwgtCF1NPyEWyIxAQUX9ACb3M0FAZ61n\\nfpPrvwTaIIxxZ01L3IzPLpbc44x/DhJIEU+iDt6IMTrHOphD9MCG4631eIdB0H1b\\n6zbNX1CXTsafqHRFV9XmYYIeOMggmd90s3xIbEujA6HKNP/gwzO6CDJ+nHFDEqoF\\nSkxRdTkEqjTjVKieURW7Swv7zpfu5PrsrrkyGnsRrBJJzXlm2FOOxnbI2iSL1B5F\\nrO5kbUxFeZUIDq+7Yv4kLWcCAwEAAQ==\n616a9724:MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAnC+bR4bHf/L6QdU4puhQ\\ngl1MHePszRC38bzvVFDUJsmCaMCL2suCs2A2yxAgGb9pu9AJYLAmxQC4mM3jNqhg\\n/E7yuaBbek3O02zN/ctvflJ250wZCy+z0ZGIp1ak6pu1j14IwHokl9j36zNfGtfv\\nADVOcdpWITFFlPqwq1qt/H3UsKVmtiF3BNWWTeUEQwKvlU8ymxgS99yn0+4OPyNT\\nL3EUeS+NQJtDS01unau0t7LnjUXn+XIneWny8bIYOQCuVR6s/gpIGuhBaUqwaJOw\\n7jkJZYF2Ij7uPb4b5/R3vX2FfxxqEHqssFSg8FFUNTZz3qNZs0CRVyfA972g9WkJ\\nhPfn31pQYil4QGRibCMIeU27YAEjXoqfJKEPh4UWMQsQLrEfdGfb8VgwrPbniGfU\\nL3jKJR3VAafL9330iawzVQDlIlwGl6u77gEXMl9K0pfazunYhAp+BMP+9ot5ckK+\\nosmrqj11qMESsAj083GeFdfV3pXEIwUytaB0AKEht9DbqUfiE/oeZ/LAXgySMtVC\\nsbC4ESmgVeY2xSBIJdDyUap7FR49GGrw0W49NUv9gRgQtGGaNVQQO9oGL2PBC41P\\niWF9GLoX30HIz1P8PF/cZvicSSPkQf2Z6TV+t0ebdGNS5DjapdnCrq8m9Z0pyKsQ\\nuxAL2a7zX8l5i1CZh1ycUGsCAwEAAQ==\n616abc23:MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA0MfCDrhODRCIxR9Dep1s\\neXafh5CE5BrF4WbCgCsevyPIdvTeyIaW4vmO3bbG4VzhogDZju+R3IQYFuhoXP5v\\nY+zYJGnwrgz3r5wYAvPnLEs1+dtDKYOgJXQj+wLJBW1mzRDL8FoRXOe5iRmn1EFS\\nwZ1DoUvyu7/J5r0itKicZp3QKED6YoilXed+1vnS4Sk0mzN4smuMR9eO1mMCqNp9\\n9KTfRDHTbakIHwasECCXCp50uXdoW6ig/xUAFanpm9LtK6jctNDbXDhQmgvAaLXZ\\nLvFqoaYJ/CvWkyYCgL6qxvMvVmPoRv7OPcyni4xR/WgWa0MSaEWjgPx3+yj9fiMA\\n1S02pFWFDOr5OUF/O4YhFJvUCOtVsUPPfA/Lj6faL0h5QI9mQhy5Zb9TTaS9jB6p\\nLw7u0dJlrjFedk8KTJdFCcaGYHP6kNPnOxMylcB/5WcztXZVQD5WpCicGNBxCGMm\\nW64SgrV7M07gQfL/32QLsdqPUf0i8hoVD8wfQ3EpbQzv6Fk1Cn90bZqZafg8XWGY\\nwddhkXk7egrr23Djv37V2okjzdqoyLBYBxMz63qQzFoAVv5VoY2NDTbXYUYytOvG\\nGJ1afYDRVWrExCech1mX5ZVUB1br6WM+psFLJFoBFl6mDmiYt0vMYBddKISsvwLl\\nIJQkzDwtXzT2cSjoj3T5QekCAwEAAQ==\n616ac3bc:MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAvaaoSLab+IluixwKV5Od\\n0gib2YurjPatGIbn5Ov2DLUFYiebj2oJINXJSwUOO+4WcuHFEqiL/1rya+k5hLZt\\nhnPL1tn6QD4rESznvGSasRCQNT2vS/oyZbTYJRyAtFkEYLlq0t3S3xBxxHWuvIf0\\nqVxVNYpQWyM3N9RIeYBR/euXKJXileSHk/uq1I5wTC0XBIHWcthczGN0m9wBEiWS\\n0m3cnPk4q0Ea8mUJ91Rqob19qETz6VbSPYYpZk3qOycjKosuwcuzoMpwU8KRiMFd\\n5LHtX0Hx85ghGsWDVtS0c0+aJa4lOMGvJCAOvDfqvODv7gKlCXUpgumGpLdTmaZ8\\n1RwqspAe3IqBcdKTqRD4m2mSg23nVx2FAY3cjFvZQtfooT7q1ItRV5RgH6FhQSl7\\n+6YIMJ1Bf8AAlLdRLpg+doOUGcEn+pkDiHFgI8ylH1LKyFKw+eXaAml/7DaWZk1d\\ndqggwhXOhc/UUZFQuQQ8A8zpA13PcbC05XxN2hyP93tCEtyynMLVPtrRwDnHxFKa\\nqKzs3rMDXPSXRn3ZZTdKH3069ApkEjQdpcwUh+EmJ1Ve/5cdtzT6kKWCjKBFZP/s\\n91MlRrX2BTRdHaU5QJkUheUtakwxuHrdah2F94lRmsnQlpPr2YseJu6sIE+Dnx4M\\nCfhdVbQL2w54R645nlnohu8CAwEAAQ==\n616adfeb:MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAq0BFD1D4lIxQcsqEpQzU\\npNCYM3aP1V/fxxVdT4DWvSI53JHTwHQamKdMWtEXetWVbP5zSROniYKFXd/xrD9X\\n0jiGHey3lEtylXRIPxe5s+wXoCmNLcJVnvTcDtwx/ne2NLHxp76lyc25At+6RgE6\\nADjLVuoD7M4IFDkAsd8UQ8zM0Dww9SylIk/wgV3ZkifecvgUQRagrNUdUjR56EBZ\\nraQrev4hhzOgwelT0kXCu3snbUuNY/lU53CoTzfBJ5UfEJ5pMw1ij6X0r5S9IVsy\\nKLWH1hiO0NzU2c8ViUYCly4Fe9xMTFc6u2dy/dxf6FwERfGzETQxqZvSfrRX+GLj\\n/QZAXiPg5178hT/m0Y3z5IGenIC/80Z9NCi+byF1WuJlzKjDcF/TU72zk0+PNM/H\\nKuppf3JT4DyjiVzNC5YoWJT2QRMS9KLP5iKCSThwVceEEg5HfhQBRT9M6KIcFLSs\\nmFjx9kNEEmc1E8hl5IR3+3Ry8G5/bTIIruz14jgeY9u5jhL8Vyyvo41jgt9sLHR1\\n/J1TxKfkgksYev7PoX6/ZzJ1ksWKZY5NFoDXTNYUgzFUTOoEaOg3BAQKadb3Qbbq\\nXIrxmPBdgrn9QI7NCgfnAY3Tb4EEjs3ON/BNyEhUENcXOH6I1NbcuBQ7g9P73kE4\\nVORdoc8MdJ5eoKBpO8Ww8HECAwEAAQ==\n616ae350:MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAyduVzi1mWm+lYo2Tqt/0\\nXkCIWrDNP1QBMVPrE0/ZlU2bCGSoo2Z9FHQKz/mTyMRlhNqTfhJ5qU3U9XlyGOPJ\\npiM+b91g26pnpXJ2Q2kOypSgOMOPA4cQ42PkHBEqhuzssfj9t7x47ppS94bboh46\\nxLSDRff/NAbtwTpvhStV3URYkxFG++cKGGa5MPXBrxIp+iZf9GnuxVdST5PGiVGP\\nODL/b69sPJQNbJHVquqUTOh5Ry8uuD2WZuXfKf7/C0jC/ie9m2+0CttNu9tMciGM\\nEyKG1/Xhk5iIWO43m4SrrT2WkFlcZ1z2JSf9Pjm4C2+HovYpihwwdM/OdP8Xmsnr\\nDzVB4YvQiW+IHBjStHVuyiZWc+JsgEPJzisNY0Wyc/kNyNtqVKpX6dRhMLanLmy+\\nf53cCSI05KPQAcGj6tdL+D60uKDkt+FsDa0BTAobZ31OsFVid0vCXtsbplNhW1IF\\nHwsGXBTVcfXg44RLyL8Lk/2dQxDHNHzAUslJXzPxaHBLmt++2COa2EI1iWlvtznk\\nOk9WP8SOAIj+xdqoiHcC4j72BOVVgiITIJNHrbppZCq6qPR+fgXmXa+sDcGh30m6\\n9Wpbr28kLMSHiENCWTdsFij+NQTd5S47H7XTROHnalYDuF1RpS+DpQidT5tUimaT\\nJZDr++FjKrnnijbyNF8b98UCAwEAAQ==\n616db30d:MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAnpUpyWDWjlUk3smlWeA0\\nlIMW+oJ38t92CRLHH3IqRhyECBRW0d0aRGtq7TY8PmxjjvBZrxTNDpJT6KUk4LRm\\na6A6IuAI7QnNK8SJqM0DLzlpygd7GJf8ZL9SoHSH+gFsYF67Cpooz/YDqWrlN7Vw\\ntO00s0B+eXy+PCXYU7VSfuWFGK8TGEv6HfGMALLjhqMManyvfp8hz3ubN1rK3c8C\\nUS/ilRh1qckdbtPvoDPhSbTDmfU1g/EfRSIEXBrIMLg9ka/XB9PvWRrekrppnQzP\\nhP9YE3x/wbFc5QqQWiRCYyQl/rgIMOXvIxhkfe8H5n1Et4VAorkpEAXdsfN8KSVv\\nLSMazVlLp9GYq5SUpqYX3KnxdWBgN7BJoZ4sltsTpHQ/34SXWfu3UmyUveWj7wp0\\nx9hwsPirVI00EEea9AbP7NM2rAyu6ukcm4m6ATd2DZJIViq2es6m60AE6SMCmrQF\\nwmk4H/kdQgeAELVfGOm2VyJ3z69fQuywz7xu27S6zTKi05Qlnohxol4wVb6OB7qG\\nLPRtK9ObgzRo/OPumyXqlzAi/Yvyd1ZQk8labZps3e16bQp8+pVPiumWioMFJDWV\\nGZjCmyMSU8V6MB6njbgLHoyg2LCukCAeSjbPGGGYhnKLm1AKSoJh3IpZuqcKCk5C\\n8CM1S15HxV78s9dFntEqIokCAwEAAQ==\n66ba20fe:MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAtfB12w4ZgqsXWZDfUAV/\\n6Y4aHUKIu3q4SXrNZ7CXF9nXoAVYrS7NAxJdAodsY3vPCN0g5O8DFXR+390LdOuQ\\n+HsGKCc1k5tX5ZXld37EZNTNSbR0k+NKhd9h6X3u6wqPOx7SIKxwAQR8qeeFq4pP\\nrt9GAGlxtuYgzIIcKJPwE0dZlcBCg+GnptCUZXp/38BP1eYC+xTXSL6Muq1etYfg\\nodXdb7Yl+2h1IHuOwo5rjgY5kpY7GcAs8AjGk3lDD/av60OTYccknH0NCVSmPoXK\\nvrxDBOn0LQRNBLcAfnTKgHrzy0Q5h4TNkkyTgxkoQw5ObDk9nnabTxql732yy9BY\\ns+hM9+dSFO1HKeVXreYSA2n1ndF18YAvAumzgyqzB7I4pMHXq1kC/8bONMJxwSkS\\nYm6CoXKyavp7RqGMyeVpRC7tV+blkrrUml0BwNkxE+XnwDRB3xDV6hqgWe0XrifD\\nYTfvd9ScZQP83ip0r4IKlq4GMv/R5shcCRJSkSZ6QSGshH40JYSoiwJf5FHbj9ND\\n7do0UAqebWo4yNx63j/wb2ULorW3AClv0BCFSdPsIrCStiGdpgJDBR2P2NZOCob3\\nG9uMj+wJD6JJg2nWqNJxkANXX37Qf8plgzssrhrgOvB0fjjS7GYhfkfmZTJ0wPOw\\nA8+KzFseBh4UFGgue78KwgkCAwEAAQ==\n'\n__Keyring=\n__KeyringFile=\"/usr/share/keyrings/ubuntu-archive-keyring.gpg\"\n__SkipSigCheck=0\n__SkipEmulation=0\n__UseMirror=0\n\n__UnprocessedBuildArgs=\nwhile :; do\n    if [[ \"$#\" -le 0 ]]; then\n        break\n    fi\n\n    lowerI=\"$(echo \"$1\" | tr \"[:upper:]\" \"[:lower:]\")\"\n    case $lowerI in\n        -\\?|-h|--help)\n            usage\n            ;;\n        arm)\n            __BuildArch=arm\n            __UbuntuArch=armhf\n            __AlpineArch=armv7\n            __QEMUArch=arm\n            ;;\n        arm64)\n            __BuildArch=arm64\n            __UbuntuArch=arm64\n            __AlpineArch=aarch64\n            __QEMUArch=aarch64\n            __FreeBSDArch=arm64\n            __FreeBSDMachineArch=aarch64\n            __OpenBSDArch=arm64\n            __OpenBSDMachineArch=aarch64\n            ;;\n        armel)\n            __BuildArch=armel\n            __UbuntuArch=armel\n            __UbuntuRepo=\"http://archive.debian.org/debian/\"\n            __CodeName=buster\n            __KeyringFile=\"/usr/share/keyrings/debian-archive-keyring.gpg\"\n            __LLDB_Package=\"liblldb-6.0-dev\"\n            __UbuntuPackages=\"${__UbuntuPackages// libomp-dev/}\"\n            __UbuntuPackages=\"${__UbuntuPackages// libomp5/}\"\n            __UbuntuSuites=\n            ;;\n        armv6)\n            __BuildArch=armv6\n            __UbuntuArch=armhf\n            __QEMUArch=arm\n            __UbuntuRepo=\"http://raspbian.raspberrypi.org/raspbian/\"\n            __CodeName=buster\n            __KeyringFile=\"/usr/share/keyrings/raspbian-archive-keyring.gpg\"\n            __LLDB_Package=\"liblldb-6.0-dev\"\n            __UbuntuSuites=\n\n            if [[ -e \"$__KeyringFile\" ]]; then\n                __Keyring=\"--keyring $__KeyringFile\"\n            fi\n            ;;\n        loongarch64)\n            __BuildArch=loongarch64\n            __AlpineArch=loongarch64\n            __QEMUArch=loongarch64\n            __UbuntuArch=loong64\n            __UbuntuSuites=unreleased\n            __LLDB_Package=\"liblldb-19-dev\"\n\n            if [[ \"$__CodeName\" == \"sid\" ]]; then\n                __UbuntuRepo=\"http://ftp.ports.debian.org/debian-ports/\"\n            fi\n            ;;\n        riscv64)\n            __BuildArch=riscv64\n            __AlpineArch=riscv64\n            __AlpinePackages=\"${__AlpinePackages// lldb-dev/}\"\n            __QEMUArch=riscv64\n            __UbuntuArch=riscv64\n            __UbuntuPackages=\"${__UbuntuPackages// libunwind8-dev/}\"\n            unset __LLDB_Package\n            ;;\n        ppc64le)\n            __BuildArch=ppc64le\n            __AlpineArch=ppc64le\n            __QEMUArch=ppc64le\n            __UbuntuArch=ppc64el\n            __UbuntuRepo=\"http://ports.ubuntu.com/ubuntu-ports/\"\n            __UbuntuPackages=\"${__UbuntuPackages// libunwind8-dev/}\"\n            __UbuntuPackages=\"${__UbuntuPackages// libomp-dev/}\"\n            __UbuntuPackages=\"${__UbuntuPackages// libomp5/}\"\n            unset __LLDB_Package\n            ;;\n        s390x)\n            __BuildArch=s390x\n            __AlpineArch=s390x\n            __QEMUArch=s390x\n            __UbuntuArch=s390x\n            __UbuntuRepo=\"http://ports.ubuntu.com/ubuntu-ports/\"\n            __UbuntuPackages=\"${__UbuntuPackages// libunwind8-dev/}\"\n            __UbuntuPackages=\"${__UbuntuPackages// libomp-dev/}\"\n            __UbuntuPackages=\"${__UbuntuPackages// libomp5/}\"\n            unset __LLDB_Package\n            ;;\n        x64)\n            __BuildArch=x64\n            __AlpineArch=x86_64\n            __UbuntuArch=amd64\n            __FreeBSDArch=amd64\n            __FreeBSDMachineArch=amd64\n            __OpenBSDArch=amd64\n            __OpenBSDMachineArch=amd64\n            __illumosArch=x86_64\n            __HaikuArch=x86_64\n            __UbuntuRepo=\"http://archive.ubuntu.com/ubuntu/\"\n            ;;\n        x86)\n            __BuildArch=x86\n            __UbuntuArch=i386\n            __AlpineArch=x86\n            __UbuntuRepo=\"http://archive.ubuntu.com/ubuntu/\"\n            ;;\n        lldb*)\n            version=\"$(echo \"$lowerI\" | tr -d '[:alpha:]-=')\"\n            majorVersion=\"${version%%.*}\"\n\n            [ -z \"${version##*.*}\" ] && minorVersion=\"${version#*.}\"\n            if [ -z \"$minorVersion\" ]; then\n                minorVersion=0\n            fi\n\n            # for versions > 6.0, lldb has dropped the minor version\n            if [ \"$majorVersion\" -le 6 ]; then\n                version=\"$majorVersion.$minorVersion\"\n            else\n                version=\"$majorVersion\"\n            fi\n\n            __LLDB_Package=\"liblldb-${version}-dev\"\n            ;;\n        no-lldb)\n            unset __LLDB_Package\n            ;;\n        llvm*)\n            version=\"$(echo \"$lowerI\" | tr -d '[:alpha:]-=')\"\n            __LLVM_MajorVersion=\"${version%%.*}\"\n\n            [ -z \"${version##*.*}\" ] && __LLVM_MinorVersion=\"${version#*.}\"\n            if [ -z \"$__LLVM_MinorVersion\" ]; then\n                __LLVM_MinorVersion=0\n            fi\n\n            # for versions > 6.0, lldb has dropped the minor version\n            if [ \"$__LLVM_MajorVersion\" -gt 6 ]; then\n                __LLVM_MinorVersion=\n            fi\n\n            ;;\n        xenial) # Ubuntu 16.04\n            __CodeName=xenial\n            ;;\n        bionic) # Ubuntu 18.04\n            __CodeName=bionic\n            ;;\n        focal) # Ubuntu 20.04\n            __CodeName=focal\n            ;;\n        jammy) # Ubuntu 22.04\n            __CodeName=jammy\n            ;;\n        noble) # Ubuntu 24.04\n            __CodeName=noble\n            __LLDB_Package=\"liblldb-19-dev\"\n            ;;\n        stretch) # Debian 9\n            __CodeName=stretch\n            __LLDB_Package=\"liblldb-6.0-dev\"\n            __KeyringFile=\"/usr/share/keyrings/debian-archive-keyring.gpg\"\n\n            if [[ -z \"$__UbuntuRepo\" ]]; then\n                __UbuntuRepo=\"http://ftp.debian.org/debian/\"\n            fi\n            ;;\n        buster) # Debian 10\n            __CodeName=buster\n            __LLDB_Package=\"liblldb-6.0-dev\"\n            __KeyringFile=\"/usr/share/keyrings/debian-archive-keyring.gpg\"\n\n            if [[ -z \"$__UbuntuRepo\" ]]; then\n                __UbuntuRepo=\"http://archive.debian.org/debian/\"\n            fi\n            ;;\n        bullseye) # Debian 11\n            __CodeName=bullseye\n            __KeyringFile=\"/usr/share/keyrings/debian-archive-keyring.gpg\"\n\n            if [[ -z \"$__UbuntuRepo\" ]]; then\n                __UbuntuRepo=\"http://ftp.debian.org/debian/\"\n            fi\n            ;;\n        bookworm) # Debian 12\n            __CodeName=bookworm\n            __KeyringFile=\"/usr/share/keyrings/debian-archive-keyring.gpg\"\n\n            if [[ -z \"$__UbuntuRepo\" ]]; then\n                __UbuntuRepo=\"http://ftp.debian.org/debian/\"\n            fi\n            ;;\n        sid) # Debian sid\n            __CodeName=sid\n            __UbuntuSuites=\n\n            # Debian-Ports architectures need different values\n            case \"$__UbuntuArch\" in\n            amd64|arm64|armel|armhf|i386|mips64el|ppc64el|riscv64|s390x)\n                __KeyringFile=\"/usr/share/keyrings/debian-archive-keyring.gpg\"\n\n                if [[ -z \"$__UbuntuRepo\" ]]; then\n                    __UbuntuRepo=\"http://ftp.debian.org/debian/\"\n                fi\n                ;;\n            *)\n                __KeyringFile=\"/usr/share/keyrings/debian-ports-archive-keyring.gpg\"\n\n                if [[ -z \"$__UbuntuRepo\" ]]; then\n                    __UbuntuRepo=\"http://ftp.ports.debian.org/debian-ports/\"\n                fi\n                ;;\n            esac\n\n            if [[ -e \"$__KeyringFile\" ]]; then\n                __Keyring=\"--keyring $__KeyringFile\"\n            fi\n            ;;\n        tizen)\n            __CodeName=\n            __UbuntuRepo=\n            __Tizen=tizen\n            ;;\n        alpine*)\n            __CodeName=alpine\n            __UbuntuRepo=\n\n            if [[ \"$lowerI\" == \"alpineedge\" ]]; then\n                __AlpineVersion=edge\n            else\n                version=\"$(echo \"$lowerI\" | tr -d '[:alpha:]-=')\"\n                __AlpineMajorVersion=\"${version%%.*}\"\n                __AlpineMinorVersion=\"${version#*.}\"\n                __AlpineVersion=\"$__AlpineMajorVersion.$__AlpineMinorVersion\"\n            fi\n            ;;\n        freebsd13)\n            __CodeName=freebsd\n            __SkipUnmount=1\n            ;;\n        freebsd14)\n            __CodeName=freebsd\n            __FreeBSDBase=\"14.3-RELEASE\"\n            __FreeBSDABI=\"14\"\n            __SkipUnmount=1\n            ;;\n        openbsd)\n            __CodeName=openbsd\n            __SkipUnmount=1\n            ;;\n        illumos)\n            __CodeName=illumos\n            __SkipUnmount=1\n            ;;\n        haiku)\n            __CodeName=haiku\n            __SkipUnmount=1\n            ;;\n        --skipunmount)\n            __SkipUnmount=1\n            ;;\n        --skipsigcheck)\n            __SkipSigCheck=1\n            ;;\n        --skipemulation)\n            __SkipEmulation=1\n            ;;\n        --rootfsdir|-rootfsdir)\n            shift\n            __RootfsDir=\"$1\"\n            ;;\n        --use-mirror)\n            __UseMirror=1\n            ;;\n        --use-jobs)\n            shift\n            MAXJOBS=$1\n            ;;\n        *)\n            __UnprocessedBuildArgs=\"$__UnprocessedBuildArgs $1\"\n            ;;\n    esac\n\n    shift\ndone\n\ncase \"$__AlpineVersion\" in\n    3.14) __AlpinePackages+=\" llvm11-libs\" ;;\n    3.15) __AlpinePackages+=\" llvm12-libs\" ;;\n    3.16) __AlpinePackages+=\" llvm13-libs\" ;;\n    3.17) __AlpinePackages+=\" llvm15-libs\" ;;\n    edge) __AlpineLlvmLibsLookup=1 ;;\n    *)\n        if [[ \"$__AlpineArch\" =~ s390x|ppc64le ]]; then\n            __AlpineVersion=3.15 # minimum version that supports lldb-dev\n            __AlpinePackages+=\" llvm12-libs\"\n        elif [[ \"$__AlpineArch\" == \"x86\" ]]; then\n            __AlpineVersion=3.17 # minimum version that supports lldb-dev\n            __AlpinePackages+=\" llvm15-libs\"\n        elif [[ \"$__AlpineArch\" == \"riscv64\" || \"$__AlpineArch\" == \"loongarch64\" ]]; then\n            __AlpineVersion=3.21 # minimum version that supports lldb-dev\n            __AlpinePackages+=\" llvm19-libs\"\n        elif [[ -n \"$__AlpineMajorVersion\" ]]; then\n            # use whichever alpine version is provided and select the latest toolchain libs\n            __AlpineLlvmLibsLookup=1\n        else\n            __AlpineVersion=3.13 # 3.13 to maximize compatibility\n            __AlpinePackages+=\" llvm10-libs\"\n        fi\nesac\n\nif [[ \"$__AlpineVersion\" =~ 3\\.1[345] ]]; then\n    # compiler-rt--static was merged in compiler-rt package in alpine 3.16\n    # for older versions, we need compiler-rt--static, so replace the name\n    __AlpinePackages=\"${__AlpinePackages/compiler-rt/compiler-rt-static}\"\nfi\n\n__UbuntuPackages+=\" ${__LLDB_Package:-}\"\n\nif [[ -z \"$__UbuntuRepo\" ]]; then\n    __UbuntuRepo=\"http://ports.ubuntu.com/\"\nfi\n\nif [[ -n \"$__LLVM_MajorVersion\" ]]; then\n    __UbuntuPackages+=\" libclang-common-${__LLVM_MajorVersion}${__LLVM_MinorVersion:+.$__LLVM_MinorVersion}-dev\"\nfi\n\nif [[ -z \"$__RootfsDir\" && -n \"$ROOTFS_DIR\" ]]; then\n    __RootfsDir=\"$ROOTFS_DIR\"\nfi\n\nif [[ -z \"$__RootfsDir\" ]]; then\n    __RootfsDir=\"$__CrossDir/../../../.tools/rootfs/$__BuildArch\"\nfi\n\nif [[ -d \"$__RootfsDir\" ]]; then\n    if [[ \"$__SkipUnmount\" == \"0\" ]]; then\n        umount \"$__RootfsDir\"/* || true\n    fi\n    rm -rf \"$__RootfsDir\"\nfi\n\nmkdir -p \"$__RootfsDir\"\n__RootfsDir=\"$( cd \"$__RootfsDir\" && pwd )\"\n\n__hasWget=\nensureDownloadTool()\n{\n    if command -v wget &> /dev/null; then\n        __hasWget=1\n    elif command -v curl &> /dev/null; then\n        __hasWget=0\n    else\n        >&2 echo \"ERROR: either wget or curl is required by this script.\"\n        exit 1\n    fi\n}\n\nif [[ \"$__CodeName\" == \"alpine\" ]]; then\n    __ApkToolsVersion=2.12.11\n    __ApkToolsDir=\"$(mktemp -d)\"\n    __ApkKeysDir=\"$(mktemp -d)\"\n    arch=\"$(uname -m)\"\n\n    ensureDownloadTool\n\n    if [[ \"$__hasWget\" == 1 ]]; then\n        wget -P \"$__ApkToolsDir\" \"https://gitlab.alpinelinux.org/api/v4/projects/5/packages/generic/v$__ApkToolsVersion/$arch/apk.static\"\n    else\n        curl -SLO --create-dirs --output-dir \"$__ApkToolsDir\" \"https://gitlab.alpinelinux.org/api/v4/projects/5/packages/generic/v$__ApkToolsVersion/$arch/apk.static\"\n    fi\n    if [[ \"$arch\" == \"x86_64\" ]]; then\n      __ApkToolsSHA512SUM=\"53e57b49230da07ef44ee0765b9592580308c407a8d4da7125550957bb72cb59638e04f8892a18b584451c8d841d1c7cb0f0ab680cc323a3015776affaa3be33\"\n    elif [[ \"$arch\" == \"aarch64\" ]]; then\n      __ApkToolsSHA512SUM=\"9e2b37ecb2b56c05dad23d379be84fd494c14bd730b620d0d576bda760588e1f2f59a7fcb2f2080577e0085f23a0ca8eadd993b4e61c2ab29549fdb71969afd0\"\n    else\n      echo \"WARNING: add missing hash for your host architecture. To find the value, use: 'find /tmp -name apk.static -exec sha512sum {} \\;'\"\n    fi\n    echo \"$__ApkToolsSHA512SUM $__ApkToolsDir/apk.static\" | sha512sum -c\n    chmod +x \"$__ApkToolsDir/apk.static\"\n\n    if [[ \"$__AlpineVersion\" == \"edge\" ]]; then\n        version=edge\n    else\n        version=\"v$__AlpineVersion\"\n    fi\n\n    for line in $__AlpineKeys; do\n        id=\"${line%%:*}\"\n        content=\"${line#*:}\"\n\n        echo -e \"-----BEGIN PUBLIC KEY-----\\n$content\\n-----END PUBLIC KEY-----\" > \"$__ApkKeysDir/alpine-devel@lists.alpinelinux.org-$id.rsa.pub\"\n    done\n\n    if [[ \"$__SkipSigCheck\" == \"1\" ]]; then\n        __ApkSignatureArg=\"--allow-untrusted\"\n    else\n        __ApkSignatureArg=\"--keys-dir $__ApkKeysDir\"\n    fi\n\n    if [[ \"$__SkipEmulation\" == \"1\" ]]; then\n        __NoEmulationArg=\"--no-scripts\"\n    fi\n\n    # initialize DB\n    # shellcheck disable=SC2086\n    \"$__ApkToolsDir/apk.static\" \\\n        -X \"http://dl-cdn.alpinelinux.org/alpine/$version/main\" \\\n        -X \"http://dl-cdn.alpinelinux.org/alpine/$version/community\" \\\n        -U $__ApkSignatureArg --root \"$__RootfsDir\" --arch \"$__AlpineArch\" --initdb add\n\n    if [[ \"$__AlpineLlvmLibsLookup\" == 1 ]]; then\n        # shellcheck disable=SC2086\n        __AlpinePackages+=\" $(\"$__ApkToolsDir/apk.static\" \\\n            -X \"http://dl-cdn.alpinelinux.org/alpine/$version/main\" \\\n            -X \"http://dl-cdn.alpinelinux.org/alpine/$version/community\" \\\n            -U $__ApkSignatureArg --root \"$__RootfsDir\" --arch \"$__AlpineArch\" \\\n            search 'llvm*-libs' | grep -E '^llvm' | sort | tail -1 | sed 's/-[^-]*//2g')\"\n    fi\n\n    # install all packages in one go\n    # shellcheck disable=SC2086\n    \"$__ApkToolsDir/apk.static\" \\\n        -X \"http://dl-cdn.alpinelinux.org/alpine/$version/main\" \\\n        -X \"http://dl-cdn.alpinelinux.org/alpine/$version/community\" \\\n        -U $__ApkSignatureArg --root \"$__RootfsDir\" --arch \"$__AlpineArch\" $__NoEmulationArg \\\n        add $__AlpinePackages\n\n    rm -r \"$__ApkToolsDir\"\nelif [[ \"$__CodeName\" == \"freebsd\" ]]; then\n    mkdir -p \"$__RootfsDir\"/usr/local/etc\n    JOBS=${MAXJOBS:=\"$(getconf _NPROCESSORS_ONLN)\"}\n\n    ensureDownloadTool\n\n    if [[ \"$__hasWget\" == 1 ]]; then\n        wget -O- \"https://download.freebsd.org/ftp/releases/${__FreeBSDArch}/${__FreeBSDMachineArch}/${__FreeBSDBase}/base.txz\" | tar -C \"$__RootfsDir\" -Jxf - ./lib ./usr/lib ./usr/libdata ./usr/include ./usr/share/keys ./etc ./bin/freebsd-version\n    else\n        curl -SL \"https://download.freebsd.org/ftp/releases/${__FreeBSDArch}/${__FreeBSDMachineArch}/${__FreeBSDBase}/base.txz\" | tar -C \"$__RootfsDir\" -Jxf - ./lib ./usr/lib ./usr/libdata ./usr/include ./usr/share/keys ./etc ./bin/freebsd-version\n    fi\n    echo \"ABI = \\\"FreeBSD:${__FreeBSDABI}:${__FreeBSDMachineArch}\\\"; FINGERPRINTS = \\\"${__RootfsDir}/usr/share/keys\\\"; REPOS_DIR = [\\\"${__RootfsDir}/etc/pkg\\\"]; REPO_AUTOUPDATE = NO; RUN_SCRIPTS = NO;\" > \"${__RootfsDir}\"/usr/local/etc/pkg.conf\n    echo \"FreeBSD: { url: \\\"pkg+http://pkg.FreeBSD.org/\\${ABI}/quarterly\\\", mirror_type: \\\"srv\\\", signature_type: \\\"fingerprints\\\", fingerprints: \\\"/usr/share/keys/pkg\\\", enabled: yes }\" > \"${__RootfsDir}\"/etc/pkg/FreeBSD.conf\n    mkdir -p \"$__RootfsDir\"/tmp\n    # get and build package manager\n    if [[ \"$__hasWget\" == 1 ]]; then\n        wget -O- \"https://github.com/freebsd/pkg/archive/${__FreeBSDPkg}.tar.gz\" | tar -C \"$__RootfsDir\"/tmp -zxf -\n    else\n        curl -SL \"https://github.com/freebsd/pkg/archive/${__FreeBSDPkg}.tar.gz\" | tar -C \"$__RootfsDir\"/tmp -zxf -\n    fi\n    cd \"$__RootfsDir/tmp/pkg-${__FreeBSDPkg}\"\n    # needed for install to succeed\n    mkdir -p \"$__RootfsDir\"/host/etc\n    ./autogen.sh && ./configure --prefix=\"$__RootfsDir\"/host && make -j \"$JOBS\" && make install\n    rm -rf \"$__RootfsDir/tmp/pkg-${__FreeBSDPkg}\"\n    # install packages we need.\n    INSTALL_AS_USER=$(whoami) \"$__RootfsDir\"/host/sbin/pkg -r \"$__RootfsDir\" -C \"$__RootfsDir\"/usr/local/etc/pkg.conf update\n    # shellcheck disable=SC2086\n    INSTALL_AS_USER=$(whoami) \"$__RootfsDir\"/host/sbin/pkg -r \"$__RootfsDir\" -C \"$__RootfsDir\"/usr/local/etc/pkg.conf install --yes $__FreeBSDPackages\nelif [[ \"$__CodeName\" == \"openbsd\" ]]; then\n    # determine mirrors\n    OPENBSD_MIRROR=\"https://cdn.openbsd.org/pub/OpenBSD/$__OpenBSDVersion/$__OpenBSDMachineArch\"\n\n    # download base system sets\n    ensureDownloadTool\n\n    BASE_SETS=(base comp)\n    for set in \"${BASE_SETS[@]}\"; do\n        FILE=\"${set}${__OpenBSDVersion//./}.tgz\"\n        echo \"Downloading $FILE...\"\n        if [[ \"$__hasWget\" == 1 ]]; then\n            wget -O- \"$OPENBSD_MIRROR/$FILE\" | tar -C \"$__RootfsDir\" -xzpf -\n        else\n            curl -SL \"$OPENBSD_MIRROR/$FILE\" | tar -C \"$__RootfsDir\" -xzpf -\n        fi\n    done\n\n    PKG_MIRROR=\"https://cdn.openbsd.org/pub/OpenBSD/${__OpenBSDVersion}/packages/${__OpenBSDMachineArch}\"\n\n    echo \"Installing packages into sysroot...\"\n\n    # Fetch package index once\n    if [[ \"$__hasWget\" == 1 ]]; then\n        PKG_INDEX=$(wget -qO- \"$PKG_MIRROR/\")\n    else\n        PKG_INDEX=$(curl -s \"$PKG_MIRROR/\")\n    fi\n\n    for pkg in $__OpenBSDPackages; do\n        PKG_FILE=$(echo \"$PKG_INDEX\" | grep -Po \">\\K${pkg}-[0-9][^\\\" ]*\\.tgz\" \\\n            | sort -V | tail -n1)\n\n        echo \"Resolved package filename for $pkg: $PKG_FILE\"\n\n        [[ -z \"$PKG_FILE\" ]] && { echo \"ERROR: Package $pkg not found\"; exit 1; }\n\n        if [[ \"$__hasWget\" == 1 ]]; then\n            wget -O- \"$PKG_MIRROR/$PKG_FILE\" | tar -C \"$__RootfsDir\" -xzpf -\n        else\n            curl -SL \"$PKG_MIRROR/$PKG_FILE\" | tar -C \"$__RootfsDir\" -xzpf -\n        fi\n    done\n\n    echo \"Creating versionless symlinks for shared libraries...\"\n    # Find all versioned .so files and create the base .so symlink\n    for lib in \"$__RootfsDir/usr/lib/libc++.so.\"* \"$__RootfsDir/usr/lib/libc++abi.so.\"* \"$__RootfsDir/usr/lib/libpthread.so.\"*; do\n        if [ -f \"$lib\" ]; then\n            # Extract the filename (e.g., libc++.so.12.0)\n            VERSIONED_NAME=$(basename \"$lib\")\n            # Remove the trailing version numbers (e.g., libc++.so)\n            BASE_NAME=${VERSIONED_NAME%.so.*}.so\n            # Create the symlink in the same directory\n            ln -sf \"$VERSIONED_NAME\" \"$__RootfsDir/usr/lib/$BASE_NAME\"\n        fi\n    done\nelif [[ \"$__CodeName\" == \"illumos\" ]]; then\n    mkdir \"$__RootfsDir/tmp\"\n    pushd \"$__RootfsDir/tmp\"\n    JOBS=${MAXJOBS:=\"$(getconf _NPROCESSORS_ONLN)\"}\n\n    ensureDownloadTool\n\n    echo \"Downloading sysroot.\"\n    if [[ \"$__hasWget\" == 1 ]]; then\n        wget -O- https://github.com/illumos/sysroot/releases/download/20181213-de6af22ae73b-v1/illumos-sysroot-i386-20181213-de6af22ae73b-v1.tar.gz | tar -C \"$__RootfsDir\" -xzf -\n    else\n        curl -SL https://github.com/illumos/sysroot/releases/download/20181213-de6af22ae73b-v1/illumos-sysroot-i386-20181213-de6af22ae73b-v1.tar.gz | tar -C \"$__RootfsDir\" -xzf -\n    fi\n    echo \"Building binutils. Please wait..\"\n    if [[ \"$__hasWget\" == 1 ]]; then\n        wget -O- https://ftp.gnu.org/gnu/binutils/binutils-2.42.tar.xz | tar -xJf -\n    else\n        curl -SL https://ftp.gnu.org/gnu/binutils/binutils-2.42.tar.xz | tar -xJf -\n    fi\n    mkdir build-binutils && cd build-binutils\n    ../binutils-2.42/configure --prefix=\"$__RootfsDir\" --target=\"${__illumosArch}-sun-solaris2.11\" --program-prefix=\"${__illumosArch}-illumos-\" --with-sysroot=\"$__RootfsDir\"\n    make -j \"$JOBS\" && make install && cd ..\n    echo \"Building gcc. Please wait..\"\n    if [[ \"$__hasWget\" == 1 ]]; then\n        wget -O- https://ftp.gnu.org/gnu/gcc/gcc-13.3.0/gcc-13.3.0.tar.xz | tar -xJf -\n    else\n        curl -SL https://ftp.gnu.org/gnu/gcc/gcc-13.3.0/gcc-13.3.0.tar.xz | tar -xJf -\n    fi\n    CFLAGS=\"-fPIC\"\n    CXXFLAGS=\"-fPIC\"\n    CXXFLAGS_FOR_TARGET=\"-fPIC\"\n    CFLAGS_FOR_TARGET=\"-fPIC\"\n    export CFLAGS CXXFLAGS CXXFLAGS_FOR_TARGET CFLAGS_FOR_TARGET\n    mkdir build-gcc && cd build-gcc\n    ../gcc-13.3.0/configure --prefix=\"$__RootfsDir\" --target=\"${__illumosArch}-sun-solaris2.11\" --program-prefix=\"${__illumosArch}-illumos-\" --with-sysroot=\"$__RootfsDir\" --with-gnu-as       \\\n        --with-gnu-ld --disable-nls --disable-libgomp --disable-libquadmath --disable-libssp --disable-libvtv --disable-libcilkrts --disable-libada --disable-libsanitizer \\\n        --disable-libquadmath-support --disable-shared --enable-tls\n    make -j \"$JOBS\" && make install && cd ..\n    BaseUrl=https://pkgsrc.smartos.org\n    if [[ \"$__UseMirror\" == 1 ]]; then\n        BaseUrl=https://pkgsrc.smartos.skylime.net\n    fi\n    BaseUrl=\"$BaseUrl/packages/SmartOS/2019Q4/${__illumosArch}/All\"\n    echo \"Downloading manifest\"\n    if [[ \"$__hasWget\" == 1 ]]; then\n        wget \"$BaseUrl\"\n    else\n        curl -SLO \"$BaseUrl\"\n    fi\n    echo \"Downloading dependencies.\"\n    read -ra array <<<\"$__IllumosPackages\"\n    for package in \"${array[@]}\"; do\n        echo \"Installing '$package'\"\n        # find last occurrence of package in listing and extract its name\n        package=\"$(sed -En '/.*href=\"('\"$package\"'-[0-9].*).tgz\".*/h;$!d;g;s//\\1/p' All)\"\n        echo \"Resolved name '$package'\"\n        if [[ \"$__hasWget\" == 1 ]]; then\n            wget \"$BaseUrl\"/\"$package\".tgz\n        else\n            curl -SLO \"$BaseUrl\"/\"$package\".tgz\n        fi\n        ar -x \"$package\".tgz\n        tar --skip-old-files -xzf \"$package\".tmp.tg* -C \"$__RootfsDir\" 2>/dev/null\n    done\n    echo \"Cleaning up temporary files.\"\n    popd\n    rm -rf \"$__RootfsDir\"/{tmp,+*}\n    mkdir -p \"$__RootfsDir\"/usr/include/net\n    mkdir -p \"$__RootfsDir\"/usr/include/netpacket\n    if [[ \"$__hasWget\" == 1 ]]; then\n        wget -P \"$__RootfsDir\"/usr/include/net https://raw.githubusercontent.com/illumos/illumos-gate/master/usr/src/uts/common/io/bpf/net/bpf.h\n        wget -P \"$__RootfsDir\"/usr/include/net https://raw.githubusercontent.com/illumos/illumos-gate/master/usr/src/uts/common/io/bpf/net/dlt.h\n        wget -P \"$__RootfsDir\"/usr/include/netpacket https://raw.githubusercontent.com/illumos/illumos-gate/master/usr/src/uts/common/inet/sockmods/netpacket/packet.h\n        wget -P \"$__RootfsDir\"/usr/include/sys https://raw.githubusercontent.com/illumos/illumos-gate/master/usr/src/uts/common/sys/sdt.h\n    else\n        curl -SLO --create-dirs --output-dir \"$__RootfsDir\"/usr/include/net https://raw.githubusercontent.com/illumos/illumos-gate/master/usr/src/uts/common/io/bpf/net/bpf.h\n        curl -SLO --create-dirs --output-dir \"$__RootfsDir\"/usr/include/net https://raw.githubusercontent.com/illumos/illumos-gate/master/usr/src/uts/common/io/bpf/net/dlt.h\n        curl -SLO --create-dirs --output-dir \"$__RootfsDir\"/usr/include/netpacket https://raw.githubusercontent.com/illumos/illumos-gate/master/usr/src/uts/common/inet/sockmods/netpacket/packet.h\n        curl -SLO --create-dirs --output-dir \"$__RootfsDir\"/usr/include/sys https://raw.githubusercontent.com/illumos/illumos-gate/master/usr/src/uts/common/sys/sdt.h\n    fi\nelif [[ \"$__CodeName\" == \"haiku\" ]]; then\n    JOBS=${MAXJOBS:=\"$(getconf _NPROCESSORS_ONLN)\"}\n\n    echo \"Building Haiku sysroot for $__HaikuArch\"\n    mkdir -p \"$__RootfsDir/tmp\"\n    pushd \"$__RootfsDir/tmp\"\n\n    mkdir \"$__RootfsDir/tmp/download\"\n\n    ensureDownloadTool\n\n    echo \"Downloading Haiku package tools\"\n    git clone https://github.com/haiku/haiku-toolchains-ubuntu --depth 1 \"$__RootfsDir/tmp/script\"\n    if [[ \"$__hasWget\" == 1 ]]; then\n        wget -O \"$__RootfsDir/tmp/download/hosttools.zip\" \"$(\"$__RootfsDir/tmp/script/fetch.sh\" --hosttools)\"\n    else\n        curl -SLo \"$__RootfsDir/tmp/download/hosttools.zip\" \"$(\"$__RootfsDir/tmp/script/fetch.sh\" --hosttools)\"\n    fi\n\n    unzip -o \"$__RootfsDir/tmp/download/hosttools.zip\" -d \"$__RootfsDir/tmp/bin\"\n\n    HaikuBaseUrl=\"https://eu.hpkg.haiku-os.org/haiku/master/$__HaikuArch/current\"\n    HaikuPortsBaseUrl=\"https://eu.hpkg.haiku-os.org/haikuports/master/$__HaikuArch/current\"\n\n    echo \"Downloading HaikuPorts package repository index...\"\n    if [[ \"$__hasWget\" == 1 ]]; then\n        wget -P \"$__RootfsDir/tmp/download\" \"$HaikuPortsBaseUrl/repo\"\n    else\n        curl -SLO --create-dirs --output-dir \"$__RootfsDir/tmp/download\" \"$HaikuPortsBaseUrl/repo\"\n    fi\n\n    echo \"Downloading Haiku packages\"\n    read -ra array <<<\"$__HaikuPackages\"\n    for package in \"${array[@]}\"; do\n        echo \"Downloading $package...\"\n        hpkgFilename=\"$(LD_LIBRARY_PATH=\"$__RootfsDir/tmp/bin\" \"$__RootfsDir/tmp/bin/package_repo\" list -f \"$__RootfsDir/tmp/download/repo\" |\n            grep -E \"${package}-\" | sort -V | tail -n 1 | xargs)\"\n        if [ -z \"$hpkgFilename\" ]; then\n            >&2 echo \"ERROR: package $package missing.\"\n            exit 1\n        fi\n        echo \"Resolved filename: $hpkgFilename...\"\n        hpkgDownloadUrl=\"$HaikuPortsBaseUrl/packages/$hpkgFilename\"\n        if [[ \"$__hasWget\" == 1 ]]; then\n            wget -P \"$__RootfsDir/tmp/download\" \"$hpkgDownloadUrl\"\n        else\n            curl -SLO --create-dirs --output-dir \"$__RootfsDir/tmp/download\" \"$hpkgDownloadUrl\"\n        fi\n    done\n    for package in haiku haiku_devel; do\n        echo \"Downloading $package...\"\n        if [[ \"$__hasWget\" == 1 ]]; then\n            hpkgVersion=\"$(wget -qO- \"$HaikuBaseUrl\" | sed -n 's/^.*version: \"\\([^\"]*\\)\".*$/\\1/p')\"\n            wget -P \"$__RootfsDir/tmp/download\" \"$HaikuBaseUrl/packages/$package-$hpkgVersion-1-$__HaikuArch.hpkg\"\n        else\n            hpkgVersion=\"$(curl -sSL \"$HaikuBaseUrl\" | sed -n 's/^.*version: \"\\([^\"]*\\)\".*$/\\1/p')\"\n            curl -SLO --create-dirs --output-dir \"$__RootfsDir/tmp/download\" \"$HaikuBaseUrl/packages/$package-$hpkgVersion-1-$__HaikuArch.hpkg\"\n        fi\n    done\n\n    # Set up the sysroot\n    echo \"Setting up sysroot and extracting required packages\"\n    mkdir -p \"$__RootfsDir/boot/system\"\n    for file in \"$__RootfsDir/tmp/download/\"*.hpkg; do\n        echo \"Extracting $file...\"\n        LD_LIBRARY_PATH=\"$__RootfsDir/tmp/bin\" \"$__RootfsDir/tmp/bin/package\" extract -C \"$__RootfsDir/boot/system\" \"$file\"\n    done\n\n    # Download buildtools\n    echo \"Downloading Haiku buildtools\"\n    if [[ \"$__hasWget\" == 1 ]]; then\n        wget -O \"$__RootfsDir/tmp/download/buildtools.zip\" \"$(\"$__RootfsDir/tmp/script/fetch.sh\" --buildtools --arch=$__HaikuArch)\"\n    else\n        curl -SLo \"$__RootfsDir/tmp/download/buildtools.zip\" \"$(\"$__RootfsDir/tmp/script/fetch.sh\" --buildtools --arch=$__HaikuArch)\"\n    fi\n    unzip -o \"$__RootfsDir/tmp/download/buildtools.zip\" -d \"$__RootfsDir\"\n\n    # Cleaning up temporary files\n    echo \"Cleaning up temporary files\"\n    popd\n    rm -rf \"$__RootfsDir/tmp\"\nelif [[ -n \"$__CodeName\" ]]; then\n    __Suites=\"$__CodeName $(for suite in $__UbuntuSuites; do echo -n \"$__CodeName-$suite \"; done)\"\n\n    if [[ \"$__SkipEmulation\" == \"1\" ]]; then\n        if [[ -z \"$AR\" ]]; then\n            if command -v ar &>/dev/null; then\n                AR=\"$(command -v ar)\"\n            elif command -v llvm-ar &>/dev/null; then\n                AR=\"$(command -v llvm-ar)\"\n            else\n                echo \"Unable to find ar or llvm-ar on PATH, add them to PATH or set AR environment variable pointing to the available AR tool\"\n                exit 1\n            fi\n        fi\n\n        PYTHON=${PYTHON_EXECUTABLE:-python3}\n\n        # shellcheck disable=SC2086,SC2046\n        echo running \"$PYTHON\" \"$__CrossDir/install-debs.py\" --arch \"$__UbuntuArch\" --mirror \"$__UbuntuRepo\" --rootfsdir \"$__RootfsDir\" --artool \"$AR\" \\\n            $(for suite in $__Suites; do echo -n \"--suite $suite \"; done) \\\n            $__UbuntuPackages\n\n        # shellcheck disable=SC2086,SC2046\n        \"$PYTHON\" \"$__CrossDir/install-debs.py\" --arch \"$__UbuntuArch\" --mirror \"$__UbuntuRepo\" --rootfsdir \"$__RootfsDir\" --artool \"$AR\" \\\n            $(for suite in $__Suites; do echo -n \"--suite $suite \"; done) \\\n            $__UbuntuPackages\n\n        exit 0\n    fi\n\n    __UpdateOptions=\n    if [[ \"$__SkipSigCheck\" == \"0\" ]]; then\n        __Keyring=\"$__Keyring --force-check-gpg\"\n    else\n        __Keyring=\n        __UpdateOptions=\"--allow-unauthenticated --allow-insecure-repositories\"\n    fi\n\n    # shellcheck disable=SC2086\n    echo running debootstrap \"--variant=minbase\" $__Keyring --arch \"$__UbuntuArch\" \"$__CodeName\" \"$__RootfsDir\" \"$__UbuntuRepo\"\n\n    # shellcheck disable=SC2086\n    if ! debootstrap \"--variant=minbase\" $__Keyring --arch \"$__UbuntuArch\" \"$__CodeName\" \"$__RootfsDir\" \"$__UbuntuRepo\"; then\n        echo \"debootstrap failed! dumping debootstrap.log\"\n        cat \"$__RootfsDir/debootstrap/debootstrap.log\"\n        exit 1\n    fi\n\n    rm -rf \"$__RootfsDir\"/etc/apt/*.{sources,list} \"$__RootfsDir\"/etc/apt/sources.list.d\n    mkdir -p \"$__RootfsDir/etc/apt/sources.list.d/\"\n\n    # shellcheck disable=SC2086\n    cat > \"$__RootfsDir/etc/apt/sources.list.d/$__CodeName.sources\" <<EOF\nTypes: deb\nURIs: $__UbuntuRepo\nSuites: $__Suites\nComponents: main universe\nSigned-By: $__KeyringFile\nEOF\n\n    # shellcheck disable=SC2086\n    chroot \"$__RootfsDir\" apt-get update $__UpdateOptions\n    chroot \"$__RootfsDir\" apt-get -f -y install\n    # shellcheck disable=SC2086\n    chroot \"$__RootfsDir\" apt-get -y install $__UbuntuPackages\n    chroot \"$__RootfsDir\" symlinks -cr /usr\n    chroot \"$__RootfsDir\" apt-get clean\n\n    if [[ \"$__SkipUnmount\" == \"0\" ]]; then\n        umount \"$__RootfsDir\"/* || true\n    fi\nelif [[ \"$__Tizen\" == \"tizen\" ]]; then\n    ROOTFS_DIR=\"$__RootfsDir\" \"$__CrossDir/tizen-build-rootfs.sh\" \"$__BuildArch\"\nelse\n    echo \"Unsupported target platform.\"\n    usage\nfi\n"
  },
  {
    "path": "eng/common/cross/install-debs.py",
    "content": "#!/usr/bin/env python3\n\nimport argparse\nimport asyncio\nimport aiohttp\nimport gzip\nimport os\nimport re\nimport shutil\nimport subprocess\nimport sys\nimport tarfile\nimport tempfile\nimport zstandard\n\nfrom collections import deque\nfrom functools import cmp_to_key\n\nasync def download_file(session, url, dest_path, max_retries=3, retry_delay=2, timeout=60):\n    \"\"\"Asynchronous file download with retries.\"\"\"\n    attempt = 0\n    while attempt < max_retries:\n        try:\n            async with session.get(url, timeout=aiohttp.ClientTimeout(total=timeout)) as response:\n                if response.status == 200:\n                    with open(dest_path, \"wb\") as f:\n                        content = await response.read()\n                        f.write(content)\n                    print(f\"Downloaded {url} at {dest_path}\")\n                    return\n                else:\n                    print(f\"Failed to download {url}, Status Code: {response.status}\")\n                    break\n        except (asyncio.CancelledError, asyncio.TimeoutError, aiohttp.ClientError) as e:\n            print(f\"Error downloading {url}: {type(e).__name__} - {e}. Retrying...\")\n\n        attempt += 1\n        await asyncio.sleep(retry_delay)\n\n    print(f\"Failed to download {url} after {max_retries} attempts.\")\n\nasync def download_deb_files_parallel(mirror, packages, tmp_dir):\n    \"\"\"Download .deb files in parallel.\"\"\"\n    os.makedirs(tmp_dir, exist_ok=True)\n\n    tasks = []\n    timeout = aiohttp.ClientTimeout(total=60)\n    async with aiohttp.ClientSession(timeout=timeout) as session:\n        for pkg, info in packages.items():\n            filename = info.get(\"Filename\")\n            if filename:\n                url = f\"{mirror}/{filename}\"\n                dest_path = os.path.join(tmp_dir, os.path.basename(filename))\n                tasks.append(asyncio.create_task(download_file(session, url, dest_path)))\n\n        await asyncio.gather(*tasks)\n\nasync def download_package_index_parallel(mirror, arch, suites):\n    \"\"\"Download package index files for specified suites and components entirely in memory.\"\"\"\n    tasks = []\n    timeout = aiohttp.ClientTimeout(total=60)\n\n    async with aiohttp.ClientSession(timeout=timeout) as session:\n        for suite in suites:\n            for component in [\"main\", \"universe\"]:\n                url = f\"{mirror}/dists/{suite}/{component}/binary-{arch}/Packages.gz\"\n                tasks.append(fetch_and_decompress(session, url))\n\n        results = await asyncio.gather(*tasks, return_exceptions=True)\n\n    merged_content = \"\"\n    for result in results:\n        if isinstance(result, str):\n            if merged_content:\n                merged_content += \"\\n\\n\"\n            merged_content += result\n\n    return merged_content\n\nasync def fetch_and_decompress(session, url):\n    \"\"\"Fetch and decompress the Packages.gz file.\"\"\"\n    try:\n        async with session.get(url) as response:\n            if response.status == 200:\n                compressed_data = await response.read()\n                decompressed_data = gzip.decompress(compressed_data).decode('utf-8')\n                print(f\"Downloaded index: {url}\")\n                return decompressed_data\n            else:\n                print(f\"Skipped index: {url} (doesn't exist)\")\n                return None\n    except Exception as e:\n        print(f\"Error fetching {url}: {e}\")\n\ndef parse_debian_version(version):\n    \"\"\"Parse a Debian package version into epoch, upstream version, and revision.\"\"\"\n    match = re.match(r'^(?:(\\d+):)?([^-]+)(?:-(.+))?$', version)\n    if not match:\n        raise ValueError(f\"Invalid Debian version format: {version}\")\n    epoch, upstream, revision = match.groups()\n    return int(epoch) if epoch else 0, upstream, revision or \"\"\n\ndef compare_upstream_version(v1, v2):\n    \"\"\"Compare upstream or revision parts using Debian rules.\"\"\"\n    def tokenize(version):\n        tokens = re.split(r'([0-9]+|[A-Za-z]+)', version)\n        return [int(x) if x.isdigit() else x for x in tokens if x]\n\n    tokens1 = tokenize(v1)\n    tokens2 = tokenize(v2)\n\n    for token1, token2 in zip(tokens1, tokens2):\n        if type(token1) == type(token2):\n            if token1 != token2:\n                return (token1 > token2) - (token1 < token2)\n        else:\n            return -1 if isinstance(token1, str) else 1\n\n    return len(tokens1) - len(tokens2)\n\ndef compare_debian_versions(version1, version2):\n    \"\"\"Compare two Debian package versions.\"\"\"\n    epoch1, upstream1, revision1 = parse_debian_version(version1)\n    epoch2, upstream2, revision2 = parse_debian_version(version2)\n\n    if epoch1 != epoch2:\n        return epoch1 - epoch2\n\n    result = compare_upstream_version(upstream1, upstream2)\n    if result != 0:\n        return result\n\n    return compare_upstream_version(revision1, revision2)\n\ndef resolve_dependencies(packages, aliases, desired_packages):\n    \"\"\"Recursively resolves dependencies for the desired packages.\"\"\"\n    resolved = []\n    to_process = deque(desired_packages)\n\n    while to_process:\n        current = to_process.popleft()\n        resolved_package = current if current in packages else aliases.get(current, [None])[0]\n\n        if not resolved_package:\n            print(f\"Error: Package '{current}' was not found in the available packages.\")\n            sys.exit(1)\n\n        if resolved_package not in resolved:\n            resolved.append(resolved_package)\n\n            deps = packages.get(resolved_package, {}).get(\"Depends\", \"\")\n            if deps:\n                deps = [dep.split(' ')[0] for dep in deps.split(', ') if dep]\n                for dep in deps:\n                    if dep not in resolved and dep not in to_process and dep in packages:\n                        to_process.append(dep)\n\n    return resolved\n\ndef parse_package_index(content):\n    \"\"\"Parses the Packages.gz file and returns package information.\"\"\"\n    packages = {}\n    aliases = {}\n    entries = re.split(r'\\n\\n+', content)\n\n    for entry in entries:\n        fields = dict(re.findall(r'^(\\S+): (.+)$', entry, re.MULTILINE))\n        if \"Package\" in fields:\n            package_name = fields[\"Package\"]\n            version = fields.get(\"Version\")\n            filename = fields.get(\"Filename\")\n            depends = fields.get(\"Depends\")\n            provides = fields.get(\"Provides\", None)\n\n            # Only update if package_name is not in packages or if the new version is higher\n            if package_name not in packages or compare_debian_versions(version, packages[package_name][\"Version\"]) > 0:\n                packages[package_name] = {\n                    \"Version\": version,\n                    \"Filename\": filename,\n                    \"Depends\": depends\n                }\n\n                # Update aliases if package provides any alternatives\n                if provides:\n                    provides_list = [x.strip() for x in provides.split(\",\")]\n                    for alias in provides_list:\n                        # Strip version specifiers\n                        alias_name = re.sub(r'\\s*\\(=.*\\)', '', alias)\n                        if alias_name not in aliases:\n                            aliases[alias_name] = []\n                        if package_name not in aliases[alias_name]:\n                            aliases[alias_name].append(package_name)\n\n    return packages, aliases\n\ndef install_packages(mirror, packages_info, aliases, tmp_dir, extract_dir, ar_tool, desired_packages):\n    \"\"\"Downloads .deb files and extracts them.\"\"\"\n    resolved_packages = resolve_dependencies(packages_info, aliases, desired_packages)\n    print(f\"Resolved packages (including dependencies): {resolved_packages}\")\n\n    packages_to_download = {}\n\n    for pkg in resolved_packages:\n        if pkg in packages_info:\n            packages_to_download[pkg] = packages_info[pkg]\n\n        if pkg in aliases:\n            for alias in aliases[pkg]:\n                if alias in packages_info:\n                    packages_to_download[alias] = packages_info[alias]\n\n    asyncio.run(download_deb_files_parallel(mirror, packages_to_download, tmp_dir))\n\n    package_to_deb_file_map = {}\n    for pkg in resolved_packages:\n        pkg_info = packages_info.get(pkg)\n        if pkg_info:\n            deb_filename = pkg_info.get(\"Filename\")\n            if deb_filename:\n                deb_file_path = os.path.join(tmp_dir, os.path.basename(deb_filename))\n                package_to_deb_file_map[pkg] = deb_file_path\n\n    for pkg in reversed(resolved_packages):\n        deb_file = package_to_deb_file_map.get(pkg)\n        if deb_file and os.path.exists(deb_file):\n            extract_deb_file(deb_file, tmp_dir, extract_dir, ar_tool)\n\n    print(\"All done!\")\n\ndef extract_deb_file(deb_file, tmp_dir, extract_dir, ar_tool):\n    \"\"\"Extract .deb file contents\"\"\"\n\n    os.makedirs(extract_dir, exist_ok=True)\n\n    with tempfile.TemporaryDirectory(dir=tmp_dir) as tmp_subdir:\n        result = subprocess.run(f\"{ar_tool} t {os.path.abspath(deb_file)}\", cwd=tmp_subdir, check=True, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)\n\n        tar_filename = None\n        for line in result.stdout.decode().splitlines():\n            if line.startswith(\"data.tar\"):\n                tar_filename = line.strip()\n                break\n\n        if not tar_filename:\n            raise FileNotFoundError(f\"Could not find 'data.tar.*' in {deb_file}.\")\n\n        tar_file_path = os.path.join(tmp_subdir, tar_filename)\n        print(f\"Extracting {tar_filename} from {deb_file}..\")\n\n        subprocess.run(f\"{ar_tool} p {os.path.abspath(deb_file)} {tar_filename} > {tar_file_path}\", check=True, shell=True)\n\n        file_extension = os.path.splitext(tar_file_path)[1].lower()\n\n        if file_extension == \".xz\":\n            mode = \"r:xz\"\n        elif file_extension == \".gz\":\n            mode = \"r:gz\"\n        elif file_extension == \".zst\":\n            # zstd is not supported by standard library yet\n            decompressed_tar_path = tar_file_path.replace(\".zst\", \"\")\n            with open(tar_file_path, \"rb\") as zst_file, open(decompressed_tar_path, \"wb\") as decompressed_file:\n                dctx = zstandard.ZstdDecompressor()\n                dctx.copy_stream(zst_file, decompressed_file)\n\n            tar_file_path = decompressed_tar_path\n            mode = \"r\"\n        else:\n            raise ValueError(f\"Unsupported compression format: {file_extension}\")\n\n        with tarfile.open(tar_file_path, mode) as tar:\n            tar.extractall(path=extract_dir, filter='fully_trusted')\n\ndef finalize_setup(rootfsdir):\n    lib_dir = os.path.join(rootfsdir, 'lib')\n    usr_lib_dir = os.path.join(rootfsdir, 'usr', 'lib')\n\n    if os.path.exists(lib_dir):\n        if os.path.islink(lib_dir):\n            os.remove(lib_dir)\n        else:\n            os.makedirs(usr_lib_dir, exist_ok=True)\n\n            for item in os.listdir(lib_dir):\n                src = os.path.join(lib_dir, item)\n                dest = os.path.join(usr_lib_dir, item)\n\n                if os.path.isdir(src):\n                    shutil.copytree(src, dest, dirs_exist_ok=True)\n                else:\n                    shutil.copy2(src, dest)\n\n            shutil.rmtree(lib_dir)\n\n    os.symlink(usr_lib_dir, lib_dir)\n\nif __name__ == \"__main__\":\n    parser = argparse.ArgumentParser(description=\"Generate rootfs for .NET runtime on Debian-like OS\")\n    parser.add_argument(\"--distro\", required=False, help=\"Distro name (e.g., debian, ubuntu, etc.)\")\n    parser.add_argument(\"--arch\", required=True, help=\"Architecture (e.g., amd64, loong64, etc.)\")\n    parser.add_argument(\"--rootfsdir\", required=True, help=\"Destination directory.\")\n    parser.add_argument('--suite', required=True, action='append', help='Specify one or more repository suites to collect index data.')\n    parser.add_argument(\"--mirror\", required=False, help=\"Mirror (e.g., http://ftp.debian.org/debian-ports etc.)\")\n    parser.add_argument(\"--artool\", required=False, default=\"ar\", help=\"ar tool to extract debs (e.g., ar, llvm-ar etc.)\")\n    parser.add_argument(\"packages\", nargs=\"+\", help=\"List of package names to be installed.\")\n\n    args = parser.parse_args()\n\n    if args.mirror is None:\n        if args.distro == \"ubuntu\":\n            args.mirror = \"http://archive.ubuntu.com/ubuntu\" if args.arch in [\"amd64\", \"i386\"] else \"http://ports.ubuntu.com/ubuntu-ports\"\n        elif args.distro == \"debian\":\n            args.mirror = \"http://ftp.debian.org/debian-ports\"\n        else:\n            raise Exception(\"Unsupported distro\")\n\n    DESIRED_PACKAGES = args.packages + [ # base packages\n        \"dpkg\",\n        \"busybox\",\n        \"libc-bin\",\n        \"base-files\",\n        \"base-passwd\",\n        \"debianutils\"\n    ]\n\n    print(f\"Creating rootfs. rootfsdir: {args.rootfsdir}, distro: {args.distro}, arch: {args.arch}, suites: {args.suite}, mirror: {args.mirror}\")\n\n    package_index_content = asyncio.run(download_package_index_parallel(args.mirror, args.arch, args.suite))\n\n    packages_info, aliases = parse_package_index(package_index_content)\n\n    with tempfile.TemporaryDirectory() as tmp_dir:\n        install_packages(args.mirror, packages_info, aliases, tmp_dir, args.rootfsdir, args.artool, DESIRED_PACKAGES)\n\n    finalize_setup(args.rootfsdir)\n"
  },
  {
    "path": "eng/common/cross/riscv64/tizen/tizen.patch",
    "content": "diff -u -r a/usr/lib/libc.so b/usr/lib/libc.so\n--- a/usr/lib64/libc.so\t2016-12-30 23:00:08.284951863 +0900\n+++ b/usr/lib64/libc.so\t2016-12-30 23:00:32.140951815 +0900\n@@ -2,4 +2,4 @@\n    Use the shared library, but some functions are only in\n    the static library, so try that secondarily.  */\n OUTPUT_FORMAT(elf64-littleriscv)\n-GROUP ( /lib64/libc.so.6 /usr/lib64/libc_nonshared.a  AS_NEEDED ( /lib64/ld-linux-riscv64-lp64d.so.1 ) )\n+GROUP ( libc.so.6 libc_nonshared.a  AS_NEEDED ( ld-linux-riscv64-lp64d.so.1 ) )\n"
  },
  {
    "path": "eng/common/cross/tizen-build-rootfs.sh",
    "content": "#!/usr/bin/env bash\nset -e\n\nARCH=$1\nLINK_ARCH=$ARCH\n\ncase \"$ARCH\" in\n    arm)\n        TIZEN_ARCH=\"armv7hl\"\n        ;;\n    armel)\n        TIZEN_ARCH=\"armv7l\"\n        LINK_ARCH=\"arm\"\n        ;;\n    arm64)\n        TIZEN_ARCH=\"aarch64\"\n        ;;\n    x86)\n        TIZEN_ARCH=\"i686\"\n        ;;\n    x64)\n        TIZEN_ARCH=\"x86_64\"\n        LINK_ARCH=\"x86\"\n        ;;\n    riscv64)\n        TIZEN_ARCH=\"riscv64\"\n        LINK_ARCH=\"riscv\"\n        ;;\n    *)\n        echo \"Unsupported architecture for tizen: $ARCH\"\n        exit 1\nesac\n\n__CrossDir=$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" && pwd )\n__TIZEN_CROSSDIR=\"$__CrossDir/${ARCH}/tizen\"\n\nif [[ -z \"$ROOTFS_DIR\" ]]; then\n    echo \"ROOTFS_DIR is not defined.\"\n    exit 1;\nfi\n\nTIZEN_TMP_DIR=$ROOTFS_DIR/tizen_tmp\nmkdir -p $TIZEN_TMP_DIR\n\n# Download files\necho \">>Start downloading files\"\nVERBOSE=1 $__CrossDir/tizen-fetch.sh $TIZEN_TMP_DIR $TIZEN_ARCH\necho \"<<Finish downloading files\"\n\necho \">>Start constructing Tizen rootfs\"\nTIZEN_RPM_FILES=`ls $TIZEN_TMP_DIR/*.rpm`\ncd $ROOTFS_DIR\nfor f in $TIZEN_RPM_FILES; do\n    rpm2cpio $f  | cpio -idm --quiet\ndone\necho \"<<Finish constructing Tizen rootfs\"\n\n# Cleanup tmp\nrm -rf $TIZEN_TMP_DIR\n\n# Configure Tizen rootfs\necho \">>Start configuring Tizen rootfs\"\nln -sfn asm-${LINK_ARCH} ./usr/include/asm\npatch -p1 < $__TIZEN_CROSSDIR/tizen.patch\nif [[ \"$TIZEN_ARCH\" == \"riscv64\" ]]; then\n    echo \"Fixing broken symlinks in $PWD\"\n    rm ./usr/lib64/libresolv.so\n    ln -s ../../lib64/libresolv.so.2 ./usr/lib64/libresolv.so\n    rm ./usr/lib64/libpthread.so\n    ln -s ../../lib64/libpthread.so.0 ./usr/lib64/libpthread.so\n    rm ./usr/lib64/libdl.so\n    ln -s ../../lib64/libdl.so.2 ./usr/lib64/libdl.so\n    rm ./usr/lib64/libutil.so\n    ln -s ../../lib64/libutil.so.1 ./usr/lib64/libutil.so\n    rm ./usr/lib64/libm.so\n    ln -s ../../lib64/libm.so.6 ./usr/lib64/libm.so\n    rm ./usr/lib64/librt.so\n    ln -s ../../lib64/librt.so.1 ./usr/lib64/librt.so\n    rm ./lib/ld-linux-riscv64-lp64d.so.1\n    ln -s ../lib64/ld-linux-riscv64-lp64d.so.1 ./lib/ld-linux-riscv64-lp64d.so.1\nfi\necho \"<<Finish configuring Tizen rootfs\"\n"
  },
  {
    "path": "eng/common/cross/tizen-fetch.sh",
    "content": "#!/usr/bin/env bash\nset -e\n\nif [[ -z \"${VERBOSE// }\" ]] || [ \"$VERBOSE\" -ne \"$VERBOSE\" ] 2>/dev/null; then\n    VERBOSE=0\nfi\n\nLog()\n{\n    if [ $VERBOSE -ge 1 ]; then\n        echo ${@:2}\n    fi\n}\n\nInform()\n{\n    Log 1 -e \"\\x1B[0;34m$@\\x1B[m\"\n}\n\nDebug()\n{\n    Log 2 -e \"\\x1B[0;32m$@\\x1B[m\"\n}\n\nError()\n{\n    >&2 Log 0 -e \"\\x1B[0;31m$@\\x1B[m\"\n}\n\nFetch()\n{\n    URL=$1\n    FILE=$2\n    PROGRESS=$3\n    if [ $VERBOSE -ge 1 ] && [ $PROGRESS ]; then\n        CURL_OPT=\"--progress-bar\"\n    else\n        CURL_OPT=\"--silent\"\n    fi\n    curl $CURL_OPT $URL > $FILE\n}\n\nhash curl 2> /dev/null || { Error \"Require 'curl' Aborting.\"; exit 1; }\nhash xmllint 2> /dev/null || { Error \"Require 'xmllint' Aborting.\"; exit 1; }\nhash sha256sum 2> /dev/null || { Error \"Require 'sha256sum' Aborting.\"; exit 1; }\n\nTMPDIR=$1\nif [ ! -d $TMPDIR ]; then\n    TMPDIR=./tizen_tmp\n    Debug \"Create temporary directory : $TMPDIR\"\n    mkdir -p $TMPDIR\nfi\n\nTIZEN_ARCH=$2\n\nTIZEN_URL=http://download.tizen.org/snapshots/TIZEN/Tizen\nBUILD_XML=build.xml\nREPOMD_XML=repomd.xml\nPRIMARY_XML=primary.xml\nTARGET_URL=\"http://__not_initialized\"\n\nXpath_get()\n{\n    XPATH_RESULT=''\n    XPATH=$1\n    XML_FILE=$2\n    RESULT=$(xmllint --xpath $XPATH $XML_FILE)\n    if [[ -z ${RESULT// } ]]; then\n        Error \"Can not find target from $XML_FILE\"\n        Debug \"Xpath = $XPATH\"\n        exit 1\n    fi\n    XPATH_RESULT=$RESULT\n}\n\nfetch_tizen_pkgs_init()\n{\n    TARGET=$1\n    PROFILE=$2\n    Debug \"Initialize TARGET=$TARGET, PROFILE=$PROFILE\"\n\n    TMP_PKG_DIR=$TMPDIR/tizen_${PROFILE}_pkgs\n    if [ -d $TMP_PKG_DIR ]; then rm -rf $TMP_PKG_DIR; fi\n    mkdir -p $TMP_PKG_DIR\n\n    PKG_URL=$TIZEN_URL/$PROFILE/latest\n\n    BUILD_XML_URL=$PKG_URL/$BUILD_XML\n    TMP_BUILD=$TMP_PKG_DIR/$BUILD_XML\n    TMP_REPOMD=$TMP_PKG_DIR/$REPOMD_XML\n    TMP_PRIMARY=$TMP_PKG_DIR/$PRIMARY_XML\n    TMP_PRIMARYGZ=${TMP_PRIMARY}.gz\n\n    Fetch $BUILD_XML_URL $TMP_BUILD\n\n    Debug \"fetch $BUILD_XML_URL to $TMP_BUILD\"\n\n    TARGET_XPATH=\"//build/buildtargets/buildtarget[@name=\\\"$TARGET\\\"]/repo[@type=\\\"binary\\\"]/text()\"\n    Xpath_get $TARGET_XPATH $TMP_BUILD\n    TARGET_PATH=$XPATH_RESULT\n    TARGET_URL=$PKG_URL/$TARGET_PATH\n\n    REPOMD_URL=$TARGET_URL/repodata/repomd.xml\n    PRIMARY_XPATH='string(//*[local-name()=\"data\"][@type=\"primary\"]/*[local-name()=\"location\"]/@href)'\n\n    Fetch $REPOMD_URL $TMP_REPOMD\n\n    Debug \"fetch $REPOMD_URL to $TMP_REPOMD\"\n\n    Xpath_get $PRIMARY_XPATH $TMP_REPOMD\n    PRIMARY_XML_PATH=$XPATH_RESULT\n    PRIMARY_URL=$TARGET_URL/$PRIMARY_XML_PATH\n\n    Fetch $PRIMARY_URL $TMP_PRIMARYGZ\n\n    Debug \"fetch $PRIMARY_URL to $TMP_PRIMARYGZ\"\n\n    gunzip $TMP_PRIMARYGZ\n\n    Debug \"unzip $TMP_PRIMARYGZ to $TMP_PRIMARY\"\n}\n\nfetch_tizen_pkgs()\n{\n    ARCH=$1\n    PACKAGE_XPATH_TPL='string(//*[local-name()=\"metadata\"]/*[local-name()=\"package\"][*[local-name()=\"name\"][text()=\"_PKG_\"]][*[local-name()=\"arch\"][text()=\"_ARCH_\"]]/*[local-name()=\"location\"]/@href)'\n\n    PACKAGE_CHECKSUM_XPATH_TPL='string(//*[local-name()=\"metadata\"]/*[local-name()=\"package\"][*[local-name()=\"name\"][text()=\"_PKG_\"]][*[local-name()=\"arch\"][text()=\"_ARCH_\"]]/*[local-name()=\"checksum\"]/text())'\n\n    for pkg in ${@:2}\n    do\n        Inform \"Fetching... $pkg\"\n        XPATH=${PACKAGE_XPATH_TPL/_PKG_/$pkg}\n        XPATH=${XPATH/_ARCH_/$ARCH}\n        Xpath_get $XPATH $TMP_PRIMARY\n        PKG_PATH=$XPATH_RESULT\n\n        XPATH=${PACKAGE_CHECKSUM_XPATH_TPL/_PKG_/$pkg}\n        XPATH=${XPATH/_ARCH_/$ARCH}\n        Xpath_get $XPATH $TMP_PRIMARY\n        CHECKSUM=$XPATH_RESULT\n\n        PKG_URL=$TARGET_URL/$PKG_PATH\n        PKG_FILE=$(basename $PKG_PATH)\n        PKG_PATH=$TMPDIR/$PKG_FILE\n\n        Debug \"Download $PKG_URL to $PKG_PATH\"\n        Fetch $PKG_URL $PKG_PATH true\n\n        echo \"$CHECKSUM $PKG_PATH\" | sha256sum -c - > /dev/null\n        if [ $? -ne 0 ]; then\n            Error \"Fail to fetch $PKG_URL to $PKG_PATH\"\n            Debug \"Checksum = $CHECKSUM\"\n            exit 1\n        fi\n    done\n}\n\nBASE=\"Tizen-Base\"\nUNIFIED=\"Tizen-Unified\"\n\nInform \"Initialize ${TIZEN_ARCH} base\"\nfetch_tizen_pkgs_init standard $BASE\nInform \"fetch common packages\"\nfetch_tizen_pkgs ${TIZEN_ARCH} gcc gcc-devel-static glibc glibc-devel libicu libicu-devel libatomic linux-glibc-devel keyutils keyutils-devel libkeyutils\nInform \"fetch coreclr packages\"\nfetch_tizen_pkgs ${TIZEN_ARCH} libgcc libstdc++ libstdc++-devel libunwind libunwind-devel lttng-ust-devel lttng-ust userspace-rcu-devel userspace-rcu\nif [ \"$TIZEN_ARCH\" != \"riscv64\" ]; then\n    fetch_tizen_pkgs ${TIZEN_ARCH} lldb lldb-devel\nfi\nInform \"fetch corefx packages\"\nfetch_tizen_pkgs ${TIZEN_ARCH} libcom_err libcom_err-devel zlib zlib-devel libopenssl11 libopenssl1.1-devel krb5 krb5-devel\n\nInform \"Initialize standard unified\"\nfetch_tizen_pkgs_init standard $UNIFIED\nInform \"fetch corefx packages\"\nfetch_tizen_pkgs ${TIZEN_ARCH} gssdp gssdp-devel tizen-release\n\n"
  },
  {
    "path": "eng/common/cross/toolchain.cmake",
    "content": "set(CROSS_ROOTFS $ENV{ROOTFS_DIR})\n\n# reset platform variables (e.g. cmake 3.25 sets LINUX=1)\nunset(LINUX)\nunset(FREEBSD)\nunset(OPENBSD)\nunset(ILLUMOS)\nunset(ANDROID)\nunset(TIZEN)\nunset(HAIKU)\n\nset(TARGET_ARCH_NAME $ENV{TARGET_BUILD_ARCH})\n\nfile(GLOB OPENBSD_PROBE \"${CROSS_ROOTFS}/etc/signify/openbsd-*.pub\")\n\nif(EXISTS ${CROSS_ROOTFS}/bin/freebsd-version)\n  set(CMAKE_SYSTEM_NAME FreeBSD)\n  set(FREEBSD 1)\nelseif(OPENBSD_PROBE)\n  set(CMAKE_SYSTEM_NAME OpenBSD)\n  set(OPENBSD 1)\nelseif(EXISTS ${CROSS_ROOTFS}/usr/platform/i86pc)\n  set(CMAKE_SYSTEM_NAME SunOS)\n  set(ILLUMOS 1)\nelseif(EXISTS ${CROSS_ROOTFS}/boot/system/develop/headers/config/HaikuConfig.h)\n  set(CMAKE_SYSTEM_NAME Haiku)\n  set(HAIKU 1)\nelse()\n  set(CMAKE_SYSTEM_NAME Linux)\n  set(LINUX 1)\nendif()\nset(CMAKE_SYSTEM_VERSION 1)\n\nif(EXISTS ${CROSS_ROOTFS}/etc/tizen-release)\n  set(TIZEN 1)\nelseif(EXISTS ${CROSS_ROOTFS}/android_platform)\n  set(ANDROID 1)\nendif()\n\nif(TARGET_ARCH_NAME STREQUAL \"arm\")\n  set(CMAKE_SYSTEM_PROCESSOR armv7l)\n  if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/armv7-alpine-linux-musleabihf)\n    set(TOOLCHAIN \"armv7-alpine-linux-musleabihf\")\n  elseif(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/armv6-alpine-linux-musleabihf)\n    set(TOOLCHAIN \"armv6-alpine-linux-musleabihf\")\n  else()\n    set(TOOLCHAIN \"arm-linux-gnueabihf\")\n  endif()\n  if(TIZEN)\n    set(TIZEN_TOOLCHAIN \"armv7hl-tizen-linux-gnueabihf\")\n  endif()\nelseif(TARGET_ARCH_NAME STREQUAL \"arm64\")\n  set(CMAKE_SYSTEM_PROCESSOR aarch64)\n  if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/aarch64-alpine-linux-musl)\n    set(TOOLCHAIN \"aarch64-alpine-linux-musl\")\n  elseif(LINUX)\n    set(TOOLCHAIN \"aarch64-linux-gnu\")\n    if(TIZEN)\n      set(TIZEN_TOOLCHAIN \"aarch64-tizen-linux-gnu\")\n    endif()\n  elseif(FREEBSD)\n    set(triple \"aarch64-unknown-freebsd12\")\n  elseif(OPENBSD)\n    set(triple \"aarch64-unknown-openbsd\")\n  endif()\nelseif(TARGET_ARCH_NAME STREQUAL \"armel\")\n  set(CMAKE_SYSTEM_PROCESSOR armv7l)\n  set(TOOLCHAIN \"arm-linux-gnueabi\")\n  if(TIZEN)\n    set(TIZEN_TOOLCHAIN \"armv7l-tizen-linux-gnueabi\")\n  endif()\nelseif(TARGET_ARCH_NAME STREQUAL \"armv6\")\n  set(CMAKE_SYSTEM_PROCESSOR armv6l)\n  if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/armv6-alpine-linux-musleabihf)\n    set(TOOLCHAIN \"armv6-alpine-linux-musleabihf\")\n  else()\n    set(TOOLCHAIN \"arm-linux-gnueabihf\")\n  endif()\nelseif(TARGET_ARCH_NAME STREQUAL \"loongarch64\")\n  set(CMAKE_SYSTEM_PROCESSOR \"loongarch64\")\n  if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/loongarch64-alpine-linux-musl)\n    set(TOOLCHAIN \"loongarch64-alpine-linux-musl\")\n  else()\n    set(TOOLCHAIN \"loongarch64-linux-gnu\")\n  endif()\nelseif(TARGET_ARCH_NAME STREQUAL \"ppc64le\")\n  set(CMAKE_SYSTEM_PROCESSOR ppc64le)\n  if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/powerpc64le-alpine-linux-musl)\n    set(TOOLCHAIN \"powerpc64le-alpine-linux-musl\")\n  else()\n    set(TOOLCHAIN \"powerpc64le-linux-gnu\")\n  endif()\nelseif(TARGET_ARCH_NAME STREQUAL \"riscv64\")\n  set(CMAKE_SYSTEM_PROCESSOR riscv64)\n  if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/riscv64-alpine-linux-musl)\n    set(TOOLCHAIN \"riscv64-alpine-linux-musl\")\n  else()\n    set(TOOLCHAIN \"riscv64-linux-gnu\")\n    if(TIZEN)\n      set(TIZEN_TOOLCHAIN \"riscv64-tizen-linux-gnu\")\n    endif()\n  endif()\nelseif(TARGET_ARCH_NAME STREQUAL \"s390x\")\n  set(CMAKE_SYSTEM_PROCESSOR s390x)\n  if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/s390x-alpine-linux-musl)\n    set(TOOLCHAIN \"s390x-alpine-linux-musl\")\n  else()\n    set(TOOLCHAIN \"s390x-linux-gnu\")\n  endif()\nelseif(TARGET_ARCH_NAME STREQUAL \"x64\")\n  set(CMAKE_SYSTEM_PROCESSOR x86_64)\n  if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/x86_64-alpine-linux-musl)\n    set(TOOLCHAIN \"x86_64-alpine-linux-musl\")\n  elseif(LINUX)\n    set(TOOLCHAIN \"x86_64-linux-gnu\")\n    if(TIZEN)\n      set(TIZEN_TOOLCHAIN \"x86_64-tizen-linux-gnu\")\n    endif()\n  elseif(FREEBSD)\n    set(triple \"x86_64-unknown-freebsd12\")\n  elseif(OPENBSD)\n    set(triple \"x86_64-unknown-openbsd\")\n  elseif(ILLUMOS)\n    set(TOOLCHAIN \"x86_64-illumos\")\n  elseif(HAIKU)\n    set(TOOLCHAIN \"x86_64-unknown-haiku\")\n  endif()\nelseif(TARGET_ARCH_NAME STREQUAL \"x86\")\n  set(CMAKE_SYSTEM_PROCESSOR i686)\n  if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/i586-alpine-linux-musl)\n    set(TOOLCHAIN \"i586-alpine-linux-musl\")\n  else()\n    set(TOOLCHAIN \"i686-linux-gnu\")\n  endif()\n  if(TIZEN)\n    set(TIZEN_TOOLCHAIN \"i586-tizen-linux-gnu\")\n  endif()\nelse()\n  message(FATAL_ERROR \"Arch is ${TARGET_ARCH_NAME}. Only arm, arm64, armel, armv6, loongarch64, ppc64le, riscv64, s390x, x64 and x86 are supported!\")\nendif()\n\nif(DEFINED ENV{TOOLCHAIN})\n  set(TOOLCHAIN $ENV{TOOLCHAIN})\nendif()\n\n# Specify include paths\nif(TIZEN)\n  function(find_toolchain_dir prefix)\n    # Dynamically find the version subdirectory\n    file(GLOB DIRECTORIES \"${prefix}/*\")\n    list(GET DIRECTORIES 0 FIRST_MATCH)\n    get_filename_component(TOOLCHAIN_VERSION ${FIRST_MATCH} NAME)\n\n    set(TIZEN_TOOLCHAIN_PATH \"${prefix}/${TOOLCHAIN_VERSION}\" PARENT_SCOPE)\n  endfunction()\n\n  if(TARGET_ARCH_NAME MATCHES \"^(arm|armel|x86)$\")\n    find_toolchain_dir(\"${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}\")\n  else()\n    find_toolchain_dir(\"${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}\")\n  endif()\n\n  message(STATUS \"TIZEN_TOOLCHAIN_PATH set to: ${TIZEN_TOOLCHAIN_PATH}\")\n\n  include_directories(SYSTEM ${TIZEN_TOOLCHAIN_PATH}/include/c++)\n  include_directories(SYSTEM ${TIZEN_TOOLCHAIN_PATH}/include/c++/${TIZEN_TOOLCHAIN})\nendif()\n\nfunction(locate_toolchain_exec exec var)\n    set(TOOLSET_PREFIX ${TOOLCHAIN}-)\n    string(TOUPPER ${exec} EXEC_UPPERCASE)\n    if(NOT \"$ENV{CLR_${EXEC_UPPERCASE}}\" STREQUAL \"\")\n        set(${var} \"$ENV{CLR_${EXEC_UPPERCASE}}\" PARENT_SCOPE)\n        return()\n    endif()\n\n    find_program(EXEC_LOCATION_${exec}\n        NAMES\n        \"${TOOLSET_PREFIX}${exec}${CLR_CMAKE_COMPILER_FILE_NAME_VERSION}\"\n        \"${TOOLSET_PREFIX}${exec}\")\n\n    if (EXEC_LOCATION_${exec} STREQUAL \"EXEC_LOCATION_${exec}-NOTFOUND\")\n        message(FATAL_ERROR \"Unable to find toolchain executable. Name: ${exec}, Prefix: ${TOOLSET_PREFIX}.\")\n    endif()\n    set(${var} ${EXEC_LOCATION_${exec}} PARENT_SCOPE)\nendfunction()\n\nif(ANDROID)\n    if(TARGET_ARCH_NAME STREQUAL \"arm\")\n        set(ANDROID_ABI armeabi-v7a)\n    elseif(TARGET_ARCH_NAME STREQUAL \"arm64\")\n        set(ANDROID_ABI arm64-v8a)\n    endif()\n\n    # extract platform number required by the NDK's toolchain\n    file(READ \"${CROSS_ROOTFS}/android_platform\" RID_FILE_CONTENTS)\n    string(REPLACE \"RID=\" \"\" ANDROID_RID \"${RID_FILE_CONTENTS}\")\n    string(REGEX REPLACE \".*\\\\.([0-9]+)-.*\" \"\\\\1\" ANDROID_PLATFORM \"${ANDROID_RID}\")\n\n    set(ANDROID_TOOLCHAIN clang)\n    set(FEATURE_EVENT_TRACE 0) # disable event trace as there is no lttng-ust package in termux repository\n    set(CMAKE_SYSTEM_LIBRARY_PATH \"${CROSS_ROOTFS}/usr/lib\")\n    set(CMAKE_SYSTEM_INCLUDE_PATH \"${CROSS_ROOTFS}/usr/include\")\n\n    # include official NDK toolchain script\n    include(${CROSS_ROOTFS}/../build/cmake/android.toolchain.cmake)\nelseif(FREEBSD OR OPENBSD)\n    # we cross-compile by instructing clang\n    set(CMAKE_C_COMPILER_TARGET ${triple})\n    set(CMAKE_CXX_COMPILER_TARGET ${triple})\n    set(CMAKE_ASM_COMPILER_TARGET ${triple})\n    set(CMAKE_SYSROOT \"${CROSS_ROOTFS}\")\n    set(CMAKE_EXE_LINKER_FLAGS \"${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=lld\")\n    set(CMAKE_SHARED_LINKER_FLAGS \"${CMAKE_SHARED_LINKER_FLAGS} -fuse-ld=lld\")\n    set(CMAKE_MODULE_LINKER_FLAGS \"${CMAKE_MODULE_LINKER_FLAGS} -fuse-ld=lld\")\nelseif(ILLUMOS)\n    set(CMAKE_SYSROOT \"${CROSS_ROOTFS}\")\n    set(CMAKE_SYSTEM_PREFIX_PATH \"${CROSS_ROOTFS}\")\n    set(CMAKE_C_STANDARD_LIBRARIES \"${CMAKE_C_STANDARD_LIBRARIES} -lssp\")\n    set(CMAKE_CXX_STANDARD_LIBRARIES \"${CMAKE_CXX_STANDARD_LIBRARIES} -lssp\")\n\n    include_directories(SYSTEM ${CROSS_ROOTFS}/include)\n\n    locate_toolchain_exec(gcc CMAKE_C_COMPILER)\n    locate_toolchain_exec(g++ CMAKE_CXX_COMPILER)\nelseif(HAIKU)\n    set(CMAKE_SYSROOT \"${CROSS_ROOTFS}\")\n    set(CMAKE_PROGRAM_PATH \"${CMAKE_PROGRAM_PATH};${CROSS_ROOTFS}/cross-tools-x86_64/bin\")\n    set(CMAKE_SYSTEM_PREFIX_PATH \"${CROSS_ROOTFS}\")\n    set(CMAKE_C_STANDARD_LIBRARIES \"${CMAKE_C_STANDARD_LIBRARIES} -lssp\")\n    set(CMAKE_CXX_STANDARD_LIBRARIES \"${CMAKE_CXX_STANDARD_LIBRARIES} -lssp\")\n\n    locate_toolchain_exec(gcc CMAKE_C_COMPILER)\n    locate_toolchain_exec(g++ CMAKE_CXX_COMPILER)\n\n    # let CMake set up the correct search paths\n    include(Platform/Haiku)\nelse()\n    set(CMAKE_SYSROOT \"${CROSS_ROOTFS}\")\n\n    set(CMAKE_C_COMPILER_EXTERNAL_TOOLCHAIN \"${CROSS_ROOTFS}/usr\")\n    set(CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN \"${CROSS_ROOTFS}/usr\")\n    set(CMAKE_ASM_COMPILER_EXTERNAL_TOOLCHAIN \"${CROSS_ROOTFS}/usr\")\nendif()\n\n# Specify link flags\n\nfunction(add_toolchain_linker_flag Flag)\n  set(Config \"${ARGV1}\")\n  set(CONFIG_SUFFIX \"\")\n  if (NOT Config STREQUAL \"\")\n    set(CONFIG_SUFFIX \"_${Config}\")\n  endif()\n  set(\"CMAKE_EXE_LINKER_FLAGS${CONFIG_SUFFIX}_INIT\" \"${CMAKE_EXE_LINKER_FLAGS${CONFIG_SUFFIX}_INIT} ${Flag}\" PARENT_SCOPE)\n  set(\"CMAKE_SHARED_LINKER_FLAGS${CONFIG_SUFFIX}_INIT\" \"${CMAKE_SHARED_LINKER_FLAGS${CONFIG_SUFFIX}_INIT} ${Flag}\" PARENT_SCOPE)\nendfunction()\n\nif(LINUX)\n  add_toolchain_linker_flag(\"-Wl,--rpath-link=${CROSS_ROOTFS}/lib/${TOOLCHAIN}\")\n  add_toolchain_linker_flag(\"-Wl,--rpath-link=${CROSS_ROOTFS}/usr/lib/${TOOLCHAIN}\")\nendif()\n\nif(TARGET_ARCH_NAME MATCHES \"^(arm|armel)$\")\n  if(TIZEN)\n    add_toolchain_linker_flag(\"-B${TIZEN_TOOLCHAIN_PATH}\")\n    add_toolchain_linker_flag(\"-L${CROSS_ROOTFS}/lib\")\n    add_toolchain_linker_flag(\"-L${CROSS_ROOTFS}/usr/lib\")\n    add_toolchain_linker_flag(\"-L${TIZEN_TOOLCHAIN_PATH}\")\n  endif()\nelseif(TARGET_ARCH_NAME MATCHES \"^(arm64|x64|riscv64)$\")\n  if(TIZEN)\n    add_toolchain_linker_flag(\"-B${TIZEN_TOOLCHAIN_PATH}\")\n    add_toolchain_linker_flag(\"-L${CROSS_ROOTFS}/lib64\")\n    add_toolchain_linker_flag(\"-L${CROSS_ROOTFS}/usr/lib64\")\n    add_toolchain_linker_flag(\"-L${TIZEN_TOOLCHAIN_PATH}\")\n\n    add_toolchain_linker_flag(\"-Wl,--rpath-link=${CROSS_ROOTFS}/lib64\")\n    add_toolchain_linker_flag(\"-Wl,--rpath-link=${CROSS_ROOTFS}/usr/lib64\")\n    add_toolchain_linker_flag(\"-Wl,--rpath-link=${TIZEN_TOOLCHAIN_PATH}\")\n  endif()\nelseif(TARGET_ARCH_NAME STREQUAL \"s390x\")\n  add_toolchain_linker_flag(\"--target=${TOOLCHAIN}\")\nelseif(TARGET_ARCH_NAME STREQUAL \"x86\")\n  if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/i586-alpine-linux-musl)\n    add_toolchain_linker_flag(\"--target=${TOOLCHAIN}\")\n    add_toolchain_linker_flag(\"-Wl,--rpath-link=${CROSS_ROOTFS}/usr/lib/gcc/${TOOLCHAIN}\")\n  endif()\n  add_toolchain_linker_flag(-m32)\n  if(TIZEN)\n    add_toolchain_linker_flag(\"-B${TIZEN_TOOLCHAIN_PATH}\")\n    add_toolchain_linker_flag(\"-L${CROSS_ROOTFS}/lib\")\n    add_toolchain_linker_flag(\"-L${CROSS_ROOTFS}/usr/lib\")\n    add_toolchain_linker_flag(\"-L${TIZEN_TOOLCHAIN_PATH}\")\n  endif()\nelseif(ILLUMOS)\n  add_toolchain_linker_flag(\"-L${CROSS_ROOTFS}/lib/amd64\")\n  add_toolchain_linker_flag(\"-L${CROSS_ROOTFS}/usr/amd64/lib\")\nelseif(HAIKU)\n  add_toolchain_linker_flag(\"-lnetwork\")\n  add_toolchain_linker_flag(\"-lroot\")\nendif()\n\n# Specify compile options\n\nif((TARGET_ARCH_NAME MATCHES \"^(arm|arm64|armel|armv6|loongarch64|ppc64le|riscv64|s390x|x64|x86)$\" AND NOT ANDROID AND NOT FREEBSD AND NOT OPENBSD) OR ILLUMOS OR HAIKU)\n  set(CMAKE_C_COMPILER_TARGET ${TOOLCHAIN})\n  set(CMAKE_CXX_COMPILER_TARGET ${TOOLCHAIN})\n  set(CMAKE_ASM_COMPILER_TARGET ${TOOLCHAIN})\nendif()\n\nif(TARGET_ARCH_NAME MATCHES \"^(arm|armel)$\")\n  add_compile_options(-mthumb)\n  if (NOT DEFINED CLR_ARM_FPU_TYPE)\n    set (CLR_ARM_FPU_TYPE vfpv3)\n  endif (NOT DEFINED CLR_ARM_FPU_TYPE)\n\n  add_compile_options (-mfpu=${CLR_ARM_FPU_TYPE})\n  if (NOT DEFINED CLR_ARM_FPU_CAPABILITY)\n    set (CLR_ARM_FPU_CAPABILITY 0x7)\n  endif (NOT DEFINED CLR_ARM_FPU_CAPABILITY)\n\n  add_definitions (-DCLR_ARM_FPU_CAPABILITY=${CLR_ARM_FPU_CAPABILITY})\n\n  # persist variables across multiple try_compile passes\n  list(APPEND CMAKE_TRY_COMPILE_PLATFORM_VARIABLES CLR_ARM_FPU_TYPE CLR_ARM_FPU_CAPABILITY)\n\n  if(TARGET_ARCH_NAME STREQUAL \"armel\")\n    add_compile_options(-mfloat-abi=softfp)\n  endif()\nelseif(TARGET_ARCH_NAME STREQUAL \"s390x\")\n  add_compile_options(\"--target=${TOOLCHAIN}\")\nelseif(TARGET_ARCH_NAME STREQUAL \"x86\")\n  if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/i586-alpine-linux-musl)\n    add_compile_options(--target=${TOOLCHAIN})\n  endif()\n  add_compile_options(-m32)\n  add_compile_options(-Wno-error=unused-command-line-argument)\nendif()\n\nif(TIZEN)\n  if(TARGET_ARCH_NAME MATCHES \"^(arm|armel|arm64|x86)$\")\n    add_compile_options(-Wno-deprecated-declarations) # compile-time option\n    add_compile_options(-D__extern_always_inline=inline) # compile-time option\n  endif()\nendif()\n\n# Set LLDB include and library paths for builds that need lldb.\nif(TARGET_ARCH_NAME MATCHES \"^(arm|armel|x86)$\")\n  if(TARGET_ARCH_NAME STREQUAL \"x86\")\n    set(LLVM_CROSS_DIR \"$ENV{LLVM_CROSS_HOME}\")\n  else() # arm/armel case\n    set(LLVM_CROSS_DIR \"$ENV{LLVM_ARM_HOME}\")\n  endif()\n  if(LLVM_CROSS_DIR)\n    set(WITH_LLDB_LIBS \"${LLVM_CROSS_DIR}/lib/\" CACHE STRING \"\")\n    set(WITH_LLDB_INCLUDES \"${LLVM_CROSS_DIR}/include\" CACHE STRING \"\")\n    set(LLDB_H \"${WITH_LLDB_INCLUDES}\" CACHE STRING \"\")\n    set(LLDB \"${LLVM_CROSS_DIR}/lib/liblldb.so\" CACHE STRING \"\")\n  else()\n    if(TARGET_ARCH_NAME STREQUAL \"x86\")\n      set(WITH_LLDB_LIBS \"${CROSS_ROOTFS}/usr/lib/i386-linux-gnu\" CACHE STRING \"\")\n      set(CHECK_LLVM_DIR \"${CROSS_ROOTFS}/usr/lib/llvm-3.8/include\")\n      if(EXISTS \"${CHECK_LLVM_DIR}\" AND IS_DIRECTORY \"${CHECK_LLVM_DIR}\")\n        set(WITH_LLDB_INCLUDES \"${CHECK_LLVM_DIR}\")\n      else()\n        set(WITH_LLDB_INCLUDES \"${CROSS_ROOTFS}/usr/lib/llvm-3.6/include\")\n      endif()\n    else() # arm/armel case\n      set(WITH_LLDB_LIBS \"${CROSS_ROOTFS}/usr/lib/${TOOLCHAIN}\" CACHE STRING \"\")\n      set(WITH_LLDB_INCLUDES \"${CROSS_ROOTFS}/usr/lib/llvm-3.6/include\" CACHE STRING \"\")\n    endif()\n  endif()\nendif()\n\n# Set C++ standard library options if specified\nset(CLR_CMAKE_CXX_STANDARD_LIBRARY \"\" CACHE STRING \"Standard library flavor to link against. Only supported with the Clang compiler.\")\nif (CLR_CMAKE_CXX_STANDARD_LIBRARY)\n  add_compile_options($<$<COMPILE_LANG_AND_ID:CXX,Clang>:--stdlib=${CLR_CMAKE_CXX_STANDARD_LIBRARY}>)\n  add_link_options($<$<LINK_LANG_AND_ID:CXX,Clang>:--stdlib=${CLR_CMAKE_CXX_STANDARD_LIBRARY}>)\nendif()\n\noption(CLR_CMAKE_CXX_STANDARD_LIBRARY_STATIC \"Statically link against the C++ standard library\" OFF)\nif(CLR_CMAKE_CXX_STANDARD_LIBRARY_STATIC)\n  add_link_options($<$<LINK_LANGUAGE:CXX>:-static-libstdc++>)\nendif()\n\nset(CLR_CMAKE_CXX_ABI_LIBRARY \"\" CACHE STRING \"C++ ABI implementation library to link against. Only supported with the Clang compiler.\")\nif (CLR_CMAKE_CXX_ABI_LIBRARY)\n  # The user may specify the ABI library with the 'lib' prefix, like 'libstdc++'. Strip the prefix here so the linker finds the right library.\n  string(REGEX REPLACE \"^lib(.+)\" \"\\\\1\" CLR_CMAKE_CXX_ABI_LIBRARY ${CLR_CMAKE_CXX_ABI_LIBRARY})\n  # We need to specify this as a linker-backend option as Clang will filter this option out when linking to libc++.\n  add_link_options(\"LINKER:-l${CLR_CMAKE_CXX_ABI_LIBRARY}\")\nendif()\n\nset(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)\nset(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)\nset(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)\nset(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)\n"
  },
  {
    "path": "eng/common/darc-init.ps1",
    "content": "param (\n    $darcVersion = $null,\n    $versionEndpoint = 'https://maestro.dot.net/api/assets/darc-version?api-version=2020-02-20',\n    $verbosity = 'minimal',\n    $toolpath = $null\n)\n\n. $PSScriptRoot\\tools.ps1\n\nfunction InstallDarcCli ($darcVersion, $toolpath) {\n  $darcCliPackageName = 'microsoft.dotnet.darc'\n\n  $dotnetRoot = InitializeDotNetCli -install:$true\n  $dotnet = \"$dotnetRoot\\dotnet.exe\"\n  $toolList = & \"$dotnet\" tool list -g\n\n  if ($toolList -like \"*$darcCliPackageName*\") {\n    & \"$dotnet\" tool uninstall $darcCliPackageName -g\n  }\n\n  # If the user didn't explicitly specify the darc version,\n  # query the Maestro API for the correct version of darc to install.\n  if (-not $darcVersion) {\n    $darcVersion = $(Invoke-WebRequest -Uri $versionEndpoint -UseBasicParsing).Content\n  }\n\n  $arcadeServicesSource = 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json'\n\n  Write-Host \"Installing Darc CLI version $darcVersion...\"\n  Write-Host 'You may need to restart your command window if this is the first dotnet tool you have installed.'\n  if (-not $toolpath) {\n    Write-Host \"'$dotnet' tool install $darcCliPackageName --version $darcVersion --source '$arcadeServicesSource' -v $verbosity -g\"\n    & \"$dotnet\" tool install $darcCliPackageName --version $darcVersion --source \"$arcadeServicesSource\" -v $verbosity -g\n  }else {\n    Write-Host \"'$dotnet' tool install $darcCliPackageName --version $darcVersion --source '$arcadeServicesSource' -v $verbosity --tool-path '$toolpath'\"\n    & \"$dotnet\" tool install $darcCliPackageName --version $darcVersion --source \"$arcadeServicesSource\" -v $verbosity --tool-path \"$toolpath\"\n  }\n}\n\ntry {\n  InstallDarcCli $darcVersion $toolpath\n}\ncatch {\n  Write-Host $_.ScriptStackTrace\n  Write-PipelineTelemetryError -Category 'Darc' -Message $_\n  ExitWithExitCode 1\n}"
  },
  {
    "path": "eng/common/darc-init.sh",
    "content": "#!/usr/bin/env bash\n\nsource=\"${BASH_SOURCE[0]}\"\ndarcVersion=''\nversionEndpoint='https://maestro.dot.net/api/assets/darc-version?api-version=2020-02-20'\nverbosity='minimal'\n\nwhile [[ $# -gt 0 ]]; do\n  opt=\"$(echo \"$1\" | tr \"[:upper:]\" \"[:lower:]\")\"\n  case \"$opt\" in\n    --darcversion)\n      darcVersion=$2\n      shift\n      ;;\n    --versionendpoint)\n      versionEndpoint=$2\n      shift\n      ;;\n    --verbosity)\n      verbosity=$2\n      shift\n      ;;\n    --toolpath)\n      toolpath=$2\n      shift\n      ;;\n    *)\n      echo \"Invalid argument: $1\"\n      usage\n      exit 1\n      ;;\n  esac\n\n  shift\ndone\n\n# resolve $source until the file is no longer a symlink\nwhile [[ -h \"$source\" ]]; do\n  scriptroot=\"$( cd -P \"$( dirname \"$source\" )\" && pwd )\"\n  source=\"$(readlink \"$source\")\"\n  # if $source was a relative symlink, we need to resolve it relative to the path where the\n  # symlink file was located\n  [[ $source != /* ]] && source=\"$scriptroot/$source\"\ndone\nscriptroot=\"$( cd -P \"$( dirname \"$source\" )\" && pwd )\"\n\n. \"$scriptroot/tools.sh\"\n\nif [ -z \"$darcVersion\" ]; then\n  darcVersion=$(curl -X GET \"$versionEndpoint\" -H \"accept: text/plain\")\nfi\n\nfunction InstallDarcCli {\n  local darc_cli_package_name=\"microsoft.dotnet.darc\"\n\n  InitializeDotNetCli true\n  local dotnet_root=$_InitializeDotNetCli\n\n  if [ -z \"$toolpath\" ]; then\n    local tool_list=$($dotnet_root/dotnet tool list -g)\n    if [[ $tool_list = *$darc_cli_package_name* ]]; then\n      echo $($dotnet_root/dotnet tool uninstall $darc_cli_package_name -g)\n    fi\n  else\n    local tool_list=$($dotnet_root/dotnet tool list --tool-path \"$toolpath\")\n    if [[ $tool_list = *$darc_cli_package_name* ]]; then\n      echo $($dotnet_root/dotnet tool uninstall $darc_cli_package_name --tool-path \"$toolpath\")\n    fi\n  fi\n\n  local arcadeServicesSource=\"https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json\"\n\n  echo \"Installing Darc CLI version $darcVersion...\"\n  echo \"You may need to restart your command shell if this is the first dotnet tool you have installed.\"\n  if [ -z \"$toolpath\" ]; then\n    echo $($dotnet_root/dotnet tool install $darc_cli_package_name --version $darcVersion --source \"$arcadeServicesSource\" -v $verbosity -g)\n  else\n    echo $($dotnet_root/dotnet tool install $darc_cli_package_name --version $darcVersion --source \"$arcadeServicesSource\" -v $verbosity --tool-path \"$toolpath\")\n  fi\n}\n\nInstallDarcCli\n"
  },
  {
    "path": "eng/common/dotnet-install.cmd",
    "content": "@echo off\npowershell -ExecutionPolicy ByPass -NoProfile -command \"& \"\"\"%~dp0dotnet-install.ps1\"\"\" %*\""
  },
  {
    "path": "eng/common/dotnet-install.ps1",
    "content": "[CmdletBinding(PositionalBinding=$false)]\nParam(\n  [string] $verbosity = 'minimal',\n  [string] $architecture = '',\n  [string] $version = 'Latest',\n  [string] $runtime = 'dotnet',\n  [string] $RuntimeSourceFeed = '',\n  [string] $RuntimeSourceFeedKey = ''\n)\n\n. $PSScriptRoot\\tools.ps1\n\n$dotnetRoot = Join-Path $RepoRoot '.dotnet'\n\n$installdir = $dotnetRoot\ntry {\n    if ($architecture -and $architecture.Trim() -eq 'x86') {\n        $installdir = Join-Path $installdir 'x86'\n    }\n    InstallDotNet $installdir $version $architecture $runtime $true -RuntimeSourceFeed $RuntimeSourceFeed -RuntimeSourceFeedKey $RuntimeSourceFeedKey\n}\ncatch {\n  Write-Host $_.ScriptStackTrace\n  Write-PipelineTelemetryError -Category 'InitializeToolset' -Message $_\n  ExitWithExitCode 1\n}\n\nExitWithExitCode 0\n"
  },
  {
    "path": "eng/common/dotnet-install.sh",
    "content": "#!/usr/bin/env bash\n\nsource=\"${BASH_SOURCE[0]}\"\n# resolve $source until the file is no longer a symlink\nwhile [[ -h \"$source\" ]]; do\n  scriptroot=\"$( cd -P \"$( dirname \"$source\" )\" && pwd )\"\n  source=\"$(readlink \"$source\")\"\n  # if $source was a relative symlink, we need to resolve it relative to the path where the\n  # symlink file was located\n  [[ $source != /* ]] && source=\"$scriptroot/$source\"\ndone\nscriptroot=\"$( cd -P \"$( dirname \"$source\" )\" && pwd )\"\n\n. \"$scriptroot/tools.sh\"\n\nversion='Latest'\narchitecture=''\nruntime='dotnet'\nruntimeSourceFeed=''\nruntimeSourceFeedKey=''\nwhile [[ $# -gt 0 ]]; do\n  opt=\"$(echo \"$1\" | tr \"[:upper:]\" \"[:lower:]\")\"\n  case \"$opt\" in\n    -version|-v)\n      shift\n      version=\"$1\"\n      ;;\n    -architecture|-a)\n      shift\n      architecture=\"$1\"\n      ;;\n    -runtime|-r)\n      shift\n      runtime=\"$1\"\n      ;;\n    -runtimesourcefeed)\n      shift\n      runtimeSourceFeed=\"$1\"\n      ;;\n    -runtimesourcefeedkey)\n      shift\n      runtimeSourceFeedKey=\"$1\"\n      ;;\n    *)\n      Write-PipelineTelemetryError -Category 'Build' -Message \"Invalid argument: $1\"\n      exit 1\n      ;;\n  esac\n  shift\ndone\n\n# Use uname to determine what the CPU is, see https://en.wikipedia.org/wiki/Uname#Examples\ncpuname=$(uname -m)\ncase $cpuname in\n  arm64|aarch64)\n    buildarch=arm64\n    if [ \"$(getconf LONG_BIT)\" -lt 64 ]; then\n        # This is 32-bit OS running on 64-bit CPU (for example Raspberry Pi OS)\n        buildarch=arm\n    fi\n    ;;\n  loongarch64)\n    buildarch=loongarch64\n    ;;\n  amd64|x86_64)\n    buildarch=x64\n    ;;\n  armv*l)\n    buildarch=arm\n    ;;\n  i[3-6]86)\n    buildarch=x86\n    ;;\n  riscv64)\n    buildarch=riscv64\n    ;;\n  *)\n    echo \"Unknown CPU $cpuname detected, treating it as x64\"\n    buildarch=x64\n    ;;\nesac\n\ndotnetRoot=\"${repo_root}.dotnet\"\nif [[ $architecture != \"\" ]] && [[ $architecture != $buildarch ]]; then\n  dotnetRoot=\"$dotnetRoot/$architecture\"\nfi\n\nInstallDotNet \"$dotnetRoot\" $version \"$architecture\" $runtime true $runtimeSourceFeed $runtimeSourceFeedKey || {\n  local exit_code=$?\n  Write-PipelineTelemetryError -Category 'InitializeToolset' -Message \"dotnet-install.sh failed (exit code '$exit_code').\" >&2\n  ExitWithExitCode $exit_code\n}\n\nExitWithExitCode 0\n"
  },
  {
    "path": "eng/common/dotnet.cmd",
    "content": "@echo off\n\n:: This script is used to install the .NET SDK.\n:: It will also invoke the SDK with any provided arguments.\n\npowershell -ExecutionPolicy ByPass -NoProfile -command \"& \"\"\"%~dp0dotnet.ps1\"\"\" %*\"\nexit /b %ErrorLevel%\n"
  },
  {
    "path": "eng/common/dotnet.ps1",
    "content": "# This script is used to install the .NET SDK.\n# It will also invoke the SDK with any provided arguments.\n\n. $PSScriptRoot\\tools.ps1\n$dotnetRoot = InitializeDotNetCli -install:$true\n\n# Invoke acquired SDK with args if they are provided\nif ($args.count -gt 0) {\n  $env:DOTNET_NOLOGO=1\n  & \"$dotnetRoot\\dotnet.exe\" $args\n}\n"
  },
  {
    "path": "eng/common/dotnet.sh",
    "content": "#!/usr/bin/env bash\n\n# This script is used to install the .NET SDK.\n# It will also invoke the SDK with any provided arguments.\n\nsource=\"${BASH_SOURCE[0]}\"\n# resolve $SOURCE until the file is no longer a symlink\nwhile [[ -h $source ]]; do\n  scriptroot=\"$( cd -P \"$( dirname \"$source\" )\" && pwd )\"\n  source=\"$(readlink \"$source\")\"\n\n  # if $source was a relative symlink, we need to resolve it relative to the path where the\n  # symlink file was located\n  [[ $source != /* ]] && source=\"$scriptroot/$source\"\ndone\nscriptroot=\"$( cd -P \"$( dirname \"$source\" )\" && pwd )\"\n\nsource $scriptroot/tools.sh\nInitializeDotNetCli true # install\n\n# Invoke acquired SDK with args if they are provided\nif [[ $# -gt 0 ]]; then\n  __dotnetDir=${_InitializeDotNetCli}\n  dotnetPath=${__dotnetDir}/dotnet\n  ${dotnetPath} \"$@\"\nfi\n"
  },
  {
    "path": "eng/common/enable-cross-org-publishing.ps1",
    "content": "param(\n  [string] $token\n)\n\n\n. $PSScriptRoot\\pipeline-logging-functions.ps1\n\n# Write-PipelineSetVariable will no-op if a variable named $ci is not defined\n# Since this script is only ever called in AzDO builds, just universally set it\n$ci = $true\n\nWrite-PipelineSetVariable -Name 'VSS_NUGET_ACCESSTOKEN' -Value $token -IsMultiJobVariable $false\nWrite-PipelineSetVariable -Name 'VSS_NUGET_URI_PREFIXES' -Value 'https://dnceng.pkgs.visualstudio.com/;https://pkgs.dev.azure.com/dnceng/;https://devdiv.pkgs.visualstudio.com/;https://pkgs.dev.azure.com/devdiv/' -IsMultiJobVariable $false\n"
  },
  {
    "path": "eng/common/generate-locproject.ps1",
    "content": "Param(\n    [Parameter(Mandatory=$true)][string] $SourcesDirectory,     # Directory where source files live; if using a Localize directory it should live in here\n    [string] $LanguageSet = 'VS_Main_Languages',                # Language set to be used in the LocProject.json\n    [switch] $UseCheckedInLocProjectJson,                       # When set, generates a LocProject.json and compares it to one that already exists in the repo; otherwise just generates one\n    [switch] $CreateNeutralXlfs                                 # Creates neutral xlf files. Only set to false when running locally\n)\n\n# Generates LocProject.json files for the OneLocBuild task. OneLocBuildTask is described here:\n# https://ceapex.visualstudio.com/CEINTL/_wiki/wikis/CEINTL.wiki/107/Localization-with-OneLocBuild-Task\n\nSet-StrictMode -Version 2.0\n$ErrorActionPreference = \"Stop\"\n. $PSScriptRoot\\pipeline-logging-functions.ps1\n\n$exclusionsFilePath = \"$SourcesDirectory\\eng\\Localize\\LocExclusions.json\"\n$exclusions = @{ Exclusions = @() }\nif (Test-Path -Path $exclusionsFilePath)\n{\n    $exclusions = Get-Content \"$exclusionsFilePath\" | ConvertFrom-Json\n}\n\nPush-Location \"$SourcesDirectory\" # push location for Resolve-Path -Relative to work\n\n# Template files\n$jsonFiles = @()\n$jsonTemplateFiles = Get-ChildItem -Recurse -Path \"$SourcesDirectory\" | Where-Object { $_.FullName -Match \"\\.template\\.config\\\\localize\\\\.+\\.en\\.json\" } # .NET templating pattern\n$jsonTemplateFiles | ForEach-Object {\n    $null = $_.Name -Match \"(.+)\\.[\\w-]+\\.json\" # matches '[filename].[langcode].json\n\n    $destinationFile = \"$($_.Directory.FullName)\\$($Matches.1).json\"\n    $jsonFiles += Copy-Item \"$($_.FullName)\" -Destination $destinationFile -PassThru\n}\n\n$jsonWinformsTemplateFiles = Get-ChildItem -Recurse -Path \"$SourcesDirectory\" | Where-Object { $_.FullName -Match \"en\\\\strings\\.json\" } # current winforms pattern\n\n$wxlFilesV3 = @()\n$wxlFilesV5 = @()\n$wxlFiles = Get-ChildItem -Recurse -Path \"$SourcesDirectory\" | Where-Object { $_.FullName -Match \"\\\\.+\\.wxl\" -And -Not( $_.Directory.Name -Match \"\\d{4}\" ) } # localized files live in four digit lang ID directories; this excludes them\nif (-not $wxlFiles) {\n    $wxlEnFiles = Get-ChildItem -Recurse -Path \"$SourcesDirectory\" | Where-Object { $_.FullName -Match \"\\\\1033\\\\.+\\.wxl\" } #  pick up en files (1033 = en) specifically so we can copy them to use as the neutral xlf files\n    if ($wxlEnFiles) {\n        $wxlFiles = @()\n        $wxlEnFiles | ForEach-Object {\n            $destinationFile = \"$($_.Directory.Parent.FullName)\\$($_.Name)\"\n            $content = Get-Content $_.FullName -Raw\n\n            # Split files on schema to select different parser settings in the generated project.\n            if ($content -like \"*http://wixtoolset.org/schemas/v4/wxl*\")\n            {\n                $wxlFilesV5 += Copy-Item $_.FullName -Destination $destinationFile -PassThru\n            }\n            elseif ($content -like \"*http://schemas.microsoft.com/wix/2006/localization*\")\n            {\n                $wxlFilesV3 += Copy-Item $_.FullName -Destination $destinationFile -PassThru\n            }\n        }\n    }\n}\n\n$macosHtmlEnFiles = Get-ChildItem -Recurse -Path \"$SourcesDirectory\" | Where-Object { $_.FullName -Match \"en\\.lproj\\\\.+\\.html$\" } # add installer HTML files\n$macosHtmlFiles = @()\nif ($macosHtmlEnFiles) {\n    $macosHtmlEnFiles | ForEach-Object {\n        $destinationFile = \"$($_.Directory.Parent.FullName)\\$($_.Name)\"\n        $macosHtmlFiles += Copy-Item \"$($_.FullName)\" -Destination $destinationFile -PassThru\n    }\n}\n\n$xlfFiles = @()\n\n$allXlfFiles = Get-ChildItem -Recurse -Path \"$SourcesDirectory\\*\\*.xlf\"\n$langXlfFiles = @()\nif ($allXlfFiles) {\n    $null = $allXlfFiles[0].FullName -Match \"\\.([\\w-]+)\\.xlf\" # matches '[langcode].xlf'\n    $firstLangCode = $Matches.1\n    $langXlfFiles = Get-ChildItem -Recurse -Path \"$SourcesDirectory\\*\\*.$firstLangCode.xlf\"\n}\n$langXlfFiles | ForEach-Object {\n    $null = $_.Name -Match \"(.+)\\.[\\w-]+\\.xlf\" # matches '[filename].[langcode].xlf\n\n    $destinationFile = \"$($_.Directory.FullName)\\$($Matches.1).xlf\"\n    $xlfFiles += Copy-Item \"$($_.FullName)\" -Destination $destinationFile -PassThru\n}\n\n$locFiles = $jsonFiles + $jsonWinformsTemplateFiles + $xlfFiles\n\n$locJson = @{\n    Projects = @(\n        @{\n            LanguageSet = $LanguageSet\n            LocItems = @(\n                $locFiles | ForEach-Object {\n                    $outputPath = \"$(($_.DirectoryName | Resolve-Path -Relative) + \"\\\")\"\n                    $continue = $true\n                    foreach ($exclusion in $exclusions.Exclusions) {\n                        if ($_.FullName.Contains($exclusion))\n                        {\n                            $continue = $false\n                        }\n                    }\n                    $sourceFile = ($_.FullName | Resolve-Path -Relative)\n                    if (!$CreateNeutralXlfs -and $_.Extension -eq '.xlf') {\n                        Remove-Item -Path $sourceFile\n                    }\n                    if ($continue)\n                    {\n                        if ($_.Directory.Name -eq 'en' -and $_.Extension -eq '.json') {\n                            return @{\n                                SourceFile = $sourceFile\n                                CopyOption = \"LangIDOnPath\"\n                                OutputPath = \"$($_.Directory.Parent.FullName | Resolve-Path -Relative)\\\"\n                            }\n                        } else {\n                            return @{\n                                SourceFile = $sourceFile\n                                CopyOption = \"LangIDOnName\"\n                                OutputPath = $outputPath\n                            }\n                        }\n                    }\n                }\n            )\n        },\n        @{\n            LanguageSet = $LanguageSet\n            CloneLanguageSet = \"WiX_CloneLanguages\"\n            LssFiles = @( \"wxl_loc.lss\" )\n            LocItems = @(\n                $wxlFilesV3 | ForEach-Object {\n                    $outputPath = \"$($_.Directory.FullName | Resolve-Path -Relative)\\\"\n                    $continue = $true\n                    foreach ($exclusion in $exclusions.Exclusions) {\n                        if ($_.FullName.Contains($exclusion)) {\n                            $continue = $false\n                        }\n                    }\n                    $sourceFile = ($_.FullName | Resolve-Path -Relative)\n                    if ($continue)\n                    {\n                        return @{\n                            SourceFile = $sourceFile\n                            CopyOption = \"LangIDOnPath\"\n                            OutputPath = $outputPath\n                        }\n                    }\n                }\n            )\n        },\n        @{\n            LanguageSet = $LanguageSet\n            CloneLanguageSet = \"WiX_CloneLanguages\"\n            LssFiles = @( \"P210WxlSchemaV4.lss\" )\n            LocItems = @(\n                $wxlFilesV5 | ForEach-Object {\n                    $outputPath = \"$($_.Directory.FullName | Resolve-Path -Relative)\\\"\n                    $continue = $true\n                    foreach ($exclusion in $exclusions.Exclusions) {\n                        if ($_.FullName.Contains($exclusion)) {\n                            $continue = $false\n                        }\n                    }\n                    $sourceFile = ($_.FullName | Resolve-Path -Relative)\n                    if ($continue)\n                    {\n                        return @{\n                            SourceFile = $sourceFile\n                            CopyOption = \"LangIDOnPath\"\n                            OutputPath = $outputPath\n                        }\n                    }\n                }\n            )\n        },\n        @{\n            LanguageSet = $LanguageSet\n            CloneLanguageSet = \"VS_macOS_CloneLanguages\"\n            LssFiles = @( \".\\eng\\common\\loc\\P22DotNetHtmlLocalization.lss\" )\n            LocItems = @(\n                $macosHtmlFiles | ForEach-Object {\n                    $outputPath = \"$($_.Directory.FullName | Resolve-Path -Relative)\\\"\n                    $continue = $true\n                    foreach ($exclusion in $exclusions.Exclusions) {\n                        if ($_.FullName.Contains($exclusion)) {\n                            $continue = $false\n                        }\n                    }\n                    $sourceFile = ($_.FullName | Resolve-Path -Relative)\n                    $lciFile = $sourceFile + \".lci\"\n                    if ($continue) {\n                        $result = @{\n                            SourceFile = $sourceFile\n                            CopyOption = \"LangIDOnPath\"\n                            OutputPath = $outputPath\n                        }\n                        if (Test-Path $lciFile -PathType Leaf) {\n                            $result[\"LciFile\"] = $lciFile\n                        }\n                        return $result\n                    }\n                }\n            )\n        }\n    )\n}\n\n$json = ConvertTo-Json $locJson -Depth 5\nWrite-Host \"LocProject.json generated:`n`n$json`n`n\"\nPop-Location\n\nif (!$UseCheckedInLocProjectJson) {\n    New-Item \"$SourcesDirectory\\eng\\Localize\\LocProject.json\" -Force # Need this to make sure the Localize directory is created\n    Set-Content \"$SourcesDirectory\\eng\\Localize\\LocProject.json\" $json\n}\nelse {\n    New-Item \"$SourcesDirectory\\eng\\Localize\\LocProject-generated.json\" -Force # Need this to make sure the Localize directory is created\n    Set-Content \"$SourcesDirectory\\eng\\Localize\\LocProject-generated.json\" $json\n\n    if ((Get-FileHash \"$SourcesDirectory\\eng\\Localize\\LocProject-generated.json\").Hash -ne (Get-FileHash \"$SourcesDirectory\\eng\\Localize\\LocProject.json\").Hash) {\n        Write-PipelineTelemetryError -Category \"OneLocBuild\" -Message \"Existing LocProject.json differs from generated LocProject.json. Download LocProject-generated.json and compare them.\"\n\n        exit 1\n    }\n    else {\n        Write-Host \"Generated LocProject.json and current LocProject.json are identical.\"\n    }\n}\n"
  },
  {
    "path": "eng/common/helixpublish.proj",
    "content": "<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. -->\n<Project Sdk=\"Microsoft.DotNet.Helix.Sdk\" DefaultTargets=\"Test\">\n\n  <PropertyGroup>\n    <Language>msbuild</Language>\n  </PropertyGroup>\n\n  <ItemGroup>\n    <HelixCorrelationPayload Include=\"$(CorrelationPayloadDirectory)\">\n      <PayloadDirectory>%(Identity)</PayloadDirectory>\n    </HelixCorrelationPayload>\n  </ItemGroup>\n\n  <ItemGroup>\n    <HelixWorkItem Include=\"WorkItem\" Condition=\"'$(WorkItemDirectory)' != ''\">\n      <PayloadDirectory>$(WorkItemDirectory)</PayloadDirectory>\n      <Command>$(WorkItemCommand)</Command>\n      <Timeout Condition=\"'$(WorkItemTimeout)' != ''\">$(WorkItemTimeout)</Timeout>\n    </HelixWorkItem>\n  </ItemGroup>\n\n  <ItemGroup>\n    <XUnitProject Include=\"$(XUnitProjects.Split(';'))\">\n      <Arguments />\n    </XUnitProject>\n  </ItemGroup>\n</Project>\n"
  },
  {
    "path": "eng/common/init-tools-native.cmd",
    "content": "@echo off\npowershell -NoProfile -NoLogo -ExecutionPolicy ByPass -command \"& \"\"\"%~dp0init-tools-native.ps1\"\"\" %*\"\nexit /b %ErrorLevel%"
  },
  {
    "path": "eng/common/init-tools-native.ps1",
    "content": "<#\n.SYNOPSIS\nEntry point script for installing native tools\n\n.DESCRIPTION\nReads $RepoRoot\\global.json file to determine native assets to install\nand executes installers for those tools\n\n.PARAMETER BaseUri\nBase file directory or Url from which to acquire tool archives\n\n.PARAMETER InstallDirectory\nDirectory to install native toolset.  This is a command-line override for the default\nInstall directory precedence order:\n- InstallDirectory command-line override\n- NETCOREENG_INSTALL_DIRECTORY environment variable\n- (default) %USERPROFILE%/.netcoreeng/native\n\n.PARAMETER Clean\nSwitch specifying to not install anything, but cleanup native asset folders\n\n.PARAMETER Force\nClean and then install tools\n\n.PARAMETER DownloadRetries\nTotal number of retry attempts\n\n.PARAMETER RetryWaitTimeInSeconds\nWait time between retry attempts in seconds\n\n.PARAMETER GlobalJsonFile\nFile path to global.json file\n\n.PARAMETER PathPromotion\nOptional switch to enable either promote native tools specified in the global.json to the path (in Azure Pipelines)\nor break the build if a native tool is not found on the path (on a local dev machine)\n\n.NOTES\n#>\n[CmdletBinding(PositionalBinding=$false)]\nParam (\n  [string] $BaseUri = 'https://netcorenativeassets.blob.core.windows.net/resource-packages/external',\n  [string] $InstallDirectory,\n  [switch] $Clean = $False,\n  [switch] $Force = $False,\n  [int] $DownloadRetries = 5,\n  [int] $RetryWaitTimeInSeconds = 30,\n  [string] $GlobalJsonFile,\n  [switch] $PathPromotion\n)\n\nif (!$GlobalJsonFile) {\n  $GlobalJsonFile = Join-Path (Get-Item $PSScriptRoot).Parent.Parent.FullName 'global.json'\n}\n\nSet-StrictMode -version 2.0\n$ErrorActionPreference='Stop'\n\n. $PSScriptRoot\\pipeline-logging-functions.ps1\nImport-Module -Name (Join-Path $PSScriptRoot 'native\\CommonLibrary.psm1')\n\ntry {\n  # Define verbose switch if undefined\n  $Verbose = $VerbosePreference -Eq 'Continue'\n\n  $EngCommonBaseDir = Join-Path $PSScriptRoot 'native\\'\n  $NativeBaseDir = $InstallDirectory\n  if (!$NativeBaseDir) {\n    $NativeBaseDir = CommonLibrary\\Get-NativeInstallDirectory\n  }\n  $Env:CommonLibrary_NativeInstallDir = $NativeBaseDir\n  $InstallBin = Join-Path $NativeBaseDir 'bin'\n  $InstallerPath = Join-Path $EngCommonBaseDir 'install-tool.ps1'\n\n  # Process tools list\n  Write-Host \"Processing $GlobalJsonFile\"\n  If (-Not (Test-Path $GlobalJsonFile)) {\n    Write-Host \"Unable to find '$GlobalJsonFile'\"\n    exit 0\n  }\n  $NativeTools = Get-Content($GlobalJsonFile) -Raw |\n                    ConvertFrom-Json |\n                    Select-Object -Expand 'native-tools' -ErrorAction SilentlyContinue\n  if ($NativeTools) {\n    if ($PathPromotion -eq $True) {\n      $ArcadeToolsDirectory = \"$env:SYSTEMDRIVE\\arcade-tools\"\n      if (Test-Path $ArcadeToolsDirectory) { # if this directory exists, we should use native tools on machine\n        $NativeTools.PSObject.Properties | ForEach-Object {\n          $ToolName = $_.Name\n          $ToolVersion = $_.Value\n          $InstalledTools = @{}\n\n          if ((Get-Command \"$ToolName\" -ErrorAction SilentlyContinue) -eq $null) {\n            if ($ToolVersion -eq \"latest\") {\n              $ToolVersion = \"\"\n            }\n            $ToolDirectories = (Get-ChildItem -Path \"$ArcadeToolsDirectory\" -Filter \"$ToolName-$ToolVersion*\" | Sort-Object -Descending)\n            if ($ToolDirectories -eq $null) {\n              Write-Error \"Unable to find directory for $ToolName $ToolVersion; please make sure the tool is installed on this image.\"\n              exit 1\n            }\n            $ToolDirectory = $ToolDirectories[0]\n            $BinPathFile = \"$($ToolDirectory.FullName)\\binpath.txt\"\n            if (-not (Test-Path -Path \"$BinPathFile\")) {\n              Write-Error \"Unable to find binpath.txt in '$($ToolDirectory.FullName)' ($ToolName $ToolVersion); artifact is either installed incorrectly or is not a bootstrappable tool.\"\n              exit 1\n            }\n            $BinPath = Get-Content \"$BinPathFile\"\n            $ToolPath = Convert-Path -Path $BinPath\n            Write-Host \"Adding $ToolName to the path ($ToolPath)...\"\n            Write-Host \"##vso[task.prependpath]$ToolPath\"\n            $env:PATH = \"$ToolPath;$env:PATH\"\n            $InstalledTools += @{ $ToolName = $ToolDirectory.FullName }\n          }\n        }\n        return $InstalledTools\n      } else {\n        $NativeTools.PSObject.Properties | ForEach-Object {\n          $ToolName = $_.Name\n          $ToolVersion = $_.Value\n\n          if ((Get-Command \"$ToolName\" -ErrorAction SilentlyContinue) -eq $null) {\n            Write-PipelineTelemetryError -Category 'NativeToolsBootstrap' -Message \"$ToolName not found on path. Please install $ToolName $ToolVersion before proceeding.\"\n            Write-PipelineTelemetryError -Category 'NativeToolsBootstrap' -Message \"If this is running on a build machine, the arcade-tools directory was not found, which means there's an error with the image.\"\n          }\n        }\n        exit 0\n      }\n    } else {\n      $NativeTools.PSObject.Properties | ForEach-Object {\n        $ToolName = $_.Name\n        $ToolVersion = $_.Value\n        $LocalInstallerArguments =  @{ ToolName = \"$ToolName\" }\n        $LocalInstallerArguments += @{ InstallPath = \"$InstallBin\" }\n        $LocalInstallerArguments += @{ BaseUri = \"$BaseUri\" }\n        $LocalInstallerArguments += @{ CommonLibraryDirectory = \"$EngCommonBaseDir\" }\n        $LocalInstallerArguments += @{ Version = \"$ToolVersion\" }\n  \n        if ($Verbose) {\n          $LocalInstallerArguments += @{ Verbose = $True }\n        }\n        if (Get-Variable 'Force' -ErrorAction 'SilentlyContinue') {\n          if($Force) {\n            $LocalInstallerArguments += @{ Force = $True }\n          }\n        }\n        if ($Clean) {\n          $LocalInstallerArguments += @{ Clean = $True }\n        }\n  \n        Write-Verbose \"Installing $ToolName version $ToolVersion\"\n        Write-Verbose \"Executing '$InstallerPath $($LocalInstallerArguments.Keys.ForEach({\"-$_ '$($LocalInstallerArguments.$_)'\"}) -join ' ')'\"\n        & $InstallerPath @LocalInstallerArguments\n        if ($LASTEXITCODE -Ne \"0\") {\n          $errMsg = \"$ToolName installation failed\"\n          if ((Get-Variable 'DoNotAbortNativeToolsInstallationOnFailure' -ErrorAction 'SilentlyContinue') -and $DoNotAbortNativeToolsInstallationOnFailure) {\n              $showNativeToolsWarning = $true\n              if ((Get-Variable 'DoNotDisplayNativeToolsInstallationWarnings' -ErrorAction 'SilentlyContinue') -and $DoNotDisplayNativeToolsInstallationWarnings) {\n                  $showNativeToolsWarning = $false\n              }\n              if ($showNativeToolsWarning) {\n                  Write-Warning $errMsg\n              }\n              $toolInstallationFailure = $true\n          } else {\n              # We cannot change this to Write-PipelineTelemetryError because of https://github.com/dotnet/arcade/issues/4482\n              Write-Host $errMsg\n              exit 1\n          }\n        }\n      }\n  \n      if ((Get-Variable 'toolInstallationFailure' -ErrorAction 'SilentlyContinue') -and $toolInstallationFailure) {\n          # We cannot change this to Write-PipelineTelemetryError because of https://github.com/dotnet/arcade/issues/4482\n          Write-Host 'Native tools bootstrap failed'\n          exit 1\n      }\n    }\n  }\n  else {\n    Write-Host 'No native tools defined in global.json'\n    exit 0\n  }\n\n  if ($Clean) {\n    exit 0\n  }\n  if (Test-Path $InstallBin) {\n    Write-Host 'Native tools are available from ' (Convert-Path -Path $InstallBin)\n    Write-Host \"##vso[task.prependpath]$(Convert-Path -Path $InstallBin)\"\n    return $InstallBin\n  }\n  elseif (-not ($PathPromotion)) {\n    Write-PipelineTelemetryError -Category 'NativeToolsBootstrap' -Message 'Native tools install directory does not exist, installation failed'\n    exit 1\n  }\n  exit 0\n}\ncatch {\n  Write-Host $_.ScriptStackTrace\n  Write-PipelineTelemetryError -Category 'NativeToolsBootstrap' -Message $_\n  ExitWithExitCode 1\n}\n"
  },
  {
    "path": "eng/common/init-tools-native.sh",
    "content": "#!/usr/bin/env bash\n\nsource=\"${BASH_SOURCE[0]}\"\nscriptroot=\"$( cd -P \"$( dirname \"$source\" )\" && pwd )\"\n\nbase_uri='https://netcorenativeassets.blob.core.windows.net/resource-packages/external'\ninstall_directory=''\nclean=false\nforce=false\ndownload_retries=5\nretry_wait_time_seconds=30\nglobal_json_file=\"$(dirname \"$(dirname \"${scriptroot}\")\")/global.json\"\ndeclare -a native_assets\n\n. $scriptroot/pipeline-logging-functions.sh\n. $scriptroot/native/common-library.sh\n\nwhile (($# > 0)); do\n  lowerI=\"$(echo $1 | tr \"[:upper:]\" \"[:lower:]\")\"\n  case $lowerI in\n    --baseuri)\n      base_uri=$2\n      shift 2\n      ;;\n    --installdirectory)\n      install_directory=$2\n      shift 2\n      ;;\n    --clean)\n      clean=true\n      shift 1\n      ;;\n    --force)\n      force=true\n      shift 1\n      ;;\n    --donotabortonfailure)\n      donotabortonfailure=true\n      shift 1\n      ;;\n    --donotdisplaywarnings)\n      donotdisplaywarnings=true\n      shift 1\n      ;;\n    --downloadretries)\n      download_retries=$2\n      shift 2\n      ;;\n    --retrywaittimeseconds)\n      retry_wait_time_seconds=$2\n      shift 2\n      ;;\n    --help)\n      echo \"Common settings:\"\n      echo \"  --installdirectory                  Directory to install native toolset.\"\n      echo \"                                      This is a command-line override for the default\"\n      echo \"                                      Install directory precedence order:\"\n      echo \"                                          - InstallDirectory command-line override\"\n      echo \"                                          - NETCOREENG_INSTALL_DIRECTORY environment variable\"\n      echo \"                                          - (default) %USERPROFILE%/.netcoreeng/native\"\n      echo \"\"\n      echo \"  --clean                             Switch specifying not to install anything, but cleanup native asset folders\"\n      echo \"  --donotabortonfailure               Switch specifiying whether to abort native tools installation on failure\"\n      echo \"  --donotdisplaywarnings              Switch specifiying whether to display warnings during native tools installation on failure\"\n      echo \"  --force                             Clean and then install tools\"\n      echo \"  --help                              Print help and exit\"\n      echo \"\"\n      echo \"Advanced settings:\"\n      echo \"  --baseuri <value>                   Base URI for where to download native tools from\"\n      echo \"  --downloadretries <value>           Number of times a download should be attempted\"\n      echo \"  --retrywaittimeseconds <value>      Wait time between download attempts\"\n      echo \"\"\n      exit 0\n      ;;\n  esac\ndone\n\nfunction ReadGlobalJsonNativeTools {\n  # happy path: we have a proper JSON parsing tool `jq(1)` in PATH!\n  if command -v jq &> /dev/null; then\n\n    # jq: read each key/value pair under \"native-tools\" entry and emit:\n    #   KEY=\"<entry-key>\" VALUE=\"<entry-value>\"\n    # followed by a null byte.\n    #\n    # bash: read line with null byte delimeter and push to array (for later `eval`uation).\n\n    while IFS= read -rd '' line; do\n      native_assets+=(\"$line\")\n    done < <(jq -r '. |\n        select(has(\"native-tools\")) |\n        .\"native-tools\" |\n        keys[] as $k |\n        @sh \"KEY=\\($k) VALUE=\\(.[$k])\\u0000\"' \"$global_json_file\")\n\n    return\n  fi\n\n  # Warning: falling back to manually parsing JSON, which is not recommended.\n\n  # Following routine matches the output and escaping logic of jq(1)'s @sh formatter used above.\n  # It has been tested with several weird strings with escaped characters in entries (key and value)\n  # and results were compared with the output of jq(1) in binary representation using xxd(1);\n  # just before the assignment to 'native_assets' array (above and below).\n\n  # try to capture the section under \"native-tools\".\n  if [[ ! \"$(cat \"$global_json_file\")\" =~ \\\"native-tools\\\"[[:space:]\\:\\{]*([^\\}]+) ]]; then\n    return\n  fi\n\n  section=\"${BASH_REMATCH[1]}\"\n\n  parseStarted=0\n  possibleEnd=0\n  escaping=0\n  escaped=0\n  isKey=1\n\n  for (( i=0; i<${#section}; i++ )); do\n    char=\"${section:$i:1}\"\n    if ! ((parseStarted)) && [[ \"$char\" =~ [[:space:],:] ]]; then continue; fi\n\n    if ! ((escaping)) && [[ \"$char\" == \"\\\\\" ]]; then\n      escaping=1\n    elif ((escaping)) && ! ((escaped)); then\n      escaped=1\n    fi\n\n    if ! ((parseStarted)) && [[ \"$char\" == \"\\\"\" ]]; then\n      parseStarted=1\n      possibleEnd=0\n    elif [[ \"$char\" == \"'\" ]]; then\n      token=\"$token'\\\\\\''\"\n      possibleEnd=0\n    elif ((escaping)) || [[ \"$char\" != \"\\\"\" ]]; then\n      token=\"$token$char\"\n      possibleEnd=1\n    fi\n\n    if ((possibleEnd)) && ! ((escaping)) && [[ \"$char\" == \"\\\"\" ]]; then\n      # Use printf to unescape token to match jq(1)'s @sh formatting rules.\n      # do not use 'token=\"$(printf \"$token\")\"' syntax, as $() eats the trailing linefeed.\n      printf -v token \"'$token'\"\n\n      if ((isKey)); then\n        KEY=\"$token\"\n        isKey=0\n      else\n        line=\"KEY=$KEY VALUE=$token\"\n        native_assets+=(\"$line\")\n        isKey=1\n      fi\n\n      # reset for next token\n      parseStarted=0\n      token=\n    elif ((escaping)) && ((escaped)); then\n      escaping=0\n      escaped=0\n    fi\n  done\n}\n\nnative_base_dir=$install_directory\nif [[ -z $install_directory ]]; then\n  native_base_dir=$(GetNativeInstallDirectory)\nfi\n\ninstall_bin=\"${native_base_dir}/bin\"\ninstalled_any=false\n\nReadGlobalJsonNativeTools\n\nif [[ ${#native_assets[@]} -eq 0 ]]; then\n  echo \"No native tools defined in global.json\"\n  exit 0;\nelse\n  native_installer_dir=\"$scriptroot/native\"\n  for index in \"${!native_assets[@]}\"; do\n    eval \"${native_assets[\"$index\"]}\"\n\n    installer_path=\"$native_installer_dir/install-$KEY.sh\"\n    installer_command=\"$installer_path\"\n    installer_command+=\" --baseuri $base_uri\"\n    installer_command+=\" --installpath $install_bin\"\n    installer_command+=\" --version $VALUE\"\n    echo $installer_command\n\n    if [[ $force = true ]]; then\n      installer_command+=\" --force\"\n    fi\n\n    if [[ $clean = true ]]; then\n      installer_command+=\" --clean\"\n    fi\n\n    if [[ -a $installer_path ]]; then\n      $installer_command\n      if [[ $? != 0 ]]; then\n        if [[ $donotabortonfailure = true ]]; then\n          if [[ $donotdisplaywarnings != true ]]; then\n            Write-PipelineTelemetryError -category 'NativeToolsBootstrap' \"Execution Failed\"\n          fi\n        else\n          Write-PipelineTelemetryError -category 'NativeToolsBootstrap' \"Execution Failed\"\n          exit 1\n        fi\n      else\n        $installed_any = true\n      fi\n    else\n      if [[ $donotabortonfailure == true ]]; then\n        if [[ $donotdisplaywarnings != true ]]; then\n          Write-PipelineTelemetryError -category 'NativeToolsBootstrap' \"Execution Failed: no install script\"\n        fi\n      else\n        Write-PipelineTelemetryError -category 'NativeToolsBootstrap' \"Execution Failed: no install script\"\n        exit 1\n      fi\n    fi\n  done\nfi\n\nif [[ $clean = true ]]; then\n  exit 0\nfi\n\nif [[ -d $install_bin ]]; then\n  echo \"Native tools are available from $install_bin\"\n  echo \"##vso[task.prependpath]$install_bin\"\nelse\n  if [[ $installed_any = true ]]; then\n    Write-PipelineTelemetryError -category 'NativeToolsBootstrap' \"Native tools install directory does not exist, installation failed\"\n    exit 1\n  fi\nfi\n\nexit 0\n"
  },
  {
    "path": "eng/common/internal/Directory.Build.props",
    "content": "<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. -->\n<Project>\n\n  <PropertyGroup>\n    <ImportDirectoryBuildTargets>false</ImportDirectoryBuildTargets>\n    <ImportDirectoryPackagesProps>false</ImportDirectoryPackagesProps>\n  </PropertyGroup>\n\n  <Import Project=\"Sdk.props\" Sdk=\"Microsoft.DotNet.Arcade.Sdk\" />\n\n</Project>\n"
  },
  {
    "path": "eng/common/internal/NuGet.config",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<configuration>\n  <packageSources>\n    <clear />\n    <add key=\"dotnet-core-internal-tooling\" value=\"https://pkgs.dev.azure.com/devdiv/_packaging/dotnet-core-internal-tooling/nuget/v3/index.json\" />\n  </packageSources>\n  <packageSourceMapping>\n    <clear />\n  </packageSourceMapping>\n</configuration>\n"
  },
  {
    "path": "eng/common/internal/Tools.csproj",
    "content": "<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. -->\n<Project Sdk=\"Microsoft.NET.Sdk\">\n\n  <PropertyGroup>\n    <TargetFramework>net472</TargetFramework>\n    <AutomaticallyUseReferenceAssemblyPackages>false</AutomaticallyUseReferenceAssemblyPackages>\n    <BuildWithNetFrameworkHostedCompiler>false</BuildWithNetFrameworkHostedCompiler>\n  </PropertyGroup>\n  <ItemGroup>\n    <!-- Clear references, the SDK may add some depending on UsuingToolXxx settings, but we only want to restore the following -->\n    <PackageReference Remove=\"@(PackageReference)\"/>\n    <PackageReference Include=\"Microsoft.ManifestTool.CrossPlatform\" Version=\"$(MicrosoftManifestToolCrossPlatformVersion)\" />\n    <PackageReference Include=\"Microsoft.VisualStudioEng.MicroBuild.Core\" Version=\"$(MicrosoftVisualStudioEngMicroBuildCoreVersion)\" />\n    <PackageReference Include=\"Microsoft.VisualStudioEng.MicroBuild.Plugins.SwixBuild\" Version=\"$(MicrosoftVisualStudioEngMicroBuildPluginsSwixBuildVersion)\" />\n    <PackageReference Include=\"Microsoft.DotNet.IBCMerge\" Version=\"$(MicrosoftDotNetIBCMergeVersion)\" Condition=\"'$(UsingToolIbcOptimization)' == 'true'\" />\n    <PackageReference Include=\"Drop.App\" Version=\"$(DropAppVersion)\" ExcludeAssets=\"all\" Condition=\"'$(UsingToolVisualStudioIbcTraining)' == 'true'\"/>\n  </ItemGroup>\n\n  <!-- Repository extensibility point -->\n  <Import Project=\"$(RepositoryEngineeringDir)InternalTools.props\" Condition=\"Exists('$(RepositoryEngineeringDir)InternalTools.props')\" />\n\n</Project>\n"
  },
  {
    "path": "eng/common/internal-feed-operations.ps1",
    "content": "param(\n  [Parameter(Mandatory=$true)][string] $Operation,\n  [string] $AuthToken,\n  [string] $CommitSha,\n  [string] $RepoName,\n  [switch] $IsFeedPrivate\n)\n\n$ErrorActionPreference = 'Stop'\nSet-StrictMode -Version 2.0\n. $PSScriptRoot\\tools.ps1\n\n# Sets VSS_NUGET_EXTERNAL_FEED_ENDPOINTS based on the \"darc-int-*\" feeds defined in NuGet.config. This is needed\n# in build agents by CredProvider to authenticate the restore requests to internal feeds as specified in\n# https://github.com/microsoft/artifacts-credprovider/blob/0f53327cd12fd893d8627d7b08a2171bf5852a41/README.md#environment-variables. This should ONLY be called from identified\n# internal builds\nfunction SetupCredProvider {\n  param(\n    [string] $AuthToken\n  )    \n\n  # Install the Cred Provider NuGet plugin\n  Write-Host 'Setting up Cred Provider NuGet plugin in the agent...'\n  Write-Host \"Getting 'installcredprovider.ps1' from 'https://github.com/microsoft/artifacts-credprovider'...\"\n\n  $url = 'https://raw.githubusercontent.com/microsoft/artifacts-credprovider/master/helpers/installcredprovider.ps1'\n  \n  Write-Host \"Writing the contents of 'installcredprovider.ps1' locally...\"\n  Invoke-WebRequest $url -UseBasicParsing -OutFile installcredprovider.ps1\n  \n  Write-Host 'Installing plugin...'\n  .\\installcredprovider.ps1 -Force\n  \n  Write-Host \"Deleting local copy of 'installcredprovider.ps1'...\"\n  Remove-Item .\\installcredprovider.ps1\n\n  if (-Not(\"$env:USERPROFILE\\.nuget\\plugins\\netcore\")) {\n    Write-PipelineTelemetryError -Category 'Arcade' -Message 'CredProvider plugin was not installed correctly!'\n    ExitWithExitCode 1  \n  } \n  else {\n    Write-Host 'CredProvider plugin was installed correctly!'\n  }\n\n  # Then, we set the 'VSS_NUGET_EXTERNAL_FEED_ENDPOINTS' environment variable to restore from the stable \n  # feeds successfully\n\n  $nugetConfigPath = Join-Path $RepoRoot \"NuGet.config\"\n\n  if (-Not (Test-Path -Path $nugetConfigPath)) {\n    Write-PipelineTelemetryError -Category 'Build' -Message 'NuGet.config file not found in repo root!'\n    ExitWithExitCode 1\n  }\n  \n  $endpoints = New-Object System.Collections.ArrayList\n  $nugetConfigPackageSources = Select-Xml -Path $nugetConfigPath -XPath \"//packageSources/add[contains(@key, 'darc-int-')]/@value\" | foreach{$_.Node.Value}\n  \n  if (($nugetConfigPackageSources | Measure-Object).Count -gt 0 ) {\n    foreach ($stableRestoreResource in $nugetConfigPackageSources) {\n      $trimmedResource = ([string]$stableRestoreResource).Trim()\n      [void]$endpoints.Add(@{endpoint=\"$trimmedResource\"; password=\"$AuthToken\"}) \n    }\n  }\n\n  if (($endpoints | Measure-Object).Count -gt 0) {\n      $endpointCredentials = @{endpointCredentials=$endpoints} | ConvertTo-Json -Compress\n\n     # Create the environment variables the AzDo way\n      Write-LoggingCommand -Area 'task' -Event 'setvariable' -Data $endpointCredentials -Properties @{\n        'variable' = 'VSS_NUGET_EXTERNAL_FEED_ENDPOINTS'\n        'issecret' = 'false'\n      } \n\n      # We don't want sessions cached since we will be updating the endpoints quite frequently\n      Write-LoggingCommand -Area 'task' -Event 'setvariable' -Data 'False' -Properties @{\n        'variable' = 'NUGET_CREDENTIALPROVIDER_SESSIONTOKENCACHE_ENABLED'\n        'issecret' = 'false'\n      } \n  }\n  else\n  {\n    Write-Host 'No internal endpoints found in NuGet.config'\n  }\n}\n\n#Workaround for https://github.com/microsoft/msbuild/issues/4430\nfunction InstallDotNetSdkAndRestoreArcade {\n  $dotnetTempDir = Join-Path $RepoRoot \"dotnet\"\n  $dotnetSdkVersion=\"2.1.507\" # After experimentation we know this version works when restoring the SDK (compared to 3.0.*)\n  $dotnet = \"$dotnetTempDir\\dotnet.exe\"\n  $restoreProjPath = \"$PSScriptRoot\\restore.proj\"\n  \n  Write-Host \"Installing dotnet SDK version $dotnetSdkVersion to restore Arcade SDK...\"\n  InstallDotNetSdk \"$dotnetTempDir\" \"$dotnetSdkVersion\"\n  \n  '<Project Sdk=\"Microsoft.DotNet.Arcade.Sdk\"/>' | Out-File \"$restoreProjPath\"\n\n  & $dotnet restore $restoreProjPath\n\n  Write-Host 'Arcade SDK restored!'\n\n  if (Test-Path -Path $restoreProjPath) {\n    Remove-Item $restoreProjPath\n  }\n\n  if (Test-Path -Path $dotnetTempDir) {\n    Remove-Item $dotnetTempDir -Recurse\n  }\n}\n\ntry {\n  Push-Location $PSScriptRoot\n\n  if ($Operation -like 'setup') {\n    SetupCredProvider $AuthToken\n  } \n  elseif ($Operation -like 'install-restore') {\n    InstallDotNetSdkAndRestoreArcade\n  }\n  else {\n    Write-PipelineTelemetryError -Category 'Arcade' -Message \"Unknown operation '$Operation'!\"\n    ExitWithExitCode 1  \n  }\n} \ncatch {\n  Write-Host $_.ScriptStackTrace\n  Write-PipelineTelemetryError -Category 'Arcade' -Message $_\n  ExitWithExitCode 1\n} \nfinally {\n  Pop-Location\n}\n"
  },
  {
    "path": "eng/common/internal-feed-operations.sh",
    "content": "#!/usr/bin/env bash\n\nset -e\n\n# Sets VSS_NUGET_EXTERNAL_FEED_ENDPOINTS based on the \"darc-int-*\" feeds defined in NuGet.config. This is needed\n# in build agents by CredProvider to authenticate the restore requests to internal feeds as specified in\n# https://github.com/microsoft/artifacts-credprovider/blob/0f53327cd12fd893d8627d7b08a2171bf5852a41/README.md#environment-variables. \n# This should ONLY be called from identified internal builds\nfunction SetupCredProvider {\n  local authToken=$1\n  \n  # Install the Cred Provider NuGet plugin\n  echo \"Setting up Cred Provider NuGet plugin in the agent...\"...\n  echo \"Getting 'installcredprovider.ps1' from 'https://github.com/microsoft/artifacts-credprovider'...\"\n\n  local url=\"https://raw.githubusercontent.com/microsoft/artifacts-credprovider/master/helpers/installcredprovider.sh\"  \n  \n  echo \"Writing the contents of 'installcredprovider.ps1' locally...\"\n  local installcredproviderPath=\"installcredprovider.sh\"\n  if command -v curl > /dev/null; then\n    curl $url > \"$installcredproviderPath\"\n  else   \n    wget -q -O \"$installcredproviderPath\" \"$url\"\n  fi\n  \n  echo \"Installing plugin...\"\n  . \"$installcredproviderPath\"\n  \n  echo \"Deleting local copy of 'installcredprovider.sh'...\"\n  rm installcredprovider.sh\n\n  if [ ! -d \"$HOME/.nuget/plugins\" ]; then\n    Write-PipelineTelemetryError -category 'Build' 'CredProvider plugin was not installed correctly!'\n    ExitWithExitCode 1  \n  else \n    echo \"CredProvider plugin was installed correctly!\"\n  fi\n\n  # Then, we set the 'VSS_NUGET_EXTERNAL_FEED_ENDPOINTS' environment variable to restore from the stable \n  # feeds successfully\n\n  local nugetConfigPath=\"{$repo_root}NuGet.config\"\n\n  if [ ! \"$nugetConfigPath\" ]; then\n    Write-PipelineTelemetryError -category 'Build' \"NuGet.config file not found in repo's root!\"\n    ExitWithExitCode 1  \n  fi\n  \n  local endpoints='['\n  local nugetConfigPackageValues=`cat \"$nugetConfigPath\" | grep \"key=\\\"darc-int-\"`\n  local pattern=\"value=\\\"(.*)\\\"\"\n\n  for value in $nugetConfigPackageValues \n  do\n    if [[ $value =~ $pattern ]]; then\n      local endpoint=\"${BASH_REMATCH[1]}\"  \n      endpoints+=\"{\\\"endpoint\\\": \\\"$endpoint\\\", \\\"password\\\": \\\"$authToken\\\"},\"\n    fi\n  done\n  \n  endpoints=${endpoints%?}\n  endpoints+=']'\n\n  if [ ${#endpoints} -gt 2 ]; then \n      local endpointCredentials=\"{\\\"endpointCredentials\\\": \"$endpoints\"}\"\n\n      echo \"##vso[task.setvariable variable=VSS_NUGET_EXTERNAL_FEED_ENDPOINTS]$endpointCredentials\"\n      echo \"##vso[task.setvariable variable=NUGET_CREDENTIALPROVIDER_SESSIONTOKENCACHE_ENABLED]False\"\n  else\n    echo \"No internal endpoints found in NuGet.config\"\n  fi\n} \n\n# Workaround for https://github.com/microsoft/msbuild/issues/4430\nfunction InstallDotNetSdkAndRestoreArcade {\n  local dotnetTempDir=\"$repo_root/dotnet\"\n  local dotnetSdkVersion=\"2.1.507\" # After experimentation we know this version works when restoring the SDK (compared to 3.0.*)\n  local restoreProjPath=\"$repo_root/eng/common/restore.proj\"\n  \n  echo \"Installing dotnet SDK version $dotnetSdkVersion to restore Arcade SDK...\"\n  echo \"<Project Sdk=\\\"Microsoft.DotNet.Arcade.Sdk\\\"/>\" > \"$restoreProjPath\"\n  \n  InstallDotNetSdk \"$dotnetTempDir\" \"$dotnetSdkVersion\"\n\n  local res=`$dotnetTempDir/dotnet restore $restoreProjPath`\n  echo \"Arcade SDK restored!\"\n\n  # Cleanup\n  if [ \"$restoreProjPath\" ]; then\n    rm \"$restoreProjPath\"\n  fi\n\n  if [ \"$dotnetTempDir\" ]; then\n    rm -r $dotnetTempDir\n  fi\n}\n\nsource=\"${BASH_SOURCE[0]}\"\noperation=''\nauthToken=''\nrepoName=''\n\nwhile [[ $# -gt 0 ]]; do\n  opt=\"$(echo \"$1\" | tr \"[:upper:]\" \"[:lower:]\")\"\n  case \"$opt\" in\n    --operation)\n      operation=$2\n      shift\n      ;;\n    --authtoken)\n      authToken=$2\n      shift\n      ;;\n    *)\n      echo \"Invalid argument: $1\"\n      usage\n      exit 1\n      ;;\n  esac\n\n  shift\ndone\n\nwhile [[ -h \"$source\" ]]; do\n  scriptroot=\"$( cd -P \"$( dirname \"$source\" )\" && pwd )\"\n  source=\"$(readlink \"$source\")\"\n  # if $source was a relative symlink, we need to resolve it relative to the path where the\n  # symlink file was located\n  [[ $source != /* ]] && source=\"$scriptroot/$source\"\ndone\nscriptroot=\"$( cd -P \"$( dirname \"$source\" )\" && pwd )\"\n\n. \"$scriptroot/tools.sh\"\n\nif [ \"$operation\" = \"setup\" ]; then\n  SetupCredProvider $authToken\nelif [ \"$operation\" = \"install-restore\" ]; then\n  InstallDotNetSdkAndRestoreArcade\nelse\n  echo \"Unknown operation '$operation'!\"\nfi\n"
  },
  {
    "path": "eng/common/loc/P22DotNetHtmlLocalization.lss",
    "content": "<?xml version=\"1.0\"?>\n<LS_SETTINGS_FILE>\n  <LS_SETTINGS_DESCRIPTION>\n    <![CDATA[]]>\n  </LS_SETTINGS_DESCRIPTION>\n  <optionSet id=\"LSOptions\">\n    <optionSet id=\"Defaults\" displayName=\"Options Defaults\">\n      <optionSet id=\"Espresso\" displayName=\"Espresso\"/>\n      <optionSet id=\"Parsers\" displayName=\"Parsers\"/>\n    </optionSet>\n    <optionSet id=\"User\" displayName=\"User Overrides\">\n      <optionSet id=\"Espresso\" displayName=\"Espresso\"/>\n      <optionSet id=\"Parsers\" displayName=\"Parsers\"/>\n    </optionSet>\n    <optionSet id=\"Project\" displayName=\"Project Overrides\">\n      <optionSet id=\"Espresso\" displayName=\"Espresso\"/>\n      <optionSet id=\"Parsers\" displayName=\"Parsers\">\n        <optionSet id=\"Parser 22\" displayName=\"POMHTML Parser options\" helpText=\"POMHTML Parser options for Localization Studio.\">\n          <option id=\"SetCharsetInfo\" displayName=\"Set or add Charset information when Generating\" helpText=\"Add Charset information to the Generated file. This is in the format &lt;META HTTP-EQUIV=&quot;Content-Type&quot; CONTENT=&quot;text/html; charset=windows-1252&quot;&gt;. This is based on the Project Target Langauge. If the dir attribute value in the HTML tag i.e. &lt;HTML dir=&quot;ltr&quot;&gt; is not localizable or is missing, its value will be set automatically on Generate if the reading order of the target language is different from the source language.\">\n            <boolean defaultValue=\"1\" currentValue=\"0\"/>\n          </option>\n          <option id=\"IncTermNoResId\" displayName=\"Include Terms which have no Resource Identifier\" helpText=\"Include Terms which have no Resource Identifier. Terms without Resource Identifiers cannot be Updated or Uploaded if they change.\">\n            <boolean defaultValue=\"0\" currentValue=\"1\"/>\n          </option>\n        </optionSet>\n      </optionSet>\n    </optionSet>\n  </optionSet>\n</LS_SETTINGS_FILE>"
  },
  {
    "path": "eng/common/msbuild.ps1",
    "content": "[CmdletBinding(PositionalBinding=$false)]\nParam(\n  [string] $verbosity = 'minimal',\n  [bool] $warnAsError = $true,\n  [bool] $nodeReuse = $true,\n  [switch] $ci,\n  [switch] $prepareMachine,\n  [switch] $excludePrereleaseVS,\n  [string] $msbuildEngine = $null,\n  [Parameter(ValueFromRemainingArguments=$true)][String[]]$extraArgs\n)\n\n. $PSScriptRoot\\tools.ps1\n\ntry {\n  if ($ci) {\n    $nodeReuse = $false\n  }\n\n  MSBuild @extraArgs\n} \ncatch {\n  Write-Host $_.ScriptStackTrace\n  Write-PipelineTelemetryError -Category 'Build' -Message $_\n  ExitWithExitCode 1\n}\n\nExitWithExitCode 0"
  },
  {
    "path": "eng/common/msbuild.sh",
    "content": "#!/usr/bin/env bash\n\nsource=\"${BASH_SOURCE[0]}\"\n\n# resolve $source until the file is no longer a symlink\nwhile [[ -h \"$source\" ]]; do\n  scriptroot=\"$( cd -P \"$( dirname \"$source\" )\" && pwd )\"\n  source=\"$(readlink \"$source\")\"\n  # if $source was a relative symlink, we need to resolve it relative to the path where the\n  # symlink file was located\n  [[ $source != /* ]] && source=\"$scriptroot/$source\"\ndone\nscriptroot=\"$( cd -P \"$( dirname \"$source\" )\" && pwd )\"\n\nverbosity='minimal'\nwarn_as_error=true\nnode_reuse=true\nprepare_machine=false\nextra_args=''\n\nwhile (($# > 0)); do\n  lowerI=\"$(echo $1 | tr \"[:upper:]\" \"[:lower:]\")\"\n  case $lowerI in\n    --verbosity)\n      verbosity=$2\n      shift 2\n      ;;\n    --warnaserror)\n      warn_as_error=$2\n      shift 2\n      ;;\n    --nodereuse)\n      node_reuse=$2\n      shift 2\n      ;;\n    --ci)\n      ci=true\n      shift 1\n      ;;\n    --preparemachine)\n      prepare_machine=true\n      shift 1\n      ;;\n      *)\n      extra_args=\"$extra_args $1\"\n      shift 1\n      ;;\n  esac\ndone\n\n. \"$scriptroot/tools.sh\"\n\nif [[ \"$ci\" == true ]]; then\n  node_reuse=false\nfi\n\nMSBuild $extra_args\nExitWithExitCode 0\n"
  },
  {
    "path": "eng/common/native/CommonLibrary.psm1",
    "content": "<#\n.SYNOPSIS\nHelper module to install an archive to a directory\n\n.DESCRIPTION\nHelper module to download and extract an archive to a specified directory\n\n.PARAMETER Uri\nUri of artifact to download\n\n.PARAMETER InstallDirectory\nDirectory to extract artifact contents to\n\n.PARAMETER Force\nForce download / extraction if file or contents already exist. Default = False\n\n.PARAMETER DownloadRetries\nTotal number of retry attempts. Default = 5\n\n.PARAMETER RetryWaitTimeInSeconds\nWait time between retry attempts in seconds. Default = 30\n\n.NOTES\nReturns False if download or extraction fail, True otherwise\n#>\nfunction DownloadAndExtract {\n  [CmdletBinding(PositionalBinding=$false)]\n  Param (\n    [Parameter(Mandatory=$True)]\n    [string] $Uri,\n    [Parameter(Mandatory=$True)]\n    [string] $InstallDirectory,\n    [switch] $Force = $False,\n    [int] $DownloadRetries = 5,\n    [int] $RetryWaitTimeInSeconds = 30\n  )\n  # Define verbose switch if undefined\n  $Verbose = $VerbosePreference -Eq \"Continue\"\n\n  $TempToolPath = CommonLibrary\\Get-TempPathFilename -Path $Uri\n\n  # Download native tool\n  $DownloadStatus = CommonLibrary\\Get-File -Uri $Uri `\n                                           -Path $TempToolPath `\n                                           -DownloadRetries $DownloadRetries `\n                                           -RetryWaitTimeInSeconds $RetryWaitTimeInSeconds `\n                                           -Force:$Force `\n                                           -Verbose:$Verbose\n\n  if ($DownloadStatus -Eq $False) {\n    Write-Error \"Download failed from $Uri\"\n    return $False\n  }\n\n  # Extract native tool\n  $UnzipStatus = CommonLibrary\\Expand-Zip -ZipPath $TempToolPath `\n                                          -OutputDirectory $InstallDirectory `\n                                          -Force:$Force `\n                                          -Verbose:$Verbose\n\n  if ($UnzipStatus -Eq $False) {\n    # Retry Download one more time with Force=true\n    $DownloadRetryStatus = CommonLibrary\\Get-File -Uri $Uri `\n                                             -Path $TempToolPath `\n                                             -DownloadRetries 1 `\n                                             -RetryWaitTimeInSeconds $RetryWaitTimeInSeconds `\n                                             -Force:$True `\n                                             -Verbose:$Verbose\n\n    if ($DownloadRetryStatus -Eq $False) {\n      Write-Error \"Last attempt of download failed as well\"\n      return $False\n    }\n\n    # Retry unzip again one more time with Force=true\n    $UnzipRetryStatus = CommonLibrary\\Expand-Zip -ZipPath $TempToolPath `\n                                            -OutputDirectory $InstallDirectory `\n                                            -Force:$True `\n                                            -Verbose:$Verbose\n    if ($UnzipRetryStatus -Eq $False)\n    {\n      Write-Error \"Last attempt of unzip failed as well\"\n      # Clean up partial zips and extracts\n      if (Test-Path $TempToolPath) {\n        Remove-Item $TempToolPath -Force\n      }\n      if (Test-Path $InstallDirectory) {\n        Remove-Item $InstallDirectory -Force -Recurse\n      }\n      return $False\n    }\n  }\n\n  return $True\n}\n\n<#\n.SYNOPSIS\nDownload a file, retry on failure\n\n.DESCRIPTION\nDownload specified file and retry if attempt fails\n\n.PARAMETER Uri\nUri of file to download. If Uri is a local path, the file will be copied instead of downloaded\n\n.PARAMETER Path\nPath to download or copy uri file to\n\n.PARAMETER Force\nOverwrite existing file if present. Default = False\n\n.PARAMETER DownloadRetries\nTotal number of retry attempts. Default = 5\n\n.PARAMETER RetryWaitTimeInSeconds\nWait time between retry attempts in seconds Default = 30\n\n#>\nfunction Get-File {\n  [CmdletBinding(PositionalBinding=$false)]\n  Param (\n    [Parameter(Mandatory=$True)]\n    [string] $Uri,\n    [Parameter(Mandatory=$True)]\n    [string] $Path,\n    [int] $DownloadRetries = 5,\n    [int] $RetryWaitTimeInSeconds = 30,\n    [switch] $Force = $False\n  )\n  $Attempt = 0\n\n  if ($Force) {\n    if (Test-Path $Path) {\n      Remove-Item $Path -Force\n    }\n  }\n  if (Test-Path $Path) {\n    Write-Host \"File '$Path' already exists, skipping download\"\n    return $True\n  }\n\n  $DownloadDirectory = Split-Path -ErrorAction Ignore -Path \"$Path\" -Parent\n  if (-Not (Test-Path $DownloadDirectory)) {\n    New-Item -path $DownloadDirectory -force -itemType \"Directory\" | Out-Null\n  }\n\n  $TempPath = \"$Path.tmp\"\n  if (Test-Path -IsValid -Path $Uri) {\n    Write-Verbose \"'$Uri' is a file path, copying temporarily to '$TempPath'\"\n    Copy-Item -Path $Uri -Destination $TempPath\n    Write-Verbose \"Moving temporary file to '$Path'\"\n    Move-Item -Path $TempPath -Destination $Path\n    return $?\n  }\n  else {\n    Write-Verbose \"Downloading $Uri\"\n    # Don't display the console progress UI - it's a huge perf hit\n    $ProgressPreference = 'SilentlyContinue'   \n    while($Attempt -Lt $DownloadRetries)\n    {\n      try {\n        Invoke-WebRequest -UseBasicParsing -Uri $Uri -OutFile $TempPath\n        Write-Verbose \"Downloaded to temporary location '$TempPath'\"\n        Move-Item -Path $TempPath -Destination $Path\n        Write-Verbose \"Moved temporary file to '$Path'\"\n        return $True\n      }\n      catch {\n        $Attempt++\n        if ($Attempt -Lt $DownloadRetries) {\n          $AttemptsLeft = $DownloadRetries - $Attempt\n          Write-Warning \"Download failed, $AttemptsLeft attempts remaining, will retry in $RetryWaitTimeInSeconds seconds\"\n          Start-Sleep -Seconds $RetryWaitTimeInSeconds\n        }\n        else {\n          Write-Error $_\n          Write-Error $_.Exception\n        }\n      }\n    }\n  }\n\n  return $False\n}\n\n<#\n.SYNOPSIS\nGenerate a shim for a native tool\n\n.DESCRIPTION\nCreates a wrapper script (shim) that passes arguments forward to native tool assembly\n\n.PARAMETER ShimName\nThe name of the shim\n\n.PARAMETER ShimDirectory\nThe directory where shims are stored\n\n.PARAMETER ToolFilePath\nPath to file that shim forwards to\n\n.PARAMETER Force\nReplace shim if already present.  Default = False\n\n.NOTES\nReturns $True if generating shim succeeds, $False otherwise\n#>\nfunction New-ScriptShim {\n  [CmdletBinding(PositionalBinding=$false)]\n  Param (\n    [Parameter(Mandatory=$True)]\n    [string] $ShimName,\n    [Parameter(Mandatory=$True)]\n    [string] $ShimDirectory,\n    [Parameter(Mandatory=$True)]\n    [string] $ToolFilePath,\n    [Parameter(Mandatory=$True)]\n    [string] $BaseUri,\n    [switch] $Force\n  )\n  try {\n    Write-Verbose \"Generating '$ShimName' shim\"\n\n    if (-Not (Test-Path $ToolFilePath)){\n      Write-Error \"Specified tool file path '$ToolFilePath' does not exist\"\n      return $False\n    }\n\n    # WinShimmer is a small .NET Framework program that creates .exe shims to bootstrapped programs\n    # Many of the checks for installed programs expect a .exe extension for Windows tools, rather\n    # than a .bat or .cmd file.\n    # Source: https://github.com/dotnet/arcade/tree/master/src/WinShimmer\n    if (-Not (Test-Path \"$ShimDirectory\\WinShimmer\\winshimmer.exe\")) {\n      $InstallStatus = DownloadAndExtract -Uri \"$BaseUri/windows/winshimmer/WinShimmer.zip\" `\n                                          -InstallDirectory $ShimDirectory\\WinShimmer `\n                                          -Force:$Force `\n                                          -DownloadRetries 2 `\n                                          -RetryWaitTimeInSeconds 5 `\n                                          -Verbose:$Verbose\n    }\n\n    if ((Test-Path (Join-Path $ShimDirectory \"$ShimName.exe\"))) {\n      Write-Host \"$ShimName.exe already exists; replacing...\"\n      Remove-Item (Join-Path $ShimDirectory \"$ShimName.exe\")\n    }\n\n    & \"$ShimDirectory\\WinShimmer\\winshimmer.exe\" $ShimName $ToolFilePath $ShimDirectory\n    return $True\n  }\n  catch {\n    Write-Host $_\n    Write-Host $_.Exception\n    return $False\n  }\n}\n\n<#\n.SYNOPSIS\nReturns the machine architecture of the host machine\n\n.NOTES\nReturns 'x64' on 64 bit machines\n Returns 'x86' on 32 bit machines\n#>\nfunction Get-MachineArchitecture {\n  $ProcessorArchitecture = $Env:PROCESSOR_ARCHITECTURE\n  $ProcessorArchitectureW6432 = $Env:PROCESSOR_ARCHITEW6432\n  if($ProcessorArchitecture -Eq \"X86\")\n  {\n    if(($ProcessorArchitectureW6432 -Eq \"\") -Or\n       ($ProcessorArchitectureW6432 -Eq \"X86\")) {\n        return \"x86\"\n    }\n    $ProcessorArchitecture = $ProcessorArchitectureW6432\n  }\n  if (($ProcessorArchitecture -Eq \"AMD64\") -Or\n      ($ProcessorArchitecture -Eq \"IA64\") -Or\n      ($ProcessorArchitecture -Eq \"ARM64\") -Or\n      ($ProcessorArchitecture -Eq \"LOONGARCH64\") -Or\n      ($ProcessorArchitecture -Eq \"RISCV64\")) {\n    return \"x64\"\n  }\n  return \"x86\"\n}\n\n<#\n.SYNOPSIS\nGet the name of a temporary folder under the native install directory\n#>\nfunction Get-TempDirectory {\n  return Join-Path (Get-NativeInstallDirectory) \"temp/\"\n}\n\nfunction Get-TempPathFilename {\n  [CmdletBinding(PositionalBinding=$false)]\n  Param (\n    [Parameter(Mandatory=$True)]\n    [string] $Path\n  )\n  $TempDir = CommonLibrary\\Get-TempDirectory\n  $TempFilename = Split-Path $Path -leaf\n  $TempPath = Join-Path $TempDir $TempFilename\n  return $TempPath\n}\n\n<#\n.SYNOPSIS\nReturns the base directory to use for native tool installation\n\n.NOTES\nReturns the value of the NETCOREENG_INSTALL_DIRECTORY if that environment variable\nis set, or otherwise returns an install directory under the %USERPROFILE%\n#>\nfunction Get-NativeInstallDirectory {\n  $InstallDir = $Env:NETCOREENG_INSTALL_DIRECTORY\n  if (!$InstallDir) {\n    $InstallDir = Join-Path $Env:USERPROFILE \".netcoreeng/native/\"\n  }\n  return $InstallDir\n}\n\n<#\n.SYNOPSIS\nUnzip an archive\n\n.DESCRIPTION\nPowershell module to unzip an archive to a specified directory\n\n.PARAMETER ZipPath (Required)\nPath to archive to unzip\n\n.PARAMETER OutputDirectory (Required)\nOutput directory for archive contents\n\n.PARAMETER Force\nOverwrite output directory contents if they already exist\n\n.NOTES\n- Returns True and does not perform an extraction if output directory already exists but Overwrite is not True.\n- Returns True if unzip operation is successful\n- Returns False if Overwrite is True and it is unable to remove contents of OutputDirectory\n- Returns False if unable to extract zip archive\n#>\nfunction Expand-Zip {\n  [CmdletBinding(PositionalBinding=$false)]\n  Param (\n    [Parameter(Mandatory=$True)]\n    [string] $ZipPath,\n    [Parameter(Mandatory=$True)]\n    [string] $OutputDirectory,\n    [switch] $Force\n  )\n\n  Write-Verbose \"Extracting '$ZipPath' to '$OutputDirectory'\"\n  try {\n    if ((Test-Path $OutputDirectory) -And (-Not $Force)) {\n      Write-Host \"Directory '$OutputDirectory' already exists, skipping extract\"\n      return $True\n    }\n    if (Test-Path $OutputDirectory) {\n      Write-Verbose \"'Force' is 'True', but '$OutputDirectory' exists, removing directory\"\n      Remove-Item $OutputDirectory -Force -Recurse\n      if ($? -Eq $False) {\n        Write-Error \"Unable to remove '$OutputDirectory'\"\n        return $False\n      }\n    }\n\n    $TempOutputDirectory = Join-Path \"$(Split-Path -Parent $OutputDirectory)\" \"$(Split-Path -Leaf $OutputDirectory).tmp\"\n    if (Test-Path $TempOutputDirectory) {\n      Remove-Item $TempOutputDirectory -Force -Recurse\n    }\n    New-Item -Path $TempOutputDirectory -Force -ItemType \"Directory\" | Out-Null\n\n    Add-Type -assembly \"system.io.compression.filesystem\"\n    [io.compression.zipfile]::ExtractToDirectory(\"$ZipPath\", \"$TempOutputDirectory\")\n    if ($? -Eq $False) {\n      Write-Error \"Unable to extract '$ZipPath'\"\n      return $False\n    }\n\n    Move-Item -Path $TempOutputDirectory -Destination $OutputDirectory\n  }\n  catch {\n    Write-Host $_\n    Write-Host $_.Exception\n\n    return $False\n  }\n  return $True\n}\n\nexport-modulemember -function DownloadAndExtract\nexport-modulemember -function Expand-Zip\nexport-modulemember -function Get-File\nexport-modulemember -function Get-MachineArchitecture\nexport-modulemember -function Get-NativeInstallDirectory\nexport-modulemember -function Get-TempDirectory\nexport-modulemember -function Get-TempPathFilename\nexport-modulemember -function New-ScriptShim\n"
  },
  {
    "path": "eng/common/native/common-library.sh",
    "content": "#!/usr/bin/env bash\n\nfunction GetNativeInstallDirectory {\n  local install_dir\n\n  if [[ -z $NETCOREENG_INSTALL_DIRECTORY ]]; then\n    install_dir=$HOME/.netcoreeng/native/\n  else\n    install_dir=$NETCOREENG_INSTALL_DIRECTORY\n  fi\n\n  echo $install_dir\n  return 0\n}\n\nfunction GetTempDirectory {\n\n  echo $(GetNativeInstallDirectory)temp/\n  return 0\n}\n\nfunction ExpandZip {\n  local zip_path=$1\n  local output_directory=$2\n  local force=${3:-false}\n\n  echo \"Extracting $zip_path to $output_directory\"\n  if [[ -d $output_directory ]] && [[ $force = false ]]; then\n    echo \"Directory '$output_directory' already exists, skipping extract\"\n    return 0\n  fi\n\n  if [[ -d $output_directory ]]; then\n    echo \"'Force flag enabled, but '$output_directory' exists. Removing directory\"\n    rm -rf $output_directory\n    if [[ $? != 0 ]]; then\n      Write-PipelineTelemetryError -category 'NativeToolsBootstrap' \"Unable to remove '$output_directory'\"\n      return 1\n    fi\n  fi\n\n  echo \"Creating directory: '$output_directory'\"\n  mkdir -p $output_directory\n\n  echo \"Extracting archive\"\n  tar -xf $zip_path -C $output_directory\n  if [[ $? != 0 ]]; then\n    Write-PipelineTelemetryError -category 'NativeToolsBootstrap' \"Unable to extract '$zip_path'\"\n    return 1\n  fi\n\n  return 0\n}\n\nfunction GetCurrentOS {\n  local unameOut=\"$(uname -s)\"\n  case $unameOut in\n    Linux*)     echo \"Linux\";;\n    Darwin*)    echo \"MacOS\";;\n  esac\n  return 0\n}\n\nfunction GetFile {\n  local uri=$1\n  local path=$2\n  local force=${3:-false}\n  local download_retries=${4:-5}\n  local retry_wait_time_seconds=${5:-30}\n\n  if [[ -f $path ]]; then\n    if [[ $force = false ]]; then\n      echo \"File '$path' already exists. Skipping download\"\n      return 0\n    else\n      rm -rf $path\n    fi\n  fi\n\n  if [[ -f $uri ]]; then\n    echo \"'$uri' is a file path, copying file to '$path'\"\n    cp $uri $path\n    return $?\n  fi\n\n  echo \"Downloading $uri\"\n  # Use curl if available, otherwise use wget\n  if command -v curl > /dev/null; then\n    curl \"$uri\" -sSL --retry $download_retries --retry-delay $retry_wait_time_seconds --create-dirs -o \"$path\" --fail\n  else\n    wget -q -O \"$path\" \"$uri\" --tries=\"$download_retries\"\n  fi\n\n  return $?\n}\n\nfunction GetTempPathFileName {\n  local path=$1\n\n  local temp_dir=$(GetTempDirectory)\n  local temp_file_name=$(basename $path)\n  echo $temp_dir$temp_file_name\n  return 0\n}\n\nfunction DownloadAndExtract {\n  local uri=$1\n  local installDir=$2\n  local force=${3:-false}\n  local download_retries=${4:-5}\n  local retry_wait_time_seconds=${5:-30}\n\n  local temp_tool_path=$(GetTempPathFileName $uri)\n\n  echo \"downloading to: $temp_tool_path\"\n\n  # Download file\n  GetFile \"$uri\" \"$temp_tool_path\" $force $download_retries $retry_wait_time_seconds\n  if [[ $? != 0 ]]; then\n    Write-PipelineTelemetryError -category 'NativeToolsBootstrap' \"Failed to download '$uri' to '$temp_tool_path'.\"\n    return 1\n  fi\n\n  # Extract File\n  echo \"extracting from  $temp_tool_path to $installDir\"\n  ExpandZip \"$temp_tool_path\" \"$installDir\" $force $download_retries $retry_wait_time_seconds\n  if [[ $? != 0 ]]; then\n    Write-PipelineTelemetryError -category 'NativeToolsBootstrap' \"Failed to extract '$temp_tool_path' to '$installDir'.\"\n    return 1\n  fi\n\n  return 0\n}\n\nfunction NewScriptShim {\n  local shimpath=$1\n  local tool_file_path=$2\n  local force=${3:-false}\n\n  echo \"Generating '$shimpath' shim\"\n  if [[ -f $shimpath ]]; then\n    if [[ $force = false ]]; then\n      echo \"File '$shimpath' already exists.\" >&2\n      return 1\n    else\n      rm -rf $shimpath\n    fi\n  fi\n  \n  if [[ ! -f $tool_file_path ]]; then\n    # try to see if the path is lower cased\n    tool_file_path=\"$(echo $tool_file_path | tr \"[:upper:]\" \"[:lower:]\")\" \n    if [[ ! -f $tool_file_path ]]; then\n      Write-PipelineTelemetryError -category 'NativeToolsBootstrap' \"Specified tool file path:'$tool_file_path' does not exist\"\n      return 1\n    fi\n  fi\n\n  local shim_contents=$'#!/usr/bin/env bash\\n'\n  shim_contents+=\"SHIMARGS=\"$'$1\\n'\n  shim_contents+=\"$tool_file_path\"$' $SHIMARGS\\n'\n\n  # Write shim file\n  echo \"$shim_contents\" > $shimpath\n\n  chmod +x $shimpath\n\n  echo \"Finished generating shim '$shimpath'\"\n\n  return $?\n}\n\n"
  },
  {
    "path": "eng/common/native/init-compiler.sh",
    "content": "#!/bin/sh\n#\n# This file detects the C/C++ compiler and exports it to the CC/CXX environment variables\n#\n# NOTE: some scripts source this file and rely on stdout being empty, make sure\n# to not output *anything* here, unless it is an error message that fails the\n# build.\n\nif [ -z \"$build_arch\" ] || [ -z \"$compiler\" ]; then\n  echo \"Usage...\"\n  echo \"build_arch=<ARCH> compiler=<NAME> init-compiler.sh\"\n  echo \"Specify the target architecture.\"\n  echo \"Specify the name of compiler (clang or gcc).\"\n  exit 1\nfi\n\ncase \"$compiler\" in\n    clang*|-clang*|--clang*)\n        # clangx.y or clang-x.y\n        version=\"$(echo \"$compiler\" | tr -d '[:alpha:]-=')\"\n        majorVersion=\"${version%%.*}\"\n\n        # LLVM based on v18 released in early 2024, with two releases per year\n        maxVersion=\"$((18 + ((($(date +%Y) - 2024) * 12 + $(date +%-m) - 3) / 6)))\"\n        compiler=clang\n        ;;\n\n    gcc*|-gcc*|--gcc*)\n        # gccx.y or gcc-x.y\n        version=\"$(echo \"$compiler\" | tr -d '[:alpha:]-=')\"\n        majorVersion=\"${version%%.*}\"\n\n        # GCC based on v14 released in early 2024, with one release per year\n        maxVersion=\"$((14 + ((($(date +%Y) - 2024) * 12 + $(date +%-m) - 3) / 12)))\"\n        compiler=gcc\n        ;;\nesac\n\ncxxCompiler=\"$compiler++\"\n\n# clear the existing CC and CXX from environment\nCC=\nCXX=\nLDFLAGS=\n\nif [ \"$compiler\" = \"gcc\" ]; then cxxCompiler=\"g++\"; fi\n\ncheck_version_exists() {\n    desired_version=-1\n\n    # Set up the environment to be used for building with the desired compiler.\n    if command -v \"$compiler-$1\" > /dev/null; then\n        desired_version=\"-$1\"\n    elif command -v \"$compiler$1\" > /dev/null; then\n        desired_version=\"$1\"\n    fi\n\n    echo \"$desired_version\"\n}\n\n__baseOS=\"$(uname)\"\nset_compiler_version_from_CC() {\n    if [ \"$__baseOS\" = \"Darwin\" ]; then\n        # On Darwin, the versions from -version/-dumpversion refer to Xcode\n        # versions, not llvm versions, so we can't rely on them.\n        return\n    fi\n\n    version=\"$(\"$CC\" -dumpversion)\"\n    if [ -z \"$version\" ]; then\n        echo \"Error: $CC -dumpversion didn't provide a version\"\n        exit 1\n    fi\n\n    # gcc and clang often display 3 part versions. However, gcc can show only 1 part in some environments.\n    IFS=. read -r majorVersion _ <<EOF\n$version\nEOF\n}\n\nif [ -z \"$CLR_CC\" ]; then\n\n    # Set default versions\n    if [ -z \"$majorVersion\" ]; then\n        minVersion=8\n        maxVersion=\"$((maxVersion + 1))\" # +1 for headspace\n        i=\"$maxVersion\"\n        while [ \"$i\" -ge $minVersion ]; do\n            desired_version=\"$(check_version_exists \"$i\")\"\n            if [ \"$desired_version\" != \"-1\" ]; then majorVersion=\"$i\"; break; fi\n            i=$((i - 1))\n        done\n\n        if [ -z \"$majorVersion\" ]; then\n            if ! command -v \"$compiler\" > /dev/null; then\n                echo \"Error: No compatible version of $compiler was found within the range of $minVersion to $maxVersion. Please upgrade your toolchain or specify the compiler explicitly using CLR_CC and CLR_CXX environment variables.\"\n                exit 1\n            fi\n\n            CC=\"$(command -v \"$compiler\" 2> /dev/null)\"\n            CXX=\"$(command -v \"$cxxCompiler\" 2> /dev/null)\"\n            set_compiler_version_from_CC\n        fi\n    else\n        desired_version=\"$(check_version_exists \"$majorVersion\")\"\n        if [ \"$desired_version\" = \"-1\" ]; then\n            echo \"Error: Could not find specific version of $compiler: $majorVersion.\"\n            exit 1\n        fi\n    fi\n\n    if [ -z \"$CC\" ]; then\n        CC=\"$(command -v \"$compiler$desired_version\" 2> /dev/null)\"\n        CXX=\"$(command -v \"$cxxCompiler$desired_version\" 2> /dev/null)\"\n        if [ -z \"$CXX\" ]; then CXX=\"$(command -v \"$cxxCompiler\" 2> /dev/null)\"; fi\n        set_compiler_version_from_CC\n    fi\nelse\n    if [ ! -f \"$CLR_CC\" ]; then\n        echo \"Error: CLR_CC is set but path '$CLR_CC' does not exist\"\n        exit 1\n    fi\n    CC=\"$CLR_CC\"\n    CXX=\"$CLR_CXX\"\n    set_compiler_version_from_CC\nfi\n\nif [ -z \"$CC\" ]; then\n    echo \"Error: Unable to find $compiler.\"\n    exit 1\nfi\n\nif [ \"$__baseOS\" != \"Darwin\" ]; then\n    # On Darwin, we always want to use the Apple linker.\n\n    # Only lld version >= 9 can be considered stable. lld supports s390x starting from 18.0.\n    if [ \"$compiler\" = \"clang\" ] && [ -n \"$majorVersion\" ] && [ \"$majorVersion\" -ge 9 ] && { [ \"$build_arch\" != \"s390x\" ] || [ \"$majorVersion\" -ge 18 ]; }; then\n        if \"$CC\" -fuse-ld=lld -Wl,--version >/dev/null 2>&1; then\n            LDFLAGS=\"-fuse-ld=lld\"\n        fi\n    fi\nfi\n\nSCAN_BUILD_COMMAND=\"$(command -v \"scan-build$desired_version\" 2> /dev/null)\"\n\nexport CC CXX LDFLAGS SCAN_BUILD_COMMAND\n"
  },
  {
    "path": "eng/common/native/init-distro-rid.sh",
    "content": "#!/bin/sh\n\n# getNonPortableDistroRid\n#\n# Input:\n#   targetOs: (str)\n#   targetArch: (str)\n#   rootfsDir: (str)\n#\n# Return:\n#   non-portable rid\ngetNonPortableDistroRid()\n{\n    targetOs=\"$1\"\n    targetArch=\"$2\"\n    rootfsDir=\"$3\"\n    nonPortableRid=\"\"\n\n    if [ \"$targetOs\" = \"linux\" ]; then\n        # shellcheck disable=SC1091\n        if [ -e \"${rootfsDir}/etc/os-release\" ]; then\n            . \"${rootfsDir}/etc/os-release\"\n            if echo \"${VERSION_ID:-}\" | grep -qE '^([[:digit:]]|\\.)+$'; then\n                nonPortableRid=\"${ID}.${VERSION_ID}-${targetArch}\"\n            else\n                # Rolling release distros either do not set VERSION_ID, set it as blank or\n                # set it to non-version looking string (such as TEMPLATE_VERSION_ID on ArchLinux);\n                # so omit it here to be consistent with everything else.\n                nonPortableRid=\"${ID}-${targetArch}\"\n            fi\n        elif [ -e \"${rootfsDir}/android_platform\" ]; then\n            # shellcheck disable=SC1091\n            . \"${rootfsDir}/android_platform\"\n            nonPortableRid=\"$RID\"\n        fi\n    fi\n\n    if [ \"$targetOs\" = \"freebsd\" ]; then\n        # $rootfsDir can be empty. freebsd-version is a shell script and should always work.\n        __freebsd_major_version=$(\"$rootfsDir\"/bin/freebsd-version | cut -d'.' -f1)\n        nonPortableRid=\"freebsd.$__freebsd_major_version-${targetArch}\"\n    elif [ \"$targetOs\" = \"openbsd\" ]; then\n        nonPortableRid=\"openbsd.$(uname -r)-${targetArch}\"\n    elif command -v getprop >/dev/null && getprop ro.product.system.model | grep -qi android; then\n        __android_sdk_version=$(getprop ro.build.version.sdk)\n        nonPortableRid=\"android.$__android_sdk_version-${targetArch}\"\n    elif [ \"$targetOs\" = \"illumos\" ]; then\n        __uname_version=$(uname -v)\n        nonPortableRid=\"illumos-${targetArch}\"\n    elif [ \"$targetOs\" = \"solaris\" ]; then\n        __uname_version=$(uname -v)\n        __solaris_major_version=$(echo \"$__uname_version\" | cut -d'.' -f1)\n        nonPortableRid=\"solaris.$__solaris_major_version-${targetArch}\"\n    elif [ \"$targetOs\" = \"haiku\" ]; then\n        __uname_release=\"$(uname -r)\"\n        nonPortableRid=haiku.r\"$__uname_release\"-\"$targetArch\"\n    fi\n\n    echo \"$nonPortableRid\" | tr '[:upper:]' '[:lower:]'\n}\n\n# initDistroRidGlobal\n#\n# Input:\n#   os: (str)\n#   arch: (str)\n#   rootfsDir?: (nullable:string)\n#\n# Return:\n#   None\n#\n# Notes:\n#   It is important to note that the function does not return anything, but it\n#   exports the following variables on success:\n#     __DistroRid   : Non-portable rid of the target platform.\n#     __PortableTargetOS  : OS-part of the portable rid that corresponds to the target platform.\ninitDistroRidGlobal()\n{\n    targetOs=\"$1\"\n    targetArch=\"$2\"\n    rootfsDir=\"\"\n    if [ $# -ge 3 ]; then\n        rootfsDir=\"$3\"\n    fi\n\n    if [ -n \"${rootfsDir}\" ]; then\n        # We may have a cross build. Check for the existence of the rootfsDir\n        if [ ! -e \"${rootfsDir}\" ]; then\n            echo \"Error: rootfsDir has been passed, but the location is not valid.\"\n            exit 1\n        fi\n    fi\n\n    __DistroRid=$(getNonPortableDistroRid \"${targetOs}\" \"${targetArch}\" \"${rootfsDir}\")\n\n    if [ -z \"${__PortableTargetOS:-}\" ]; then\n        __PortableTargetOS=\"$targetOs\"\n\n        STRINGS=\"$(command -v strings || true)\"\n        if [ -z \"$STRINGS\" ]; then\n            STRINGS=\"$(command -v llvm-strings || true)\"\n        fi\n\n        # Check for musl-based distros (e.g. Alpine Linux, Void Linux).\n        if \"${rootfsDir}/usr/bin/ldd\" --version 2>&1 | grep -q musl ||\n                ( [ -n \"$STRINGS\" ] && \"$STRINGS\" \"${rootfsDir}/usr/bin/ldd\" 2>&1 | grep -q musl ); then\n            __PortableTargetOS=\"linux-musl\"\n        fi\n    fi\n\n    export __DistroRid __PortableTargetOS\n}\n"
  },
  {
    "path": "eng/common/native/init-os-and-arch.sh",
    "content": "#!/bin/sh\n\n# Use uname to determine what the OS is.\nOSName=$(uname -s | tr '[:upper:]' '[:lower:]')\n\nif command -v getprop && getprop ro.product.system.model 2>&1 | grep -qi android; then\n    OSName=\"android\"\nfi\n\ncase \"$OSName\" in\nfreebsd|linux|netbsd|openbsd|sunos|android|haiku)\n    os=\"$OSName\" ;;\ndarwin)\n    os=osx ;;\n*)\n    echo \"Unsupported OS $OSName detected!\"\n    exit 1 ;;\nesac\n\n# On Solaris, `uname -m` is discouraged, see https://docs.oracle.com/cd/E36784_01/html/E36870/uname-1.html\n# and `uname -p` returns processor type (e.g. i386 on amd64).\n# The appropriate tool to determine CPU is isainfo(1) https://docs.oracle.com/cd/E36784_01/html/E36870/isainfo-1.html.\nif [ \"$os\" = \"sunos\" ]; then\n    if uname -o 2>&1 | grep -q illumos; then\n        os=\"illumos\"\n    else\n        os=\"solaris\"\n    fi\n    CPUName=$(isainfo -n)\nelse\n    # For the rest of the operating systems, use uname(1) to determine what the CPU is.\n    CPUName=$(uname -m)\nfi\n\ncase \"$CPUName\" in\n    arm64|aarch64)\n        arch=arm64\n        if [ \"$(getconf LONG_BIT)\" -lt 64 ]; then\n            # This is 32-bit OS running on 64-bit CPU (for example Raspberry Pi OS)\n            arch=arm\n        fi\n        ;;\n\n    loongarch64)\n        arch=loongarch64\n        ;;\n\n    riscv64)\n        arch=riscv64\n        ;;\n\n    amd64|x86_64)\n        arch=x64\n        ;;\n\n    armv7l|armv8l)\n        # shellcheck disable=SC1091\n        if (NAME=\"\"; . /etc/os-release; test \"$NAME\" = \"Tizen\"); then\n            arch=armel\n        else\n            arch=arm\n        fi\n        ;;\n\n    armv6l)\n        arch=armv6\n        ;;\n\n    i[3-6]86)\n        echo \"Unsupported CPU $CPUName detected, build might not succeed!\"\n        arch=x86\n        ;;\n\n    s390x)\n        arch=s390x\n        ;;\n\n    ppc64le)\n        arch=ppc64le\n        ;;\n    *)\n        echo \"Unknown CPU $CPUName detected!\"\n        exit 1\n        ;;\nesac\n"
  },
  {
    "path": "eng/common/native/install-cmake-test.sh",
    "content": "#!/usr/bin/env bash\n\nsource=\"${BASH_SOURCE[0]}\"\nscriptroot=\"$( cd -P \"$( dirname \"$source\" )\" && pwd )\"\n\n. $scriptroot/common-library.sh\n\nbase_uri=\ninstall_path=\nversion=\nclean=false\nforce=false\ndownload_retries=5\nretry_wait_time_seconds=30\n\nwhile (($# > 0)); do\n  lowerI=\"$(echo $1 | tr \"[:upper:]\" \"[:lower:]\")\"\n  case $lowerI in\n    --baseuri)\n      base_uri=$2\n      shift 2\n      ;;\n    --installpath)\n      install_path=$2\n      shift 2\n      ;;\n    --version)\n      version=$2\n      shift 2\n      ;;\n    --clean)\n      clean=true\n      shift 1\n      ;;\n    --force)\n      force=true\n      shift 1\n      ;;\n    --downloadretries)\n      download_retries=$2\n      shift 2\n      ;;\n    --retrywaittimeseconds)\n      retry_wait_time_seconds=$2\n      shift 2\n      ;;\n    --help)\n      echo \"Common settings:\"\n      echo \"  --baseuri <value>        Base file directory or Url wrom which to acquire tool archives\"\n      echo \"  --installpath <value>    Base directory to install native tool to\"\n      echo \"  --clean                  Don't install the tool, just clean up the current install of the tool\"\n      echo \"  --force                  Force install of tools even if they previously exist\"\n      echo \"  --help                   Print help and exit\"\n      echo \"\"\n      echo \"Advanced settings:\"\n      echo \"  --downloadretries        Total number of retry attempts\"\n      echo \"  --retrywaittimeseconds   Wait time between retry attempts in seconds\"\n      echo \"\"\n      exit 0\n      ;;\n  esac\ndone\n\ntool_name=\"cmake-test\"\ntool_os=$(GetCurrentOS)\ntool_folder=\"$(echo $tool_os | tr \"[:upper:]\" \"[:lower:]\")\"\ntool_arch=\"x86_64\"\ntool_name_moniker=\"$tool_name-$version-$tool_os-$tool_arch\"\ntool_install_directory=\"$install_path/$tool_name/$version\"\ntool_file_path=\"$tool_install_directory/$tool_name_moniker/bin/$tool_name\"\nshim_path=\"$install_path/$tool_name.sh\"\nuri=\"${base_uri}/$tool_folder/$tool_name/$tool_name_moniker.tar.gz\"\n\n# Clean up tool and installers\nif [[ $clean = true ]]; then\n  echo \"Cleaning $tool_install_directory\"\n  if [[ -d $tool_install_directory ]]; then\n    rm -rf $tool_install_directory\n  fi\n\n  echo \"Cleaning $shim_path\"\n  if [[ -f $shim_path ]]; then\n    rm -rf $shim_path\n  fi\n\n  tool_temp_path=$(GetTempPathFileName $uri)\n  echo \"Cleaning $tool_temp_path\"\n  if [[ -f $tool_temp_path ]]; then\n    rm -rf $tool_temp_path\n  fi\n\n  exit 0\nfi\n\n# Install tool\nif [[ -f $tool_file_path ]] && [[ $force = false ]]; then\n  echo \"$tool_name ($version) already exists, skipping install\"\n  exit 0\nfi\n\nDownloadAndExtract $uri $tool_install_directory $force $download_retries $retry_wait_time_seconds\n\nif [[ $? != 0 ]]; then\n  Write-PipelineTelemetryError -category 'NativeToolsBootstrap' 'Installation failed'\n  exit 1\nfi\n\n# Generate Shim\n# Always rewrite shims so that we are referencing the expected version\nNewScriptShim $shim_path $tool_file_path true\n\nif [[ $? != 0 ]]; then\n  Write-PipelineTelemetryError -category 'NativeToolsBootstrap' 'Shim generation failed'\n  exit 1\nfi\n\nexit 0\n"
  },
  {
    "path": "eng/common/native/install-cmake.sh",
    "content": "#!/usr/bin/env bash\n\nsource=\"${BASH_SOURCE[0]}\"\nscriptroot=\"$( cd -P \"$( dirname \"$source\" )\" && pwd )\"\n\n. $scriptroot/common-library.sh\n\nbase_uri=\ninstall_path=\nversion=\nclean=false\nforce=false\ndownload_retries=5\nretry_wait_time_seconds=30\n\nwhile (($# > 0)); do\n  lowerI=\"$(echo $1 | tr \"[:upper:]\" \"[:lower:]\")\"\n  case $lowerI in\n    --baseuri)\n      base_uri=$2\n      shift 2\n      ;;\n    --installpath)\n      install_path=$2\n      shift 2\n      ;;\n    --version)\n      version=$2\n      shift 2\n      ;;\n    --clean)\n      clean=true\n      shift 1\n      ;;\n    --force)\n      force=true\n      shift 1\n      ;;\n    --downloadretries)\n      download_retries=$2\n      shift 2\n      ;;\n    --retrywaittimeseconds)\n      retry_wait_time_seconds=$2\n      shift 2\n      ;;\n    --help)\n      echo \"Common settings:\"\n      echo \"  --baseuri <value>        Base file directory or Url wrom which to acquire tool archives\"\n      echo \"  --installpath <value>    Base directory to install native tool to\"\n      echo \"  --clean                  Don't install the tool, just clean up the current install of the tool\"\n      echo \"  --force                  Force install of tools even if they previously exist\"\n      echo \"  --help                   Print help and exit\"\n      echo \"\"\n      echo \"Advanced settings:\"\n      echo \"  --downloadretries        Total number of retry attempts\"\n      echo \"  --retrywaittimeseconds   Wait time between retry attempts in seconds\"\n      echo \"\"\n      exit 0\n      ;;\n  esac\ndone\n\ntool_name=\"cmake\"\ntool_os=$(GetCurrentOS)\ntool_folder=\"$(echo $tool_os | tr \"[:upper:]\" \"[:lower:]\")\"\ntool_arch=\"x86_64\"\ntool_name_moniker=\"$tool_name-$version-$tool_os-$tool_arch\"\ntool_install_directory=\"$install_path/$tool_name/$version\"\ntool_file_path=\"$tool_install_directory/$tool_name_moniker/bin/$tool_name\"\nshim_path=\"$install_path/$tool_name.sh\"\nuri=\"${base_uri}/$tool_folder/$tool_name/$tool_name_moniker.tar.gz\"\n\n# Clean up tool and installers\nif [[ $clean = true ]]; then\n  echo \"Cleaning $tool_install_directory\"\n  if [[ -d $tool_install_directory ]]; then\n    rm -rf $tool_install_directory\n  fi\n\n  echo \"Cleaning $shim_path\"\n  if [[ -f $shim_path ]]; then\n    rm -rf $shim_path\n  fi\n\n  tool_temp_path=$(GetTempPathFileName $uri)\n  echo \"Cleaning $tool_temp_path\"\n  if [[ -f $tool_temp_path ]]; then\n    rm -rf $tool_temp_path\n  fi\n\n  exit 0\nfi\n\n# Install tool\nif [[ -f $tool_file_path ]] && [[ $force = false ]]; then\n  echo \"$tool_name ($version) already exists, skipping install\"\n  exit 0\nfi\n\nDownloadAndExtract $uri $tool_install_directory $force $download_retries $retry_wait_time_seconds\n\nif [[ $? != 0 ]]; then\n  Write-PipelineTelemetryError -category 'NativeToolsBootstrap' 'Installation failed'\n  exit 1\nfi\n\n# Generate Shim\n# Always rewrite shims so that we are referencing the expected version\nNewScriptShim $shim_path $tool_file_path true\n\nif [[ $? != 0 ]]; then\n  Write-PipelineTelemetryError -category 'NativeToolsBootstrap' 'Shim generation failed'\n  exit 1\nfi\n\nexit 0\n"
  },
  {
    "path": "eng/common/native/install-dependencies.sh",
    "content": "#!/bin/sh\n\nset -e\n\n# This is a simple script primarily used for CI to install necessary dependencies\n#\n# Usage:\n#\n# ./install-dependencies.sh <OS>\n\nos=\"$(echo \"$1\" | tr \"[:upper:]\" \"[:lower:]\")\"\n\nif [ -z \"$os\" ]; then\n    . \"$(dirname \"$0\")\"/init-os-and-arch.sh\nfi\n\ncase \"$os\" in\n    linux)\n        if [ -e /etc/os-release ]; then\n            . /etc/os-release\n        fi\n\n        if [ \"$ID\" = \"debian\" ] || [ \"$ID_LIKE\" = \"debian\" ]; then\n            apt update\n\n            apt install -y build-essential gettext locales cmake llvm clang lld lldb liblldb-dev libunwind8-dev libicu-dev liblttng-ust-dev \\\n                libssl-dev libkrb5-dev pigz cpio ninja-build\n\n            localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8\n        elif [ \"$ID\" = \"fedora\" ] || [ \"$ID\" = \"rhel\" ] || [ \"$ID\" = \"azurelinux\" ] || [ \"$ID\" = \"centos\" ]; then\n            pkg_mgr=\"$(command -v tdnf 2>/dev/null || command -v dnf)\"\n            $pkg_mgr install -y cmake llvm lld lldb clang python curl libicu-devel openssl-devel krb5-devel lttng-ust-devel pigz cpio ninja-build\n        elif [ \"$ID\" = \"amzn\" ]; then\n            dnf install -y cmake llvm lld lldb clang python libicu-devel openssl-devel krb5-devel lttng-ust-devel pigz cpio ninja-build\n        elif [ \"$ID\" = \"alpine\" ]; then\n            apk add build-base cmake bash curl clang llvm llvm-dev lld lldb-dev krb5-dev lttng-ust-dev icu-dev openssl-dev pigz cpio ninja\n        else\n            echo \"Unsupported distro. distro: $ID\"\n            exit 1\n        fi\n        ;;\n\n    osx|maccatalyst|ios|iossimulator|tvos|tvossimulator)\n        echo \"Installed xcode version: $(xcode-select -p)\"\n\n        export HOMEBREW_NO_INSTALL_CLEANUP=1\n        export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1\n        # Skip brew update for now, see https://github.com/actions/setup-python/issues/577\n        # brew update --preinstall\n        brew bundle --no-upgrade --file=- <<EOF\nbrew \"cmake\"\nbrew \"icu4c\"\nbrew \"openssl@3\"\nbrew \"pkgconf\"\nbrew \"python3\"\nbrew \"pigz\"\nbrew \"ninja\"\nEOF\n        ;;\n\n    *)\n        echo \"Unsupported platform. OS: $os\"\n        exit 1\n        ;;\nesac\n"
  },
  {
    "path": "eng/common/native/install-tool.ps1",
    "content": "<#\n.SYNOPSIS\nInstall native tool\n\n.DESCRIPTION\nInstall cmake native tool from Azure blob storage\n\n.PARAMETER InstallPath\nBase directory to install native tool to\n\n.PARAMETER BaseUri\nBase file directory or Url from which to acquire tool archives\n\n.PARAMETER CommonLibraryDirectory\nPath to folder containing common library modules\n\n.PARAMETER Force\nForce install of tools even if they previously exist\n\n.PARAMETER Clean\nDon't install the tool, just clean up the current install of the tool\n\n.PARAMETER DownloadRetries\nTotal number of retry attempts\n\n.PARAMETER RetryWaitTimeInSeconds\nWait time between retry attempts in seconds\n\n.NOTES\nReturns 0 if install succeeds, 1 otherwise\n#>\n[CmdletBinding(PositionalBinding=$false)]\nParam (\n  [Parameter(Mandatory=$True)]\n  [string] $ToolName,\n  [Parameter(Mandatory=$True)]\n  [string] $InstallPath,\n  [Parameter(Mandatory=$True)]\n  [string] $BaseUri,\n  [Parameter(Mandatory=$True)]\n  [string] $Version,\n  [string] $CommonLibraryDirectory = $PSScriptRoot,\n  [switch] $Force = $False,\n  [switch] $Clean = $False,\n  [int] $DownloadRetries = 5,\n  [int] $RetryWaitTimeInSeconds = 30\n)\n\n. $PSScriptRoot\\..\\pipeline-logging-functions.ps1\n\n# Import common library modules\nImport-Module -Name (Join-Path $CommonLibraryDirectory \"CommonLibrary.psm1\")\n\ntry {\n  # Define verbose switch if undefined\n  $Verbose = $VerbosePreference -Eq \"Continue\"\n\n  $Arch = CommonLibrary\\Get-MachineArchitecture\n  $ToolOs = \"win64\"\n  if($Arch -Eq \"x32\") {\n    $ToolOs = \"win32\"\n  }\n  $ToolNameMoniker = \"$ToolName-$Version-$ToolOs-$Arch\"\n  $ToolInstallDirectory = Join-Path $InstallPath \"$ToolName\\$Version\\\"\n  $Uri = \"$BaseUri/windows/$ToolName/$ToolNameMoniker.zip\"\n  $ShimPath = Join-Path $InstallPath \"$ToolName.exe\"\n\n  if ($Clean) {\n    Write-Host \"Cleaning $ToolInstallDirectory\"\n    if (Test-Path $ToolInstallDirectory) {\n      Remove-Item $ToolInstallDirectory -Force -Recurse\n    }\n    Write-Host \"Cleaning $ShimPath\"\n    if (Test-Path $ShimPath) {\n      Remove-Item $ShimPath -Force\n    }\n    $ToolTempPath = CommonLibrary\\Get-TempPathFilename -Path $Uri\n    Write-Host \"Cleaning $ToolTempPath\"\n    if (Test-Path $ToolTempPath) {\n      Remove-Item $ToolTempPath -Force\n    }\n    exit 0\n  }\n\n  # Install tool\n  if ((Test-Path $ToolInstallDirectory) -And (-Not $Force)) {\n    Write-Verbose \"$ToolName ($Version) already exists, skipping install\"\n  }\n  else {\n    $InstallStatus = CommonLibrary\\DownloadAndExtract -Uri $Uri `\n                                                      -InstallDirectory $ToolInstallDirectory `\n                                                      -Force:$Force `\n                                                      -DownloadRetries $DownloadRetries `\n                                                      -RetryWaitTimeInSeconds $RetryWaitTimeInSeconds `\n                                                      -Verbose:$Verbose\n\n    if ($InstallStatus -Eq $False) {\n      Write-PipelineTelemetryError \"Installation failed\" -Category \"NativeToolsetBootstrapping\"\n      exit 1\n    }\n  }\n\n  $ToolFilePath = Get-ChildItem $ToolInstallDirectory -Recurse -Filter \"$ToolName.exe\" | % { $_.FullName }\n  if (@($ToolFilePath).Length -Gt 1) {\n    Write-Error \"There are multiple copies of $ToolName in $($ToolInstallDirectory): `n$(@($ToolFilePath | out-string))\"\n    exit 1\n  } elseif (@($ToolFilePath).Length -Lt 1) {\n    Write-Host \"$ToolName was not found in $ToolInstallDirectory.\"\n    exit 1\n  }\n\n  # Generate shim\n  # Always rewrite shims so that we are referencing the expected version\n  $GenerateShimStatus = CommonLibrary\\New-ScriptShim -ShimName $ToolName `\n                                                     -ShimDirectory $InstallPath `\n                                                     -ToolFilePath \"$ToolFilePath\" `\n                                                     -BaseUri $BaseUri `\n                                                     -Force:$Force `\n                                                     -Verbose:$Verbose\n\n  if ($GenerateShimStatus -Eq $False) {\n    Write-PipelineTelemetryError \"Generate shim failed\" -Category \"NativeToolsetBootstrapping\"\n    return 1\n  }\n\n  exit 0\n}\ncatch {\n  Write-Host $_.ScriptStackTrace\n  Write-PipelineTelemetryError -Category \"NativeToolsetBootstrapping\" -Message $_\n  exit 1\n}\n"
  },
  {
    "path": "eng/common/pipeline-logging-functions.ps1",
    "content": "# Source for this file was taken from https://github.com/microsoft/azure-pipelines-task-lib/blob/11c9439d4af17e6475d9fe058e6b2e03914d17e6/powershell/VstsTaskSdk/LoggingCommandFunctions.ps1 and modified.\n\n# NOTE: You should not be calling these method directly as they are likely to change.  Instead you should be calling the Write-Pipeline* functions defined in tools.ps1\n\n$script:loggingCommandPrefix = '##vso['\n$script:loggingCommandEscapeMappings = @( # TODO: WHAT ABOUT \"=\"? WHAT ABOUT \"%\"?\n    New-Object psobject -Property @{ Token = ';' ; Replacement = '%3B' }\n    New-Object psobject -Property @{ Token = \"`r\" ; Replacement = '%0D' }\n    New-Object psobject -Property @{ Token = \"`n\" ; Replacement = '%0A' }\n    New-Object psobject -Property @{ Token = \"]\" ; Replacement = '%5D' }\n)\n# TODO: BUG: Escape % ???\n# TODO: Add test to verify don't need to escape \"=\".\n\n# Specify \"-Force\" to force pipeline formatted output even if \"$ci\" is false or not set\nfunction Write-PipelineTelemetryError {\n    [CmdletBinding()]\n    param(\n        [Parameter(Mandatory = $true)]\n        [string]$Category,\n        [Parameter(Mandatory = $true)]\n        [string]$Message,\n        [Parameter(Mandatory = $false)]\n        [string]$Type = 'error',\n        [string]$ErrCode,\n        [string]$SourcePath,\n        [string]$LineNumber,\n        [string]$ColumnNumber,\n        [switch]$AsOutput,\n        [switch]$Force)\n\n    $PSBoundParameters.Remove('Category') | Out-Null\n\n    if ($Force -Or ((Test-Path variable:ci) -And $ci)) {\n        $Message = \"(NETCORE_ENGINEERING_TELEMETRY=$Category) $Message\"\n    }\n    $PSBoundParameters.Remove('Message') | Out-Null\n    $PSBoundParameters.Add('Message', $Message)\n    Write-PipelineTaskError @PSBoundParameters\n}\n\n# Specify \"-Force\" to force pipeline formatted output even if \"$ci\" is false or not set\nfunction Write-PipelineTaskError {\n    [CmdletBinding()]\n    param(\n        [Parameter(Mandatory = $true)]\n        [string]$Message,\n        [Parameter(Mandatory = $false)]\n        [string]$Type = 'error',\n        [string]$ErrCode,\n        [string]$SourcePath,\n        [string]$LineNumber,\n        [string]$ColumnNumber,\n        [switch]$AsOutput,\n        [switch]$Force\n    )\n\n    if (!$Force -And (-Not (Test-Path variable:ci) -Or !$ci)) {\n        if ($Type -eq 'error') {\n            Write-Host $Message -ForegroundColor Red\n            return\n        }\n        elseif ($Type -eq 'warning') {\n            Write-Host $Message -ForegroundColor Yellow\n            return\n        }\n    }\n\n    if (($Type -ne 'error') -and ($Type -ne 'warning')) {\n        Write-Host $Message\n        return\n    }\n    $PSBoundParameters.Remove('Force') | Out-Null      \n    if (-not $PSBoundParameters.ContainsKey('Type')) {\n        $PSBoundParameters.Add('Type', 'error')\n    }\n    Write-LogIssue @PSBoundParameters\n}\n  \nfunction Write-PipelineSetVariable {\n    [CmdletBinding()]\n    param(\n        [Parameter(Mandatory = $true)]\n        [string]$Name,\n        [string]$Value,\n        [switch]$Secret,\n        [switch]$AsOutput,\n        [bool]$IsMultiJobVariable = $true)\n\n    if ((Test-Path variable:ci) -And $ci) {\n        Write-LoggingCommand -Area 'task' -Event 'setvariable' -Data $Value -Properties @{\n            'variable' = $Name\n            'isSecret' = $Secret\n            'isOutput' = $IsMultiJobVariable\n        } -AsOutput:$AsOutput\n    }\n}\n  \nfunction Write-PipelinePrependPath {\n    [CmdletBinding()]\n    param(\n        [Parameter(Mandatory = $true)]\n        [string]$Path,\n        [switch]$AsOutput)\n\n    if ((Test-Path variable:ci) -And $ci) {\n        Write-LoggingCommand -Area 'task' -Event 'prependpath' -Data $Path -AsOutput:$AsOutput\n    }\n}\n\nfunction Write-PipelineSetResult {\n    [CmdletBinding()]\n    param(\n        [ValidateSet(\"Succeeded\", \"SucceededWithIssues\", \"Failed\", \"Cancelled\", \"Skipped\")]\n        [Parameter(Mandatory = $true)]\n        [string]$Result,\n        [string]$Message)\n    if ((Test-Path variable:ci) -And $ci) {\n        Write-LoggingCommand -Area 'task' -Event 'complete' -Data $Message -Properties @{\n            'result' = $Result\n        }\n    }\n}\n\n<########################################\n# Private functions.\n########################################>\nfunction Format-LoggingCommandData {\n    [CmdletBinding()]\n    param([string]$Value, [switch]$Reverse)\n\n    if (!$Value) {\n        return ''\n    }\n\n    if (!$Reverse) {\n        foreach ($mapping in $script:loggingCommandEscapeMappings) {\n            $Value = $Value.Replace($mapping.Token, $mapping.Replacement)\n        }\n    }\n    else {\n        for ($i = $script:loggingCommandEscapeMappings.Length - 1 ; $i -ge 0 ; $i--) {\n            $mapping = $script:loggingCommandEscapeMappings[$i]\n            $Value = $Value.Replace($mapping.Replacement, $mapping.Token)\n        }\n    }\n\n    return $Value\n}\n\nfunction Format-LoggingCommand {\n    [CmdletBinding()]\n    param(\n        [Parameter(Mandatory = $true)]\n        [string]$Area,\n        [Parameter(Mandatory = $true)]\n        [string]$Event,\n        [string]$Data,\n        [hashtable]$Properties)\n\n    # Append the preamble.\n    [System.Text.StringBuilder]$sb = New-Object -TypeName System.Text.StringBuilder\n    $null = $sb.Append($script:loggingCommandPrefix).Append($Area).Append('.').Append($Event)\n\n    # Append the properties.\n    if ($Properties) {\n        $first = $true\n        foreach ($key in $Properties.Keys) {\n            [string]$value = Format-LoggingCommandData $Properties[$key]\n            if ($value) {\n                if ($first) {\n                    $null = $sb.Append(' ')\n                    $first = $false\n                }\n                else {\n                    $null = $sb.Append(';')\n                }\n\n                $null = $sb.Append(\"$key=$value\")\n            }\n        }\n    }\n\n    # Append the tail and output the value.\n    $Data = Format-LoggingCommandData $Data\n    $sb.Append(']').Append($Data).ToString()\n}\n\nfunction Write-LoggingCommand {\n    [CmdletBinding(DefaultParameterSetName = 'Parameters')]\n    param(\n        [Parameter(Mandatory = $true, ParameterSetName = 'Parameters')]\n        [string]$Area,\n        [Parameter(Mandatory = $true, ParameterSetName = 'Parameters')]\n        [string]$Event,\n        [Parameter(ParameterSetName = 'Parameters')]\n        [string]$Data,\n        [Parameter(ParameterSetName = 'Parameters')]\n        [hashtable]$Properties,\n        [Parameter(Mandatory = $true, ParameterSetName = 'Object')]\n        $Command,\n        [switch]$AsOutput)\n\n    if ($PSCmdlet.ParameterSetName -eq 'Object') {\n        Write-LoggingCommand -Area $Command.Area -Event $Command.Event -Data $Command.Data -Properties $Command.Properties -AsOutput:$AsOutput\n        return\n    }\n\n    $command = Format-LoggingCommand -Area $Area -Event $Event -Data $Data -Properties $Properties\n    if ($AsOutput) {\n        $command\n    }\n    else {\n        Write-Host $command\n    }\n}\n\nfunction Write-LogIssue {\n    [CmdletBinding()]\n    param(\n        [ValidateSet('warning', 'error')]\n        [Parameter(Mandatory = $true)]\n        [string]$Type,\n        [string]$Message,\n        [string]$ErrCode,\n        [string]$SourcePath,\n        [string]$LineNumber,\n        [string]$ColumnNumber,\n        [switch]$AsOutput)\n\n    $command = Format-LoggingCommand -Area 'task' -Event 'logissue' -Data $Message -Properties @{\n        'type'         = $Type\n        'code'         = $ErrCode\n        'sourcepath'   = $SourcePath\n        'linenumber'   = $LineNumber\n        'columnnumber' = $ColumnNumber\n    }\n    if ($AsOutput) {\n        return $command\n    }\n\n    if ($Type -eq 'error') {\n        $foregroundColor = $host.PrivateData.ErrorForegroundColor\n        $backgroundColor = $host.PrivateData.ErrorBackgroundColor\n        if ($foregroundColor -isnot [System.ConsoleColor] -or $backgroundColor -isnot [System.ConsoleColor]) {\n            $foregroundColor = [System.ConsoleColor]::Red\n            $backgroundColor = [System.ConsoleColor]::Black\n        }\n    }\n    else {\n        $foregroundColor = $host.PrivateData.WarningForegroundColor\n        $backgroundColor = $host.PrivateData.WarningBackgroundColor\n        if ($foregroundColor -isnot [System.ConsoleColor] -or $backgroundColor -isnot [System.ConsoleColor]) {\n            $foregroundColor = [System.ConsoleColor]::Yellow\n            $backgroundColor = [System.ConsoleColor]::Black\n        }\n    }\n\n    Write-Host $command -ForegroundColor $foregroundColor -BackgroundColor $backgroundColor\n}\n"
  },
  {
    "path": "eng/common/pipeline-logging-functions.sh",
    "content": "#!/usr/bin/env bash\n\nfunction Write-PipelineTelemetryError {\n  local telemetry_category=''\n  local force=false\n  local function_args=()\n  local message=''\n  while [[ $# -gt 0 ]]; do\n    opt=\"$(echo \"${1/#--/-}\" | tr \"[:upper:]\" \"[:lower:]\")\"\n    case \"$opt\" in\n      -category|-c)\n        telemetry_category=$2\n        shift\n        ;;\n      -force|-f)\n        force=true\n        ;;\n      -*)\n        function_args+=(\"$1 $2\")\n        shift\n        ;;\n      *)\n        message=$*\n        ;;\n    esac\n    shift\n  done\n\n  if [[ $force != true ]] && [[ \"$ci\" != true ]]; then\n    echo \"$message\" >&2\n    return\n  fi\n\n  if [[ $force == true ]]; then\n    function_args+=(\"-force\")\n  fi\n  message=\"(NETCORE_ENGINEERING_TELEMETRY=$telemetry_category) $message\"\n  function_args+=(\"$message\")\n  Write-PipelineTaskError ${function_args[@]}\n}\n\nfunction Write-PipelineTaskError {\n  local message_type=\"error\"\n  local sourcepath=''\n  local linenumber=''\n  local columnnumber=''\n  local error_code=''\n  local force=false\n\n  while [[ $# -gt 0 ]]; do\n    opt=\"$(echo \"${1/#--/-}\" | tr \"[:upper:]\" \"[:lower:]\")\"\n    case \"$opt\" in\n      -type|-t)\n        message_type=$2\n        shift\n        ;;\n      -sourcepath|-s)\n        sourcepath=$2\n        shift\n        ;;\n      -linenumber|-ln)\n        linenumber=$2\n        shift\n        ;;\n      -columnnumber|-cn)\n        columnnumber=$2\n        shift\n        ;;\n      -errcode|-e)\n        error_code=$2\n        shift\n        ;;\n      -force|-f)\n        force=true\n        ;;\n      *)\n        break\n        ;;\n    esac\n\n    shift\n  done\n\n  if [[ $force != true ]] && [[ \"$ci\" != true ]]; then\n    echo \"$@\" >&2\n    return\n  fi\n\n  local message=\"##vso[task.logissue\"\n\n  message=\"$message type=$message_type\"\n\n  if [ -n \"$sourcepath\" ]; then\n    message=\"$message;sourcepath=$sourcepath\"\n  fi\n\n  if [ -n \"$linenumber\" ]; then\n    message=\"$message;linenumber=$linenumber\"\n  fi\n\n  if [ -n \"$columnnumber\" ]; then\n    message=\"$message;columnnumber=$columnnumber\"\n  fi\n\n  if [ -n \"$error_code\" ]; then\n    message=\"$message;code=$error_code\"\n  fi\n\n  message=\"$message]$*\"\n  echo \"$message\"\n}\n\nfunction Write-PipelineSetVariable {\n  if [[ \"$ci\" != true ]]; then\n    return\n  fi\n\n  local name=''\n  local value=''\n  local secret=false\n  local as_output=false\n  local is_multi_job_variable=true\n\n  while [[ $# -gt 0 ]]; do\n    opt=\"$(echo \"${1/#--/-}\" | tr \"[:upper:]\" \"[:lower:]\")\"\n    case \"$opt\" in\n      -name|-n)\n        name=$2\n        shift\n        ;;\n      -value|-v)\n        value=$2\n        shift\n        ;;\n      -secret|-s)\n        secret=true\n        ;;\n      -as_output|-a)\n        as_output=true\n        ;;\n      -is_multi_job_variable|-i)\n        is_multi_job_variable=$2\n        shift\n        ;;\n    esac\n    shift\n  done\n\n  value=${value/;/%3B}\n  value=${value/\\\\r/%0D}\n  value=${value/\\\\n/%0A}\n  value=${value/]/%5D}\n\n  local message=\"##vso[task.setvariable variable=$name;isSecret=$secret;isOutput=$is_multi_job_variable]$value\"\n\n  if [[ \"$as_output\" == true ]]; then\n    $message\n  else\n    echo \"$message\"\n  fi\n}\n\nfunction Write-PipelinePrependPath {\n  local prepend_path=''\n\n  while [[ $# -gt 0 ]]; do\n    opt=\"$(echo \"${1/#--/-}\" | tr \"[:upper:]\" \"[:lower:]\")\"\n    case \"$opt\" in\n      -path|-p)\n        prepend_path=$2\n        shift\n        ;;\n    esac\n    shift\n  done\n\n  export PATH=\"$prepend_path:$PATH\"\n\n  if [[ \"$ci\" == true ]]; then\n    echo \"##vso[task.prependpath]$prepend_path\"\n  fi\n}\n\nfunction Write-PipelineSetResult {\n  local result=''\n  local message=''\n\n  while [[ $# -gt 0 ]]; do\n    opt=\"$(echo \"${1/#--/-}\" | tr \"[:upper:]\" \"[:lower:]\")\"\n    case \"$opt\" in\n      -result|-r)\n        result=$2\n        shift\n        ;;\n      -message|-m)\n        message=$2\n        shift\n        ;;\n    esac\n    shift\n  done\n\n  if [[ \"$ci\" == true ]]; then\n    echo \"##vso[task.complete result=$result;]$message\"\n  fi\n}\n"
  },
  {
    "path": "eng/common/post-build/check-channel-consistency.ps1",
    "content": "param(\n  [Parameter(Mandatory=$true)][string] $PromoteToChannels,            # List of channels that the build should be promoted to\n  [Parameter(Mandatory=$true)][array] $AvailableChannelIds            # List of channel IDs available in the YAML implementation\n)\n\ntry {\n  $ErrorActionPreference = 'Stop'\n  Set-StrictMode -Version 2.0\n\n  # `tools.ps1` checks $ci to perform some actions. Since the post-build\n  # scripts don't necessarily execute in the same agent that run the\n  # build.ps1/sh script this variable isn't automatically set.\n  $ci = $true\n  $disableConfigureToolsetImport = $true\n  . $PSScriptRoot\\..\\tools.ps1\n\n  if ($PromoteToChannels -eq \"\") {\n    Write-PipelineTaskError -Type 'warning' -Message \"This build won't publish assets as it's not configured to any Maestro channel. If that wasn't intended use Darc to configure a default channel using add-default-channel for this branch or to promote it to a channel using add-build-to-channel. See https://github.com/dotnet/arcade/blob/main/Documentation/Darc.md#assigning-an-individual-build-to-a-channel for more info.\"\n    ExitWithExitCode 0\n  }\n\n  # Check that every channel that Maestro told to promote the build to \n  # is available in YAML\n  $PromoteToChannelsIds = $PromoteToChannels -split \"\\D\" | Where-Object { $_ }\n\n  $hasErrors = $false\n\n  foreach ($id in $PromoteToChannelsIds) {\n    if (($id -ne 0) -and ($id -notin $AvailableChannelIds)) {\n      Write-PipelineTaskError -Message \"Channel $id is not present in the post-build YAML configuration! This is an error scenario. Please contact @dnceng.\"\n      $hasErrors = $true\n    }\n  }\n\n  # The `Write-PipelineTaskError` doesn't error the script and we might report several errors\n  # in the previous lines. The check below makes sure that we return an error state from the\n  # script if we reported any validation error\n  if ($hasErrors) {\n    ExitWithExitCode 1 \n  }\n\n  Write-Host 'done.'\n} \ncatch {\n  Write-Host $_\n  Write-PipelineTelemetryError -Category 'CheckChannelConsistency' -Message \"There was an error while trying to check consistency of Maestro default channels for the build and post-build YAML configuration.\"\n  ExitWithExitCode 1\n}\n"
  },
  {
    "path": "eng/common/post-build/nuget-validation.ps1",
    "content": "# This script validates NuGet package metadata information using this \n# tool: https://github.com/NuGet/NuGetGallery/tree/jver-verify/src/VerifyMicrosoftPackage\n\nparam(\n  [Parameter(Mandatory=$true)][string] $PackagesPath # Path to where the packages to be validated are\n)\n\n# `tools.ps1` checks $ci to perform some actions. Since the post-build\n# scripts don't necessarily execute in the same agent that run the\n# build.ps1/sh script this variable isn't automatically set.\n$ci = $true\n$disableConfigureToolsetImport = $true\n. $PSScriptRoot\\..\\tools.ps1\n\ntry {\n  & $PSScriptRoot\\nuget-verification.ps1 ${PackagesPath}\\*.nupkg\n} \ncatch {\n  Write-Host $_.ScriptStackTrace\n  Write-PipelineTelemetryError -Category 'NuGetValidation' -Message $_\n  ExitWithExitCode 1\n}\n"
  },
  {
    "path": "eng/common/post-build/nuget-verification.ps1",
    "content": "<#\n.SYNOPSIS\n    Verifies that Microsoft NuGet packages have proper metadata.\n.DESCRIPTION\n    Downloads a verification tool and runs metadata validation on the provided NuGet packages. This script writes an\n    error if any of the provided packages fail validation. All arguments provided to this PowerShell script that do not\n    match PowerShell parameters are passed on to the verification tool downloaded during the execution of this script.\n.PARAMETER NuGetExePath\n    The path to the nuget.exe binary to use. If not provided, nuget.exe will be downloaded into the -DownloadPath\n    directory.\n.PARAMETER PackageSource\n    The package source to use to download the verification tool. If not provided, nuget.org will be used.\n.PARAMETER DownloadPath\n    The directory path to download the verification tool and nuget.exe to. If not provided,\n    %TEMP%\\NuGet.VerifyNuGetPackage will be used.\n.PARAMETER args\n    Arguments that will be passed to the verification tool.\n.EXAMPLE\n    PS> .\\verify.ps1 *.nupkg\n    Verifies the metadata of all .nupkg files in the currect working directory.\n.EXAMPLE\n    PS> .\\verify.ps1 --help\n    Displays the help text of the downloaded verifiction tool.\n.LINK\n    https://github.com/NuGet/NuGetGallery/blob/master/src/VerifyMicrosoftPackage/README.md\n#>\n\n# This script was copied from https://github.com/NuGet/NuGetGallery/blob/3e25ad135146676bcab0050a516939d9958bfa5d/src/VerifyMicrosoftPackage/verify.ps1\n\n[CmdletBinding(PositionalBinding = $false)]\nparam(\n   [string]$NuGetExePath,\n   [string]$PackageSource = \"https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json\",\n   [string]$DownloadPath,\n   [Parameter(ValueFromRemainingArguments = $true)]\n   [string[]]$args\n)\n\n# The URL to download nuget.exe.\n$nugetExeUrl = \"https://dist.nuget.org/win-x86-commandline/v4.9.4/nuget.exe\"\n\n# The package ID of the verification tool.\n$packageId = \"NuGet.VerifyMicrosoftPackage\"\n\n# The location that nuget.exe and the verification tool will be downloaded to.\nif (!$DownloadPath) {\n    $DownloadPath = (Join-Path $env:TEMP \"NuGet.VerifyMicrosoftPackage\")\n}\n\n$fence = New-Object -TypeName string -ArgumentList '=', 80\n\n# Create the download directory, if it doesn't already exist.\nif (!(Test-Path $DownloadPath)) {\n    New-Item -ItemType Directory $DownloadPath | Out-Null\n}\nWrite-Host \"Using download path: $DownloadPath\"\n\nif ($NuGetExePath) {\n    $nuget = $NuGetExePath\n} else {\n    $downloadedNuGetExe = Join-Path $DownloadPath \"nuget.exe\"\n    \n    # Download nuget.exe, if it doesn't already exist.\n    if (!(Test-Path $downloadedNuGetExe)) {\n        Write-Host \"Downloading nuget.exe from $nugetExeUrl...\"\n        $ProgressPreference = 'SilentlyContinue'\n        try {\n            Invoke-WebRequest $nugetExeUrl -UseBasicParsing -OutFile $downloadedNuGetExe\n            $ProgressPreference = 'Continue'\n        } catch {\n            $ProgressPreference = 'Continue'\n            Write-Error $_\n            Write-Error \"nuget.exe failed to download.\"\n            exit\n        }\n    }\n\n    $nuget = $downloadedNuGetExe\n}\n\nWrite-Host \"Using nuget.exe path: $nuget\"\nWrite-Host \" \"\n\n# Download the latest version of the verification tool.\nWrite-Host \"Downloading the latest version of $packageId from $packageSource...\"\nWrite-Host $fence\n& $nuget install $packageId `\n    -Prerelease `\n    -OutputDirectory $DownloadPath `\n    -Source $PackageSource\nWrite-Host $fence\nWrite-Host \" \"\n\nif ($LASTEXITCODE -ne 0) {\n    Write-Error \"nuget.exe failed to fetch the verify tool.\"\n    exit\n}\n\n# Find the most recently downloaded tool\nWrite-Host \"Finding the most recently downloaded verification tool.\"\n$verifyProbePath = Join-Path $DownloadPath \"$packageId.*\"\n$verifyPath = Get-ChildItem -Path $verifyProbePath -Directory `\n    | Sort-Object -Property LastWriteTime -Descending `\n    | Select-Object -First 1\n$verify = Join-Path $verifyPath \"tools\\NuGet.VerifyMicrosoftPackage.exe\"\nWrite-Host \"Using verification tool: $verify\"\nWrite-Host \" \"\n\n# Execute the verification tool.\nWrite-Host \"Executing the verify tool...\"\nWrite-Host $fence\n& $verify $args\nWrite-Host $fence\nWrite-Host \" \"\n\n# Respond to the exit code.\nif ($LASTEXITCODE -ne 0) {\n    Write-Error \"The verify tool found some problems.\"\n} else {\n    Write-Output \"The verify tool succeeded.\"\n}\n"
  },
  {
    "path": "eng/common/post-build/publish-using-darc.ps1",
    "content": "param(\n  [Parameter(Mandatory=$true)][int] $BuildId,\n  [Parameter(Mandatory=$true)][int] $PublishingInfraVersion,\n  [Parameter(Mandatory=$true)][string] $AzdoToken,\n  [Parameter(Mandatory=$false)][string] $MaestroApiEndPoint = 'https://maestro.dot.net',\n  [Parameter(Mandatory=$true)][string] $WaitPublishingFinish,\n  [Parameter(Mandatory=$false)][string] $ArtifactsPublishingAdditionalParameters,\n  [Parameter(Mandatory=$false)][string] $SymbolPublishingAdditionalParameters,\n  [Parameter(Mandatory=$false)][string] $RequireDefaultChannels,\n  [Parameter(Mandatory=$false)][string] $SkipAssetsPublishing,\n  [Parameter(Mandatory=$false)][string] $runtimeSourceFeed,\n  [Parameter(Mandatory=$false)][string] $runtimeSourceFeedKey\n)\n\ntry {\n  # `tools.ps1` checks $ci to perform some actions. Since the post-build\n  # scripts don't necessarily execute in the same agent that run the\n  # build.ps1/sh script this variable isn't automatically set.\n  $ci = $true\n  $disableConfigureToolsetImport = $true\n  . $PSScriptRoot\\..\\tools.ps1\n\n  $darc = Get-Darc\n\n  $optionalParams = [System.Collections.ArrayList]::new()\n\n  if (\"\" -ne $ArtifactsPublishingAdditionalParameters) {\n    $optionalParams.Add(\"--artifact-publishing-parameters\") | Out-Null\n    $optionalParams.Add($ArtifactsPublishingAdditionalParameters) | Out-Null\n  }\n\n  if (\"\" -ne $SymbolPublishingAdditionalParameters) {\n    $optionalParams.Add(\"--symbol-publishing-parameters\") | Out-Null\n    $optionalParams.Add($SymbolPublishingAdditionalParameters) | Out-Null\n  }\n\n  if (\"false\" -eq $WaitPublishingFinish) {\n    $optionalParams.Add(\"--no-wait\") | Out-Null\n  }\n  \n  if (\"true\" -eq $RequireDefaultChannels) {\n    $optionalParams.Add(\"--default-channels-required\") | Out-Null\n  }\n\n  if (\"true\" -eq $SkipAssetsPublishing) {\n    $optionalParams.Add(\"--skip-assets-publishing\") | Out-Null\n  }\n\n  & $darc add-build-to-channel `\n    --id $buildId `\n    --publishing-infra-version $PublishingInfraVersion `\n    --default-channels `\n    --source-branch main `\n    --azdev-pat \"$AzdoToken\" `\n    --bar-uri \"$MaestroApiEndPoint\" `\n    --ci `\n    --verbose `\n\t@optionalParams\n\n  if ($LastExitCode -ne 0) {\n    Write-Host \"Problems using Darc to promote build ${buildId} to default channels. Stopping execution...\"\n    exit 1\n  }\n\n  Write-Host 'done.'\n}\ncatch {\n  Write-Host $_\n  Write-PipelineTelemetryError -Category 'PromoteBuild' -Message \"There was an error while trying to publish build '$BuildId' to default channels.\"\n  ExitWithExitCode 1\n}\n"
  },
  {
    "path": "eng/common/post-build/redact-logs.ps1",
    "content": "[CmdletBinding(PositionalBinding=$False)]\nparam(\n  [Parameter(Mandatory=$true, Position=0)][string] $InputPath,\n  [Parameter(Mandatory=$true)][string] $BinlogToolVersion,\n  [Parameter(Mandatory=$false)][string] $DotnetPath,\n  [Parameter(Mandatory=$false)][string] $PackageFeed = 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json',\n  # File with strings to redact - separated by newlines.\n  #  For comments start the line with '# ' - such lines are ignored \n  [Parameter(Mandatory=$false)][string] $TokensFilePath,\n  [Parameter(ValueFromRemainingArguments=$true)][String[]]$TokensToRedact,\n  [Parameter(Mandatory=$false)][string] $runtimeSourceFeed,\n  [Parameter(Mandatory=$false)][string] $runtimeSourceFeedKey\n)\n\ntry {\n  $ErrorActionPreference = 'Stop'\n  Set-StrictMode -Version 2.0\n\n  # `tools.ps1` checks $ci to perform some actions. Since the post-build\n  # scripts don't necessarily execute in the same agent that run the\n  # build.ps1/sh script this variable isn't automatically set.\n  $ci = $true\n  $disableConfigureToolsetImport = $true\n  . $PSScriptRoot\\..\\tools.ps1\n\n  $packageName = 'binlogtool'\n\n  $dotnet = $DotnetPath\n\n  if (!$dotnet) {\n    $dotnetRoot = InitializeDotNetCli -install:$true\n    $dotnet = \"$dotnetRoot\\dotnet.exe\"\n  }\n  \n  $toolList = & \"$dotnet\" tool list -g\n\n  if ($toolList -like \"*$packageName*\") {\n    & \"$dotnet\" tool uninstall $packageName -g\n  }\n\n  $toolPath  = \"$PSScriptRoot\\..\\..\\..\\.tools\"\n  $verbosity = 'minimal'\n  \n  New-Item -ItemType Directory -Force -Path $toolPath\n  \n  Push-Location -Path $toolPath\n\n  try {\n    Write-Host \"Installing Binlog redactor CLI...\"\n    Write-Host \"'$dotnet' new tool-manifest\"\n    & \"$dotnet\" new tool-manifest\n    Write-Host \"'$dotnet' tool install $packageName --local --source '$PackageFeed' -v $verbosity --version $BinlogToolVersion\"\n    & \"$dotnet\" tool install $packageName --local --source \"$PackageFeed\" -v $verbosity --version $BinlogToolVersion\n\n    if (Test-Path $TokensFilePath) {\n        Write-Host \"Adding additional sensitive data for redaction from file: \" $TokensFilePath\n        $TokensToRedact += Get-Content -Path $TokensFilePath | Foreach {$_.Trim()} | Where { $_ -notmatch \"^# \" }\n    }\n\n    $optionalParams = [System.Collections.ArrayList]::new()\n  \n    Foreach ($p in $TokensToRedact)\n    {\n      if($p -match '^\\$\\(.*\\)$')\n      {\n        Write-Host (\"Ignoring token {0} as it is probably unexpanded AzDO variable\"  -f $p)\n      }          \n      elseif($p)\n      {\n        $optionalParams.Add(\"-p:\" + $p) | Out-Null\n      }\n    }\n\n    & $dotnet binlogtool redact --input:$InputPath --recurse --in-place `\n      @optionalParams\n\n    if ($LastExitCode -ne 0) {\n      Write-PipelineTelemetryError -Category 'Redactor' -Type 'warning' -Message \"Problems using Redactor tool (exit code: $LastExitCode). But ignoring them now.\"\n    }\n  }\n  finally {\n    Pop-Location\n  }\n\n  Write-Host 'done.'\n} \ncatch {\n  Write-Host $_\n  Write-PipelineTelemetryError -Category 'Redactor' -Message \"There was an error while trying to redact logs. Error: $_\"\n  ExitWithExitCode 1\n}\n"
  },
  {
    "path": "eng/common/post-build/symbols-validation.ps1",
    "content": "param(\n  [Parameter(Mandatory = $true)][string] $InputPath, # Full path to directory where NuGet packages to be checked are stored\n  [Parameter(Mandatory = $true)][string] $ExtractPath, # Full path to directory where the packages will be extracted during validation\n  [Parameter(Mandatory = $true)][string] $DotnetSymbolVersion, # Version of dotnet symbol to use\n  [Parameter(Mandatory = $false)][switch] $CheckForWindowsPdbs, # If we should check for the existence of windows pdbs in addition to portable PDBs\n  [Parameter(Mandatory = $false)][switch] $ContinueOnError, # If we should keep checking symbols after an error\n  [Parameter(Mandatory = $false)][switch] $Clean,           # Clean extracted symbols directory after checking symbols\n  [Parameter(Mandatory = $false)][string] $SymbolExclusionFile  # Exclude the symbols in the file from publishing to symbol server\n)\n\n. $PSScriptRoot\\..\\tools.ps1\n# Maximum number of jobs to run in parallel\n$MaxParallelJobs = 16\n\n# Max number of retries\n$MaxRetry = 5\n\n# Wait time between check for system load\n$SecondsBetweenLoadChecks = 10\n\n# Set error codes\nSet-Variable -Name \"ERROR_BADEXTRACT\" -Option Constant -Value -1\nSet-Variable -Name \"ERROR_FILEDOESNOTEXIST\" -Option Constant -Value -2\n\n$WindowsPdbVerificationParam = \"\"\nif ($CheckForWindowsPdbs) {\n  $WindowsPdbVerificationParam = \"--windows-pdbs\"\n}\n\n$ExclusionSet = New-Object System.Collections.Generic.HashSet[string];\n\nif (!$InputPath -or !(Test-Path $InputPath)){\n  Write-Host \"No symbols to validate.\"\n  ExitWithExitCode 0\n}\n\n#Check if the path exists\nif ($SymbolExclusionFile -and (Test-Path $SymbolExclusionFile)){\n  [string[]]$Exclusions = Get-Content \"$SymbolExclusionFile\"\n  $Exclusions | foreach { if($_ -and $_.Trim()){$ExclusionSet.Add($_)} }\n}\nelse{\n  Write-Host \"Symbol Exclusion file does not exists. No symbols to exclude.\"\n}\n\n$CountMissingSymbols = {\n  param( \n    [string] $PackagePath, # Path to a NuGet package\n    [string] $WindowsPdbVerificationParam # If we should check for the existence of windows pdbs in addition to portable PDBs\n  )\n\n  Add-Type -AssemblyName System.IO.Compression.FileSystem\n\n  Write-Host \"Validating $PackagePath \"\n\n  # Ensure input file exist\n  if (!(Test-Path $PackagePath)) {\n    Write-PipelineTaskError \"Input file does not exist: $PackagePath\"\n    return [pscustomobject]@{\n      result      = $using:ERROR_FILEDOESNOTEXIST\n      packagePath = $PackagePath\n    }\n  }\n  \n  # Extensions for which we'll look for symbols\n  $RelevantExtensions = @('.dll', '.exe', '.so', '.dylib')\n\n  # How many files are missing symbol information\n  $MissingSymbols = 0\n\n  $PackageId = [System.IO.Path]::GetFileNameWithoutExtension($PackagePath)\n  $PackageGuid = New-Guid\n  $ExtractPath = Join-Path -Path $using:ExtractPath -ChildPath $PackageGuid\n  $SymbolsPath = Join-Path -Path $ExtractPath -ChildPath 'Symbols'\n  \n  try {\n    [System.IO.Compression.ZipFile]::ExtractToDirectory($PackagePath, $ExtractPath)\n  }\n  catch {\n    Write-Host \"Something went wrong extracting $PackagePath\"\n    Write-Host $_\n    return [pscustomobject]@{\n      result      = $using:ERROR_BADEXTRACT\n      packagePath = $PackagePath\n    }\n  }\n\n  Get-ChildItem -Recurse $ExtractPath |\n  Where-Object { $RelevantExtensions -contains $_.Extension } |\n  ForEach-Object {\n    $FileName = $_.FullName\n    if ($FileName -Match '\\\\ref\\\\') {\n      Write-Host \"`t Ignoring reference assembly file \" $FileName\n      return\n    }\n\n    $FirstMatchingSymbolDescriptionOrDefault = {\n      param( \n        [string] $FullPath, # Full path to the module that has to be checked\n        [string] $TargetServerParam, # Parameter to pass to `Symbol Tool` indicating the server to lookup for symbols\n        [string] $WindowsPdbVerificationParam, # Parameter to pass to potential check for windows-pdbs.\n        [string] $SymbolsPath\n      )\n\n      $FileName = [System.IO.Path]::GetFileName($FullPath)\n      $Extension = [System.IO.Path]::GetExtension($FullPath)\n\n      # Those below are potential symbol files that the `dotnet symbol` might\n      # return. Which one will be returned depend on the type of file we are\n      # checking and which type of file was uploaded.\n\n      # The file itself is returned\n      $SymbolPath = $SymbolsPath + '\\' + $FileName\n\n      # PDB file for the module\n      $PdbPath = $SymbolPath.Replace($Extension, '.pdb')\n\n      # PDB file for R2R module (created by crossgen)\n      $NGenPdb = $SymbolPath.Replace($Extension, '.ni.pdb')\n\n      # DBG file for a .so library\n      $SODbg = $SymbolPath.Replace($Extension, '.so.dbg')\n\n      # DWARF file for a .dylib\n      $DylibDwarf = $SymbolPath.Replace($Extension, '.dylib.dwarf')\n\n      $dotnetSymbolExe = \"$env:USERPROFILE\\.dotnet\\tools\"\n      $dotnetSymbolExe = Resolve-Path \"$dotnetSymbolExe\\dotnet-symbol.exe\"\n\n      $totalRetries = 0\n\n      while ($totalRetries -lt $using:MaxRetry) {\n\n        # Save the output and get diagnostic output\n        $output = & $dotnetSymbolExe --symbols --modules $WindowsPdbVerificationParam $TargetServerParam $FullPath -o $SymbolsPath --diagnostics | Out-String\n\n        if ((Test-Path $PdbPath) -and (Test-path $SymbolPath)) {\n          return 'Module and PDB for Module'\n        }\n        elseif ((Test-Path $NGenPdb) -and (Test-Path $PdbPath) -and (Test-Path $SymbolPath)) {\n          return 'Dll, PDB and NGen PDB'\n        }\n        elseif ((Test-Path $SODbg) -and (Test-Path $SymbolPath)) {\n          return 'So and DBG for SO'\n        }  \n        elseif ((Test-Path $DylibDwarf) -and (Test-Path $SymbolPath)) {\n          return 'Dylib and Dwarf for Dylib'\n        }  \n        elseif (Test-Path $SymbolPath) {\n          return 'Module'\n        }\n        else\n        {\n          $totalRetries++\n        }\n      }\n      \n      return $null\n    }\n\n    $FileRelativePath = $FileName.Replace(\"$ExtractPath\\\", \"\")\n    if (($($using:ExclusionSet) -ne $null) -and ($($using:ExclusionSet).Contains($FileRelativePath) -or ($($using:ExclusionSet).Contains($FileRelativePath.Replace(\"\\\", \"/\"))))){\n      Write-Host \"Skipping $FileName from symbol validation\"\n    }\n\n    else {\n      $FileGuid = New-Guid\n      $ExpandedSymbolsPath = Join-Path -Path $SymbolsPath -ChildPath $FileGuid\n\n      $SymbolsOnMSDL = & $FirstMatchingSymbolDescriptionOrDefault `\n          -FullPath $FileName `\n          -TargetServerParam '--microsoft-symbol-server' `\n          -SymbolsPath \"$ExpandedSymbolsPath-msdl\" `\n          -WindowsPdbVerificationParam $WindowsPdbVerificationParam\n      $SymbolsOnSymWeb = & $FirstMatchingSymbolDescriptionOrDefault `\n          -FullPath $FileName `\n          -TargetServerParam '--internal-server' `\n          -SymbolsPath \"$ExpandedSymbolsPath-symweb\" `\n          -WindowsPdbVerificationParam $WindowsPdbVerificationParam\n\n      Write-Host -NoNewLine \"`t Checking file \" $FileName \"... \"\n  \n      if ($SymbolsOnMSDL -ne $null -and $SymbolsOnSymWeb -ne $null) {\n        Write-Host \"Symbols found on MSDL ($SymbolsOnMSDL) and SymWeb ($SymbolsOnSymWeb)\"\n      }\n      else {\n        $MissingSymbols++\n\n        if ($SymbolsOnMSDL -eq $null -and $SymbolsOnSymWeb -eq $null) {\n          Write-Host 'No symbols found on MSDL or SymWeb!'\n        }\n        else {\n          if ($SymbolsOnMSDL -eq $null) {\n            Write-Host 'No symbols found on MSDL!'\n          }\n          else {\n            Write-Host 'No symbols found on SymWeb!'\n          }\n        }\n      }\n    }\n  }\n  \n  if ($using:Clean) {\n    Remove-Item $ExtractPath -Recurse -Force\n  }\n  \n  Pop-Location\n\n  return [pscustomobject]@{\n    result      = $MissingSymbols\n    packagePath = $PackagePath\n  }\n}\n\nfunction CheckJobResult(\n  $result, \n  $packagePath,\n  [ref]$DupedSymbols,\n  [ref]$TotalFailures) {\n  if ($result -eq $ERROR_BADEXTRACT) {\n    Write-PipelineTelemetryError -Category 'CheckSymbols' -Message \"$packagePath has duplicated symbol files\"\n    $DupedSymbols.Value++\n  } \n  elseif ($result -eq $ERROR_FILEDOESNOTEXIST) {\n    Write-PipelineTelemetryError -Category 'CheckSymbols' -Message \"$packagePath does not exist\"\n    $TotalFailures.Value++\n  }\n  elseif ($result -gt '0') {\n    Write-PipelineTelemetryError -Category 'CheckSymbols' -Message \"Missing symbols for $result modules in the package $packagePath\"\n    $TotalFailures.Value++\n  }\n  else {\n    Write-Host \"All symbols verified for package $packagePath\"\n  }\n}\n\nfunction CheckSymbolsAvailable {\n  if (Test-Path $ExtractPath) {\n    Remove-Item $ExtractPath -Force  -Recurse -ErrorAction SilentlyContinue\n  }\n\n  $TotalPackages = 0\n  $TotalFailures = 0\n  $DupedSymbols = 0\n\n  Get-ChildItem \"$InputPath\\*.nupkg\" |\n    ForEach-Object {\n      $FileName = $_.Name\n      $FullName = $_.FullName\n\n      # These packages from Arcade-Services include some native libraries that\n      # our current symbol uploader can't handle. Below is a workaround until\n      # we get issue: https://github.com/dotnet/arcade/issues/2457 sorted.\n      if ($FileName -Match 'Microsoft\\.DotNet\\.Darc\\.') {\n        Write-Host \"Ignoring Arcade-services file: $FileName\"\n        Write-Host\n        return\n      }\n      elseif ($FileName -Match 'Microsoft\\.DotNet\\.Maestro\\.Tasks\\.') {\n        Write-Host \"Ignoring Arcade-services file: $FileName\"\n        Write-Host\n        return\n      }\n\n      $TotalPackages++\n\n      Start-Job -ScriptBlock $CountMissingSymbols -ArgumentList @($FullName,$WindowsPdbVerificationParam) | Out-Null\n\n      $NumJobs = @(Get-Job -State 'Running').Count\n\n      while ($NumJobs -ge $MaxParallelJobs) {\n        Write-Host \"There are $NumJobs validation jobs running right now. Waiting $SecondsBetweenLoadChecks seconds to check again.\"\n        sleep $SecondsBetweenLoadChecks\n        $NumJobs = @(Get-Job -State 'Running').Count\n      }\n\n      foreach ($Job in @(Get-Job -State 'Completed')) {\n        $jobResult = Wait-Job -Id $Job.Id | Receive-Job\n        CheckJobResult $jobResult.result $jobResult.packagePath ([ref]$DupedSymbols) ([ref]$TotalFailures)\n        Remove-Job -Id $Job.Id\n      }\n      Write-Host\n    }\n\n  foreach ($Job in @(Get-Job)) {\n    $jobResult = Wait-Job -Id $Job.Id | Receive-Job\n    CheckJobResult $jobResult.result $jobResult.packagePath ([ref]$DupedSymbols) ([ref]$TotalFailures)\n  }\n\n  if ($TotalFailures -gt 0 -or $DupedSymbols -gt 0) {\n    if ($TotalFailures -gt 0) {\n      Write-PipelineTelemetryError -Category 'CheckSymbols' -Message \"Symbols missing for $TotalFailures/$TotalPackages packages\"\n    }\n\n    if ($DupedSymbols -gt 0) {\n      Write-PipelineTelemetryError -Category 'CheckSymbols' -Message \"$DupedSymbols/$TotalPackages packages had duplicated symbol files and could not be extracted\"\n    }\n    \n    ExitWithExitCode 1\n  }\n  else {\n    Write-Host \"All symbols validated!\"\n  }\n}\n\nfunction InstallDotnetSymbol {\n  $dotnetSymbolPackageName = 'dotnet-symbol'\n\n  $dotnetRoot = InitializeDotNetCli -install:$true\n  $dotnet = \"$dotnetRoot\\dotnet.exe\"\n  $toolList = & \"$dotnet\" tool list --global\n\n  if (($toolList -like \"*$dotnetSymbolPackageName*\") -and ($toolList -like \"*$dotnetSymbolVersion*\")) {\n    Write-Host \"dotnet-symbol version $dotnetSymbolVersion is already installed.\"\n  }\n  else {\n    Write-Host \"Installing dotnet-symbol version $dotnetSymbolVersion...\"\n    Write-Host 'You may need to restart your command window if this is the first dotnet tool you have installed.'\n    & \"$dotnet\" tool install $dotnetSymbolPackageName --version $dotnetSymbolVersion --verbosity \"minimal\" --global\n  }\n}\n\ntry {\n  InstallDotnetSymbol\n\n  foreach ($Job in @(Get-Job)) {\n    Remove-Job -Id $Job.Id\n  }\n\n  CheckSymbolsAvailable\n}\ncatch {\n  Write-Host $_.ScriptStackTrace\n  Write-PipelineTelemetryError -Category 'CheckSymbols' -Message $_\n  ExitWithExitCode 1\n}\n"
  },
  {
    "path": "eng/common/renovate.env",
    "content": "# Renovate Global Configuration\n# https://docs.renovatebot.com/self-hosted-configuration/\n#\n# NOTE: This file uses bash/shell format and is sourced via `. renovate.env`.\n# Values containing spaces or special characters must be quoted.\n\n# Author to use for git commits made by Renovate\n# https://docs.renovatebot.com/configuration-options/#gitauthor\nexport RENOVATE_GIT_AUTHOR='.NET Renovate <dotnet-renovate-bot@microsoft.com>'\n\n# Disable rate limiting for PR creation (0 = unlimited)\n# https://docs.renovatebot.com/presets-default/#prhourlylimitnone\n# https://docs.renovatebot.com/presets-default/#prconcurrentlimitnone\nexport RENOVATE_PR_HOURLY_LIMIT=0\nexport RENOVATE_PR_CONCURRENT_LIMIT=0\n\n# Skip the onboarding PR that Renovate normally creates for new repos\n# https://docs.renovatebot.com/config-overview/#onboarding\nexport RENOVATE_ONBOARDING=false\n\n# Any Renovate config file in the cloned repository is ignored. Only\n# the Renovate config file from the repo where the pipeline is running\n# is used (yes, those are the same repo but the sources may be different).\n# https://docs.renovatebot.com/self-hosted-configuration/#requireconfig\nexport RENOVATE_REQUIRE_CONFIG=ignored\n\n# Customize the PR body content. This removes some of the default\n# sections that aren't relevant in a self-hosted config.\n# https://docs.renovatebot.com/configuration-options/#prheader\n# https://docs.renovatebot.com/configuration-options/#prbodynotes\n# https://docs.renovatebot.com/configuration-options/#prbodytemplate\nexport RENOVATE_PR_HEADER='## Automated Dependency Update'\nexport RENOVATE_PR_BODY_NOTES='[\"This PR has been created automatically by the [.NET Renovate Bot](https://github.com/dotnet/arcade/blob/main/Documentation/Renovate.md) to update one or more dependencies in your repo. Please review the changes and merge the PR if everything looks good.\"]'\nexport RENOVATE_PR_BODY_TEMPLATE='{{{header}}}{{{table}}}{{{warnings}}}{{{notes}}}{{{changelogs}}}'\n\n# Extend the global config with additional presets\n# https://docs.renovatebot.com/self-hosted-configuration/#globalextends\n# Disable the Dependency Dashboard issue that tracks all updates\nexport RENOVATE_GLOBAL_EXTENDS='[\":disableDependencyDashboard\"]'\n\n# Allow all commands for post-upgrade commands.\nexport RENOVATE_ALLOWED_COMMANDS='[\".*\"]'\n"
  },
  {
    "path": "eng/common/retain-build.ps1",
    "content": "\nParam(\n[Parameter(Mandatory=$true)][int] $buildId,\n[Parameter(Mandatory=$true)][string] $azdoOrgUri, \n[Parameter(Mandatory=$true)][string] $azdoProject,\n[Parameter(Mandatory=$true)][string] $token\n)\n\n$ErrorActionPreference = 'Stop'\nSet-StrictMode -Version 2.0\n\nfunction Get-AzDOHeaders(\n    [string] $token)\n{\n    $base64AuthInfo = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(\":${token}\"))\n    $headers = @{\"Authorization\"=\"Basic $base64AuthInfo\"}\n    return $headers\n}\n\nfunction Update-BuildRetention(\n    [string] $azdoOrgUri,\n    [string] $azdoProject,\n    [int] $buildId,\n    [string] $token)\n{\n    $headers = Get-AzDOHeaders -token $token\n    $requestBody = \"{\n        `\"keepForever`\": `\"true`\"\n    }\"\n\n    $requestUri = \"${azdoOrgUri}/${azdoProject}/_apis/build/builds/${buildId}?api-version=6.0\"\n    write-Host \"Attempting to retain build using the following URI: ${requestUri} ...\"\n\n    try {\n        Invoke-RestMethod -Uri $requestUri -Method Patch -Body $requestBody -Header $headers -contentType \"application/json\"\n        Write-Host \"Updated retention settings for build ${buildId}.\"\n    }\n    catch {\n        Write-Error \"Failed to update retention settings for build: $_.Exception.Response.StatusDescription\"\n        exit 1\n    }\n}\n\nUpdate-BuildRetention -azdoOrgUri $azdoOrgUri -azdoProject $azdoProject -buildId $buildId -token $token\nexit 0\n"
  },
  {
    "path": "eng/common/sdk-task.ps1",
    "content": "[CmdletBinding(PositionalBinding=$false)]\nParam(\n  [string] $configuration = 'Debug',\n  [string] $task,\n  [string] $verbosity = 'minimal',\n  [string] $msbuildEngine = $null,\n  [switch] $restore,\n  [switch] $prepareMachine,\n  [switch][Alias('nobl')]$excludeCIBinaryLog,\n  [switch]$noWarnAsError,\n  [switch] $help,\n  [string] $runtimeSourceFeed = '',\n  [string] $runtimeSourceFeedKey = '',\n  [Parameter(ValueFromRemainingArguments=$true)][String[]]$properties\n)\n\n$ci = $true\n$binaryLog = if ($excludeCIBinaryLog) { $false } else { $true }\n$warnAsError = if ($noWarnAsError) { $false } else { $true }\n\n. $PSScriptRoot\\tools.ps1\n\nfunction Print-Usage() {\n  Write-Host \"Common settings:\"\n  Write-Host \"  -task <value>           Name of Arcade task (name of a project in toolset directory of the Arcade SDK package)\"\n  Write-Host \"  -restore                Restore dependencies\"\n  Write-Host \"  -verbosity <value>      Msbuild verbosity: q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic]\"\n  Write-Host \"  -help                   Print help and exit\"\n  Write-Host \"\"\n\n  Write-Host \"Advanced settings:\"\n  Write-Host \"  -prepareMachine         Prepare machine for CI run\"\n  Write-Host \"  -msbuildEngine <value>  Msbuild engine to use to run build ('dotnet', 'vs', or unspecified).\"\n  Write-Host \"  -excludeCIBinaryLog     When running on CI, allow no binary log (short: -nobl)\"\n  Write-Host \"\"\n  Write-Host \"Command line arguments not listed above are passed thru to msbuild.\"\n}\n\nfunction Build([string]$target) {\n  $logSuffix = if ($target -eq 'Execute') { '' } else { \".$target\" }\n  $log = Join-Path $LogDir \"$task$logSuffix.binlog\"\n  $binaryLogArg = if ($binaryLog) { \"/bl:$log\" } else { \"\" }\n  $outputPath = Join-Path $ToolsetDir \"$task\\\"\n\n  MSBuild $taskProject `\n    $binaryLogArg `\n    /t:$target `\n    /p:Configuration=$configuration `\n    /p:RepoRoot=$RepoRoot `\n    /p:BaseIntermediateOutputPath=$outputPath `\n    /v:$verbosity `\n    @properties\n}\n\ntry {\n  if ($help -or (($null -ne $properties) -and ($properties.Contains('/help') -or $properties.Contains('/?')))) {\n    Print-Usage\n    exit 0\n  }\n\n  if ($task -eq \"\") {\n    Write-PipelineTelemetryError -Category 'Build' -Message \"Missing required parameter '-task <value>'\"\n    Print-Usage\n    ExitWithExitCode 1\n  }\n\n  if( $msbuildEngine -eq \"vs\") {\n    # Ensure desktop MSBuild is available for sdk tasks.\n    $global:_MSBuildExe = InitializeVisualStudioMSBuild\n  }\n\n  $taskProject = GetSdkTaskProject $task\n  if (!(Test-Path $taskProject)) {\n    Write-PipelineTelemetryError -Category 'Build' -Message \"Unknown task: $task\"\n    ExitWithExitCode 1\n  }\n\n  if ($restore) {\n    Build 'Restore'\n  }\n\n  Build 'Execute'\n}\ncatch {\n  Write-Host $_.ScriptStackTrace\n  Write-PipelineTelemetryError -Category 'Build' -Message $_\n  ExitWithExitCode 1\n}\n\nExitWithExitCode 0\n"
  },
  {
    "path": "eng/common/sdk-task.sh",
    "content": "#!/usr/bin/env bash\n\nshow_usage() {\n    echo \"Common settings:\"\n    echo \"  --task <value>           Name of Arcade task (name of a project in toolset directory of the Arcade SDK package)\"\n    echo \"  --restore                Restore dependencies\"\n    echo \"  --verbosity <value>      Msbuild verbosity: q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic]\"\n    echo \"  --help                   Print help and exit\"\n    echo \"\"\n\n    echo \"Advanced settings:\"\n    echo \"  --excludeCIBinarylog     Don't output binary log (short: -nobl)\"\n    echo \"  --noWarnAsError          Do not warn as error\"\n    echo \"\"\n    echo \"Command line arguments not listed above are passed thru to msbuild.\"\n}\n\nsource=\"${BASH_SOURCE[0]}\"\n\n# resolve $source until the file is no longer a symlink\nwhile [[ -h \"$source\" ]]; do\n  scriptroot=\"$( cd -P \"$( dirname \"$source\" )\" && pwd )\"\n  source=\"$(readlink \"$source\")\"\n  # if $source was a relative symlink, we need to resolve it relative to the path where the\n  # symlink file was located\n  [[ $source != /* ]] && source=\"$scriptroot/$source\"\ndone\nscriptroot=\"$( cd -P \"$( dirname \"$source\" )\" && pwd )\"\n\nBuild() {\n    local target=$1\n    local log_suffix=\"\"\n    [[ \"$target\" != \"Execute\" ]] && log_suffix=\".$target\"\n    local log=\"$log_dir/$task$log_suffix.binlog\"\n    local binaryLogArg=\"\"\n    [[ $binary_log == true ]] && binaryLogArg=\"/bl:$log\"\n    local output_path=\"$toolset_dir/$task/\"\n\n    MSBuild \"$taskProject\" \\\n        $binaryLogArg \\\n        /t:\"$target\" \\\n        /p:Configuration=\"$configuration\" \\\n        /p:RepoRoot=\"$repo_root\" \\\n        /p:BaseIntermediateOutputPath=\"$output_path\" \\\n        /v:\"$verbosity\" \\\n        $properties\n}\n\nbinary_log=true\nconfiguration=\"Debug\"\nverbosity=\"minimal\"\nexclude_ci_binary_log=false\nrestore=false\nhelp=false\nproperties=''\nwarnAsError=true\n\nwhile (($# > 0)); do\n  lowerI=\"$(echo $1 | tr \"[:upper:]\" \"[:lower:]\")\"\n  case $lowerI in\n    --task)\n      task=$2\n      shift 2\n      ;;\n    --restore)\n      restore=true\n      shift 1\n      ;;\n    --verbosity)\n      verbosity=$2\n      shift 2\n      ;;\n    --excludecibinarylog|--nobl)\n      binary_log=false\n      exclude_ci_binary_log=true\n      shift 1\n      ;;\n    --noWarnAsError)\n      warnAsError=false\n      shift 1\n      ;;\n    --help)\n      help=true\n      shift 1\n      ;;\n    *)\n      properties=\"$properties $1\"\n      shift 1\n      ;;\n  esac\ndone\n\nci=true\n\nif $help; then\n  show_usage\n  exit 0\nfi\n\n. \"$scriptroot/tools.sh\"\nInitializeToolset\n\nif [[ -z \"$task\" ]]; then\n    Write-PipelineTelemetryError -Category 'Task' -Name 'MissingTask' -Message \"Missing required parameter '-task <value>'\"\n    ExitWithExitCode 1\nfi\n\ntaskProject=$(GetSdkTaskProject \"$task\")\nif [[ ! -e \"$taskProject\" ]]; then\n    Write-PipelineTelemetryError -Category 'Task' -Name 'UnknownTask' -Message \"Unknown task: $task\"\n    ExitWithExitCode 1\nfi\n\nif $restore; then\n    Build \"Restore\"\nfi\n\nBuild \"Execute\"\n\n\nExitWithExitCode 0\n"
  },
  {
    "path": "eng/common/template-guidance.md",
    "content": "# Overview\n\nArcade provides templates for public (`/templates`) and 1ES pipeline templates (`/templates-official`) scenarios.  Pipelines which are required to be managed by 1ES pipeline templates should reference `/templates-offical`, all other pipelines may reference `/templates`.\n\n## How to use\n\nBasic guidance is:\n\n- 1ES Pipeline Template or 1ES Microbuild template runs should reference `eng/common/templates-official`. Any internal production-graded pipeline should use these templates.\n\n- All other runs should reference `eng/common/templates`.\n\nSee [azure-pipelines.yml](../../azure-pipelines.yml) (templates-official example) or [azure-pipelines-pr.yml](../../azure-pipelines-pr.yml) (templates example) for examples.\n\n#### The `templateIs1ESManaged` parameter\n\nThe `templateIs1ESManaged` is available on most templates and affects which of the variants is used for nested templates. See [Development Notes](#development-notes) below for more information on the `templateIs1ESManaged1 parameter.\n\n- For templates under `job/`, `jobs/`, `steps`, or `post-build/`, this parameter must be explicitly set.\n\n## Multiple outputs\n\n1ES pipeline templates impose a policy where every publish artifact execution results in additional security scans being injected into your pipeline.  When using `templates-official/jobs/jobs.yml`, Arcade reduces the number of additional security injections by gathering all publishing outputs into the [Build.ArtifactStagingDirectory](https://learn.microsoft.com/en-us/azure/devops/pipelines/build/variables?view=azure-devops&tabs=yaml#build-variables-devops-services), and utilizing the [outputParentDirectory](https://eng.ms/docs/cloud-ai-platform/devdiv/one-engineering-system-1es/1es-docs/1es-pipeline-templates/features/outputs#multiple-outputs) feature of 1ES pipeline templates.  When implementing your pipeline, if you ensure publish artifacts are located in the `$(Build.ArtifactStagingDirectory)`, and utilize the 1ES provided template context, then you can reduce the number of security scans for your pipeline.\n\nExample:\n``` yaml\n# azure-pipelines.yml\nextends:\n  template: azure-pipelines/MicroBuild.1ES.Official.yml@MicroBuildTemplate\n  parameters:\n    stages:\n    - stage: build\n      jobs:\n      - template: /eng/common/templates-official/jobs/jobs.yml@self\n        parameters:\n          # 1ES makes use of outputs to reduce security task injection overhead\n          templateContext:\n            outputs:\n            - output: pipelineArtifact\n              displayName: 'Publish logs from source'\n              continueOnError: true\n              condition: always()\n              targetPath: $(Build.ArtifactStagingDirectory)/artifacts/log\n              artifactName: Logs\n          jobs:\n          - job: Windows\n            steps:\n            - script: echo \"friendly neighborhood\" > artifacts/marvel/spiderman.txt\n          # copy build outputs to artifact staging directory for publishing\n          - task: CopyFiles@2\n              displayName: Gather build output\n              inputs:\n                SourceFolder: '$(System.DefaultWorkingDirectory)/artifacts/marvel'\n                Contents: '**'\n                TargetFolder: '$(Build.ArtifactStagingDirectory)/artifacts/marvel'\n```\n\nNote: Multiple outputs are ONLY applicable to 1ES PT publishing (only usable when referencing `templates-official`).\n\n## Development notes\n\n**Folder / file structure**\n\n``` text\neng\\common\\\n    [templates || templates-official]\\\n        job\\\n            job.yml                          (shim + artifact publishing logic)\n            onelocbuild.yml                  (shim)\n            publish-build-assets.yml         (shim)\n            source-build.yml                 (shim)\n            source-index-stage1.yml          (shim)\n        jobs\\\n            jobs.yml                         (shim)\n            source-build.yml                 (shim)\n        post-build\\\n            post-build.yml                   (shim)\n            common-variabls.yml              (shim)\n            setup-maestro-vars.yml           (shim)\n        steps\\\n            publish-build-artifacts.yml      (logic)\n            publish-pipeline-artifacts.yml   (logic)\n            component-governance.yml         (shim)\n            publish-logs.yml                 (shim)\n            retain-build.yml                 (shim)\n            send-to-helix.yml                (shim)\n            source-build.yml                 (shim)\n        variables\\\n            pool-providers.yml               (logic + redirect) # templates/variables/pool-providers.yml will redirect to templates-official/variables/pool-providers.yml if you are running in the internal project\n    core-templates\\\n        job\\\n            job.yml                          (logic)\n            onelocbuild.yml                  (logic)\n            publish-build-assets.yml         (logic)\n            source-build.yml                 (logic)\n            source-index-stage1.yml          (logic)\n        jobs\\\n            jobs.yml                         (logic)\n            source-build.yml                 (logic)\n        post-build\\\n            common-variabls.yml              (logic)\n            post-build.yml                   (logic)\n            setup-maestro-vars.yml           (logic)\n        steps\\\n            component-governance.yml         (logic)\n            publish-build-artifacts.yml      (redirect)\n            publish-logs.yml                 (logic)\n            publish-pipeline-artifacts.yml   (redirect)\n            retain-build.yml                 (logic)\n            send-to-helix.yml                (logic)\n            source-build.yml                 (logic)\n        variables\\\n            pool-providers.yml               (redirect)\n```\n\nIn the table above, a file is designated as \"shim\", \"logic\", or \"redirect\".\n\n- shim - represents a yaml file which is an intermediate step between pipeline logic and .Net Core Engineering's templates (`core-templates`) and defines the `is1ESPipeline` parameter value.\n\n- logic - represents actual base template logic.\n\n- redirect- represents a file in `core-templates` which redirects to the \"logic\" file in either `templates` or `templates-official`.\n\nLogic for Arcade's templates live **primarily** in the `core-templates` folder.  The exceptions to the location of the logic files are around artifact publishing, which is handled differently between 1es pipeline templates and standard templates.  `templates` and `templates-official` provide shim entry points which redirect to `core-templates` while also defining the `is1ESPipeline` parameter.  If a shim is referenced in `templates`, then `is1ESPipeline` is set to `false`.  If a shim is referenced in `templates-official`, then `is1ESPipeline` is set to `true`.\n\nWithin `templates` and `templates-official`, the templates at the \"stages\", and \"jobs\" / \"job\" level have been replaced with shims.  Templates at the \"steps\" and \"variables\" level are typically too granular to be replaced with shims and instead persist logic which is directly applicable to either scenario.\n\nWithin `core-templates`, there are a handful of places where logic is dependent on which shim entry point was used.  In those places, we redirect back to the respective logic file in `templates` or `templates-official`.\n"
  },
  {
    "path": "eng/common/templates/job/job.yml",
    "content": "parameters: \n  enablePublishBuildArtifacts: false\n  runAsPublic: false\n# CG related params, unused now and can eventually be removed\n  disableComponentGovernance: unused\n# Sbom related params, unused now and can eventually be removed\n  enableSbom: unused\n  PackageVersion: unused\n  BuildDropPath: unused\n\njobs:\n- template: /eng/common/core-templates/job/job.yml\n  parameters:\n    is1ESPipeline: false\n\n    ${{ each parameter in parameters }}:\n      ${{ if and(ne(parameter.key, 'steps'), ne(parameter.key, 'is1ESPipeline')) }}:\n        ${{ parameter.key }}: ${{ parameter.value }}\n\n    steps:\n    - ${{ each step in parameters.steps }}:\n      - ${{ step }}\n\n    # we don't run CG in public\n    - ${{ if eq(variables['System.TeamProject'], 'public') }}:\n      - script: echo \"##vso[task.setvariable variable=skipComponentGovernanceDetection]true\"\n        displayName: Set skipComponentGovernanceDetection variable\n\n    artifactPublishSteps:\n    - ${{ if ne(parameters.artifacts.publish, '') }}:\n      - ${{ if and(ne(parameters.artifacts.publish.artifacts, 'false'), ne(parameters.artifacts.publish.artifacts, '')) }}:\n        - template: /eng/common/core-templates/steps/publish-pipeline-artifacts.yml\n          parameters:\n            is1ESPipeline: false\n            args:\n              displayName: Publish pipeline artifacts\n              targetPath: '$(Build.ArtifactStagingDirectory)/artifacts'\n              artifactName: ${{ coalesce(parameters.artifacts.publish.artifacts.name , 'Artifacts_$(Agent.Os)_$(_BuildConfig)') }}\n              continueOnError: true\n              condition: succeeded()\n              retryCountOnTaskFailure: 10 # for any files being locked\n        - template: /eng/common/core-templates/steps/publish-pipeline-artifacts.yml\n          parameters:\n            is1ESPipeline: false\n            args:\n              displayName: Publish pipeline artifacts\n              targetPath: '$(Build.ArtifactStagingDirectory)/artifacts'\n              artifactName: ${{ coalesce(parameters.artifacts.publish.artifacts.name , 'Artifacts_$(Agent.Os)_$(_BuildConfig)') }}_Attempt$(System.JobAttempt)\n              continueOnError: true\n              condition: not(succeeded())\n              retryCountOnTaskFailure: 10 # for any files being locked\n      - ${{ if and(ne(parameters.artifacts.publish.logs, 'false'), ne(parameters.artifacts.publish.logs, '')) }}:\n        - template: /eng/common/core-templates/steps/publish-pipeline-artifacts.yml\n          parameters:\n            is1ESPipeline: false\n            args:\n              targetPath: '$(Build.ArtifactStagingDirectory)/artifacts/log'\n              artifactName: ${{ coalesce(parameters.artifacts.publish.logs.name, 'Logs_Build_$(Agent.Os)_$(_BuildConfig)') }}\n              displayName: 'Publish logs'\n              continueOnError: true\n              condition: always()\n              retryCountOnTaskFailure: 10 # for any files being locked\n\n    - ${{ if ne(parameters.enablePublishBuildArtifacts, 'false') }}:\n      - template: /eng/common/core-templates/steps/publish-pipeline-artifacts.yml\n        parameters:\n          is1ESPipeline: false\n          args:\n            displayName: Publish Logs\n            targetPath: '$(Build.ArtifactStagingDirectory)/artifacts/log/$(_BuildConfig)'\n            artifactName: ${{ coalesce(parameters.enablePublishBuildArtifacts.artifactName, '$(Agent.Os)_$(Agent.JobName)_Attempt$(System.JobAttempt)' ) }}\n            continueOnError: true\n            condition: always()\n            retryCountOnTaskFailure: 10 # for any files being locked\n\n    - ${{ if eq(parameters.enableBuildRetry, 'true') }}:\n      - template: /eng/common/core-templates/steps/publish-pipeline-artifacts.yml\n        parameters:\n          is1ESPipeline: false\n          args:\n            targetPath: '$(System.DefaultWorkingDirectory)\\eng\\common\\BuildConfiguration'\n            artifactName: 'BuildConfiguration'\n            displayName: 'Publish build retry configuration'\n            continueOnError: true\n            retryCountOnTaskFailure: 10 # for any files being locked\n"
  },
  {
    "path": "eng/common/templates/job/onelocbuild.yml",
    "content": "jobs:\n- template: /eng/common/core-templates/job/onelocbuild.yml\n  parameters:\n    is1ESPipeline: false\n\n    ${{ each parameter in parameters }}:\n      ${{ parameter.key }}: ${{ parameter.value }}\n"
  },
  {
    "path": "eng/common/templates/job/publish-build-assets.yml",
    "content": "jobs:\n- template: /eng/common/core-templates/job/publish-build-assets.yml\n  parameters:\n    is1ESPipeline: false\n\n    ${{ each parameter in parameters }}:\n      ${{ parameter.key }}: ${{ parameter.value }}\n"
  },
  {
    "path": "eng/common/templates/job/source-build.yml",
    "content": "jobs:\n- template: /eng/common/core-templates/job/source-build.yml\n  parameters:\n    is1ESPipeline: false\n\n    ${{ each parameter in parameters }}:\n      ${{ parameter.key }}: ${{ parameter.value }}\n"
  },
  {
    "path": "eng/common/templates/job/source-index-stage1.yml",
    "content": "jobs:\n- template: /eng/common/core-templates/job/source-index-stage1.yml\n  parameters:\n    is1ESPipeline: false\n\n    ${{ each parameter in parameters }}:\n      ${{ parameter.key }}: ${{ parameter.value }}\n"
  },
  {
    "path": "eng/common/templates/jobs/jobs.yml",
    "content": "jobs:\n- template: /eng/common/core-templates/jobs/jobs.yml\n  parameters:\n    is1ESPipeline: false\n\n    ${{ each parameter in parameters }}:\n      ${{ parameter.key }}: ${{ parameter.value }}\n"
  },
  {
    "path": "eng/common/templates/jobs/source-build.yml",
    "content": "jobs:\n- template: /eng/common/core-templates/jobs/source-build.yml\n  parameters:\n    is1ESPipeline: false\n\n    ${{ each parameter in parameters }}:\n      ${{ parameter.key }}: ${{ parameter.value }}"
  },
  {
    "path": "eng/common/templates/post-build/common-variables.yml",
    "content": "variables:\n- template: /eng/common/core-templates/post-build/common-variables.yml\n  parameters:\n    # Specifies whether to use 1ES\n    is1ESPipeline: false\n\n    ${{ each parameter in parameters }}:\n      ${{ parameter.key }}: ${{ parameter.value }}"
  },
  {
    "path": "eng/common/templates/post-build/post-build.yml",
    "content": "stages:\n- template: /eng/common/core-templates/post-build/post-build.yml\n  parameters:\n    # Specifies whether to use 1ES\n    is1ESPipeline: false\n\n    ${{ each parameter in parameters }}:\n      ${{ parameter.key }}: ${{ parameter.value }}"
  },
  {
    "path": "eng/common/templates/post-build/setup-maestro-vars.yml",
    "content": "steps:\n- template: /eng/common/core-templates/post-build/setup-maestro-vars.yml\n  parameters:\n    # Specifies whether to use 1ES\n    is1ESPipeline: false\n\n    ${{ each parameter in parameters }}:\n      ${{ parameter.key }}: ${{ parameter.value }}"
  },
  {
    "path": "eng/common/templates/steps/enable-internal-runtimes.yml",
    "content": "# Obtains internal runtime download credentials and populates the 'dotnetbuilds-internal-container-read-token-base64'\n# variable with the base64-encoded SAS token, by default\n\nsteps:\n- template: /eng/common/core-templates/steps/enable-internal-runtimes.yml\n  parameters:\n    is1ESPipeline: false\n\n    ${{ each parameter in parameters }}:\n      ${{ parameter.key }}: ${{ parameter.value }}\n"
  },
  {
    "path": "eng/common/templates/steps/enable-internal-sources.yml",
    "content": "steps:\n- template: /eng/common/core-templates/steps/enable-internal-sources.yml\n  parameters:\n    is1ESPipeline: false\n\n    ${{ each parameter in parameters }}:\n      ${{ parameter.key }}: ${{ parameter.value }}"
  },
  {
    "path": "eng/common/templates/steps/generate-sbom.yml",
    "content": "steps:\n- template: /eng/common/core-templates/steps/generate-sbom.yml\n  parameters:\n    is1ESPipeline: false\n\n    ${{ each parameter in parameters }}:\n      ${{ parameter.key }}: ${{ parameter.value }}\n"
  },
  {
    "path": "eng/common/templates/steps/get-delegation-sas.yml",
    "content": "steps:\n- template: /eng/common/core-templates/steps/get-delegation-sas.yml\n  parameters:\n    is1ESPipeline: false\n\n    ${{ each parameter in parameters }}:\n      ${{ parameter.key }}: ${{ parameter.value }}\n"
  },
  {
    "path": "eng/common/templates/steps/get-federated-access-token.yml",
    "content": "steps:\n- template: /eng/common/core-templates/steps/get-federated-access-token.yml\n  parameters:\n    is1ESPipeline: false\n\n    ${{ each parameter in parameters }}:\n      ${{ parameter.key }}: ${{ parameter.value }}"
  },
  {
    "path": "eng/common/templates/steps/publish-build-artifacts.yml",
    "content": "parameters:\n- name: is1ESPipeline\n  type: boolean\n  default: false\n\n- name: displayName\n  type: string\n  default: 'Publish to Build Artifact'\n\n- name: condition\n  type: string\n  default: succeeded()\n\n- name: artifactName\n  type: string\n\n- name: pathToPublish\n  type: string\n\n- name: continueOnError\n  type: boolean\n  default: false\n\n- name: publishLocation\n  type: string\n  default: 'Container'\n\n- name: retryCountOnTaskFailure\n  type: string\n  default: 10\n\nsteps:\n- ${{ if eq(parameters.is1ESPipeline, true) }}:\n  - 'eng/common/templates cannot be referenced from a 1ES managed template': error\n- task: PublishBuildArtifacts@1\n  displayName: ${{ parameters.displayName }}\n  condition: ${{ parameters.condition }}\n  ${{ if parameters.continueOnError }}:\n    continueOnError: ${{ parameters.continueOnError }}\n  inputs:\n    PublishLocation: ${{ parameters.publishLocation }}  \n    PathtoPublish: ${{ parameters.pathToPublish }}\n    ${{ if parameters.artifactName }}:\n      ArtifactName: ${{ parameters.artifactName }}\n    ${{ if parameters.retryCountOnTaskFailure }}:\n      retryCountOnTaskFailure: ${{ parameters.retryCountOnTaskFailure }}\n"
  },
  {
    "path": "eng/common/templates/steps/publish-logs.yml",
    "content": "steps:\n- template: /eng/common/core-templates/steps/publish-logs.yml\n  parameters:\n    is1ESPipeline: false\n\n    ${{ each parameter in parameters }}:\n      ${{ parameter.key }}: ${{ parameter.value }}\n"
  },
  {
    "path": "eng/common/templates/steps/publish-pipeline-artifacts.yml",
    "content": "parameters:\n- name: is1ESPipeline\n  type: boolean\n  default: false\n\n- name: args\n  type: object\n  default: {}\n\nsteps:\n- ${{ if eq(parameters.is1ESPipeline, true) }}:\n  - 'eng/common/templates cannot be referenced from a 1ES managed template': error\n- task: PublishPipelineArtifact@1\n  displayName: ${{ coalesce(parameters.args.displayName, 'Publish to Build Artifact') }}\n  ${{ if parameters.args.condition }}:\n    condition: ${{ parameters.args.condition }}\n  ${{ else }}:\n    condition: succeeded()\n  ${{ if parameters.args.continueOnError }}:\n    continueOnError: ${{ parameters.args.continueOnError }}\n  inputs:\n    targetPath: ${{ parameters.args.targetPath }}\n    ${{ if parameters.args.artifactName }}:\n      artifactName: ${{ parameters.args.artifactName }}\n    ${{ if parameters.args.publishLocation }}:\n      publishLocation: ${{ parameters.args.publishLocation }}\n    ${{ if parameters.args.fileSharePath }}:\n      fileSharePath: ${{ parameters.args.fileSharePath }}\n    ${{ if parameters.args.Parallel }}:\n      parallel: ${{ parameters.args.Parallel }}\n    ${{ if parameters.args.parallelCount }}:\n      parallelCount: ${{ parameters.args.parallelCount }}\n    ${{ if parameters.args.properties }}:\n      properties: ${{ parameters.args.properties }}"
  },
  {
    "path": "eng/common/templates/steps/retain-build.yml",
    "content": "steps:\n- template: /eng/common/core-templates/steps/retain-build.yml\n  parameters:\n    is1ESPipeline: false\n\n    ${{ each parameter in parameters }}:\n      ${{ parameter.key }}: ${{ parameter.value }}\n"
  },
  {
    "path": "eng/common/templates/steps/send-to-helix.yml",
    "content": "steps:\n- template: /eng/common/core-templates/steps/send-to-helix.yml\n  parameters:\n    is1ESPipeline: false\n\n    ${{ each parameter in parameters }}:\n      ${{ parameter.key }}: ${{ parameter.value }}\n"
  },
  {
    "path": "eng/common/templates/steps/source-build.yml",
    "content": "steps:\n- template: /eng/common/core-templates/steps/source-build.yml\n  parameters:\n    is1ESPipeline: false\n\n    ${{ each parameter in parameters }}:\n      ${{ parameter.key }}: ${{ parameter.value }}\n"
  },
  {
    "path": "eng/common/templates/steps/source-index-stage1-publish.yml",
    "content": "steps:\n- template: /eng/common/core-templates/steps/source-index-stage1-publish.yml\n  parameters:\n    is1ESPipeline: false\n\n    ${{ each parameter in parameters }}:\n      ${{ parameter.key }}: ${{ parameter.value }}\n"
  },
  {
    "path": "eng/common/templates/steps/vmr-sync.yml",
    "content": "### These steps synchronize new code from product repositories into the VMR (https://github.com/dotnet/dotnet).\n### They initialize the darc CLI and pull the new updates.\n### Changes are applied locally onto the already cloned VMR (located in $vmrPath).\n\nparameters:\n- name: targetRef\n  displayName: Target revision in dotnet/<repo> to synchronize\n  type: string\n  default: $(Build.SourceVersion)\n\n- name: vmrPath\n  displayName: Path where the dotnet/dotnet is checked out to\n  type: string\n  default: $(Agent.BuildDirectory)/vmr\n\n- name: additionalSyncs\n  displayName: Optional list of package names whose repo's source will also be synchronized in the local VMR, e.g. NuGet.Protocol\n  type: object\n  default: []\n\nsteps:\n- checkout: vmr\n  displayName: Clone dotnet/dotnet\n  path: vmr\n  clean: true\n\n- checkout: self\n  displayName: Clone $(Build.Repository.Name)\n  path: repo\n  fetchDepth: 0\n\n# This step is needed so that when we get a detached HEAD / shallow clone,\n# we still pull the commit into the temporary repo clone to use it during the sync.\n# Also unshallow the clone so that forwardflow command would work.\n- script: |\n    git branch repo-head\n    git rev-parse HEAD\n  displayName: Label PR commit\n  workingDirectory: $(Agent.BuildDirectory)/repo\n\n- script: |\n    git config --global user.name \"dotnet-maestro[bot]\"\n    git config --global user.email \"dotnet-maestro[bot]@users.noreply.github.com\"\n  displayName: Set git author to dotnet-maestro[bot]\n  workingDirectory: ${{ parameters.vmrPath }}\n\n- script: |\n    ./eng/common/vmr-sync.sh                         \\\n      --vmr ${{ parameters.vmrPath }}         \\\n      --tmp $(Agent.TempDirectory)            \\\n      --azdev-pat '$(dn-bot-all-orgs-code-r)' \\\n      --ci                                    \\\n      --debug\n\n    if [ \"$?\" -ne 0 ]; then\n      echo \"##vso[task.logissue type=error]Failed to synchronize the VMR\"\n      exit 1\n    fi\n  displayName: Sync repo into VMR (Unix)\n  condition: ne(variables['Agent.OS'], 'Windows_NT')\n  workingDirectory: $(Agent.BuildDirectory)/repo\n\n- script: |\n    git config --global diff.astextplain.textconv echo\n    git config --system core.longpaths true\n  displayName: Configure Windows git (longpaths, astextplain)\n  condition: eq(variables['Agent.OS'], 'Windows_NT')\n\n- powershell: |\n    ./eng/common/vmr-sync.ps1                      `\n      -vmr ${{ parameters.vmrPath }}        `\n      -tmp $(Agent.TempDirectory)           `\n      -azdevPat '$(dn-bot-all-orgs-code-r)' `\n      -ci                                   `\n      -debugOutput\n\n    if ($LASTEXITCODE -ne 0) {\n      echo \"##vso[task.logissue type=error]Failed to synchronize the VMR\"\n      exit 1\n    }\n  displayName: Sync repo into VMR (Windows)\n  condition: eq(variables['Agent.OS'], 'Windows_NT')\n  workingDirectory: $(Agent.BuildDirectory)/repo\n\n- ${{ if eq(variables['Build.Reason'], 'PullRequest') }}:\n  - task: CopyFiles@2\n    displayName: Collect failed patches\n    condition: failed()\n    inputs:\n      SourceFolder: '$(Agent.TempDirectory)'\n      Contents: '*.patch'\n      TargetFolder: '$(Build.ArtifactStagingDirectory)/FailedPatches'\n\n  - publish: '$(Build.ArtifactStagingDirectory)/FailedPatches'\n    artifact: $(System.JobDisplayName)_FailedPatches\n    displayName: Upload failed patches\n    condition: failed()\n\n- ${{ each assetName in parameters.additionalSyncs }}:\n  # The vmr-sync script ends up staging files in the local VMR so we have to commit those\n  - script:\n      git commit --allow-empty -am \"Forward-flow $(Build.Repository.Name)\"\n    displayName: Commit local VMR changes\n    workingDirectory: ${{ parameters.vmrPath }}\n\n  - script: |\n      set -ex\n\n      echo \"Searching for details of asset ${{ assetName }}...\"\n\n      # Use darc to get dependencies information\n      dependencies=$(./.dotnet/dotnet darc get-dependencies --name '${{ assetName }}' --ci)\n\n      # Extract repository URL and commit hash\n      repository=$(echo \"$dependencies\" | grep 'Repo:' | sed 's/Repo:[[:space:]]*//' | head -1)\n\n      if [ -z \"$repository\" ]; then\n        echo \"##vso[task.logissue type=error]Asset ${{ assetName }} not found in the dependency list\"\n        exit 1\n      fi\n\n      commit=$(echo \"$dependencies\" | grep 'Commit:' | sed 's/Commit:[[:space:]]*//' | head -1)\n\n      echo \"Updating the VMR from $repository / $commit...\"\n      cd ..\n      git clone $repository ${{ assetName }}\n      cd ${{ assetName }}\n      git checkout $commit\n      git branch \"sync/$commit\"\n\n      ./eng/common/vmr-sync.sh                         \\\n        --vmr ${{ parameters.vmrPath }}         \\\n        --tmp $(Agent.TempDirectory)            \\\n        --azdev-pat '$(dn-bot-all-orgs-code-r)' \\\n        --ci                                    \\\n        --debug\n\n      if [ \"$?\" -ne 0 ]; then\n        echo \"##vso[task.logissue type=error]Failed to synchronize the VMR\"\n        exit 1\n      fi\n    displayName: Sync ${{ assetName }} into (Unix)\n    condition: ne(variables['Agent.OS'], 'Windows_NT')\n    workingDirectory: $(Agent.BuildDirectory)/repo\n\n  - powershell: |\n      $ErrorActionPreference = 'Stop'\n\n      Write-Host \"Searching for details of asset ${{ assetName }}...\"\n\n      $dependencies = .\\.dotnet\\dotnet darc get-dependencies --name '${{ assetName }}' --ci\n\n      $repository = $dependencies | Select-String -Pattern 'Repo:\\s+([^\\s]+)' | Select-Object -First 1\n      $repository -match 'Repo:\\s+([^\\s]+)' | Out-Null\n      $repository = $matches[1]\n\n      if ($repository -eq $null) {\n          Write-Error \"Asset ${{ assetName }} not found in the dependency list\"\n          exit 1\n      }\n\n      $commit = $dependencies | Select-String -Pattern 'Commit:\\s+([^\\s]+)' | Select-Object -First 1\n      $commit -match 'Commit:\\s+([^\\s]+)' | Out-Null\n      $commit = $matches[1]\n\n      Write-Host \"Updating the VMR from $repository / $commit...\"\n      cd ..\n      git clone $repository ${{ assetName }}\n      cd ${{ assetName }}\n      git checkout $commit\n      git branch \"sync/$commit\"\n\n      .\\eng\\common\\vmr-sync.ps1 `\n        -vmr ${{ parameters.vmrPath }}             `\n        -tmp $(Agent.TempDirectory)                `\n        -azdevPat '$(dn-bot-all-orgs-code-r)'      `\n        -ci                                        `\n        -debugOutput\n\n      if ($LASTEXITCODE -ne 0) {\n        echo \"##vso[task.logissue type=error]Failed to synchronize the VMR\"\n        exit 1\n      }\n    displayName: Sync ${{ assetName }} into (Windows)\n    condition: ne(variables['Agent.OS'], 'Windows_NT')\n    workingDirectory: $(Agent.BuildDirectory)/repo\n"
  },
  {
    "path": "eng/common/templates/variables/pool-providers.yml",
    "content": "# Select a pool provider based off branch name. Anything with branch name containing 'release' must go into an -Svc pool,\n# otherwise it should go into the \"normal\" pools. This separates out the queueing and billing of released branches.\n\n# Motivation:\n#   Once a given branch of a repository's output has been officially \"shipped\" once, it is then considered to be COGS\n#   (Cost of goods sold) and should be moved to a servicing pool provider. This allows both separation of queueing\n#   (allowing release builds and main PR builds to not intefere with each other) and billing (required for COGS.\n#   Additionally, the pool provider name itself may be subject to change when the .NET Core Engineering Services\n#   team needs to move resources around and create new and potentially differently-named pools. Using this template\n#   file from an Arcade-ified repo helps guard against both having to update one's release/* branches and renaming.\n\n# How to use:\n#  This yaml assumes your shipped product branches use the naming convention \"release/...\" (which many do).\n#  If we find alternate naming conventions in broad usage it can be added to the condition below.\n#\n#  First, import the template in an arcade-ified repo to pick up the variables, e.g.:\n#\n#  variables:\n#  - template: /eng/common/templates/variables/pool-providers.yml\n#\n#  ... then anywhere specifying the pool provider use the runtime variables,\n#      $(DncEngInternalBuildPool) and $  (DncEngPublicBuildPool), e.g.:\n#\n#        pool:\n#           name: $(DncEngInternalBuildPool)\n#           demands: ImageOverride -equals windows.vs2026.amd64\nvariables:\n  - ${{ if eq(variables['System.TeamProject'], 'internal') }}:\n    - template: /eng/common/templates-official/variables/pool-providers.yml\n  - ${{ else }}:\n    # Coalesce the target and source branches so we know when a PR targets a release branch\n    # If these variables are somehow missing, fall back to main (tends to have more capacity)\n\n    # Any new -Svc alternative pools should have variables added here to allow for splitting work\n    - name: DncEngPublicBuildPool\n      value: $[\n          replace(\n            replace(\n              eq(contains(coalesce(variables['System.PullRequest.TargetBranch'], variables['Build.SourceBranch'], 'refs/heads/main'), 'release'), 'true'),\n              True,\n              'NetCore-Svc-Public'\n            ),\n            False,\n            'NetCore-Public'\n          )\n        ]\n\n    - name: DncEngInternalBuildPool\n      value: $[\n          replace(\n            replace(\n              eq(contains(coalesce(variables['System.PullRequest.TargetBranch'], variables['Build.SourceBranch'], 'refs/heads/main'), 'release'), 'true'),\n              True,\n              'NetCore1ESPool-Svc-Internal'\n            ),\n            False,\n            'NetCore1ESPool-Internal'\n          )\n        ]\n"
  },
  {
    "path": "eng/common/templates/vmr-build-pr.yml",
    "content": "# This pipeline is used for running the VMR verification of the PR changes in repo-level PRs.\n#\n# It will run a full set of verification jobs defined in:\n# https://github.com/dotnet/dotnet/blob/10060d128e3f470e77265f8490f5e4f72dae738e/eng/pipelines/templates/stages/vmr-build.yml#L27-L38\n#\n# For repos that do not need to run the full set, you would do the following:\n#\n# 1. Copy this YML file to a repo-specific location, i.e. outside of eng/common.\n#\n# 2. Add `verifications` parameter to VMR template reference\n#\n#    Examples:\n#    - For source-build stage 1 verification, add the following:\n#        verifications: [ \"source-build-stage1\" ]\n#\n#    - For Windows only verifications, add the following:\n#        verifications: [ \"unified-build-windows-x64\", \"unified-build-windows-x86\" ]\n\ntrigger: none\npr: none\n\nvariables:\n- template: /eng/common/templates/variables/pool-providers.yml@self\n\n- name: skipComponentGovernanceDetection  # we run CG on internal builds only\n  value: true\n\n- name: Codeql.Enabled  # we run CodeQL on internal builds only\n  value: false\n\nresources:\n  repositories:\n  - repository: vmr\n    type: github\n    name: dotnet/dotnet\n    endpoint: dotnet\n    ref: refs/heads/main # Set to whatever VMR branch the PR build should insert into\n\nstages:\n- template: /eng/pipelines/templates/stages/vmr-build.yml@vmr\n  parameters:\n    isBuiltFromVmr: false\n    scope: lite\n"
  },
  {
    "path": "eng/common/templates-official/job/job.yml",
    "content": "parameters:\n  runAsPublic: false\n# Sbom related params, unused now and can eventually be removed\n  enableSbom: unused\n  PackageVersion: unused\n  BuildDropPath: unused\n\njobs:\n- template: /eng/common/core-templates/job/job.yml\n  parameters:\n    is1ESPipeline: true\n\n    # publish artifacts\n    # for 1ES managed templates, use the templateContext.output to handle multiple outputs.\n    templateContext:\n      outputParentDirectory: $(Build.ArtifactStagingDirectory)\n      outputs:\n      - ${{ if ne(parameters.artifacts.publish, '') }}:\n        - ${{ if and(ne(parameters.artifacts.publish.artifacts, 'false'), ne(parameters.artifacts.publish.artifacts, '')) }}:\n          - output: pipelineArtifact\n            displayName: Publish pipeline artifacts\n            targetPath: '$(Build.ArtifactStagingDirectory)/artifacts'\n            artifactName: ${{ coalesce(parameters.artifacts.publish.artifacts.name , 'Artifacts_$(Agent.Os)_$(_BuildConfig)') }}\n            condition: succeeded()\n            retryCountOnTaskFailure: 10 # for any files being locked\n            continueOnError: true\n          - output: pipelineArtifact\n            displayName: Publish pipeline artifacts\n            targetPath: '$(Build.ArtifactStagingDirectory)/artifacts'\n            artifactName: ${{ coalesce(parameters.artifacts.publish.artifacts.name , 'Artifacts_$(Agent.Os)_$(_BuildConfig)') }}_Attempt$(System.JobAttempt)\n            condition: not(succeeded())\n            retryCountOnTaskFailure: 10 # for any files being locked\n            continueOnError: true\n        - ${{ if and(ne(parameters.artifacts.publish.logs, 'false'), ne(parameters.artifacts.publish.logs, '')) }}:\n          - output: pipelineArtifact\n            targetPath: '$(Build.ArtifactStagingDirectory)/artifacts/log'\n            artifactName: ${{ coalesce(parameters.artifacts.publish.logs.name, 'Logs_Build_$(Agent.Os)_$(_BuildConfig)_Attempt$(System.JobAttempt)') }}\n            displayName: 'Publish logs'\n            continueOnError: true\n            condition: always()\n            retryCountOnTaskFailure: 10 # for any files being locked\n            isProduction: false # logs are non-production artifacts\n\n      - ${{ if eq(parameters.enablePublishBuildArtifacts, true) }}:\n        - output: pipelineArtifact\n          displayName: Publish Logs\n          targetPath: '$(Build.ArtifactStagingDirectory)/artifacts/log/$(_BuildConfig)'\n          artifactName: ${{ coalesce(parameters.enablePublishBuildArtifacts.artifactName, '$(Agent.Os)_$(Agent.JobName)_Attempt$(System.JobAttempt)' ) }}\n          continueOnError: true\n          condition: always()\n          retryCountOnTaskFailure: 10 # for any files being locked\n          isProduction: false # logs are non-production artifacts\n\n      - ${{ if eq(parameters.enableBuildRetry, 'true') }}:\n        - output: pipelineArtifact\n          targetPath: '$(Build.ArtifactStagingDirectory)/artifacts/eng/common/BuildConfiguration'\n          artifactName: 'BuildConfiguration'\n          displayName: 'Publish build retry configuration'\n          continueOnError: true\n          retryCountOnTaskFailure: 10 # for any files being locked\n          isProduction: false # BuildConfiguration is a non-production artifact\n\n      # V4 publishing: automatically publish staged artifacts as a pipeline artifact.\n      # The artifact name matches the SDK's FutureArtifactName ($(System.PhaseName)_Artifacts),\n      # which is encoded in the asset manifest for downstream publishing to discover.\n      # Jobs can opt in by setting enablePublishing: true.\n      - ${{ if and(eq(parameters.publishingVersion, 4), eq(parameters.enablePublishing, 'true')) }}:\n        - output: pipelineArtifact\n          displayName: 'Publish V4 pipeline artifacts'\n          targetPath: '$(Build.ArtifactStagingDirectory)/artifacts'\n          artifactName: '$(System.PhaseName)_Artifacts'\n          continueOnError: true\n          retryCountOnTaskFailure: 10 # for any files being locked\n\n      # add any outputs provided via root yaml\n      - ${{ if ne(parameters.templateContext.outputs, '') }}:\n        - ${{ each output in parameters.templateContext.outputs }}:\n          - ${{ output }}\n      \n      # add any remaining templateContext properties\n      ${{ each context in parameters.templateContext }}:\n        ${{ if and(ne(context.key, 'outputParentDirectory'), ne(context.key, 'outputs')) }}:\n          ${{ context.key }}: ${{ context.value }}\n\n    ${{ each parameter in parameters }}:\n      ${{ if and(ne(parameter.key, 'templateContext'), ne(parameter.key, 'is1ESPipeline')) }}:\n        ${{ parameter.key }}: ${{ parameter.value }}\n"
  },
  {
    "path": "eng/common/templates-official/job/onelocbuild.yml",
    "content": "jobs:\n- template: /eng/common/core-templates/job/onelocbuild.yml\n  parameters:\n    is1ESPipeline: true\n\n    ${{ each parameter in parameters }}:\n      ${{ parameter.key }}: ${{ parameter.value }}\n"
  },
  {
    "path": "eng/common/templates-official/job/publish-build-assets.yml",
    "content": "jobs:\n- template: /eng/common/core-templates/job/publish-build-assets.yml\n  parameters:\n    is1ESPipeline: true\n\n    ${{ each parameter in parameters }}:\n      ${{ parameter.key }}: ${{ parameter.value }}\n"
  },
  {
    "path": "eng/common/templates-official/job/source-build.yml",
    "content": "jobs:\n- template: /eng/common/core-templates/job/source-build.yml\n  parameters:\n    is1ESPipeline: true\n\n    ${{ each parameter in parameters }}:\n      ${{ parameter.key }}: ${{ parameter.value }}\n"
  },
  {
    "path": "eng/common/templates-official/job/source-index-stage1.yml",
    "content": "jobs:\n- template: /eng/common/core-templates/job/source-index-stage1.yml\n  parameters:\n    is1ESPipeline: true\n\n    ${{ each parameter in parameters }}:\n      ${{ parameter.key }}: ${{ parameter.value }}\n"
  },
  {
    "path": "eng/common/templates-official/jobs/jobs.yml",
    "content": "jobs:\n- template: /eng/common/core-templates/jobs/jobs.yml\n  parameters:\n    is1ESPipeline: true\n\n    ${{ each parameter in parameters }}:\n      ${{ parameter.key }}: ${{ parameter.value }}\n"
  },
  {
    "path": "eng/common/templates-official/jobs/source-build.yml",
    "content": "jobs:\n- template: /eng/common/core-templates/jobs/source-build.yml\n  parameters:\n    is1ESPipeline: true\n\n    ${{ each parameter in parameters }}:\n      ${{ parameter.key }}: ${{ parameter.value }}"
  },
  {
    "path": "eng/common/templates-official/post-build/common-variables.yml",
    "content": "variables:\n- template: /eng/common/core-templates/post-build/common-variables.yml\n  parameters:\n    # Specifies whether to use 1ES\n    is1ESPipeline: true\n\n    ${{ each parameter in parameters }}:\n      ${{ parameter.key }}: ${{ parameter.value }}"
  },
  {
    "path": "eng/common/templates-official/post-build/post-build.yml",
    "content": "stages:\n- template: /eng/common/core-templates/post-build/post-build.yml\n  parameters:\n    # Specifies whether to use 1ES\n    is1ESPipeline: true\n\n    ${{ each parameter in parameters }}:\n      ${{ parameter.key }}: ${{ parameter.value }}\n"
  },
  {
    "path": "eng/common/templates-official/post-build/setup-maestro-vars.yml",
    "content": "steps:\n- template: /eng/common/core-templates/post-build/setup-maestro-vars.yml\n  parameters:\n    # Specifies whether to use 1ES\n    is1ESPipeline: true\n\n    ${{ each parameter in parameters }}:\n      ${{ parameter.key }}: ${{ parameter.value }}"
  },
  {
    "path": "eng/common/templates-official/steps/enable-internal-runtimes.yml",
    "content": "# Obtains internal runtime download credentials and populates the 'dotnetbuilds-internal-container-read-token-base64'\n# variable with the base64-encoded SAS token, by default\nsteps:\n- template: /eng/common/core-templates/steps/enable-internal-runtimes.yml\n  parameters:\n    is1ESPipeline: true\n\n    ${{ each parameter in parameters }}:\n      ${{ parameter.key }}: ${{ parameter.value }}\n"
  },
  {
    "path": "eng/common/templates-official/steps/enable-internal-sources.yml",
    "content": "steps:\n- template: /eng/common/core-templates/steps/enable-internal-sources.yml\n  parameters:\n    is1ESPipeline: true\n\n    ${{ each parameter in parameters }}:\n      ${{ parameter.key }}: ${{ parameter.value }}"
  },
  {
    "path": "eng/common/templates-official/steps/generate-sbom.yml",
    "content": "steps:\n- template: /eng/common/core-templates/steps/generate-sbom.yml\n  parameters:\n    is1ESPipeline: true\n\n    ${{ each parameter in parameters }}:\n      ${{ parameter.key }}: ${{ parameter.value }}\n"
  },
  {
    "path": "eng/common/templates-official/steps/get-delegation-sas.yml",
    "content": "steps:\n- template: /eng/common/core-templates/steps/get-delegation-sas.yml\n  parameters:\n    is1ESPipeline: true\n\n    ${{ each parameter in parameters }}:\n      ${{ parameter.key }}: ${{ parameter.value }}\n"
  },
  {
    "path": "eng/common/templates-official/steps/get-federated-access-token.yml",
    "content": "steps:\n- template: /eng/common/core-templates/steps/get-federated-access-token.yml\n  parameters:\n    is1ESPipeline: true\n\n    ${{ each parameter in parameters }}:\n      ${{ parameter.key }}: ${{ parameter.value }}"
  },
  {
    "path": "eng/common/templates-official/steps/publish-build-artifacts.yml",
    "content": "parameters:\n- name: displayName\n  type: string\n  default: 'Publish to Build Artifact'\n\n- name: condition\n  type: string\n  default: succeeded()\n\n- name: artifactName\n  type: string\n\n- name: pathToPublish\n  type: string\n\n- name: continueOnError\n  type: boolean\n  default: false\n\n- name: publishLocation\n  type: string\n  default: 'Container'\n\n- name: is1ESPipeline\n  type: boolean\n  default: true\n\n- name: retryCountOnTaskFailure\n  type: string\n  default: 10\n  \nsteps:\n- ${{ if ne(parameters.is1ESPipeline, true) }}:\n  - 'eng/common/templates-official cannot be referenced from a non-1ES managed template': error\n- task: 1ES.PublishBuildArtifacts@1\n  displayName: ${{ parameters.displayName }}\n  condition: ${{ parameters.condition }}\n  ${{ if parameters.continueOnError }}:\n    continueOnError: ${{ parameters.continueOnError }}\n  inputs:\n    PublishLocation: ${{ parameters.publishLocation }}\n    PathtoPublish: ${{ parameters.pathToPublish }}\n    ${{ if parameters.artifactName }}:\n      ArtifactName: ${{ parameters.artifactName }}\n    ${{ if parameters.retryCountOnTaskFailure }}:\n      retryCountOnTaskFailure: ${{ parameters.retryCountOnTaskFailure }}\n"
  },
  {
    "path": "eng/common/templates-official/steps/publish-logs.yml",
    "content": "steps:\n- template: /eng/common/core-templates/steps/publish-logs.yml\n  parameters:\n    is1ESPipeline: true\n\n    ${{ each parameter in parameters }}:\n      ${{ parameter.key }}: ${{ parameter.value }}\n"
  },
  {
    "path": "eng/common/templates-official/steps/publish-pipeline-artifacts.yml",
    "content": "parameters:\n- name: is1ESPipeline\n  type: boolean\n  default: true\n\n- name: args\n  type: object\n  default: {}\n\nsteps:\n- ${{ if ne(parameters.is1ESPipeline, true) }}:\n  - 'eng/common/templates-official cannot be referenced from a non-1ES managed template': error\n- task: 1ES.PublishPipelineArtifact@1\n  displayName: ${{ coalesce(parameters.args.displayName, 'Publish to Build Artifact') }}\n  ${{ if parameters.args.condition }}:\n    condition: ${{ parameters.args.condition }}\n  ${{ else }}:\n    condition: succeeded()\n  ${{ if parameters.args.continueOnError }}:\n    continueOnError: ${{ parameters.args.continueOnError }}\n  inputs:\n    targetPath: ${{ parameters.args.targetPath }}\n    ${{ if parameters.args.artifactName }}:\n      artifactName: ${{ parameters.args.artifactName }}\n    ${{ if parameters.args.properties }}:\n      properties: ${{ parameters.args.properties }}\n    ${{ if ne(parameters.args.sbomEnabled, '') }}:\n      sbomEnabled: ${{ parameters.args.sbomEnabled }}\n    ${{ if ne(parameters.args.isProduction, '') }}:\n      isProduction: ${{ parameters.args.isProduction }}\n"
  },
  {
    "path": "eng/common/templates-official/steps/retain-build.yml",
    "content": "steps:\n- template: /eng/common/core-templates/steps/retain-build.yml\n  parameters:\n    is1ESPipeline: true\n\n    ${{ each parameter in parameters }}:\n      ${{ parameter.key }}: ${{ parameter.value }}\n"
  },
  {
    "path": "eng/common/templates-official/steps/send-to-helix.yml",
    "content": "steps:\n- template: /eng/common/core-templates/steps/send-to-helix.yml\n  parameters:\n    is1ESPipeline: true\n\n    ${{ each parameter in parameters }}:\n      ${{ parameter.key }}: ${{ parameter.value }}\n"
  },
  {
    "path": "eng/common/templates-official/steps/source-build.yml",
    "content": "steps:\n- template: /eng/common/core-templates/steps/source-build.yml\n  parameters:\n    is1ESPipeline: true\n\n    ${{ each parameter in parameters }}:\n      ${{ parameter.key }}: ${{ parameter.value }}\n"
  },
  {
    "path": "eng/common/templates-official/steps/source-index-stage1-publish.yml",
    "content": "steps:\n- template: /eng/common/core-templates/steps/source-index-stage1-publish.yml\n  parameters:\n    is1ESPipeline: true\n\n    ${{ each parameter in parameters }}:\n      ${{ parameter.key }}: ${{ parameter.value }}\n"
  },
  {
    "path": "eng/common/templates-official/variables/pool-providers.yml",
    "content": "# Select a pool provider based off branch name. Anything with branch name containing 'release' must go into an -Svc pool, \n# otherwise it should go into the \"normal\" pools. This separates out the queueing and billing of released branches.\n\n# Motivation: \n#   Once a given branch of a repository's output has been officially \"shipped\" once, it is then considered to be COGS\n#   (Cost of goods sold) and should be moved to a servicing pool provider. This allows both separation of queueing\n#   (allowing release builds and main PR builds to not intefere with each other) and billing (required for COGS.\n#   Additionally, the pool provider name itself may be subject to change when the .NET Core Engineering Services \n#   team needs to move resources around and create new and potentially differently-named pools. Using this template \n#   file from an Arcade-ified repo helps guard against both having to update one's release/* branches and renaming.\n\n# How to use: \n#  This yaml assumes your shipped product branches use the naming convention \"release/...\" (which many do).\n#  If we find alternate naming conventions in broad usage it can be added to the condition below.\n#\n#  First, import the template in an arcade-ified repo to pick up the variables, e.g.:\n#\n#  variables:\n#  - template: /eng/common/templates-official/variables/pool-providers.yml\n#\n#  ... then anywhere specifying the pool provider use the runtime variables,\n#      $(DncEngInternalBuildPool)\n#\n#        pool:\n#           name: $(DncEngInternalBuildPool)\n#           image: windows.vs2026.amd64\n\nvariables:\n  # Coalesce the target and source branches so we know when a PR targets a release branch\n  # If these variables are somehow missing, fall back to main (tends to have more capacity)\n\n  # Any new -Svc alternative pools should have variables added here to allow for splitting work\n\n  - name: DncEngInternalBuildPool\n    value: $[\n        replace(\n          replace(\n            eq(contains(coalesce(variables['System.PullRequest.TargetBranch'], variables['Build.SourceBranch'], 'refs/heads/main'), 'release'), 'true'),\n            True,\n            'NetCore1ESPool-Svc-Internal'\n          ),\n          False,\n          'NetCore1ESPool-Internal'\n        )\n      ]"
  },
  {
    "path": "eng/common/tools.ps1",
    "content": "# Initialize variables if they aren't already defined.\n# These may be defined as parameters of the importing script, or set after importing this script.\n\n# CI mode - set to true on CI server for PR validation build or official build.\n[bool]$ci = if (Test-Path variable:ci) { $ci } else { $false }\n\n# Build configuration. Common values include 'Debug' and 'Release', but the repository may use other names.\n[string]$configuration = if (Test-Path variable:configuration) { $configuration } else { 'Debug' }\n\n# Set to true to opt out of outputting binary log while running in CI\n[bool]$excludeCIBinarylog = if (Test-Path variable:excludeCIBinarylog) { $excludeCIBinarylog } else { $false }\n\n# Set to true to output binary log from msbuild. Note that emitting binary log slows down the build.\n[bool]$binaryLog = if (Test-Path variable:binaryLog) { $binaryLog } else { $ci -and !$excludeCIBinarylog }\n\n# Set to true to use the pipelines logger which will enable Azure logging output.\n# https://github.com/Microsoft/azure-pipelines-tasks/blob/master/docs/authoring/commands.md\n# This flag is meant as a temporary opt-opt for the feature while validate it across\n# our consumers. It will be deleted in the future.\n[bool]$pipelinesLog = if (Test-Path variable:pipelinesLog) { $pipelinesLog } else { $ci }\n\n# Turns on machine preparation/clean up code that changes the machine state (e.g. kills build processes).\n[bool]$prepareMachine = if (Test-Path variable:prepareMachine) { $prepareMachine } else { $false }\n\n# True to restore toolsets and dependencies.\n[bool]$restore = if (Test-Path variable:restore) { $restore } else { $true }\n\n# Adjusts msbuild verbosity level.\n[string]$verbosity = if (Test-Path variable:verbosity) { $verbosity } else { 'minimal' }\n\n# Set to true to reuse msbuild nodes. Recommended to not reuse on CI.\n[bool]$nodeReuse = if (Test-Path variable:nodeReuse) { $nodeReuse } else { !$ci }\n\n# Configures warning treatment in msbuild.\n[bool]$warnAsError = if (Test-Path variable:warnAsError) { $warnAsError } else { $true }\n\n# Specifies semi-colon delimited list of warning codes that should not be treated as errors.\n[string]$warnNotAsError = if (Test-Path variable:warnNotAsError) { $warnNotAsError } else { '' }\n\n# Specifies which msbuild engine to use for build: 'vs', 'dotnet' or unspecified (determined based on presence of tools.vs in global.json).\n[string]$msbuildEngine = if (Test-Path variable:msbuildEngine) { $msbuildEngine } else { $null }\n\n# True to attempt using .NET Core already that meets requirements specified in global.json\n# installed on the machine instead of downloading one.\n[bool]$useInstalledDotNetCli = if (Test-Path variable:useInstalledDotNetCli) { $useInstalledDotNetCli } else { $true }\n\n# Enable repos to use a particular version of the on-line dotnet-install scripts.\n#    default URL: https://builds.dotnet.microsoft.com/dotnet/scripts/v1/dotnet-install.ps1\n[string]$dotnetInstallScriptVersion = if (Test-Path variable:dotnetInstallScriptVersion) { $dotnetInstallScriptVersion } else { 'v1' }\n\n# True to use global NuGet cache instead of restoring packages to repository-local directory.\n[bool]$useGlobalNuGetCache = if (Test-Path variable:useGlobalNuGetCache) { $useGlobalNuGetCache } else { !$ci }\n\n# True to exclude prerelease versions Visual Studio during build\n[bool]$excludePrereleaseVS = if (Test-Path variable:excludePrereleaseVS) { $excludePrereleaseVS } else { $false }\n\n# An array of names of processes to stop on script exit if prepareMachine is true.\n$processesToStopOnExit = if (Test-Path variable:processesToStopOnExit) { $processesToStopOnExit } else { @('msbuild', 'dotnet', 'vbcscompiler') }\n\n$disableConfigureToolsetImport = if (Test-Path variable:disableConfigureToolsetImport) { $disableConfigureToolsetImport } else { $null }\n\nset-strictmode -version 2.0\n$ErrorActionPreference = 'Stop'\n[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12\n\n# If specifies, provides an alternate path for getting .NET Core SDKs and Runtimes. This script will still try public sources first.\n[string]$runtimeSourceFeed = if (Test-Path variable:runtimeSourceFeed) { $runtimeSourceFeed } else { $null }\n# Base-64 encoded SAS token that has permission to storage container described by $runtimeSourceFeed\n[string]$runtimeSourceFeedKey = if (Test-Path variable:runtimeSourceFeedKey) { $runtimeSourceFeedKey } else { $null }\n\n# True when the build is running within the VMR.\n[bool]$fromVMR = if (Test-Path variable:fromVMR) { $fromVMR } else { $false }\n\nfunction Create-Directory ([string[]] $path) {\n    New-Item -Path $path -Force -ItemType 'Directory' | Out-Null\n}\n\nfunction Unzip([string]$zipfile, [string]$outpath) {\n  Add-Type -AssemblyName System.IO.Compression.FileSystem\n  [System.IO.Compression.ZipFile]::ExtractToDirectory($zipfile, $outpath)\n}\n\n# This will exec a process using the console and return it's exit code.\n# This will not throw when the process fails.\n# Returns process exit code.\nfunction Exec-Process([string]$command, [string]$commandArgs) {\n  $startInfo = New-Object System.Diagnostics.ProcessStartInfo\n  $startInfo.FileName = $command\n  $startInfo.Arguments = $commandArgs\n  $startInfo.UseShellExecute = $false\n  $startInfo.WorkingDirectory = Get-Location\n\n  $process = New-Object System.Diagnostics.Process\n  $process.StartInfo = $startInfo\n  $process.Start() | Out-Null\n\n  $finished = $false\n  try {\n    while (-not $process.WaitForExit(100)) {\n      # Non-blocking loop done to allow ctr-c interrupts\n    }\n\n    $finished = $true\n    return $global:LASTEXITCODE = $process.ExitCode\n  }\n  finally {\n    # If we didn't finish then an error occurred or the user hit ctrl-c.  Either\n    # way kill the process\n    if (-not $finished) {\n      $process.Kill()\n    }\n  }\n}\n\n# Take the given block, print it, print what the block probably references from the current set of\n# variables using low-effort string matching, then run the block.\n#\n# This is intended to replace the pattern of manually copy-pasting a command, wrapping it in quotes,\n# and printing it using \"Write-Host\". The copy-paste method is more readable in build logs, but less\n# maintainable and less reliable. It is easy to make a mistake and modify the command without\n# properly updating the \"Write-Host\" line, resulting in misleading build logs. The probability of\n# this mistake makes the pattern hard to trust when it shows up in build logs. Finding the bug in\n# existing source code can also be difficult, because the strings are not aligned to each other and\n# the line may be 300+ columns long.\n#\n# By removing the need to maintain two copies of the command, Exec-BlockVerbosely avoids the issues.\n#\n# In Bash (or any posix-like shell), \"set -x\" prints usable verbose output automatically.\n# \"Set-PSDebug\" appears to be similar at first glance, but unfortunately, it isn't very useful: it\n# doesn't print any info about the variables being used by the command, which is normally the\n# interesting part to diagnose.\nfunction Exec-BlockVerbosely([scriptblock] $block) {\n  Write-Host \"--- Running script block:\"\n  $blockString = $block.ToString().Trim()\n  Write-Host $blockString\n\n  Write-Host \"--- List of variables that might be used:\"\n  # For each variable x in the environment, check the block for a reference to x via simple \"$x\" or\n  # \"@x\" syntax. This doesn't detect other ways to reference variables (\"${x}\" nor \"$variable:x\",\n  # among others). It only catches what this function was originally written for: simple\n  # command-line commands.\n  $variableTable = Get-Variable |\n    Where-Object {\n      $blockString.Contains(\"`$$($_.Name)\") -or $blockString.Contains(\"@$($_.Name)\")\n    } |\n    Format-Table -AutoSize -HideTableHeaders -Wrap |\n    Out-String\n  Write-Host $variableTable.Trim()\n\n  Write-Host \"--- Executing:\"\n  & $block\n  Write-Host \"--- Done running script block!\"\n}\n\n# createSdkLocationFile parameter enables a file being generated under the toolset directory\n# which writes the sdk's location into. This is only necessary for cmd --> powershell invocations\n# as dot sourcing isn't possible.\nfunction InitializeDotNetCli([bool]$install, [bool]$createSdkLocationFile) {\n  if (Test-Path variable:global:_DotNetInstallDir) {\n    return $global:_DotNetInstallDir\n  }\n\n  # Disable first run since we do not need all ASP.NET packages restored.\n  $env:DOTNET_NOLOGO=1\n\n  # Disable telemetry on CI.\n  if ($ci) {\n    $env:DOTNET_CLI_TELEMETRY_OPTOUT=1\n  }\n\n  # Find the first path on %PATH% that contains the dotnet.exe\n  if ($useInstalledDotNetCli -and (-not $globalJsonHasRuntimes) -and ($env:DOTNET_INSTALL_DIR -eq $null)) {\n    $dotnetExecutable = GetExecutableFileName 'dotnet'\n    $dotnetCmd = Get-Command $dotnetExecutable -ErrorAction SilentlyContinue\n\n    if ($dotnetCmd -ne $null) {\n      $env:DOTNET_INSTALL_DIR = Split-Path $dotnetCmd.Path -Parent\n    }\n  }\n\n  $dotnetSdkVersion = $GlobalJson.tools.dotnet\n\n  # Use dotnet installation specified in DOTNET_INSTALL_DIR if it contains the required SDK version,\n  # otherwise install the dotnet CLI and SDK to repo local .dotnet directory to avoid potential permission issues.\n  if ((-not $globalJsonHasRuntimes) -and (-not [string]::IsNullOrEmpty($env:DOTNET_INSTALL_DIR)) -and (Test-Path(Join-Path $env:DOTNET_INSTALL_DIR \"sdk\\$dotnetSdkVersion\"))) {\n    $dotnetRoot = $env:DOTNET_INSTALL_DIR\n  } else {\n    if (-not [string]::IsNullOrEmpty($env:DOTNET_GLOBAL_INSTALL_DIR)) {\n      $dotnetRoot = $env:DOTNET_GLOBAL_INSTALL_DIR\n    } else {\n      $dotnetRoot = Join-Path $RepoRoot '.dotnet'\n    }\n\n    if (-not (Test-Path(Join-Path $dotnetRoot \"sdk\\$dotnetSdkVersion\"))) {\n      if ($install) {\n        InstallDotNetSdk $dotnetRoot $dotnetSdkVersion\n      } else {\n        Write-PipelineTelemetryError -Category 'InitializeToolset' -Message \"Unable to find dotnet with SDK version '$dotnetSdkVersion'\"\n        ExitWithExitCode 1\n      }\n    }\n\n    $env:DOTNET_INSTALL_DIR = $dotnetRoot\n  }\n\n  # Creates a temporary file under the toolset dir.\n  # The following code block is protecting against concurrent access so that this function can\n  # be called in parallel.\n  if ($createSdkLocationFile) {\n    do {\n      $sdkCacheFileTemp = Join-Path $ToolsetDir $([System.IO.Path]::GetRandomFileName())\n    }\n    until (!(Test-Path $sdkCacheFileTemp))\n    Set-Content -Path $sdkCacheFileTemp -Value $dotnetRoot\n\n    try {\n      Move-Item -Force $sdkCacheFileTemp (Join-Path $ToolsetDir 'sdk.txt')\n    } catch {\n      # Somebody beat us\n      Remove-Item -Path $sdkCacheFileTemp\n    }\n  }\n\n  # Add dotnet to PATH. This prevents any bare invocation of dotnet in custom\n  # build steps from using anything other than what we've downloaded.\n  # It also ensures that VS msbuild will use the downloaded sdk targets.\n  $env:PATH = \"$dotnetRoot;$env:PATH\"\n\n  # Make Sure that our bootstrapped dotnet cli is available in future steps of the Azure Pipelines build\n  Write-PipelinePrependPath -Path $dotnetRoot\n\n  Write-PipelineSetVariable -Name 'DOTNET_NOLOGO' -Value '1'\n\n  return $global:_DotNetInstallDir = $dotnetRoot\n}\n\nfunction Retry($downloadBlock, $maxRetries = 5) {\n  $retries = 1\n\n  while($true) {\n    try {\n      & $downloadBlock\n      break\n    }\n    catch {\n      Write-PipelineTelemetryError -Category 'InitializeToolset' -Message $_\n    }\n\n    if (++$retries -le $maxRetries) {\n      $delayInSeconds = [math]::Pow(2, $retries) - 1 # Exponential backoff\n      Write-Host \"Retrying. Waiting for $delayInSeconds seconds before next attempt ($retries of $maxRetries).\"\n      Start-Sleep -Seconds $delayInSeconds\n    }\n    else {\n      Write-PipelineTelemetryError -Category 'InitializeToolset' -Message \"Unable to download file in $maxRetries attempts.\"\n      break\n    }\n  }\n}\n\nfunction GetDotNetInstallScript([string] $dotnetRoot) {\n  $installScript = Join-Path $dotnetRoot 'dotnet-install.ps1'\n  $shouldDownload = $false\n  \n  if (!(Test-Path $installScript)) {\n    $shouldDownload = $true\n  } else {\n    # Check if the script is older than 30 days\n    $fileAge = (Get-Date) - (Get-Item $installScript).LastWriteTime\n    if ($fileAge.Days -gt 30) {\n      Write-Host \"Existing install script is too old, re-downloading...\"\n      $shouldDownload = $true\n    }\n  }\n  \n  if ($shouldDownload) {\n    Create-Directory $dotnetRoot\n    $ProgressPreference = 'SilentlyContinue' # Don't display the console progress UI - it's a huge perf hit\n    $uri = \"https://builds.dotnet.microsoft.com/dotnet/scripts/$dotnetInstallScriptVersion/dotnet-install.ps1\"\n\n    Retry({\n      Write-Host \"GET $uri\"\n      Invoke-WebRequest $uri -UseBasicParsing -OutFile $installScript\n    })\n  }\n\n  return $installScript\n}\n\nfunction InstallDotNetSdk([string] $dotnetRoot, [string] $version, [string] $architecture = '', [switch] $noPath) {\n  InstallDotNet $dotnetRoot $version $architecture '' $false $runtimeSourceFeed $runtimeSourceFeedKey -noPath:$noPath\n}\n\nfunction InstallDotNet([string] $dotnetRoot,\n  [string] $version,\n  [string] $architecture = '',\n  [string] $runtime = '',\n  [bool] $skipNonVersionedFiles = $false,\n  [string] $runtimeSourceFeed = '',\n  [string] $runtimeSourceFeedKey = '',\n  [switch] $noPath) {\n\n  $dotnetVersionLabel = \"'sdk v$version'\"\n\n  # For performance this check is duplicated in src/Microsoft.DotNet.Arcade.Sdk/src/InstallDotNetCore.cs\n  # if you are making changes here, consider if you need to make changes there as well.\n  if ($runtime -ne '' -and $runtime -ne 'sdk') {\n    $runtimePath = $dotnetRoot\n    $runtimePath = $runtimePath + \"\\shared\"\n    if ($runtime -eq \"dotnet\") { $runtimePath = $runtimePath + \"\\Microsoft.NETCore.App\" }\n    if ($runtime -eq \"aspnetcore\") { $runtimePath = $runtimePath + \"\\Microsoft.AspNetCore.App\" }\n    if ($runtime -eq \"windowsdesktop\") { $runtimePath = $runtimePath + \"\\Microsoft.WindowsDesktop.App\" }\n    $runtimePath = $runtimePath + \"\\\" + $version\n  \n    $dotnetVersionLabel = \"runtime toolset '$runtime/$architecture v$version'\"\n\n    if (Test-Path $runtimePath) {\n      Write-Host \"  Runtime toolset '$runtime/$architecture v$version' already installed.\"\n      $installSuccess = $true\n      Exit\n    }\n  }\n\n  $installScript = GetDotNetInstallScript $dotnetRoot\n  $installParameters = @{\n    Version = $version\n    InstallDir = $dotnetRoot\n  }\n\n  if ($architecture) { $installParameters.Architecture = $architecture }\n  if ($runtime) { $installParameters.Runtime = $runtime }\n  if ($skipNonVersionedFiles) { $installParameters.SkipNonVersionedFiles = $skipNonVersionedFiles }\n  if ($noPath) { $installParameters.NoPath = $True }\n\n  $variations = @()\n  $variations += @($installParameters)\n\n  $dotnetBuilds = $installParameters.Clone()\n  $dotnetbuilds.AzureFeed = \"https://ci.dot.net/public\"\n  $variations += @($dotnetBuilds)\n\n  if ($runtimeSourceFeed) {\n    $runtimeSource = $installParameters.Clone()\n    $runtimeSource.AzureFeed = $runtimeSourceFeed\n    if ($runtimeSourceFeedKey) {\n      $decodedBytes = [System.Convert]::FromBase64String($runtimeSourceFeedKey)\n      $decodedString = [System.Text.Encoding]::UTF8.GetString($decodedBytes)\n      $runtimeSource.FeedCredential = $decodedString\n    }\n    $variations += @($runtimeSource)\n  }\n\n  $installSuccess = $false\n  foreach ($variation in $variations) {\n    if ($variation | Get-Member AzureFeed) {\n      $location = $variation.AzureFeed\n    } else {\n      $location = \"public location\";\n    }\n    Write-Host \"  Attempting to install $dotnetVersionLabel from $location.\"\n    try {\n      & $installScript @variation\n      $installSuccess = $true\n      break\n    }\n    catch {\n      Write-Host \"  Failed to install $dotnetVersionLabel from $location.\"\n    }\n  }\n  if (-not $installSuccess) {\n    Write-PipelineTelemetryError -Category 'InitializeToolset' -Message \"Failed to install $dotnetVersionLabel from any of the specified locations.\"\n    ExitWithExitCode 1\n  }\n}\n\n#\n# Locates Visual Studio MSBuild installation.\n# The preference order for MSBuild to use is as follows:\n#\n#   1. MSBuild from an active VS command prompt\n#   2. MSBuild from a compatible VS installation\n#\n# Returns full path to msbuild.exe.\n# Throws on failure.\n#\nfunction InitializeVisualStudioMSBuild([object]$vsRequirements = $null) {\n  if (-not (IsWindowsPlatform)) {\n    throw \"Cannot initialize Visual Studio on non-Windows\"\n  }\n\n  if (Test-Path variable:global:_MSBuildExe) {\n    return $global:_MSBuildExe\n  }\n\n  # Minimum VS version to require.\n  $vsMinVersionReqdStr = '18.0'\n\n  if (!$vsRequirements) {\n    if (Get-Member -InputObject $GlobalJson.tools -Name 'vs') {\n      $vsRequirements = $GlobalJson.tools.vs\n    }\n    else {\n      $vsRequirements = New-Object PSObject -Property @{ version = $vsMinVersionReqdStr }\n    }\n  }\n  $vsMinVersionStr = if ($vsRequirements.version) { $vsRequirements.version } else { $vsMinVersionReqdStr }\n  $vsMinVersion = [Version]::new($vsMinVersionStr)\n\n  # Try msbuild command available in the environment.\n  if ($env:VSINSTALLDIR -ne $null) {\n    $msbuildCmd = Get-Command 'msbuild.exe' -ErrorAction SilentlyContinue\n    if ($msbuildCmd -ne $null) {\n      # Workaround for https://github.com/dotnet/roslyn/issues/35793\n      # Due to this issue $msbuildCmd.Version returns 0.0.0.0 for msbuild.exe 16.2+\n      $msbuildVersion = [Version]::new((Get-Item $msbuildCmd.Path).VersionInfo.ProductVersion.Split([char[]]@('-', '+'))[0])\n\n      if ($msbuildVersion -ge $vsMinVersion) {\n        return $global:_MSBuildExe = $msbuildCmd.Path\n      }\n\n      # Report error - the developer environment is initialized with incompatible VS version.\n      throw \"Developer Command Prompt for VS $($env:VisualStudioVersion) is not recent enough. Please upgrade to $vsMinVersionStr or build from a plain CMD window\"\n    }\n  }\n\n  # Locate Visual Studio installation.\n  $vsInfo = LocateVisualStudio $vsRequirements\n  if ($vsInfo -ne $null) {\n    # Ensure vsInstallDir has a trailing slash\n    $vsInstallDir = Join-Path $vsInfo.installationPath \"\\\"\n    $vsMajorVersion = $vsInfo.installationVersion.Split('.')[0]\n\n    InitializeVisualStudioEnvironmentVariables $vsInstallDir $vsMajorVersion\n  } else {\n    throw 'Unable to find Visual Studio that has required version and components installed'\n  }\n\n  $msbuildVersionDir = if ([int]$vsMajorVersion -lt 16) { \"$vsMajorVersion.0\" } else { \"Current\" }\n\n  $local:BinFolder = Join-Path $vsInstallDir \"MSBuild\\$msbuildVersionDir\\Bin\"\n  $local:Prefer64bit = if (Get-Member -InputObject $vsRequirements -Name 'Prefer64bit') { $vsRequirements.Prefer64bit } else { $false }\n  if ($local:Prefer64bit -and (Test-Path(Join-Path $local:BinFolder \"amd64\"))) {\n    $global:_MSBuildExe = Join-Path $local:BinFolder \"amd64\\msbuild.exe\"\n  } else {\n    $global:_MSBuildExe = Join-Path $local:BinFolder \"msbuild.exe\"\n  }\n\n  return $global:_MSBuildExe\n}\n\nfunction InitializeVisualStudioEnvironmentVariables([string] $vsInstallDir, [string] $vsMajorVersion) {\n  $env:VSINSTALLDIR = $vsInstallDir\n  Set-Item \"env:VS$($vsMajorVersion)0COMNTOOLS\" (Join-Path $vsInstallDir \"Common7\\Tools\\\")\n\n  $vsSdkInstallDir = Join-Path $vsInstallDir \"VSSDK\\\"\n  if (Test-Path $vsSdkInstallDir) {\n    Set-Item \"env:VSSDK$($vsMajorVersion)0Install\" $vsSdkInstallDir\n    $env:VSSDKInstall = $vsSdkInstallDir\n  }\n}\n\n#\n# Locates Visual Studio instance that meets the minimal requirements specified by tools.vs object in global.json.\n#\n# The following properties of tools.vs are recognized:\n#   \"version\": \"{major}.{minor}\"\n#       Two part minimal VS version, e.g. \"15.9\", \"16.0\", etc.\n#   \"components\": [\"componentId1\", \"componentId2\", ...]\n#       Array of ids of workload components that must be available in the VS instance.\n#       See e.g. https://docs.microsoft.com/en-us/visualstudio/install/workload-component-id-vs-enterprise?view=vs-2017\n#\n# Returns JSON describing the located VS instance (same format as returned by vswhere),\n# or $null if no instance meeting the requirements is found on the machine.\n#\nfunction LocateVisualStudio([object]$vsRequirements = $null){\n  if (-not (IsWindowsPlatform)) {\n    throw \"Cannot run vswhere on non-Windows platforms.\"\n  }\n\n  if (Get-Member -InputObject $GlobalJson.tools -Name 'vswhere') {\n    $vswhereVersion = $GlobalJson.tools.vswhere\n  } else {\n    $vswhereVersion = '3.1.7'\n  }\n\n  $vsWhereDir = Join-Path $ToolsDir \"vswhere\\$vswhereVersion\"\n  $vsWhereExe = Join-Path $vsWhereDir 'vswhere.exe'\n\n  if (!(Test-Path $vsWhereExe)) {\n    Create-Directory $vsWhereDir\n    Write-Host \"Downloading vswhere $vswhereVersion\"\n    $ProgressPreference = 'SilentlyContinue' # Don't display the console progress UI - it's a huge perf hit\n    Retry({\n      Invoke-WebRequest \"https://netcorenativeassets.blob.core.windows.net/resource-packages/external/windows/vswhere/$vswhereVersion/vswhere.exe\" -UseBasicParsing -OutFile $vswhereExe\n    })\n  }\n\n  if (!$vsRequirements) {\n    if (Get-Member -InputObject $GlobalJson.tools -Name 'vs' -ErrorAction SilentlyContinue) {\n      $vsRequirements = $GlobalJson.tools.vs\n    } else {\n      $vsRequirements = $null\n    }\n  }\n\n  $args = @('-latest', '-format', 'json', '-requires', 'Microsoft.Component.MSBuild', '-products', '*')\n\n  if (!$excludePrereleaseVS) {\n    $args += '-prerelease'\n  }\n\n  if ($vsRequirements -and (Get-Member -InputObject $vsRequirements -Name 'version' -ErrorAction SilentlyContinue)) {\n    $args += '-version'\n    $args += $vsRequirements.version\n  }\n\n  if ($vsRequirements -and (Get-Member -InputObject $vsRequirements -Name 'components' -ErrorAction SilentlyContinue)) {\n    foreach ($component in $vsRequirements.components) {\n      $args += '-requires'\n      $args += $component\n    }\n  }\n\n  $vsInfo =& $vsWhereExe $args | ConvertFrom-Json\n\n  if ($lastExitCode -ne 0) {\n    return $null\n  }\n\n  if ($null -eq $vsInfo -or $vsInfo.Count -eq 0) {\n    throw \"No instance of Visual Studio meeting the requirements specified was found. Requirements: $($args -join ' ')\"\n    return $null\n  }\n\n  # use first matching instance\n  return $vsInfo[0]\n}\n\nfunction InitializeBuildTool() {\n  if (Test-Path variable:global:_BuildTool) {\n    # If the requested msbuild parameters do not match, clear the cached variables.\n    if($global:_BuildTool.Contains('ExcludePrereleaseVS') -and $global:_BuildTool.ExcludePrereleaseVS -ne $excludePrereleaseVS) {\n      Remove-Item variable:global:_BuildTool\n      Remove-Item variable:global:_MSBuildExe\n    } else {\n      return $global:_BuildTool\n    }\n  }\n\n  if (-not $msbuildEngine) {\n    $msbuildEngine = GetDefaultMSBuildEngine\n  }\n\n  # Initialize dotnet cli if listed in 'tools'\n  $dotnetRoot = $null\n  if (Get-Member -InputObject $GlobalJson.tools -Name 'dotnet') {\n    $dotnetRoot = InitializeDotNetCli -install:$restore\n  }\n\n  if ($msbuildEngine -eq 'dotnet') {\n    if (!$dotnetRoot) {\n      Write-PipelineTelemetryError -Category 'InitializeToolset' -Message \"/global.json must specify 'tools.dotnet'.\"\n      ExitWithExitCode 1\n    }\n    $dotnetPath = Join-Path $dotnetRoot (GetExecutableFileName 'dotnet')\n\n    $buildTool = @{ Path = $dotnetPath; Command = 'msbuild'; Tool = 'dotnet'; Framework = 'net' }\n  } elseif ($msbuildEngine -eq \"vs\") {\n    try {\n      $msbuildPath = InitializeVisualStudioMSBuild\n    } catch {\n      Write-PipelineTelemetryError -Category 'InitializeToolset' -Message $_\n      ExitWithExitCode 1\n    }\n\n    $buildTool = @{ Path = $msbuildPath; Command = \"\"; Tool = \"vs\"; Framework = \"netframework\"; ExcludePrereleaseVS = $excludePrereleaseVS }\n  } else {\n    Write-PipelineTelemetryError -Category 'InitializeToolset' -Message \"Unexpected value of -msbuildEngine: '$msbuildEngine'.\"\n    ExitWithExitCode 1\n  }\n\n  return $global:_BuildTool = $buildTool\n}\n\nfunction GetDefaultMSBuildEngine() {\n  # Presence of tools.vs indicates the repo needs to build using VS msbuild on Windows.\n  if (Get-Member -InputObject $GlobalJson.tools -Name 'vs') {\n    return 'vs'\n  }\n\n  if (Get-Member -InputObject $GlobalJson.tools -Name 'dotnet') {\n    return 'dotnet'\n  }\n\n  Write-PipelineTelemetryError -Category 'InitializeToolset' -Message \"-msbuildEngine must be specified, or /global.json must specify 'tools.dotnet' or 'tools.vs'.\"\n  ExitWithExitCode 1\n}\n\nfunction GetNuGetPackageCachePath() {\n  if ($env:NUGET_PACKAGES -eq $null) {\n    # Use local cache on CI to ensure deterministic build.\n    # Avoid using the http cache as workaround for https://github.com/NuGet/Home/issues/3116\n    # use global cache in dev builds to avoid cost of downloading packages.\n    # For directory normalization, see also: https://github.com/NuGet/Home/issues/7968\n    if ($useGlobalNuGetCache) {\n      $env:NUGET_PACKAGES = Join-Path $env:UserProfile '.nuget\\packages\\'\n    } else {\n      $env:NUGET_PACKAGES = Join-Path $RepoRoot '.packages\\'\n    }\n  }\n\n  return $env:NUGET_PACKAGES\n}\n\n# Returns a full path to an Arcade SDK task project file.\nfunction GetSdkTaskProject([string]$taskName) {\n  $toolsetDir = Split-Path (InitializeToolset) -Parent\n  $proj = Join-Path $toolsetDir \"$taskName.proj\"\n  if (Test-Path $proj) {\n    return $proj\n  }\n  # TODO: Remove this fallback once all supported versions use the new layout.\n  $legacyProj = Join-Path $toolsetDir \"SdkTasks\\$taskName.proj\"\n  if (Test-Path $legacyProj) {\n    return $legacyProj\n  }\n  throw \"Unable to find $taskName.proj in toolset at: $toolsetDir\"\n}\n\nfunction InitializeNativeTools() {\n  if (-Not (Test-Path variable:DisableNativeToolsetInstalls) -And (Get-Member -InputObject $GlobalJson -Name \"native-tools\")) {\n    $nativeArgs= @{}\n    if ($ci) {\n      $nativeArgs = @{\n        InstallDirectory = \"$ToolsDir\"\n      }\n    }\n    if ($env:NativeToolsOnMachine) {\n      Write-Host \"Variable NativeToolsOnMachine detected, enabling native tool path promotion...\"\n      $nativeArgs += @{ PathPromotion = $true }\n    }\n    & \"$PSScriptRoot/init-tools-native.ps1\" @nativeArgs\n  }\n}\n\nfunction Read-ArcadeSdkVersion() {\n  return $GlobalJson.'msbuild-sdks'.'Microsoft.DotNet.Arcade.Sdk'\n}\n\nfunction InitializeToolset() {\n  # For Unified Build/Source-build support, check whether the environment variable is\n  # set. If it is, then use this as the toolset build project.\n  if ($env:_InitializeToolset -ne $null) {\n    return $global:_InitializeToolset = $env:_InitializeToolset\n  }\n\n  if (Test-Path variable:global:_InitializeToolset) {\n    return $global:_InitializeToolset\n  }\n\n  $nugetCache = GetNuGetPackageCachePath\n\n  $toolsetVersion = Read-ArcadeSdkVersion\n  $toolsetToolsDir = Join-Path $ToolsetDir $toolsetVersion\n\n  # Check if the toolset has already been extracted\n  $toolsetBuildProj = $null\n  $buildProjPath = Join-Path $toolsetToolsDir 'Build.proj'\n\n  if (Test-Path $buildProjPath) {\n    $toolsetBuildProj = $buildProjPath\n  }\n\n  if ($toolsetBuildProj -ne $null) {\n    return $global:_InitializeToolset = $toolsetBuildProj\n  }\n\n  if (-not $restore) {\n    Write-PipelineTelemetryError -Category 'InitializeToolset' -Message \"Toolset version $toolsetVersion has not been restored.\"\n    ExitWithExitCode 1\n  }\n\n  $downloadArgs = @(\"package\", \"download\", \"Microsoft.DotNet.Arcade.Sdk@$toolsetVersion\", \"--verbosity\", \"minimal\", \"--prerelease\", \"--output\", \"$nugetCache\")\n  $nugetConfig = $env:NUGET_CONFIG\n  if (-not $nugetConfig) {\n    # Search for any variation of nuget.config in the RepoRoot\n    $configFile = Get-ChildItem -Path $RepoRoot -File | Where-Object { $_.Name -ieq \"nuget.config\" } | Select-Object -First 1\n\n    if ($configFile) {\n        $nugetConfig = $configFile.FullName\n    }\n  }\n\n  if ($nugetConfig) {\n    $downloadArgs += \"--configfile\"\n    $downloadArgs += $nugetConfig\n  }\n  DotNet @downloadArgs\n\n  $packageDir = Join-Path $nugetCache (Join-Path 'microsoft.dotnet.arcade.sdk' $toolsetVersion)\n  $packageToolsetDir = Join-Path $packageDir 'toolset'\n  $packageToolsDir = Join-Path $packageDir 'tools'\n\n  # TODO: Remove the tools/ check once all supported versions have the toolset folder.\n  if (!(Test-Path $packageToolsetDir) -and !(Test-Path $packageToolsDir)) {\n    Write-PipelineTelemetryError -Category 'InitializeToolset' -Message \"Arcade SDK package does not contain a toolset or tools folder: $packageDir\"\n    ExitWithExitCode 3\n  }\n\n  New-Item -ItemType Directory -Path $toolsetToolsDir -Force | Out-Null\n\n  # Copy toolset if present at the package root (new layout), otherwise fall back to tools\n  if (Test-Path $packageToolsetDir) {\n    Copy-Item -Path \"$packageToolsetDir\\*\" -Destination $toolsetToolsDir -Recurse -Force\n  } else {\n    # TODO: Remove this fallback once all supported versions have the toolset folder.\n    Copy-Item -Path \"$packageToolsDir\\*\" -Destination $toolsetToolsDir -Recurse -Force\n  }\n\n  if (Test-Path $buildProjPath) {\n    $toolsetBuildProj = $buildProjPath\n  } else {\n    throw \"Unable to find Build.proj in toolset at: $toolsetToolsDir\"\n  }\n\n  return $global:_InitializeToolset = $toolsetBuildProj\n}\n\nfunction ExitWithExitCode([int] $exitCode) {\n  if ($ci -and $prepareMachine) {\n    Stop-Processes\n  }\n  exit $exitCode\n}\n\n# Check if $LASTEXITCODE is a nonzero exit code (NZEC). If so, print a Azure Pipeline error for\n# diagnostics, then exit the script with the $LASTEXITCODE.\nfunction Exit-IfNZEC([string] $category = \"General\") {\n  Write-Host \"Exit code $LASTEXITCODE\"\n  if ($LASTEXITCODE -ne 0) {\n    $message = \"Last command failed with exit code $LASTEXITCODE.\"\n    Write-PipelineTelemetryError -Force -Category $category -Message $message\n    ExitWithExitCode $LASTEXITCODE\n  }\n}\n\nfunction Stop-Processes() {\n  Write-Host 'Killing running build processes...'\n  foreach ($processName in $processesToStopOnExit) {\n    Get-Process -Name $processName -ErrorAction SilentlyContinue | Stop-Process\n  }\n}\n\n#\n# Executes msbuild (or 'dotnet msbuild') with arguments passed to the function.\n# The arguments are automatically quoted.\n# Terminates the script if the build fails.\n#\nfunction MSBuild() {\n  if ($pipelinesLog) {\n    $buildTool = InitializeBuildTool\n\n    if ($ci -and $buildTool.Tool -eq 'dotnet') {\n      $env:NUGET_PLUGIN_HANDSHAKE_TIMEOUT_IN_SECONDS = 20\n      $env:NUGET_PLUGIN_REQUEST_TIMEOUT_IN_SECONDS = 20\n      Write-PipelineSetVariable -Name 'NUGET_PLUGIN_HANDSHAKE_TIMEOUT_IN_SECONDS' -Value '20'\n      Write-PipelineSetVariable -Name 'NUGET_PLUGIN_REQUEST_TIMEOUT_IN_SECONDS' -Value '20'\n    }\n\n    Enable-Nuget-EnhancedRetry\n\n    $toolsetBuildProject = InitializeToolset\n    $basePath = Split-Path -parent $toolsetBuildProject\n    $selectedPath = Join-Path $basePath (Join-Path $buildTool.Framework 'Microsoft.DotNet.ArcadeLogging.dll')\n\n    if (-not $selectedPath) {\n      Write-PipelineTelemetryError -Category 'Build' -Message \"Unable to find arcade sdk logger assembly: $selectedPath\"\n      ExitWithExitCode 1\n    }\n\n    $args += \"/logger:$selectedPath\"\n  }\n\n  MSBuild-Core @args\n}\n\n#\n# Executes a dotnet command with arguments passed to the function.\n# Terminates the script if the command fails.\n#\nfunction DotNet() {\n  $dotnetRoot = InitializeDotNetCli -install:$restore\n  $dotnetPath = Join-Path $dotnetRoot (GetExecutableFileName 'dotnet')\n\n  $cmdArgs = \"\"\n  foreach ($arg in $args) {\n    if ($null -ne $arg -and $arg.Trim() -ne \"\") {\n      if ($arg.EndsWith('\\')) {\n        $arg = $arg + \"\\\"\n      }\n      $cmdArgs += \" `\"$arg`\"\"\n    }\n  }\n\n  $env:ARCADE_BUILD_TOOL_COMMAND = \"`\"$dotnetPath`\" $cmdArgs\"\n\n  $exitCode = Exec-Process $dotnetPath $cmdArgs\n\n  if ($exitCode -ne 0) {\n    Write-Host \"dotnet command failed with exit code $exitCode. Check errors above.\" -ForegroundColor Red\n\n    if ($ci -and $env:SYSTEM_TEAMPROJECT -ne $null -and !$fromVMR) {\n      Write-PipelineSetResult -Result \"Failed\" -Message \"dotnet command execution failed.\"\n      ExitWithExitCode 0\n    } else {\n      ExitWithExitCode $exitCode\n    }\n  }\n}\n\n#\n# Executes msbuild (or 'dotnet msbuild') with arguments passed to the function.\n# The arguments are automatically quoted.\n# Terminates the script if the build fails.\n#\nfunction MSBuild-Core() {\n  if ($ci) {\n    if (!$binaryLog -and !$excludeCIBinarylog) {\n      Write-PipelineTelemetryError -Category 'Build' -Message 'Binary log must be enabled in CI build, or explicitly opted-out from with the -excludeCIBinarylog switch.'\n      ExitWithExitCode 1\n    }\n\n    if ($nodeReuse) {\n      Write-PipelineTelemetryError -Category 'Build' -Message 'Node reuse must be disabled in CI build.'\n      ExitWithExitCode 1\n    }\n  }\n\n  Enable-Nuget-EnhancedRetry\n\n  $buildTool = InitializeBuildTool\n\n  $cmdArgs = \"$($buildTool.Command) /m /nologo /clp:Summary /v:$verbosity /nr:$nodeReuse /p:ContinuousIntegrationBuild=$ci\"\n\n  # Add -mt flag for MSBuild multithreaded mode if enabled via environment variable\n  if ($env:MSBUILD_MT_ENABLED -eq \"1\") {\n    $cmdArgs += ' -mt'\n  }\n\n  if ($warnAsError) {\n    $cmdArgs += ' /warnaserror /p:TreatWarningsAsErrors=true'\n  }\n  else {\n    $cmdArgs += ' /p:TreatWarningsAsErrors=false'\n  }\n\n  if ($warnAsError -and $warnNotAsError) {\n    $cmdArgs += \" /warnnotaserror:$warnNotAsError /p:AdditionalWarningsNotAsErrors=$warnNotAsError\"\n  }\n\n  foreach ($arg in $args) {\n    if ($null -ne $arg -and $arg.Trim() -ne \"\") {\n      if ($arg.EndsWith('\\')) {\n        $arg = $arg + \"\\\"\n      }\n      $cmdArgs += \" `\"$arg`\"\"\n    }\n  }\n\n  # Be sure quote the path in case there are spaces in the dotnet installation location.\n  $env:ARCADE_BUILD_TOOL_COMMAND = \"`\"$($buildTool.Path)`\" $cmdArgs\"\n\n  $exitCode = Exec-Process $buildTool.Path $cmdArgs\n\n  if ($exitCode -ne 0) {\n    # We should not Write-PipelineTaskError here because that message shows up in the build summary\n    # The build already logged an error, that's the reason it failed. Producing an error here only adds noise.\n    Write-Host \"Build failed with exit code $exitCode. Check errors above.\" -ForegroundColor Red\n\n    $buildLog = GetMSBuildBinaryLogCommandLineArgument $args\n    if ($null -ne $buildLog) {\n      Write-Host \"See log: $buildLog\" -ForegroundColor DarkGray\n    }\n\n    # When running on Azure Pipelines, override the returned exit code to avoid double logging.\n    # Skip this when the build is a child of the VMR build.\n    if ($ci -and $env:SYSTEM_TEAMPROJECT -ne $null -and !$fromVMR) {\n      Write-PipelineSetResult -Result \"Failed\" -Message \"msbuild execution failed.\"\n      # Exiting with an exit code causes the azure pipelines task to log yet another \"noise\" error\n      # The above Write-PipelineSetResult will cause the task to be marked as failure without adding yet another error\n      ExitWithExitCode 0\n    } else {\n      ExitWithExitCode $exitCode\n    }\n  }\n}\n\nfunction GetMSBuildBinaryLogCommandLineArgument($arguments) {\n  foreach ($argument in $arguments) {\n    if ($argument -ne $null) {\n      $arg = $argument.Trim()\n      if ($arg.StartsWith('/bl:', \"OrdinalIgnoreCase\")) {\n        return $arg.Substring('/bl:'.Length)\n      }\n\n      if ($arg.StartsWith('/binaryLogger:', 'OrdinalIgnoreCase')) {\n        return $arg.Substring('/binaryLogger:'.Length)\n      }\n    }\n  }\n\n  return $null\n}\n\nfunction GetExecutableFileName($baseName) {\n  if (IsWindowsPlatform) {\n    return \"$baseName.exe\"\n  }\n  else {\n    return $baseName\n  }\n}\n\nfunction IsWindowsPlatform() {\n  return [environment]::OSVersion.Platform -eq [PlatformID]::Win32NT\n}\n\nfunction Get-Darc($version) {\n  $darcPath  = \"$TempDir\\darc\\$([guid]::NewGuid())\"\n  if ($version -ne $null) {\n    & $PSScriptRoot\\darc-init.ps1 -toolpath $darcPath -darcVersion $version | Out-Host\n  } else {\n    & $PSScriptRoot\\darc-init.ps1 -toolpath $darcPath | Out-Host\n  }\n  return \"$darcPath\\darc.exe\"\n}\n\n. $PSScriptRoot\\pipeline-logging-functions.ps1\n\n$RepoRoot = Resolve-Path (Join-Path $PSScriptRoot '..\\..\\')\n$EngRoot = Resolve-Path (Join-Path $PSScriptRoot '..')\n$ArtifactsDir = Join-Path $RepoRoot 'artifacts'\n$ToolsetDir = Join-Path $ArtifactsDir 'toolset'\n$ToolsDir = Join-Path $RepoRoot '.tools'\n$LogDir = Join-Path (Join-Path $ArtifactsDir 'log') $configuration\n$TempDir = Join-Path (Join-Path $ArtifactsDir 'tmp') $configuration\n$GlobalJson = Get-Content -Raw -Path (Join-Path $RepoRoot 'global.json') | ConvertFrom-Json\n# true if global.json contains a \"runtimes\" section\n$globalJsonHasRuntimes = if ($GlobalJson.tools.PSObject.Properties.Name -Match 'runtimes') { $true } else { $false }\n\nCreate-Directory $ToolsetDir\nCreate-Directory $TempDir\nCreate-Directory $LogDir\n\nWrite-PipelineSetVariable -Name 'Artifacts' -Value $ArtifactsDir\nWrite-PipelineSetVariable -Name 'Artifacts.Toolset' -Value $ToolsetDir\nWrite-PipelineSetVariable -Name 'Artifacts.Log' -Value $LogDir\nWrite-PipelineSetVariable -Name 'TEMP' -Value $TempDir\nWrite-PipelineSetVariable -Name 'TMP' -Value $TempDir\n\n# Import custom tools configuration, if present in the repo.\n# Note: Import in global scope so that the script set top-level variables without qualification.\nif (!$disableConfigureToolsetImport) {\n  $configureToolsetScript = Join-Path $EngRoot 'configure-toolset.ps1'\n  if (Test-Path $configureToolsetScript) {\n    . $configureToolsetScript\n    if ((Test-Path variable:failOnConfigureToolsetError) -And $failOnConfigureToolsetError) {\n      if ((Test-Path variable:LastExitCode) -And ($LastExitCode -ne 0)) {\n        Write-PipelineTelemetryError -Category 'Build' -Message 'configure-toolset.ps1 returned a non-zero exit code'\n        ExitWithExitCode $LastExitCode\n      }\n    }\n  }\n}\n\n#\n# If $ci flag is set, turn on (and log that we did) special environment variables for improved Nuget client retry logic.\n#\nfunction Enable-Nuget-EnhancedRetry() {\n    if ($ci) {\n      Write-Host \"Setting NUGET enhanced retry environment variables\"\n      $env:NUGET_ENABLE_ENHANCED_HTTP_RETRY = 'true'\n      $env:NUGET_ENHANCED_MAX_NETWORK_TRY_COUNT = 6\n      $env:NUGET_ENHANCED_NETWORK_RETRY_DELAY_MILLISECONDS = 1000\n      $env:NUGET_RETRY_HTTP_429 = 'true'\n      Write-PipelineSetVariable -Name 'NUGET_ENABLE_ENHANCED_HTTP_RETRY' -Value 'true'\n      Write-PipelineSetVariable -Name 'NUGET_ENHANCED_MAX_NETWORK_TRY_COUNT' -Value '6'\n      Write-PipelineSetVariable -Name 'NUGET_ENHANCED_NETWORK_RETRY_DELAY_MILLISECONDS' -Value '1000'\n      Write-PipelineSetVariable -Name 'NUGET_RETRY_HTTP_429' -Value 'true'\n    }\n}\n"
  },
  {
    "path": "eng/common/tools.sh",
    "content": "#!/usr/bin/env bash\n\n# Initialize variables if they aren't already defined.\n\n# CI mode - set to true on CI server for PR validation build or official build.\nci=${ci:-false}\n\n# Build mode\nsource_build=${source_build:-false}\n\n# Set to true to use the pipelines logger which will enable Azure logging output.\n# https://github.com/Microsoft/azure-pipelines-tasks/blob/master/docs/authoring/commands.md\n# This flag is meant as a temporary opt-opt for the feature while validate it across\n# our consumers. It will be deleted in the future.\nif [[ \"$ci\" == true ]]; then\n  pipelines_log=${pipelines_log:-true}\nelse\n  pipelines_log=${pipelines_log:-false}\nfi\n\n# Build configuration. Common values include 'Debug' and 'Release', but the repository may use other names.\nconfiguration=${configuration:-'Debug'}\n\n# Set to true to opt out of outputting binary log while running in CI\nexclude_ci_binary_log=${exclude_ci_binary_log:-false}\n\nif [[ \"$ci\" == true && \"$exclude_ci_binary_log\" == false ]]; then\n  binary_log_default=true\nelse\n  binary_log_default=false\nfi\n\n# Set to true to output binary log from msbuild. Note that emitting binary log slows down the build.\nbinary_log=${binary_log:-$binary_log_default}\n\n# Turns on machine preparation/clean up code that changes the machine state (e.g. kills build processes).\nprepare_machine=${prepare_machine:-false}\n\n# True to restore toolsets and dependencies.\nrestore=${restore:-true}\n\n# Adjusts msbuild verbosity level.\nverbosity=${verbosity:-'minimal'}\n\n# Set to true to reuse msbuild nodes. Recommended to not reuse on CI.\nif [[ \"$ci\" == true ]]; then\n  node_reuse=${node_reuse:-false}\nelse\n  node_reuse=${node_reuse:-true}\nfi\n\n# Configures warning treatment in msbuild.\nwarn_as_error=${warn_as_error:-true}\n\n# Specifies semi-colon delimited list of warning codes that should not be treated as errors.\nwarn_not_as_error=${warn_not_as_error:-''}\n\n# True to attempt using .NET Core already that meets requirements specified in global.json\n# installed on the machine instead of downloading one.\nuse_installed_dotnet_cli=${use_installed_dotnet_cli:-true}\n\n# Enable repos to use a particular version of the on-line dotnet-install scripts.\n#    default URL: https://builds.dotnet.microsoft.com/dotnet/scripts/v1/dotnet-install.sh\ndotnetInstallScriptVersion=${dotnetInstallScriptVersion:-'v1'}\n\n# True to use global NuGet cache instead of restoring packages to repository-local directory.\n# Keep in sync with NuGetPackageroot in Arcade SDK's RepositoryLayout.props.\nif [[ \"$ci\" == true || \"$source_build\" == true ]]; then\n  use_global_nuget_cache=${use_global_nuget_cache:-false}\nelse\n  use_global_nuget_cache=${use_global_nuget_cache:-true}\nfi\n\n# Used when restoring .NET SDK from alternative feeds\nruntime_source_feed=${runtime_source_feed:-''}\nruntime_source_feed_key=${runtime_source_feed_key:-''}\n\n# True when the build is running within the VMR.\nfrom_vmr=${from_vmr:-false}\n\n# Resolve any symlinks in the given path.\nfunction ResolvePath {\n  local path=$1\n\n  while [[ -h $path ]]; do\n    local dir=\"$( cd -P \"$( dirname \"$path\" )\" && pwd )\"\n    path=\"$(readlink \"$path\")\"\n\n    # if $path was a relative symlink, we need to resolve it relative to the path where the\n    # symlink file was located\n    [[ $path != /* ]] && path=\"$dir/$path\"\n  done\n\n  # return value\n  _ResolvePath=\"$path\"\n}\n\n# ReadVersionFromJson [json key]\nfunction ReadGlobalVersion {\n  local key=$1\n\n  if command -v jq &> /dev/null; then\n    _ReadGlobalVersion=\"$(jq -r \".[] | select(has(\\\"$key\\\")) | .\\\"$key\\\"\" \"$global_json_file\")\"\n  elif [[ \"$(cat \"$global_json_file\")\" =~ \\\"$key\\\"[[:space:]\\:]*\\\"([^\\\"]+) ]]; then\n    _ReadGlobalVersion=${BASH_REMATCH[1]}\n  fi\n\n  if [[ -z \"$_ReadGlobalVersion\" ]]; then\n    Write-PipelineTelemetryError -category 'Build' \"Error: Cannot find \\\"$key\\\" in $global_json_file\"\n    ExitWithExitCode 1\n  fi\n}\n\nfunction InitializeDotNetCli {\n  if [[ -n \"${_InitializeDotNetCli:-}\" ]]; then\n    return\n  fi\n\n  local install=$1\n\n  # Disable first run since we want to control all package sources\n  export DOTNET_NOLOGO=1\n\n  # Disable telemetry on CI\n  if [[ $ci == true ]]; then\n    export DOTNET_CLI_TELEMETRY_OPTOUT=1\n  fi\n\n  # LTTNG is the logging infrastructure used by Core CLR. Need this variable set\n  # so it doesn't output warnings to the console.\n  export LTTNG_HOME=\"$HOME\"\n\n  # Find the first path on $PATH that contains the dotnet.exe\n  if [[ \"$use_installed_dotnet_cli\" == true && $global_json_has_runtimes == false && -z \"${DOTNET_INSTALL_DIR:-}\" ]]; then\n    local dotnet_path=`command -v dotnet`\n    if [[ -n \"$dotnet_path\" ]]; then\n      ResolvePath \"$dotnet_path\"\n      export DOTNET_INSTALL_DIR=`dirname \"$_ResolvePath\"`\n    fi\n  fi\n\n  ReadGlobalVersion \"dotnet\"\n  local dotnet_sdk_version=$_ReadGlobalVersion\n  local dotnet_root=\"\"\n\n  # Use dotnet installation specified in DOTNET_INSTALL_DIR if it contains the required SDK version,\n  # otherwise install the dotnet CLI and SDK to repo local .dotnet directory to avoid potential permission issues.\n  if [[ $global_json_has_runtimes == false && -n \"${DOTNET_INSTALL_DIR:-}\" && -d \"$DOTNET_INSTALL_DIR/sdk/$dotnet_sdk_version\" ]]; then\n    dotnet_root=\"$DOTNET_INSTALL_DIR\"\n  else\n    if [[ -n \"${DOTNET_GLOBAL_INSTALL_DIR:-}\" ]]; then\n      dotnet_root=\"$DOTNET_GLOBAL_INSTALL_DIR\"\n    else\n      dotnet_root=\"${repo_root}.dotnet\"\n    fi\n\n    export DOTNET_INSTALL_DIR=\"$dotnet_root\"\n\n    if [[ ! -d \"$DOTNET_INSTALL_DIR/sdk/$dotnet_sdk_version\" ]]; then\n      if [[ \"$install\" == true ]]; then\n        InstallDotNetSdk \"$dotnet_root\" \"$dotnet_sdk_version\"\n      else\n        Write-PipelineTelemetryError -category 'InitializeToolset' \"Unable to find dotnet with SDK version '$dotnet_sdk_version'\"\n        ExitWithExitCode 1\n      fi\n    fi\n  fi\n\n  # Add dotnet to PATH. This prevents any bare invocation of dotnet in custom\n  # build steps from using anything other than what we've downloaded.\n  Write-PipelinePrependPath -path \"$dotnet_root\"\n\n  Write-PipelineSetVariable -name \"DOTNET_NOLOGO\" -value \"1\"\n\n  # return value\n  _InitializeDotNetCli=\"$dotnet_root\"\n}\n\nfunction InstallDotNetSdk {\n  local root=$1\n  local version=$2\n  local architecture=\"unset\"\n  if [[ $# -ge 3 ]]; then\n    architecture=$3\n  fi\n  InstallDotNet \"$root\" \"$version\" $architecture 'sdk' 'true' $runtime_source_feed $runtime_source_feed_key\n}\n\nfunction InstallDotNet {\n  local root=$1\n  local version=$2\n  local runtime=$4\n\n  # For performance this check is duplicated in src/Microsoft.DotNet.Arcade.Sdk/src/InstallDotNetCore.cs\n  # if you are making changes here, consider if you need to make changes there as well.\n  local dotnetVersionLabel=\"'$runtime v$version'\"\n  if [[ -n \"${4:-}\" ]] && [ \"$4\" != 'sdk' ]; then\n    runtimePath=\"$root\"\n    runtimePath=\"$runtimePath/shared\"\n    case \"$runtime\" in\n      dotnet)\n        runtimePath=\"$runtimePath/Microsoft.NETCore.App\"\n        ;;\n      aspnetcore)\n        runtimePath=\"$runtimePath/Microsoft.AspNetCore.App\"\n        ;;\n      windowsdesktop)\n        runtimePath=\"$runtimePath/Microsoft.WindowsDesktop.App\"\n        ;;\n      *)\n        ;;\n    esac\n    runtimePath=\"$runtimePath/$version\"\n\n    dotnetVersionLabel=\"runtime toolset '$runtime/$architecture v$version'\"\n\n    if [ -d \"$runtimePath\" ]; then\n      echo \"  Runtime toolset '$runtime/$architecture v$version' already installed.\"\n      local installSuccess=1\n      return\n    fi\n  fi\n\n  GetDotNetInstallScript \"$root\"\n  local install_script=$_GetDotNetInstallScript\n\n  local installParameters=(--version $version --install-dir \"$root\")\n\n  if [[ -n \"${3:-}\" ]] && [ \"$3\" != 'unset' ]; then\n    installParameters+=(--architecture $3)\n  fi\n  if [[ -n \"${4:-}\" ]] && [ \"$4\" != 'sdk' ]; then\n    installParameters+=(--runtime $4)\n  fi\n  if [[ \"$#\" -ge \"5\" ]] && [[ \"$5\" != 'false' ]]; then\n    installParameters+=(--skip-non-versioned-files)\n  fi\n\n  local variations=() # list of variable names with parameter arrays in them\n\n  local public_location=(\"${installParameters[@]}\")\n  variations+=(public_location)\n\n  local dotnetbuilds=(\"${installParameters[@]}\" --azure-feed \"https://ci.dot.net/public\")\n  variations+=(dotnetbuilds)\n\n  if [[ -n \"${6:-}\" ]]; then\n    variations+=(private_feed)\n    local private_feed=(\"${installParameters[@]}\" --azure-feed $6)\n    if [[ -n \"${7:-}\" ]]; then\n      # The 'base64' binary on alpine uses '-d' and doesn't support '--decode'\n      # '-d'. To work around this, do a simple detection and switch the parameter\n      # accordingly.\n      decodeArg=\"--decode\"\n      if base64 --help 2>&1 | grep -q \"BusyBox\"; then\n          decodeArg=\"-d\"\n      fi\n      decodedFeedKey=`echo $7 | base64 $decodeArg`\n      private_feed+=(--feed-credential $decodedFeedKey)\n    fi\n  fi\n\n  local installSuccess=0\n  for variationName in \"${variations[@]}\"; do\n    local name=\"$variationName[@]\"\n    local variation=(\"${!name}\")\n    echo \"  Attempting to install $dotnetVersionLabel from $variationName.\"\n    bash \"$install_script\" \"${variation[@]}\" && installSuccess=1\n    if [[ \"$installSuccess\" -eq 1 ]]; then\n      break\n    fi\n\n    echo \"  Failed to install $dotnetVersionLabel from $variationName.\"\n  done\n\n  if [[ \"$installSuccess\" -eq 0 ]]; then\n    Write-PipelineTelemetryError -category 'InitializeToolset' \"Failed to install $dotnetVersionLabel from any of the specified locations.\"\n    ExitWithExitCode 1\n  fi\n}\n\nfunction with_retries {\n  local maxRetries=5\n  local retries=1\n  echo \"Trying to run '$@' for maximum of $maxRetries attempts.\"\n  while [[ $((retries++)) -le $maxRetries ]]; do\n    \"$@\"\n\n    if [[ $? == 0 ]]; then\n      echo \"Ran '$@' successfully.\"\n      return 0\n    fi\n\n    timeout=$((3**$retries-1))\n    echo \"Failed to execute '$@'. Waiting $timeout seconds before next attempt ($retries out of $maxRetries).\" 1>&2\n    sleep $timeout\n  done\n\n  echo \"Failed to execute '$@' for $maxRetries times.\" 1>&2\n\n  return 1\n}\n\nfunction GetDotNetInstallScript {\n  local root=$1\n  local install_script=\"$root/dotnet-install.sh\"\n  local install_script_url=\"https://builds.dotnet.microsoft.com/dotnet/scripts/$dotnetInstallScriptVersion/dotnet-install.sh\"\n  local timestamp_file=\"$root/.dotnet-install.timestamp\"\n  local should_download=false\n\n  if [[ ! -a \"$install_script\" ]]; then\n    should_download=true\n  elif [[ -f \"$timestamp_file\" ]]; then\n    # Check if the script is older than 30 days using timestamp file\n    local download_time=$(cat \"$timestamp_file\" 2>/dev/null || echo \"0\")\n    local current_time=$(date +%s)\n    local age_seconds=$((current_time - download_time))\n    \n    # 30 days = 30 * 24 * 60 * 60 = 2592000 seconds\n    if [[ $age_seconds -gt 2592000 ]]; then\n      echo \"Existing install script is too old, re-downloading...\"\n      should_download=true\n    fi\n  else\n    # No timestamp file exists, assume script is old and re-download\n    echo \"No timestamp found for existing install script, re-downloading...\"\n    should_download=true\n  fi\n\n  if [[ \"$should_download\" == true ]]; then\n    mkdir -p \"$root\"\n\n    echo \"Downloading '$install_script_url'\"\n\n    # Use curl if available, otherwise use wget\n    if command -v curl > /dev/null; then\n      # first, try directly, if this fails we will retry with verbose logging\n      curl \"$install_script_url\" -sSL --retry 10 --create-dirs -o \"$install_script\" || {\n        if command -v openssl &> /dev/null; then\n          echo \"Curl failed; dumping some information about dotnet.microsoft.com for later investigation\"\n          echo | openssl s_client -showcerts -servername dotnet.microsoft.com  -connect dotnet.microsoft.com:443 || true\n        fi\n        echo \"Will now retry the same URL with verbose logging.\"\n        with_retries curl \"$install_script_url\" -sSL --verbose --retry 10 --create-dirs -o \"$install_script\" || {\n          local exit_code=$?\n          Write-PipelineTelemetryError -category 'InitializeToolset' \"Failed to acquire dotnet install script (exit code '$exit_code').\"\n          ExitWithExitCode $exit_code\n        }\n      }\n    else\n      with_retries wget -v -O \"$install_script\" \"$install_script_url\" || {\n        local exit_code=$?\n        Write-PipelineTelemetryError -category 'InitializeToolset' \"Failed to acquire dotnet install script (exit code '$exit_code').\"\n        ExitWithExitCode $exit_code\n      }\n    fi\n    \n    # Create timestamp file to track download time in seconds from epoch\n    date +%s > \"$timestamp_file\"\n  fi\n  # return value\n  _GetDotNetInstallScript=\"$install_script\"\n}\n\nfunction InitializeBuildTool {\n  if [[ -n \"${_InitializeBuildTool:-}\" ]]; then\n    return\n  fi\n\n  InitializeDotNetCli $restore\n\n  # return values\n  _InitializeBuildTool=\"$_InitializeDotNetCli/dotnet\"\n  _InitializeBuildToolCommand=\"msbuild\"\n}\n\nfunction GetNuGetPackageCachePath {\n  if [[ -z ${NUGET_PACKAGES:-} ]]; then\n    if [[ \"$use_global_nuget_cache\" == true ]]; then\n      export NUGET_PACKAGES=\"$HOME/.nuget/packages/\"\n    else\n      export NUGET_PACKAGES=\"$repo_root/.packages/\"\n    fi\n  fi\n\n  # return value\n  _GetNuGetPackageCachePath=$NUGET_PACKAGES\n}\n\nfunction InitializeNativeTools() {\n  if [[ -n \"${DisableNativeToolsetInstalls:-}\" ]]; then\n    return\n  fi\n  if grep -Fq \"native-tools\" $global_json_file\n  then\n    local nativeArgs=\"\"\n    if [[ \"$ci\" == true ]]; then\n      nativeArgs=\"--installDirectory $tools_dir\"\n    fi\n    \"$_script_dir/init-tools-native.sh\" $nativeArgs\n  fi\n}\n\nfunction InitializeToolset {\n  if [[ -n \"${_InitializeToolset:-}\" ]]; then\n    return\n  fi\n\n  GetNuGetPackageCachePath\n\n  ReadGlobalVersion \"Microsoft.DotNet.Arcade.Sdk\"\n\n  local toolset_version=$_ReadGlobalVersion\n  local toolset_tools_dir=\"$toolset_dir/$toolset_version\"\n\n  # Check if the toolset has already been extracted\n  local toolset_build_proj=\"\"\n  if [[ -a \"$toolset_tools_dir/Build.proj\" ]]; then\n    toolset_build_proj=\"$toolset_tools_dir/Build.proj\"\n  fi\n\n  if [[ -n \"$toolset_build_proj\" ]]; then\n    # return value\n    _InitializeToolset=\"$toolset_build_proj\"\n    return\n  fi\n\n  if [[ \"$restore\" != true ]]; then\n    Write-PipelineTelemetryError -category 'InitializeToolset' \"Toolset version $toolset_version has not been restored.\"\n    ExitWithExitCode 2\n  fi\n\n  local download_args=(\"package\" \"download\" \"Microsoft.DotNet.Arcade.Sdk@$toolset_version\" \"--verbosity\" \"minimal\" \"--prerelease\" \"--output\" \"$_GetNuGetPackageCachePath\")\n  local nuget_config=\"${NUGET_CONFIG:-}\"\n  if [[ -z \"$nuget_config\" ]]; then\n    # Search for any variation of nuget.config in the RepoRoot\n    local found_config\n    found_config=$(find \"$repo_root\" -maxdepth 1 -type f -iname \"nuget.config\" -print -quit)\n\n    if [[ -n \"$found_config\" ]]; then\n      nuget_config=\"$found_config\"\n    fi\n  fi\n\n  if [[ -n \"$nuget_config\" ]]; then\n    download_args+=(\"--configfile\" \"$nuget_config\")\n  fi\n  DotNet \"${download_args[@]}\"\n\n  local package_dir=\"$_GetNuGetPackageCachePath/microsoft.dotnet.arcade.sdk/$toolset_version\"\n\n  # TODO: Remove the tools/ check once all supported versions have the toolset folder.\n  if [[ ! -d \"$package_dir/toolset\" && ! -d \"$package_dir/tools\" ]]; then\n    Write-PipelineTelemetryError -category 'InitializeToolset' \"Arcade SDK package does not contain a toolset or tools folder: $package_dir\"\n    ExitWithExitCode 3\n  fi\n\n  mkdir -p \"$toolset_tools_dir\"\n\n  # Copy toolset if present at the package root (new layout), otherwise fall back to tools\n  if [[ -d \"$package_dir/toolset\" ]]; then\n    cp -r \"$package_dir/toolset/.\" \"$toolset_tools_dir\"\n  else\n    # TODO: Remove this fallback once all supported versions have the toolset folder.\n    cp -r \"$package_dir/tools/.\" \"$toolset_tools_dir\"\n  fi\n\n  if [[ -a \"$toolset_tools_dir/Build.proj\" ]]; then\n    toolset_build_proj=\"$toolset_tools_dir/Build.proj\"\n  else\n    Write-PipelineTelemetryError -category 'Build' \"Unable to find Build.proj in toolset at: $toolset_tools_dir\"\n    ExitWithExitCode 3\n  fi\n\n  # return value\n  _InitializeToolset=\"$toolset_build_proj\"\n}\n\nfunction ExitWithExitCode {\n  if [[ \"$ci\" == true && \"$prepare_machine\" == true ]]; then\n    StopProcesses\n  fi\n  exit $1\n}\n\nfunction StopProcesses {\n  echo \"Killing running build processes...\"\n  pkill -9 \"dotnet\" || true\n  pkill -9 \"vbcscompiler\" || true\n  return 0\n}\n\nfunction DotNet {\n  InitializeDotNetCli $restore\n\n  local dotnet_path=\"$_InitializeDotNetCli/dotnet\"\n\n  export ARCADE_BUILD_TOOL_COMMAND=\"$dotnet_path $@\"\n\n  \"$dotnet_path\" \"$@\" || {\n    local exit_code=$?\n    echo \"dotnet command failed with exit code $exit_code. Check errors above.\"\n\n    if [[ \"$ci\" == true && -n ${SYSTEM_TEAMPROJECT:-} && \"$from_vmr\" != true ]]; then\n      Write-PipelineSetResult -result \"Failed\" -message \"dotnet command execution failed.\"\n      ExitWithExitCode 0\n    else\n      ExitWithExitCode $exit_code\n    fi\n  }\n}\n\nfunction MSBuild {\n  local args=( \"$@\" )\n  if [[ \"$pipelines_log\" == true ]]; then\n    InitializeBuildTool\n    InitializeToolset\n\n    if [[ \"$ci\" == true ]]; then\n      export NUGET_PLUGIN_HANDSHAKE_TIMEOUT_IN_SECONDS=20\n      export NUGET_PLUGIN_REQUEST_TIMEOUT_IN_SECONDS=20\n      Write-PipelineSetVariable -name \"NUGET_PLUGIN_HANDSHAKE_TIMEOUT_IN_SECONDS\" -value \"20\"\n      Write-PipelineSetVariable -name \"NUGET_PLUGIN_REQUEST_TIMEOUT_IN_SECONDS\" -value \"20\"\n    fi\n\n    local toolset_dir=\"${_InitializeToolset%/*}\"\n    local selectedPath=\"$toolset_dir/net/Microsoft.DotNet.ArcadeLogging.dll\"\n\n    if [[ -z \"$selectedPath\" ]]; then\n      Write-PipelineTelemetryError -category 'Build'  \"Unable to find arcade sdk logger assembly: $selectedPath\"\n      ExitWithExitCode 1\n    fi\n\n    args+=( \"-logger:$selectedPath\" )\n  fi\n\n  MSBuild-Core \"${args[@]}\"\n}\n\nfunction MSBuild-Core {\n  if [[ \"$ci\" == true ]]; then\n    if [[ \"$binary_log\" != true && \"$exclude_ci_binary_log\" != true ]]; then\n      Write-PipelineTelemetryError -category 'Build'  \"Binary log must be enabled in CI build, or explicitly opted-out from with the -noBinaryLog switch.\"\n      ExitWithExitCode 1\n    fi\n\n    if [[ \"$node_reuse\" == true ]]; then\n      Write-PipelineTelemetryError -category 'Build'  \"Node reuse must be disabled in CI build.\"\n      ExitWithExitCode 1\n    fi\n  fi\n\n  InitializeBuildTool\n\n  local warnaserror_switch=\"\"\n  if [[ $warn_as_error == true ]]; then\n    warnaserror_switch=\"/warnaserror\"\n  fi\n\n  function RunBuildTool {\n    export ARCADE_BUILD_TOOL_COMMAND=\"$_InitializeBuildTool $@\"\n\n    \"$_InitializeBuildTool\" \"$@\" || {\n      local exit_code=$?\n      # We should not Write-PipelineTaskError here because that message shows up in the build summary\n      # The build already logged an error, that's the reason it failed. Producing an error here only adds noise.\n      echo \"Build failed with exit code $exit_code. Check errors above.\"\n\n      # When running on Azure Pipelines, override the returned exit code to avoid double logging.\n      # Skip this when the build is a child of the VMR build.\n      if [[ \"$ci\" == true && -n ${SYSTEM_TEAMPROJECT:-} && \"$from_vmr\" != true ]]; then\n        Write-PipelineSetResult -result \"Failed\" -message \"msbuild execution failed.\"\n        # Exiting with an exit code causes the azure pipelines task to log yet another \"noise\" error\n        # The above Write-PipelineSetResult will cause the task to be marked as failure without adding yet another error\n        ExitWithExitCode 0\n      else\n        ExitWithExitCode $exit_code\n      fi\n    }\n  }\n\n  # Add -mt flag for MSBuild multithreaded mode if enabled via environment variable\n  local mt_switch=\"\"\n  if [[ \"${MSBUILD_MT_ENABLED:-}\" == \"1\" ]]; then\n    mt_switch=\"-mt\"\n  fi\n\n  local warnnotaserror_switch=\"\"\n  if [[ -n \"$warn_not_as_error\" && \"$warn_as_error\" == true ]]; then\n    warnnotaserror_switch=\"/warnnotaserror:$warn_not_as_error /p:AdditionalWarningsNotAsErrors=$warn_not_as_error\"\n  fi\n\n  RunBuildTool \"$_InitializeBuildToolCommand\" /m /nologo /clp:Summary /v:$verbosity /nr:$node_reuse $warnaserror_switch $mt_switch $warnnotaserror_switch /p:TreatWarningsAsErrors=$warn_as_error /p:ContinuousIntegrationBuild=$ci \"$@\"\n}\n\nfunction GetDarc {\n    darc_path=\"$temp_dir/darc\"\n    version=\"$1\"\n\n    if [[ -n \"$version\" ]]; then\n      version=\"--darcversion $version\"\n    fi\n\n    \"$eng_root/common/darc-init.sh\" --toolpath \"$darc_path\" $version\n    darc_tool=\"$darc_path/darc\"\n}\n\n# Returns a full path to an Arcade SDK task project file.\nfunction GetSdkTaskProject {\n  local taskName=$1\n  local toolsetDir\n  toolsetDir=\"$(dirname \"$_InitializeToolset\")\"\n  local proj=\"$toolsetDir/$taskName.proj\"\n  if [[ -a \"$proj\" ]]; then\n    echo \"$proj\"\n    return\n  fi\n  # TODO: Remove this fallback once all supported versions use the new layout.\n  local legacyProj=\"$toolsetDir/SdkTasks/$taskName.proj\"\n  if [[ -a \"$legacyProj\" ]]; then\n    echo \"$legacyProj\"\n    return\n  fi\n  Write-PipelineTelemetryError -category 'Build' \"Unable to find $taskName.proj in toolset at: $toolsetDir\"\n  ExitWithExitCode 3\n}\n\nResolvePath \"${BASH_SOURCE[0]}\"\n_script_dir=`dirname \"$_ResolvePath\"`\n\n. \"$_script_dir/pipeline-logging-functions.sh\"\n\neng_root=`cd -P \"$_script_dir/..\" && pwd`\nrepo_root=`cd -P \"$_script_dir/../..\" && pwd`\nrepo_root=\"${repo_root}/\"\nartifacts_dir=\"${repo_root}artifacts\"\ntoolset_dir=\"$artifacts_dir/toolset\"\ntools_dir=\"${repo_root}.tools\"\nlog_dir=\"$artifacts_dir/log/$configuration\"\ntemp_dir=\"$artifacts_dir/tmp/$configuration\"\n\nglobal_json_file=\"${repo_root}global.json\"\n# determine if global.json contains a \"runtimes\" entry\nglobal_json_has_runtimes=false\nif command -v jq &> /dev/null; then\n  if jq -e '.tools | has(\"runtimes\")' \"$global_json_file\" &> /dev/null; then\n    global_json_has_runtimes=true\n  fi\nelif [[ \"$(cat \"$global_json_file\")\" =~ \\\"runtimes\\\"[[:space:]\\:]*\\{ ]]; then\n  global_json_has_runtimes=true\nfi\n\n# HOME may not be defined in some scenarios, but it is required by NuGet\nif [[ -z $HOME ]]; then\n  export HOME=\"${repo_root}artifacts/.home/\"\n  mkdir -p \"$HOME\"\nfi\n\nmkdir -p \"$toolset_dir\"\nmkdir -p \"$temp_dir\"\nmkdir -p \"$log_dir\"\n\nWrite-PipelineSetVariable -name \"Artifacts\" -value \"$artifacts_dir\"\nWrite-PipelineSetVariable -name \"Artifacts.Toolset\" -value \"$toolset_dir\"\nWrite-PipelineSetVariable -name \"Artifacts.Log\" -value \"$log_dir\"\nWrite-PipelineSetVariable -name \"Temp\" -value \"$temp_dir\"\nWrite-PipelineSetVariable -name \"TMP\" -value \"$temp_dir\"\n\n# Import custom tools configuration, if present in the repo.\nif [ -z \"${disable_configure_toolset_import:-}\" ]; then\n  configure_toolset_script=\"$eng_root/configure-toolset.sh\"\n  if [[ -a \"$configure_toolset_script\" ]]; then\n    . \"$configure_toolset_script\"\n  fi\nfi\n\n# TODO: https://github.com/dotnet/arcade/issues/1468\n# Temporary workaround to avoid breaking change.\n# Remove once repos are updated.\nif [[ -n \"${useInstalledDotNetCli:-}\" ]]; then\n  use_installed_dotnet_cli=\"$useInstalledDotNetCli\"\nfi\n"
  },
  {
    "path": "eng/common/vmr-sync.ps1",
    "content": "<#\n.SYNOPSIS\n\nThis script is used for synchronizing the current repository into a local VMR.\nIt pulls the current repository's code into the specified VMR directory for local testing or\nSource-Build validation.\n\n.DESCRIPTION\n\nThe tooling used for synchronization will clone the VMR repository into a temporary folder if\nit does not already exist. These clones can be reused in future synchronizations, so it is\nrecommended to dedicate a folder for this to speed up re-runs.\n\n.EXAMPLE\n  Synchronize current repository into a local VMR:\n    ./vmr-sync.ps1 -vmrDir \"$HOME/repos/dotnet\" -tmpDir \"$HOME/repos/tmp\"\n\n.PARAMETER tmpDir\nRequired. Path to the temporary folder where repositories will be cloned\n\n.PARAMETER vmrBranch\nOptional. Branch of the 'dotnet/dotnet' repo to synchronize. The VMR will be checked out to this branch\n\n.PARAMETER azdevPat\nOptional. Azure DevOps PAT to use for cloning private repositories.\n\n.PARAMETER vmrDir\nOptional. Path to the dotnet/dotnet repository. When null, gets cloned to the temporary folder\n\n.PARAMETER debugOutput\nOptional. Enables debug logging in the darc vmr command.\n\n.PARAMETER ci\nOptional. Denotes that the script is running in a CI environment.\n#>\nparam (\n  [Parameter(Mandatory=$true, HelpMessage=\"Path to the temporary folder where repositories will be cloned\")]\n  [string][Alias('t', 'tmp')]$tmpDir,\n  [string][Alias('b', 'branch')]$vmrBranch,\n  [string]$remote,\n  [string]$azdevPat,\n  [string][Alias('v', 'vmr')]$vmrDir,\n  [switch]$ci,\n  [switch]$debugOutput\n)\n\nfunction Fail {\n  Write-Host \"> $($args[0])\" -ForegroundColor 'Red'\n}\n\nfunction Highlight {\n  Write-Host \"> $($args[0])\" -ForegroundColor 'Cyan'\n}\n\n$verbosity = 'verbose'\nif ($debugOutput) {\n  $verbosity = 'debug'\n}\n# Validation\n\nif (-not $tmpDir) {\n  Fail \"Missing -tmpDir argument. Please specify the path to the temporary folder where the repositories will be cloned\"\n  exit 1\n}\n\n# Sanitize the input\n\nif (-not $vmrDir) {\n  $vmrDir = Join-Path $tmpDir 'dotnet'\n}\n\nif (-not (Test-Path -Path $tmpDir -PathType Container)) {\n  New-Item -ItemType Directory -Path $tmpDir | Out-Null\n}\n\n# Prepare the VMR\n\nif (-not (Test-Path -Path $vmrDir -PathType Container)) {\n  Highlight \"Cloning 'dotnet/dotnet' into $vmrDir..\"\n  git clone https://github.com/dotnet/dotnet $vmrDir\n\n  if ($vmrBranch) {\n    git -C $vmrDir switch -c $vmrBranch\n  }\n}\nelse {\n  if ((git -C $vmrDir diff --quiet) -eq $false) {\n    Fail \"There are changes in the working tree of $vmrDir. Please commit or stash your changes\"\n    exit 1\n  }\n\n  if ($vmrBranch) {\n    Highlight \"Preparing $vmrDir\"\n    git -C $vmrDir checkout $vmrBranch\n    git -C $vmrDir pull\n  }\n}\n\nSet-StrictMode -Version Latest\n\n# Prepare darc\n\nHighlight 'Installing .NET, preparing the tooling..'\n. .\\eng\\common\\tools.ps1\n$dotnetRoot = InitializeDotNetCli -install:$true\n$env:DOTNET_ROOT = $dotnetRoot\n$darc = Get-Darc\n\nHighlight \"Starting the synchronization of VMR..\"\n\n# Synchronize the VMR\n$versionDetailsPath = Resolve-Path (Join-Path $PSScriptRoot '..\\Version.Details.xml') | Select-Object -ExpandProperty Path\n[xml]$versionDetails = Get-Content -Path $versionDetailsPath\n$repoName = $versionDetails.SelectSingleNode('//Source').Mapping\nif (-not $repoName) {\n  Fail \"Failed to resolve repo mapping from $versionDetailsPath\"\n  exit 1\n}\n\n$darcArgs = (\n  \"vmr\", \"forwardflow\",\n  \"--tmp\", $tmpDir,\n  \"--$verbosity\",\n  $vmrDir\n)\n\nif ($ci) {\n  $darcArgs += (\"--ci\")\n}\n\nif ($azdevPat) {\n  $darcArgs += (\"--azdev-pat\", $azdevPat)\n}\n\n& \"$darc\" $darcArgs\n\nif ($LASTEXITCODE -eq 0) {\n  Highlight \"Synchronization succeeded\"\n}\nelse {\n  Highlight \"Failed to flow code into the local VMR. Falling back to resetting the VMR to match repo contents...\"\n  git -C $vmrDir reset --hard\n\n  $resetArgs = (\n    \"vmr\", \"reset\",\n    \"${repoName}:HEAD\",\n    \"--vmr\", $vmrDir,\n    \"--tmp\", $tmpDir,\n    \"--additional-remotes\", \"${repoName}:${repoRoot}\"\n  )\n\n  & \"$darc\" $resetArgs\n\n  if ($LASTEXITCODE -eq 0) {\n    Highlight \"Successfully reset the VMR using 'darc vmr reset'\"\n  }\n  else {\n    Fail \"Synchronization of repo to VMR failed!\"\n    Fail \"'$vmrDir' is left in its last state (re-run of this script will reset it).\"\n    Fail \"Please inspect the logs which contain path to the failing patch file (use -debugOutput to get all the details).\"\n    Fail \"Once you make changes to the conflicting VMR patch, commit it locally and re-run this script.\"\n    exit 1\n  }\n}\n"
  },
  {
    "path": "eng/common/vmr-sync.sh",
    "content": "#!/bin/bash\n\n### This script is used for synchronizing the current repository into a local VMR.\n### It pulls the current repository's code into the specified VMR directory for local testing or\n### Source-Build validation.\n###\n### The tooling used for synchronization will clone the VMR repository into a temporary folder if\n### it does not already exist. These clones can be reused in future synchronizations, so it is\n### recommended to dedicate a folder for this to speed up re-runs.\n###\n### USAGE:\n###   Synchronize current repository into a local VMR:\n###     ./vmr-sync.sh --tmp \"$HOME/repos/tmp\" \"$HOME/repos/dotnet\"\n###\n### Options:\n###   -t, --tmp, --tmp-dir PATH\n###       Required. Path to the temporary folder where repositories will be cloned\n###\n###   -b, --branch, --vmr-branch BRANCH_NAME\n###       Optional. Branch of the 'dotnet/dotnet' repo to synchronize. The VMR will be checked out to this branch\n###\n###   --debug\n###       Optional. Turns on the most verbose logging for the VMR tooling\n###\n###   --remote name:URI\n###       Optional. Additional remote to use during the synchronization\n###       This can be used to synchronize to a commit from a fork of the repository\n###       Example: 'runtime:https://github.com/yourfork/runtime'\n###\n###   --azdev-pat\n###       Optional. Azure DevOps PAT to use for cloning private repositories.\n###\n###   -v, --vmr, --vmr-dir PATH\n###       Optional. Path to the dotnet/dotnet repository. When null, gets cloned to the temporary folder\n\nsource=\"${BASH_SOURCE[0]}\"\n\n# resolve $source until the file is no longer a symlink\nwhile [[ -h \"$source\" ]]; do\n  scriptroot=\"$( cd -P \"$( dirname \"$source\" )\" && pwd )\"\n  source=\"$(readlink \"$source\")\"\n  # if $source was a relative symlink, we need to resolve it relative to the path where the\n  # symlink file was located\n  [[ $source != /* ]] && source=\"$scriptroot/$source\"\ndone\nscriptroot=\"$( cd -P \"$( dirname \"$source\" )\" && pwd )\"\n\nfunction print_help () {\n    sed -n '/^### /,/^$/p' \"$source\" | cut -b 5-\n}\n\nCOLOR_RED=$(tput setaf 1 2>/dev/null || true)\nCOLOR_CYAN=$(tput setaf 6 2>/dev/null || true)\nCOLOR_CLEAR=$(tput sgr0 2>/dev/null || true)\nCOLOR_RESET=uniquesearchablestring\nFAILURE_PREFIX='> '\n\nfunction fail () {\n  echo \"${COLOR_RED}$FAILURE_PREFIX${1//${COLOR_RESET}/${COLOR_RED}}${COLOR_CLEAR}\" >&2\n}\n\nfunction highlight () {\n  echo \"${COLOR_CYAN}$FAILURE_PREFIX${1//${COLOR_RESET}/${COLOR_CYAN}}${COLOR_CLEAR}\"\n}\n\ntmp_dir=''\nvmr_dir=''\nvmr_branch=''\nadditional_remotes=''\nverbosity=verbose\nazdev_pat=''\nci=false\n\nwhile [[ $# -gt 0 ]]; do\n  opt=\"$(echo \"$1\" | tr \"[:upper:]\" \"[:lower:]\")\"\n  case \"$opt\" in\n    -t|--tmp|--tmp-dir)\n      tmp_dir=$2\n      shift\n      ;;\n    -v|--vmr|--vmr-dir)\n      vmr_dir=$2\n      shift\n      ;;\n    -b|--branch|--vmr-branch)\n      vmr_branch=$2\n      shift\n      ;;\n    --remote)\n      additional_remotes=\"$additional_remotes $2\"\n      shift\n      ;;\n    --azdev-pat)\n      azdev_pat=$2\n      shift\n      ;;\n    --ci)\n      ci=true\n      ;;\n    -d|--debug)\n      verbosity=debug\n      ;;\n    -h|--help)\n      print_help\n      exit 0\n      ;;\n    *)\n      fail \"Invalid argument: $1\"\n      print_help\n      exit 1\n      ;;\n  esac\n\n  shift\ndone\n\n# Validation\n\nif [[ -z \"$tmp_dir\" ]]; then\n  fail \"Missing --tmp-dir argument. Please specify the path to the temporary folder where the repositories will be cloned\"\n  exit 1\nfi\n\n# Sanitize the input\n\nif [[ -z \"$vmr_dir\" ]]; then\n  vmr_dir=\"$tmp_dir/dotnet\"\nfi\n\nif [[ ! -d \"$tmp_dir\" ]]; then\n  mkdir -p \"$tmp_dir\"\nfi\n\nif [[ \"$verbosity\" == \"debug\" ]]; then\n  set -x\nfi\n\n# Prepare the VMR\n\nif [[ ! -d \"$vmr_dir\" ]]; then\n  highlight \"Cloning 'dotnet/dotnet' into $vmr_dir..\"\n  git clone https://github.com/dotnet/dotnet \"$vmr_dir\"\n\n  if [[ -n \"$vmr_branch\" ]]; then\n    git -C \"$vmr_dir\" switch -c \"$vmr_branch\"\n  fi\nelse\n  if ! git -C \"$vmr_dir\" diff --quiet; then\n    fail \"There are changes in the working tree of $vmr_dir. Please commit or stash your changes\"\n    exit 1\n  fi\n\n  if [[ -n \"$vmr_branch\" ]]; then\n    highlight \"Preparing $vmr_dir\"\n    git -C \"$vmr_dir\" checkout \"$vmr_branch\"\n    git -C \"$vmr_dir\" pull\n  fi\nfi\n\nset -e\n\n# Prepare darc\n\nhighlight 'Installing .NET, preparing the tooling..'\nsource \"./eng/common/tools.sh\"\nInitializeDotNetCli true\nGetDarc\ndotnetDir=$( cd ./.dotnet/; pwd -P )\ndotnet=$dotnetDir/dotnet\n\nhighlight \"Starting the synchronization of VMR..\"\nset +e\n\nif [[ -n \"$additional_remotes\" ]]; then\n  additional_remotes=\"--additional-remotes $additional_remotes\"\nfi\n\nif [[ -n \"$azdev_pat\" ]]; then\n  azdev_pat=\"--azdev-pat $azdev_pat\"\nfi\n\nci_arg=''\nif [[ \"$ci\" == \"true\" ]]; then\n  ci_arg=\"--ci\"\nfi\n\n# Synchronize the VMR\n\nversion_details_path=$(cd \"$scriptroot/..\"; pwd -P)/Version.Details.xml\nrepo_name=$(grep -m 1 '<Source ' \"$version_details_path\" | sed -n 's/.*Mapping=\"\\([^\"]*\\)\".*/\\1/p')\nif [[ -z \"$repo_name\" ]]; then\n  fail \"Failed to resolve repo mapping from $version_details_path\"\n  exit 1\nfi\n\nexport DOTNET_ROOT=\"$dotnetDir\"\n\n\"$darc_tool\" vmr forwardflow \\\n  --tmp \"$tmp_dir\"             \\\n  $azdev_pat                   \\\n  --$verbosity                 \\\n  $ci_arg                      \\\n  $additional_remotes          \\\n  \"$vmr_dir\"\n\nif [[ $? == 0 ]]; then\n  highlight \"Synchronization succeeded\"\nelse\n  highlight \"Failed to flow code into the local VMR. Falling back to resetting the VMR to match repo contents...\"\n  git -C \"$vmr_dir\" reset --hard\n\n  \"$darc_tool\" vmr reset \\\n    \"$repo_name:HEAD\"                              \\\n    --vmr \"$vmr_dir\"                               \\\n    --tmp \"$tmp_dir\"                               \\\n    --additional-remotes \"$repo_name:$repo_root\"\n\n  if [[ $? == 0 ]]; then\n    highlight \"Successfully reset the VMR using 'darc vmr reset'\"\n  else\n    fail \"Synchronization of repo to VMR failed!\"\n    fail \"'$vmr_dir' is left in its last state (re-run of this script will reset it).\"\n    fail \"Please inspect the logs which contain path to the failing patch file (use --debug to get all the details).\"\n    fail \"Once you make changes to the conflicting VMR patch, commit it locally and re-run this script.\"\n    exit 1\n  fi\nfi\n"
  },
  {
    "path": "eng/pipelines/jobs/windows-build-PR.yml",
    "content": "parameters:\n  additionalMSBuildArguments: ''\n  displayName: ''\n  skipTests: $(SkipTests)\n  targetArchitecture: null\n  timeoutInMinutes: 120\n\njobs:\n  - job: ${{ parameters.name }}\n    displayName: ${{ parameters.displayName }}\n    timeoutInMinutes: ${{ parameters.timeoutInMinutes }}\n    pool:\n      # Use a hosted pool when possible.\n      ${{ if eq(variables['System.TeamProject'], 'public') }}:\n        vmImage: 'windows-2022'\n      ${{ if ne(variables['System.TeamProject'], 'public') }}:\n        name: NetCore1ESPool-Internal\n        demands: ImageOverride -equals windows.vs2019.amd64\n    strategy:\n      matrix: \n        Debug:\n          _BuildConfig: Debug\n        Release:\n          _BuildConfig: Release\n    workspace:\n      clean: all\n    variables: \n      - name: CommonMSBuildArgs\n        value: >-\n          -c $(_BuildConfig)\n          /p:TargetArchitecture=${{ parameters.targetArchitecture }}\n          /p:SkipTests=${{ parameters.skipTests }}\n      - name: TargetArchitecture\n        value: ${{ parameters.targetArchitecture }}\n      - ${{ if eq(variables['System.TeamProject'], 'public') }}:\n        - name: MsbuildSigningArguments\n          value: /p:DotNetSignType=Test\n        - name: InternalRuntimeDownloadArgs\n          value: ''\n      - ${{ if ne(variables['System.TeamProject'], 'public') }}:\n        - name: MsbuildSigningArguments\n          value: /p:DotNetSignType=Real\n        - name: InternalRuntimeDownloadArgs\n          value: /p:RuntimeSourceFeed=https://ci.dot.net/internal /p:RuntimeSourceFeedKey=$(dotnetbuilds-internal-container-read-token-base64)\n\n    steps:\n    - template: /eng/common/templates/steps/enable-internal-sources.yml\n    - template: /eng/common/templates/steps/enable-internal-runtimes.yml\n\n    - ${{ if ne(variables['System.TeamProject'], 'public') }}:\n      - task: MicroBuildSigningPlugin@4\n        displayName: Install MicroBuild plugin for Signing\n        inputs:\n          signType: $(SignType)\n          zipSources: false\n          feedSource: https://dnceng.pkgs.visualstudio.com/_packaging/MicroBuildToolset/nuget/v3/index.json\n        continueOnError: false\n        condition: and(succeeded(), in(variables['SignType'], 'real', 'test'))\n\n    - script: >-\n        eng/common/cibuild.cmd\n        $(CommonMSBuildArgs)\n        $(MsbuildSigningArguments)\n        $(InternalRuntimeDownloadArgs)\n      displayName: Build\n\n    - ${{ if ne(parameters.skipTests, 'true') }}:\n      - task: PublishTestResults@2\n        displayName: Publish Test Results\n        inputs:\n          testResultsFormat: 'xUnit'\n          testResultsFiles: '*.xml'\n          searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)'\n          mergeTestResults: true\n          testRunTitle: ${{ parameters.name }}-$(_BuildConfig)\n        continueOnError: true\n        condition: always()\n\n    - task: CopyFiles@2\n      displayName: Prepare BuildLogs staging directory\n      inputs:\n        SourceFolder: '$(Build.SourcesDirectory)'\n        Contents: |\n          **/*.log\n          **/*.binlog\n        TargetFolder: '$(Build.StagingDirectory)/BuildLogs'\n        CleanTargetFolder: true\n      continueOnError: true\n      condition: succeededOrFailed()\n\n    - task: PublishBuildArtifacts@1\n      displayName: Publish BuildLogs\n      inputs:\n        PathtoPublish: '$(Build.StagingDirectory)/BuildLogs'\n        ArtifactName: Logs-${{ parameters.name }}-$(_BuildConfig)\n      continueOnError: true\n      condition: succeededOrFailed()\n"
  },
  {
    "path": "eng/pipelines/tsaoptions.json",
    "content": "{  \n    \"instanceUrl\": \"https://devdiv.visualstudio.com/\",\n    \"template\": \"TFSDEVDIV\",\n    \"projectName\": \"DEVDIV\",\n    \"areaPath\": \"DevDiv\\\\NET Fundamentals\\\\WindowsDesktop\",\n    \"iterationPath\": \"DevDiv\",\n    \"notificationAliases\": [ \"windowsdesktopdevs@service.microsoft.com\" ],\n    \"repositoryName\":\"WindowsDesktop\",\n    \"codebaseName\": \"WindowsDesktop\"\n}"
  },
  {
    "path": "eng/sdl-tsa-vars.config",
    "content": "-SourceToolsList @(\"policheck\",\"credscan\")\n-ArtifactToolsList @(\"binskim\")\n-TsaInstanceURL https://devdiv.visualstudio.com/\n-TsaProjectName DEVDIV\n-TsaNotificationEmail wffteam@microsoft.com\n-TsaCodebaseAdmin REDMOND\\advolker\n-TsaBugAreaPath \"DevDiv\\NET Fundamentals\\WindowsDesktop\"\n-TsaIterationPath DevDiv\n-TsaRepositoryName WindowsDesktop\n-TsaCodebaseName WindowsDesktop\n-TsaOnboard $True\n-TsaPublish $True"
  },
  {
    "path": "es-metadata.yml",
    "content": "schemaVersion: 0.0.1\nisProduction: true\naccountableOwners:\n  service: 207fa7e8-9931-4637-a9c1-75b5bc8c289e\nrouting:\n  defaultAreaPath:\n    org: devdiv\n    path: DevDiv\\NET Fundamentals\\WindowsDesktop\n"
  },
  {
    "path": "github-merge-flow.jsonc",
    "content": "// IMPORTANT: This file is read by the merge flow from main branch only. \n{\n    \"merge-flow-configurations\": {\n        \"release/8.0\":{\n            \"MergeToBranch\": \"release/9.0\",\n            \"ExtraSwitches\": \"-QuietComments\"\n        },\n        \"release/9.0\":{\n            \"MergeToBranch\": \"release/10.0\",\n            \"ExtraSwitches\": \"-QuietComments\"\n        },\n        \"release/10.0\":{\n            \"MergeToBranch\": \"main\",\n            \"ExtraSwitches\": \"-QuietComments\"\n        }\n    }\n}\n"
  },
  {
    "path": "global.json",
    "content": "{\n  \"sdk\": {\n    \"version\": \"11.0.100-preview.4.26210.111\",\n    \"allowPrerelease\": true,\n    \"rollForward\": \"latestFeature\",\n    \"paths\": [\n      \".dotnet\",\n      \"$host$\"\n    ],\n    \"errorMessage\": \"The required .NET SDK wasn't found. Please run ./eng/common/dotnet.cmd/sh to install it.\"\n  },\n  \"tools\": {\n    \"dotnet\": \"11.0.100-preview.4.26210.111\",\n    \"runtimes\": {\n      \"dotnet\": [\n        \"$(MicrosoftNETCorePlatformsVersion)\"\n      ]\n    }\n  },\n  \"msbuild-sdks\": {\n    \"Microsoft.DotNet.Arcade.Sdk\": \"11.0.0-beta.26230.101\",\n    \"Microsoft.DotNet.SharedFramework.Sdk\": \"11.0.0-beta.26230.101\",\n    \"Microsoft.Build.NoTargets\": \"3.7.0\",\n    \"Microsoft.Build.Traversal\": \"3.4.0\",\n    \"Microsoft.WixToolset.Sdk\": \"6.0.3-dotnet.4\"\n  }\n}\n"
  },
  {
    "path": "src/Microsoft.Windows.Compatibility/package/Directory.Build.props",
    "content": "<Project>\n  <PropertyGroup>\n    <!-- don't produce any packages -->\n    <IsPackable>false</IsPackable>\n    <IsShipping>false</IsShipping>\n\n    <!-- use a fake version higher than the one produced by the product -->\n    <PackageVersion>4242.42.42</PackageVersion>\n  </PropertyGroup>\n\n  <Import Project=\"$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory).., Directory.Build.props))\\Directory.Build.props\" />\n\n</Project>"
  },
  {
    "path": "src/Microsoft.Windows.Compatibility/package/runtime.native.System.IO.Ports.csproj",
    "content": "<Project Sdk=\"Microsoft.Build.NoTargets\">\n  <PropertyGroup>\n    <TargetFramework>netstandard2.0</TargetFramework>\n  </PropertyGroup>\n  <!-- Intentionally empty, used to act as a stand-in for the runtime-produced package to avoid downloading the actual packages -->\n</Project>"
  },
  {
    "path": "src/Microsoft.Windows.Compatibility/src/Microsoft.Windows.Compatibility.csproj",
    "content": "<Project Sdk=\"Microsoft.Build.NoTargets\">\n\n  <PropertyGroup>\n    <!-- Using a csproj extension to get the correct multi-targeting behavior. -->\n    <TargetFrameworks>$(NetCurrent);$(NetPrevious);$(NetMinimum);netstandard2.1;netstandard2.0</TargetFrameworks>\n    <!-- Reference the outputs for the dependency nodes calculation. -->\n    <NoTargetsDoNotReferenceOutputAssemblies>false</NoTargetsDoNotReferenceOutputAssemblies>\n    <IsPackable>true</IsPackable>\n    <!-- This is a meta package and doesn't contain any libs. -->\n    <NoWarn>$(NoWarn);NU5128</NoWarn>\n    <GeneratePackageOnBuild>true</GeneratePackageOnBuild>\n    <PackageDescription>This Windows Compatibility Pack provides access to APIs that were previously available only for .NET Framework. It can be used from both .NET as well as .NET Standard.</PackageDescription>\n    <PackageReadmeFile>PACKAGE.md</PackageReadmeFile>\n  </PropertyGroup>\n\n  <ItemGroup>\n    <None Include=\"PACKAGE.md\" Pack=\"true\" PackagePath=\"\" />\n  </ItemGroup>\n\n  <ItemGroup>\n    <PackageReference Include=\"Microsoft.Win32.Registry.AccessControl\" />\n    <PackageReference Include=\"Microsoft.Win32.SystemEvents\" />\n    <PackageReference Include=\"System.CodeDom\" />\n    <PackageReference Include=\"System.ComponentModel.Composition\" />\n    <PackageReference Include=\"System.Configuration.ConfigurationManager\" />\n    <PackageReference Include=\"System.Data.Odbc\" />\n    <PackageReference Include=\"System.Data.OleDb\" />\n    <PackageReference Include=\"System.Diagnostics.EventLog\" />\n    <PackageReference Include=\"System.Diagnostics.PerformanceCounter\" />\n    <PackageReference Include=\"System.DirectoryServices.AccountManagement\" />\n    <PackageReference Include=\"System.DirectoryServices.Protocols\" />\n    <PackageReference Include=\"System.DirectoryServices\" />\n    <PackageReference Include=\"System.Drawing.Common\" />\n    <PackageReference Include=\"System.IO.Packaging\" />\n    <PackageReference Include=\"System.IO.Ports\" />\n    <!-- Use an empty project to replace the runtime.native.System.IO.Ports dependency and avoid \n         downloading native packages from other runtimes.  Mark it private to avoid it showing up\n         in the final package. -->\n    <ProjectReference Include=\"..\\package\\runtime.native.System.IO.Ports.csproj\" PrivateAssets=\"All\"/>\n    <PackageReference Include=\"System.Management\" />\n    <PackageReference Include=\"System.Reflection.Context\" />\n    <PackageReference Include=\"System.Runtime.Caching\" />\n    <PackageReference Include=\"System.Security.Cryptography.Pkcs\" />\n    <PackageReference Include=\"System.Security.Cryptography.ProtectedData\" />\n    <PackageReference Include=\"System.Security.Cryptography.Xml\" />\n    <PackageReference Include=\"System.Security.Permissions\" />\n    <PackageReference Include=\"System.ServiceModel.Http\" />\n    <PackageReference Include=\"System.ServiceModel.NetTcp\" />\n    <PackageReference Include=\"System.ServiceModel.Primitives\" />\n    <PackageReference Include=\"System.ServiceModel.Syndication\" />\n    <PackageReference Include=\"System.ServiceProcess.ServiceController\" />\n    <PackageReference Include=\"System.Speech\" />\n    <PackageReference Include=\"System.Text.Encoding.CodePages\" />\n    <PackageReference Include=\"System.Web.Services.Description\" />\n  </ItemGroup>\n  \n  <ItemGroup Condition=\"!$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net10.0'))\">\n    <PackageReference Include=\"System.Threading.AccessControl\" />\n  </ItemGroup>\n\n  <ItemGroup Condition=\"$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'netstandard2.1'))\">\n    <PackageReference Include=\"System.ComponentModel.Composition.Registration\" />\n  </ItemGroup>\n\n  <!-- Packages which are inbox on frameworks newer than .NET Standard 2.0. -->\n  <ItemGroup Condition=\"'$(TargetFramework)' == 'netstandard2.0'\">\n    <PackageReference Include=\"System.Reflection.Emit\" />\n    <PackageReference Include=\"System.Reflection.Emit.ILGeneration\" />\n    <PackageReference Include=\"System.Reflection.Emit.Lightweight\" />\n  </ItemGroup>\n\n  <!-- Packages which are inbox in NET6 and shouldn't be referenced anymore. -->\n  <ItemGroup Condition=\"'$(TargetFrameworkIdentifier)' != '.NETCoreApp'\">\n    <PackageReference Include=\"Microsoft.Win32.Registry\" />\n    <PackageReference Include=\"System.Data.DataSetExtensions\" />\n    <PackageReference Include=\"System.IO.FileSystem.AccessControl\" />\n    <PackageReference Include=\"System.IO.Pipes.AccessControl\" />\n    <PackageReference Include=\"System.Security.AccessControl\" />\n    <PackageReference Include=\"System.Security.Cryptography.Cng\" />\n    <PackageReference Include=\"System.Security.Principal.Windows\" />\n  </ItemGroup>\n\n</Project>"
  },
  {
    "path": "src/Microsoft.Windows.Compatibility/src/PACKAGE.md",
    "content": "# Microsoft.Windows.Compatibility\n\nThe `Microsoft.Windows.Compatibility` package provides Windows-specific APIs to help you port your .NET Framework applications to .NET Core 2.0+, .NET 5+ or .NET Standard. This package offers a smoother transition for those looking to modernize their applications without losing access to familiar Windows functionalities.\n\n## Getting Started\n\nTo start using the `Microsoft.Windows.Compatibility` package, you'll first need to install it via NuGet Package Manager, Package Manager Console, or by editing your project file.\n\n## Usage\n\nAfter installing the package, you can access Windows-specific APIs just like you would in a .NET Framework application. Below are some examples in both C# and VB:\n\n### Writing to the Windows Registry\n\n#### C#\n```csharp\nusing Microsoft.Win32;\n\nclass Program\n{\n    static void Main()\n    {\n        using (RegistryKey key = Registry.CurrentUser.CreateSubKey(\"Software\\\\MyApp\"))\n        {\n            key.SetValue(\"MySetting\", \"MyValue\");\n        }\n    }\n}\n```\n\n#### VB\n```vb\nImports Microsoft.Win32\n\nModule Program\n    Sub Main()\n        Using key As RegistryKey = Registry.CurrentUser.CreateSubKey(\"Software\\MyApp\")\n            key.SetValue(\"MySetting\", \"MyValue\")\n        End Using\n    End Sub\nEnd Module\n```\n\n### Using the Serial Port\n\n#### C#\n```csharp\nusing System.IO.Ports;\n\nclass Program\n{\n    static void Main()\n    {\n        using (SerialPort port = new SerialPort(\"COM1\", 9600))\n        {\n            port.Open();\n            port.WriteLine(\"Hello, world!\");\n        }\n    }\n}\n```\n\n#### VB\n```vb\nImports System.IO.Ports\n\nModule Program\n    Sub Main()\n        Using port As New SerialPort(\"COM1\", 9600)\n            port.Open()\n            port.WriteLine(\"Hello, world!\")\n        End Using\n    End Sub\nEnd Module\n```\n\n## Additional Documentation\n\nFor more in-depth tutorials and API references, you can check the following resources:\n\n- [Use the Windows Compatibility Pack to port code - .NET](https://learn.microsoft.com/dotnet/core/porting/windows-compat-pack)\n- [Announcing the Windows Compatibility Pack for .NET Core](https://devblogs.microsoft.com/dotnet/announcing-the-windows-compatibility-pack-for-net-core/)\n- [Installing NuGet client tools | Microsoft Learn](https://learn.microsoft.com/nuget/consume-packages/install-use-packages-nuget-cli)\n\n## Feedback\n\nWe value your feedback! Here are ways to get in touch with us:\n\n- Open an issue on our [GitHub repository](https://github.com/dotnet/runtime/issues)\n- Reach out on Twitter with the [hashtag #dotnet](https://twitter.com/search?q=%23dotnet)\n- Join our Discord channel: [dotnet/Discord](https://discord.com/invite/dotnet)\n"
  },
  {
    "path": "src/Microsoft.Windows.Compatibility/src/README.md",
    "content": "# Microsoft.Windows.Compatibility package\n\nThis Windows Compatibility Pack provides access to APIs that were previously available only for .NET Framework. It can be used from both .NET as well as .NET Standard.\n\n### How to add a new dependency\n1. Add the package version to the repository's Versions.props file.\n2. Add the package dependency to the repository's Version.Details.xml file. If the dependency doesn't come from a repository with a direct subscription to (i.e. winforms and runtime), add the `CoherentParentDependency` attribute to the dependency.\n3. Add the package reference into the Microsoft.Windows.Compatibility.csproj file and use the version just defined in the Versions.props file.\n4. If a `CoherentParentDependency` attribute was required, a dependency must be added to the repository dependency chain as well. I.e. to add a new dependency from runtime, a dependency must also be added in winforms and wpf's Version.Details.xml file."
  },
  {
    "path": "src/Microsoft.WindowsDesktop.App.Internal/Microsoft.WindowsDesktop.App.Internal.proj",
    "content": "<Project Sdk=\"Microsoft.Build.NoTargets\">\n\n  <!-- A sentinel package only used for communicating non-shipping versions. -->\n  <PropertyGroup>\n    <TargetFramework>$(NetCurrent)</TargetFramework>\n    <IsShippingPackage>false</IsShippingPackage>\n    <IsPackable>true</IsPackable>\n    <IncludeSymbols>false</IncludeSymbols>\n    <SuppressDependenciesWhenPacking>true</SuppressDependenciesWhenPacking>\n    <NoWarn>$(NoWarn);NU5128</NoWarn>\n  </PropertyGroup>\n\n</Project>\n"
  },
  {
    "path": "src/windowsdesktop/src/Directory.Build.props",
    "content": "<Project>\n\n  <Import Project=\"$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory).., Directory.Build.props))\\Directory.Build.props\" />\n\n  <PropertyGroup>\n    <TargetFramework>$(NetCurrent)</TargetFramework>\n    <AllowMissingPrunePackageData>true</AllowMissingPrunePackageData>\n\n    <ProductBrandPrefix>Microsoft Windows Desktop</ProductBrandPrefix>\n    <!-- The Microsoft.WindowsDesktop.App shared framework composition depends on winforms, wpf and runtime transport packages\n         which contain architecture agnostic assets. As the OS part of the RID is always the portable \"win\", we don't need to\n         support non portable builds. If we ever want to target a specific base OS version,we should update this line. -->\n    <!-- Only set RuntimeIdentifier if not already set by project (avoids conflict with multi-arch RuntimeIdentifiers) -->\n    <!-- Skip AnyCPU since it's not a valid RuntimeIdentifier -->\n    <RuntimeIdentifier Condition=\"'$(RuntimeIdentifier)' == '' and '$(RuntimeIdentifiers)' == '' and '$(TargetArchitecture)' != 'AnyCPU'\">win-$(TargetArchitecture)</RuntimeIdentifier>\n  </PropertyGroup>\n\n  <!-- WiX tooling is only needed for installer builds, not for source-only builds -->\n  <ItemGroup Condition=\"'$(DotNetBuildSourceOnly)' != 'true'\">\n    <PackageReference Include=\"Microsoft.DotNet.Build.Tasks.Installers\" />\n  <PackageReference Include=\"Microsoft.Wix\" ExcludeAssets=\"all\" GeneratePathProperty=\"true\" />\n  <PackageReference Include=\"Microsoft.WixToolset.UI.wixext\" GeneratePathProperty=\"true\" />\n  <PackageReference Include=\"Microsoft.WixToolset.Dependency.wixext\" GeneratePathProperty=\"true\" />\n  <PackageReference Include=\"Microsoft.WixToolset.Util.wixext\" GeneratePathProperty=\"true\" />\n  <PackageReference Include=\"Microsoft.WixToolset.Bal.wixext\" GeneratePathProperty=\"true\" />\n  <PackageReference Include=\"Microsoft.WixToolset.Heat\" GeneratePathProperty=\"true\" />\n  </ItemGroup>\n\n</Project>\n"
  },
  {
    "path": "src/windowsdesktop/src/Microsoft.WindowsDesktop.App.Ref.stub.proj",
    "content": "<Project Sdk=\"Microsoft.Build.NoTargets\">\n\n  <!-- This is a stub project to generate the shipping targeting pack package. This is necessary so that inside the VMR\n       on non-Windows, the sdk has access to the shipping version which is then used in the BundledSdkVersions.props\n       to download windowsdesktop packs on Unix. This package will never ship to internal / external feeds. -->\n  <PropertyGroup>\n    <PackageId>Microsoft.WindowsDesktop.App.Ref</PackageId>\n    <IsPackable>true</IsPackable>\n    <SuppressDependenciesWhenPacking>true</SuppressDependenciesWhenPacking>\n    <IncludeSymbols>false</IncludeSymbols>\n  </PropertyGroup>\n\n</Project>\n"
  },
  {
    "path": "src/windowsdesktop/src/bundle/Wix.props",
    "content": "<Project>\n  <PropertyGroup>\n    <Configuration Condition=\"'$(Configuration)' == ''\">Release</Configuration>\n    <Platform Condition=\"'$(Platform)' == ''\">x64</Platform>\n    <Lang Condition=\"'$(Lang)' == ''\">ENU</Lang>\n    <Cultures>en-US</Cultures>\n  </PropertyGroup>\n\n  <!-- Additional parameters for Light/Candle-->\n  <PropertyGroup>\n    <SuppressIces>ICE61</SuppressIces>\n    <SuppressWarnings>1033</SuppressWarnings>\n    <!-- Currently, WiX only supports 'full' for the -pdbType option. This\n         affects both bundle and package projects. -->\n    <DebugType>full</DebugType>\n    <!-- Use backwards compatible GUID generation for WiX v5 -->\n    <WixBackwardsCompatibleGuidGeneration>true</WixBackwardsCompatibleGuidGeneration>\n  </PropertyGroup>\n\n  <PropertyGroup>\n    <DefineSolutionProperties>false</DefineSolutionProperties>\n    <!-- Namespace used to generate stable UUID3 GUIDs for bundle UpgradeCode, etc.\n         DO NOT CHANGE THESE. -->\n    <WindowsDesktopBundleNamespaceGuid>E1FD1271-E0F0-4B8B-B4BE-01F2EBA58F4E</WindowsDesktopBundleNamespaceGuid>\n  </PropertyGroup>\n\n  <PropertyGroup>\n    <DefineConstants>$(DefineConstants);files=$(MSBuildThisFileDirectory)files</DefineConstants>\n    <DefineConstants>$(DefineConstants);Culture=$(Cultures)</DefineConstants>\n  </PropertyGroup>\n\n  <!-- Properties for light/lit command package drop generation -->\n  <PropertyGroup>\n    <!-- Directory for the unzipped directory -->\n    <WixCommandObjDir>$(ArtifactsObjDir)WixCommandPackages</WixCommandObjDir>\n    <!-- Directory for the zipped up wixpack command package -->\n    <WixCommandPackagesDir>$(InstallersOutputPath)</WixCommandPackagesDir>\n  </PropertyGroup>\n\n</Project>"
  },
  {
    "path": "src/windowsdesktop/src/bundle/Wix.targets",
    "content": "<Project>\n  <!-- Extracted WiX build targets for Windows Desktop Runtime bundle -->\n\n  <Target Name=\"CollectRuntimePrereqDependencies\">\n    <PropertyGroup>\n      <RuntimePrereqDownloadDirectory>$(BaseIntermediateOutputPath)runtime-prereqs\\$(TargetArchitecture)\\</RuntimePrereqDownloadDirectory>\n    </PropertyGroup>\n\n    <ItemGroup>\n      <RemoteAsset Include=\"dotnet-host-$(MicrosoftNETCoreAppRefVersion)-win-$(TargetArchitecture).msi\">\n        <AssetKind>Host</AssetKind>\n        <BundleNameProperty>DotNetRedistHostInstaller</BundleNameProperty>\n        <StageFilename>dotnet-host-win-$(TargetArchitecture).msi</StageFilename>\n      </RemoteAsset>\n      <RemoteAsset Include=\"dotnet-hostfxr-$(MicrosoftNETCoreAppRefVersion)-win-$(TargetArchitecture).msi\">\n        <AssetKind>HostFxr</AssetKind>\n        <BundleNameProperty>DotNetRedistHostfxrInstaller</BundleNameProperty>\n        <StageFilename>dotnet-hostfxr-win-$(TargetArchitecture).msi</StageFilename>\n      </RemoteAsset>\n      <RemoteAsset Include=\"dotnet-runtime-$(MicrosoftNETCoreAppRefVersion)-win-$(TargetArchitecture).msi\">\n        <AssetKind>Runtime</AssetKind>\n        <BundleNameProperty>DotNetRedistLtsInstaller</BundleNameProperty>\n        <StageFilename>dotnet-runtime-win-$(TargetArchitecture).msi</StageFilename>\n      </RemoteAsset>\n    </ItemGroup>\n\n    <ItemGroup>\n      <RemoteAsset Update=\"@(RemoteAsset)\">\n        <DownloadDestination>$(RuntimePrereqDownloadDirectory)%(Identity)</DownloadDestination>\n      </RemoteAsset>\n    </ItemGroup>\n\n    <MakeDir Directories=\"$(RuntimePrereqDownloadDirectory)\" />\n  </Target>\n\n  <UsingTask TaskName=\"Microsoft.DotNet.Arcade.Sdk.DownloadFile\" AssemblyFile=\"$(ArcadeSdkBuildTasksAssembly)\" Runtime=\"NET\" />\n  <Target Name=\"FetchRuntimePrereqDependencies\"\n          DependsOnTargets=\"CollectRuntimePrereqDependencies\"\n          Outputs=\"%(RemoteAsset.DownloadDestination)\">\n\n    <PropertyGroup>\n      <_CurrentRemoteAsset>%(RemoteAsset.Identity)</_CurrentRemoteAsset>\n      <_CurrentDestination>%(RemoteAsset.DownloadDestination)</_CurrentDestination>\n    </PropertyGroup>\n\n    <ItemGroup>\n      <UrisToDownload Include=\"@(RemoteAssetBaseURL->'%(Identity)Runtime/$(MicrosoftNETCorePlatformsVersion)/$(_CurrentRemoteAsset)')\" />\n    </ItemGroup>\n\n    <Microsoft.DotNet.Arcade.Sdk.DownloadFile Uris=\"@(UrisToDownload)\" DestinationPath=\"$(_CurrentDestination)\" />\n  </Target>\n\n  <Target Name=\"SetInstallerInfo\" BeforeTargets=\"BeforeBuild\" DependsOnTargets=\"FetchRuntimePrereqDependencies\">\n\n    <ItemGroup>\n      <_DotNetRedistHostInstallerAsset Include=\"@(RemoteAsset)\" Condition=\" '%(RemoteAsset.BundleNameProperty)' == 'DotNetRedistHostInstaller' \" />\n      <_DotNetRedistHostfxrInstallerAsset Include=\"@(RemoteAsset)\" Condition=\" '%(RemoteAsset.BundleNameProperty)' == 'DotNetRedistHostfxrInstaller' \" />\n      <_DotNetRedistLtsInstallerAsset Include=\"@(RemoteAsset)\" Condition=\" '%(RemoteAsset.BundleNameProperty)' == 'DotNetRedistLtsInstaller' \" />\n    </ItemGroup>\n\n    <PropertyGroup>\n      <DotNetRedistHostInstaller>@(_DotNetRedistHostInstallerAsset->'%(DownloadDestination)')</DotNetRedistHostInstaller>\n      <DotNetRedistHostfxrInstaller>@(_DotNetRedistHostfxrInstallerAsset->'%(DownloadDestination)')</DotNetRedistHostfxrInstaller>\n      <DotNetRedistLtsInstaller>@(_DotNetRedistLtsInstallerAsset->'%(DownloadDestination)')</DotNetRedistLtsInstaller>\n    </PropertyGroup>\n\n    <PropertyGroup>\n      <BundleBaseName>windowsdesktop-runtime-$(Version)-win-$(TargetArchitecture)</BundleBaseName>\n      <OutputName>$(BundleBaseName)</OutputName>\n      <TargetName>$(BundleBaseName)</TargetName>\n      <TargetFileName>$(TargetName)$(TargetExt)</TargetFileName>\n      <TargetPath>$(TargetDir)$(TargetFileName)</TargetPath>\n      <DefineConstants>$(DefineConstants);Version=$(MajorVersion).$(MinorVersion).$(PatchVersion)</DefineConstants>\n      <!-- An RTM build can still be non-stable (e.g., preview, rc). Use DotNetFinalVersionKind to determine if truly released. -->\n      <_IsPreReleaseBuild Condition=\"'$(DotNetFinalVersionKind)' != 'release'\">true</_IsPreReleaseBuild>\n      <_IsPreReleaseBuild Condition=\"'$(_IsPreReleaseBuild)'==''\">false</_IsPreReleaseBuild>\n      <!-- Bundle version uses 4th component for build ordering:\n        - Preview/RC: Use VersionSuffixDateStamp directly (e.g., 10.0.0.35301)\n        - RTM/GA: Use 50000 to ensure it's always > any preview/RC (e.g., 10.0.0.50000)\n        This ensures proper upgrade path: Preview -> RC -> RTM -> Servicing.\n        Treat PreReleaseVersionLabel='rtm' as shipping. -->\n      <DefineConstants Condition=\"'$(_IsPreReleaseBuild)' == 'true' AND '$(VersionSuffixDateStamp)' != ''\">$(DefineConstants);BundleVersion=$(MajorVersion).$(MinorVersion).$(PatchVersion).$(VersionSuffixDateStamp)</DefineConstants>\n      <DefineConstants Condition=\"'$(_IsPreReleaseBuild)' != 'true' OR '$(VersionSuffixDateStamp)' == ''\">$(DefineConstants);BundleVersion=$(MajorVersion).$(MinorVersion).$(PatchVersion).50000</DefineConstants>\n      <DefineConstants>$(DefineConstants);Manufacturer=Microsoft Corporation</DefineConstants>\n      <DefineConstants>$(DefineConstants);SdkBrandName=Microsoft Windows Desktop Runtime</DefineConstants>\n\n      <UpgradeCodeSeed>Windows Desktop Shared Framework Bundle Installer</UpgradeCodeSeed>\n      <UpgradeCodeSeedWithArch>$(UpgradeCodeSeed) $(TargetArchitecture) $(MajorVersion).$(MinorVersion)</UpgradeCodeSeedWithArch>\n\n      <DefineConstants>$(DefineConstants);TargetArchitecture=$(TargetArchitecture)</DefineConstants>\n      <DefineConstants>$(DefineConstants);PlatformToken=$(TargetArchitecture.ToUpper())</DefineConstants>\n      <DefineConstants>$(DefineConstants);NativeMachine_x64=x64</DefineConstants>\n      <DefineConstants>$(DefineConstants);NativeMachine_arm64=arm64</DefineConstants>\n\n      <!-- Allow downgrade only for preview/RC builds to handle version stamp issues. Disable for GA to prevent servicing downgrades. -->\n      <SuppressDowngradeFailure Condition=\"'$(_IsPreReleaseBuild)' == 'true'\">yes</SuppressDowngradeFailure>\n      <SuppressDowngradeFailure Condition=\"'$(_IsPreReleaseBuild)' != 'true'\">no</SuppressDowngradeFailure>\n      <DefineConstants>$(DefineConstants);SuppressDowngradeFailure=$(SuppressDowngradeFailure)</DefineConstants>\n\n      <DefineConstants>$(DefineConstants);MajorVersion=$(MajorVersion)</DefineConstants>\n      <DefineConstants>$(DefineConstants);MinorVersion=$(MinorVersion)</DefineConstants>\n      <DefineConstants>$(DefineConstants);DotNetRuntimeVersion=$(MicrosoftNETCoreAppRefVersion)</DefineConstants>\n      <DefineConstants>$(DefineConstants);MinimumVSVersion=$(MinimumVSVersion)</DefineConstants>\n\n      <!-- Use the DownloadDestination metadata from the matching RemoteAsset -->\n      <DefineConstants>$(DefineConstants);DotNetRedistHostInstaller=$(DotNetRedistHostInstaller)</DefineConstants>\n      <DefineConstants>$(DefineConstants);DotNetRedistHostfxrInstaller=$(DotNetRedistHostfxrInstaller)</DefineConstants>\n      <DefineConstants>$(DefineConstants);DotNetRedistLtsInstaller=$(DotNetRedistLtsInstaller)</DefineConstants>\n\n      <WindowsDesktopRuntimeMsiPath>$(ArtifactsPackagesDir)Shipping\\windowsdesktop-runtime-$(Version)-win-$(TargetArchitecture).msi</WindowsDesktopRuntimeMsiPath>\n      <DefineConstants>$(DefineConstants);WindowsDesktopRuntimeMsiPath=$(WindowsDesktopRuntimeMsiPath)</DefineConstants>\n    </PropertyGroup>\n\n    <Message Text=\"Bundle MSI Components:\" Importance=\"high\" />\n    <Message Text=\"  Windows Desktop Runtime: $(WindowsDesktopRuntimeMsiPath) (Exists: $([System.IO.File]::Exists('$(WindowsDesktopRuntimeMsiPath)')))\" Importance=\"high\" />\n  </Target>\n\n  <Target Name=\"PublishBundle\" AfterTargets=\"Build\">\n    <PropertyGroup>\n      <BundleShippingName>$(OutputName).exe</BundleShippingName>\n      <BundleShippingPath>$(ArtifactsPackagesDir)Shipping\\$(BundleShippingName)</BundleShippingPath>\n    </PropertyGroup>\n    <Copy SourceFiles=\"$(OutputPath)$(TargetFileName)\" DestinationFiles=\"$(BundleShippingPath)\" />\n    <Message Text=\"Published bundle: $(BundleShippingPath)\" Importance=\"high\" />\n  </Target>\n\n  <Target Name=\"GenerateUpgradeCode\" AfterTargets=\"SetInstallerInfo\">\n    <!-- Generate architecture-specific ProviderKey (different per architecture for SxS installations) -->\n    <PropertyGroup>\n      <ProviderKeySeed>$(UpgradeCodeSeed) $(TargetArchitecture) $(MajorVersion).$(MinorVersion)</ProviderKeySeed>\n    </PropertyGroup>\n    <GenerateGuidFromName Name=\"$(ProviderKeySeed)\">\n      <Output TaskParameter=\"GeneratedGuid\" PropertyName=\"GeneratedProviderKey\" />\n    </GenerateGuidFromName>\n\n    <!-- Generate architecture-specific UpgradeCode (different per architecture for SxS) -->\n    <GenerateGuidFromName Name=\"$(UpgradeCodeSeedWithArch)\">\n      <Output TaskParameter=\"GeneratedGuid\" PropertyName=\"GeneratedUpgradeCode\" />\n    </GenerateGuidFromName>\n\n    <PropertyGroup>\n      <DefineConstants>$(DefineConstants);ProviderKey={$(GeneratedProviderKey)}</DefineConstants>\n      <DefineConstants>$(DefineConstants);UpgradeCode={$(GeneratedUpgradeCode)}</DefineConstants>\n    </PropertyGroup>\n\n    <Message Text=\"Generated ProviderKey for $(TargetArchitecture): {$(GeneratedProviderKey)} from seed '$(ProviderKeySeed)'\" Importance=\"high\" />\n    <Message Text=\"Generated UpgradeCode for $(TargetArchitecture) v$(MajorVersion).$(MinorVersion): {$(GeneratedUpgradeCode)} from seed '$(UpgradeCodeSeedWithArch)'\" Importance=\"high\" />\n  </Target>\n\n  <Target Name=\"Pack\" DependsOnTargets=\"Build;PublishBundle;GenerateWixpackPackage\">\n    <Message Text=\"Bundle pack completed\" Importance=\"high\" />\n  </Target>\n  <!-- This target can be used to set additional Wix options. -->\n  <Target Name=\"SetAdditionalWixOptions\" BeforeTargets=\"CoreCompile\">\n    <PropertyGroup>\n      <!-- Use backwards compatible GUID generation. -->\n      <CompilerAdditionalOptions>$(CompilerAdditionalOptions) -bcgg</CompilerAdditionalOptions>\n    </PropertyGroup>\n  </Target>\n  <!-- Generate a wixpack using the Wix toolset task (pattern aligned with aspnetcore). -->\n  <!-- Run after Build to ensure all artifacts are ready, but before Pack -->\n  <Target Name=\"GenerateWixpackPackage\" AfterTargets=\"Build\" BeforeTargets=\"Pack\" Condition=\"'$(OutputType)'=='Bundle' AND '$(WixCreateWixPackOutput)'=='true' AND '$(RunWixpackTargets)'=='true'\">\n    <PropertyGroup>\n      <WixpackWorkingDir>$(IntermediateOutputPath)wixpack</WixpackWorkingDir>\n      <!-- Ensure WixCommandPackagesDir has a default value -->\n      <WixpackOutputDir Condition=\"'$(WixCommandPackagesDir)'!=''\">$(WixCommandPackagesDir)</WixpackOutputDir>\n      <WixpackOutputDir Condition=\"'$(WixCommandPackagesDir)'==''\">$(ArtifactsPackagesDir)NonShipping</WixpackOutputDir>\n      <DefaultBundleWixpackFile>$(WixpackOutputDir)\\$(TargetFileName).wixpack.zip</DefaultBundleWixpackFile>\n      <BundleShippingName Condition=\"'$(BundleShippingName)'==''\">$(OutputName).exe</BundleShippingName>\n      <!-- Expected wixpack file should match the bundle executable name -->\n      <ExpectedBundleWixpackFile>$(WixpackOutputDir)\\$(BundleShippingName).wixpack.zip</ExpectedBundleWixpackFile>\n      <!-- PDB name follows Wix default: TargetName + .wixpdb -->\n      <_BundlePdbFile>$(TargetDir)$(TargetName).wixpdb</_BundlePdbFile>\n    </PropertyGroup>\n    <Move Condition=\"'$(DefaultBundleWixpackFile)' != '' AND '$(ExpectedBundleWixpackFile)' != '' AND '$(DefaultBundleWixpackFile)' != '$(ExpectedBundleWixpackFile)' AND Exists('$(DefaultBundleWixpackFile)')\" SourceFiles=\"$(DefaultBundleWixpackFile)\" DestinationFiles=\"$(ExpectedBundleWixpackFile)\" OverwriteReadOnlyFiles=\"true\" />\n    <Message Text=\"[Wixpack] RunWixpackTargets=$(RunWixpackTargets), WixCreateWixPackOutput=$(WixCreateWixPackOutput)\" Importance=\"high\" />\n    <Message Text=\"[Wixpack] WixpackOutputDir=$(WixpackOutputDir)\" Importance=\"high\" />\n    <Message Text=\"[Wixpack] Existing wixpack detected at $(ExpectedBundleWixpackFile); skipping custom generation\" Importance=\"high\" Condition=\"Exists('$(ExpectedBundleWixpackFile)')\" />\n    <CreateWixBuildWixpack\n      AdditionalOptions=\"$(CompilerAdditionalOptions) $(LinkerAdditionalOptions)\"\n      Condition=\"!Exists('$(ExpectedBundleWixpackFile)') AND '$(WixpackOutputDir)'!=''\"\n      InstallerPlatform=\"$(InstallerPlatform)\"\n      InstallerFile=\"$(TargetPath)\"\n      IntermediateDirectory=\"$(IntermediateOutputPath)\"\n      OutputFolder=\"$(WixpackOutputDir)\"\n      OutputType=\"$(OutputType)\"\n      PdbFile=\"$(_BundlePdbFile)\"\n      PdbType=\"$(DebugType)\"\n      SourceFiles=\"@(Compile)\"\n      Extensions=\"@(_ResolvedWixExtensionPaths)\"\n      LocalizationFiles=\"@(_WixLocalizationFile)\"\n      BindPaths=\"@(BindPath)\"\n      WixpackWorkingDir=\"$(WixpackWorkingDir)\"\n      DefineConstants=\"$(DefineConstants)\">\n\n      <Output TaskParameter=\"OutputFile\" PropertyName=\"_WixBuildCommandPackageNameOutput\" />\n    </CreateWixBuildWixpack>\n    <Move Condition=\"'$(_WixBuildCommandPackageNameOutput)' != '' AND '$(ExpectedBundleWixpackFile)' != '' AND '$(_WixBuildCommandPackageNameOutput)' != '$(ExpectedBundleWixpackFile)' AND Exists('$(_WixBuildCommandPackageNameOutput)')\" SourceFiles=\"$(_WixBuildCommandPackageNameOutput)\" DestinationFiles=\"$(ExpectedBundleWixpackFile)\" OverwriteReadOnlyFiles=\"true\" />\n    <PropertyGroup>\n      <_WixBuildCommandPackageNameOutput Condition=\"'$(_WixBuildCommandPackageNameOutput)' != '' AND '$(ExpectedBundleWixpackFile)' != ''\">$(ExpectedBundleWixpackFile)</_WixBuildCommandPackageNameOutput>\n    </PropertyGroup>\n    <Message Text=\"[Wixpack] Generated: $(_WixBuildCommandPackageNameOutput)\" Importance=\"high\" Condition=\"'$(_WixBuildCommandPackageNameOutput)'!=''\" />\n  </Target>\n\n</Project>\n"
  },
  {
    "path": "src/windowsdesktop/src/bundle/bundle.thm",
    "content": "<!-- Copyright (c) .NET Foundation and contributors. All rights reserved.\nLicensed under the MIT license. See License.txt in the project root for full license information. -->\n<Theme xmlns=\"http://wixtoolset.org/schemas/v4/thmutil\">\n  <!-- Use system colors where possible as they change based on themes and are automatically adjusted for high contrast.\n       For custom colors, ensure the contrast ratio is at least 4.5:1 (3:1 for large text and other UI components).\n       The WinUI 3 Gallery app can be used to calculate contrast settings. Take note that custom colors for <Font>\n       elements use BGR instead of RGB ordering.\n\n       Line spacing for fonts should be rounded to the nearest multiple of 4. For example, Segoe UI with a height of 24 has\n       a line spacing of 31.9, so 32 should be used when calculating the height of a control that contains a single line of text,\n       like a label. For a height of 12, the line spacing to use is 16. -->\n  <Font Id=\"DefaultFont\" Height=\"-12\" Weight=\"500\" Foreground=\"windowtext\" Background=\"window\">Segoe UI</Font>\n  <Font Id=\"WindowBannerFont\" Height=\"-24\" Weight=\"900\" Foreground=\"FFFFFF\" Background=\"D42B51\">Segoe UI</Font>\n  <Font Id=\"PageHeaderFont\" Height=\"-20\" Weight=\"500\" Foreground=\"graytext\" Background=\"window\">Segoe UI</Font>\n  <!-- Do not change the foreground color to \"red\". While 0127E6 yields acceptable ratios for light/dark backgrounds, some\n       contrast themes like Dusk drops the ratio below 4.5. -->\n  <Font Id=\"ErrorFont\" Height=\"-12\" Weight=\"900\" Foreground=\"windowtext\" Background=\"window\">Segoe UI</Font>\n\n  <!-- In v5, Window@Width and Window@Height refers to the client area, not the window area. wixstdba calls \n       AdjustWindowRectEx or AdjustWindowRectExForDpi (if supported) to produce a window with the desired client area. -->\n  <Window Width=\"644\" Height=\"460\" HexStyle=\"100a0000\" FontId=\"DefaultFont\" Caption=\"#(loc.Caption)\" IconFile=\"dotnet.ico\">\n    <!-- Use the 256x256 logo as that displays better at 200% scaling for high DPI -->\n    <ImageControl Name=\"DotNetLogo\" X=\"12\" Y=\"-48\" Width=\"124\" Height=\"124\" ImageFile=\"DotNetLogo_256x.png\" Visible=\"yes\" />\n\n    <!-- A width of 0 extends the control to the right of the window. The first label will render an opaque rectangle using\n         the background color of the specified font. The second label overlays the title text. This is necessary since\n         the vertical offset of the text cannot be specified. -->\n    <Label Name=\"TitleBackground\" X=\"0\" Y=\"0\" Width=\"0\" Height=\"72\" FontId=\"WindowBannerFont\" Visible=\"yes\" DisablePrefix=\"yes\" />\n    <Label Name=\"Title\" X=\"0\" Y=\"12\" Width=\"0\" Height=\"32\" FontId=\"WindowBannerFont\" Visible=\"yes\" Center=\"yes\" DisablePrefix=\"yes\">#(loc.Title)</Label>\n\n    <Page Name=\"Help\">\n      <Label Name=\"HelpHeader\" X=\"148\" Y=\"80\" Width=\"-12\" Height=\"32\" FontId=\"PageHeaderFont\" HexStyle=\"00000000\" DisablePrefix=\"yes\">#(loc.HelpHeader)</Label>\n      <Label Name=\"HelpText\" X=\"148\" Y=\"124\" Width=\"-12\" Height=\"-48\" FontId=\"DefaultFont\" HexStyle=\"00000000\" DisablePrefix=\"yes\">#(loc.HelpText)</Label>\n\n      <Button Name=\"HelpCancelButton\"  X=\"-12\" Y=\"-12\" Width=\"100\" Height=\"24\" TabStop=\"yes\" FontId=\"DefaultFont\">\n        <Text>#(loc.HelpCloseButton)</Text>\n        <CloseWindowAction/>\n      </Button>\n    </Page>\n    <Page Name=\"Install\">\n      <Label Name=\"WelcomeHeader\" X=\"148\" Y=\"80\" Width=\"-12\" Height=\"32\" FontId=\"PageHeaderFont\" HexStyle=\"000000\">#(loc.WelcomeHeader)</Label>\n\n      <!-- Separate elements are needed to ensure tab stops function correctly. -->\n      <Hypertext Name=\"WelcomeText\" X=\"148\" Y=\"124\" Width=\"-12\" Height=\"144\" FontId=\"DefaultFont\" TabStop=\"yes\" HexStyle=\"000000\">#(loc.WelcomeDescription)&#xA;&#xA;#(loc.VisualStudioWarning)</Hypertext>\n\n      <!-- Align the label with the top of the logo on the left. -->\n      <Label Name=\"LicenseTermsAndPolicies\" X=\"148\" Y=\"288\" Width=\"-12\" Height=\"32\" FontId=\"DefaultFont\" HexStyle=\"000000\">#(loc.LicenseAssent)</Label>\n\n      <!-- These controls have larger vertical spacing to improve readability (20 instead of 16). -->\n      <Hypertext Name=\"PrivacyStatementLink\" X=\"172\" Y=\"320\" Width=\"-12\" Height=\"16\" FontId=\"DefaultFont\" TabStop=\"yes\" HexStyle=\"000000\" HideWhenDisabled=\"yes\">#(loc.PrivacyStatementLink)</Hypertext>\n      <Hypertext Name=\"DotNetCLITelemetryLink\" X=\"172\" Y=\"340\" Width=\"-12\" Height=\"16\" FontId=\"DefaultFont\" TabStop=\"yes\" HexStyle=\"000000\" HideWhenDisabled=\"yes\">#(loc.EulaLink)</Hypertext>\n      <Hypertext Name=\"DotNetEulaLink\" X=\"172\" Y=\"360\" Width=\"-12\" Height=\"16\" FontId=\"DefaultFont\" TabStop=\"yes\" HexStyle=\"000000\" HideWhenDisabled=\"yes\">#(loc.TelemetryLink)</Hypertext>\n\n      <Button Name=\"InstallButton\" X=\"-124\" Y=\"-12\" Width=\"100\" Height=\"24\" TabStop=\"yes\" FontId=\"DefaultFont\">#(loc.InstallInstallButton)</Button>\n      <Button Name=\"InstallCancelButton\" X=\"-12\" Y=\"-12\" Width=\"100\" Height=\"24\" TabStop=\"yes\" FontId=\"DefaultFont\">\n        <Text>#(loc.InstallCloseButton)</Text>\n        <CloseWindowAction/>\n      </Button>\n    </Page>\n    <Page Name=\"Progress\">\n      <Label HexStyle=\"000000\" Name=\"ProgressHeader\" X=\"12\" Y=\"80\" Width=\"-12\" Height=\"32\" FontId=\"PageHeaderFont\" DisablePrefix=\"yes\">#(loc.ProgressHeader)</Label>\n      <Label HexStyle=\"000000\" Name=\"ProgressLabel\" X=\"12\" Y=\"124\" Width=\"96\" Height=\"16\" FontId=\"DefaultFont\" DisablePrefix=\"yes\">#(loc.ProgressLabel)</Label>\n      <Label HexStyle=\"000000\" Name=\"OverallProgressPackageText\" X=\"108\" Y=\"124\" Width=\"-12\" Height=\"16\" FontId=\"DefaultFont\" DisablePrefix=\"yes\">#(loc.OverallProgressPackageText)</Label>\n\n      <Progressbar Name=\"OverallCalculatedProgressbar\" X=\"12\" Y=\"152\" Width=\"-12\" Height=\"20\" />\n\n      <Button Name=\"ProgressCancelButton\" X=\"-12\" Y=\"-12\" Width=\"100\" Height=\"24\" TabStop=\"yes\" FontId=\"DefaultFont\">\n        #(loc.ProgressCancelButton)\n        <CloseWindowAction/>\n      </Button>\n    </Page>\n    <Page Name=\"Modify\">\n      <Label Name=\"ModifyHeader\" X=\"148\" Y=\"80\" Width=\"-12\" Height=\"32\" FontId=\"PageHeaderFont\" DisablePrefix=\"yes\">#(loc.ModifyHeader)</Label>\n\n      <Label Name=\"ModifyText\" X=\"148\" Y=\"124\" Width=\"-12\" Height=\"-48\" FontId=\"DefaultFont\" HexStyle=\"00000000\" DisablePrefix=\"yes\">#(loc.ModifyText)</Label>\n\n      <Button Name=\"RepairButton\" X=\"-236\" Y=\"-12\" Width=\"100\" Height=\"24\" TabStop=\"yes\" FontId=\"DefaultFont\" HideWhenDisabled=\"yes\">#(loc.ModifyRepairButton)</Button>\n      <Button Name=\"UninstallButton\" X=\"-124\" Y=\"-12\" Width=\"100\" Height=\"24\" TabStop=\"yes\" FontId=\"DefaultFont\">#(loc.ModifyUninstallButton)</Button>\n      <Button Name=\"ModifyCancelButton\" X=\"-12\" Y=\"-12\" Width=\"100\" Height=\"24\" TabStop=\"yes\" FontId=\"DefaultFont\">\n        <Text>#(loc.ModifyCloseButton)</Text>\n        <CloseWindowAction/>\n      </Button>\n    </Page>\n    <Page Name=\"Success\">\n      <Label Name=\"SuccessHeader\" X=\"148\" Y=\"80\" Width=\"-12\" Height=\"32\" FontId=\"PageHeaderFont\" HexStyle=\"00000000\" DisablePrefix=\"yes\">\n        <!-- Default text to display if none of the conditions are true. -->\n        <Text>#(loc.SuccessHeader)</Text>\n        <Text Condition=\"WixBundleAction = 2\">#(loc.SuccessLayoutHeader)</Text>\n        <Text Condition=\"WixBundleAction = 3\">#(loc.SuccessUnsafeUninstallHeader)</Text>\n        <Text Condition=\"WixBundleAction = 4\">#(loc.SuccessUninstallHeader)</Text>\n        <Text Condition=\"WixBundleAction = 5\">#(loc.SuccessCacheHeader)</Text>\n        <Text Condition=\"WixBundleAction = 6\">#(loc.SuccessInstallHeader)</Text>\n        <Text Condition=\"WixBundleAction = 7\">#(loc.SuccessModifyHeader)</Text>\n        <Text Condition=\"WixBundleAction = 8\">#(loc.SuccessRepairHeader)</Text>\n      </Label>\n\n      <!-- Only display the welcome message when an installation was performed. Message is broken up to\n           ensure tab order is correct. -->\n      <Hypertext HexStyle=\"00000000\" EnableCondition=\"WixBundleAction = 6\" Name=\"SuccessInstallHeader\" X=\"148\" Y=\"124\" Width=\"-12\" Height=\"128\" FontId=\"DefaultFont\" HideWhenDisabled=\"yes\">#(loc.FirstTimeWelcomeMessage)</Hypertext>\n      <Hypertext HexStyle=\"00000000\" EnableCondition=\"WixBundleAction = 6\" Name=\"SuccessInstallHeader\" X=\"148\" Y=\"252\" Width=\"-12\" Height=\"32\" FontId=\"DefaultFont\" HideWhenDisabled=\"yes\">#(loc.NetDocumentationLinkText)</Hypertext>\n      <Hypertext HexStyle=\"00000000\" EnableCondition=\"WixBundleAction = 6\" Name=\"SuccessInstallHeader\" X=\"148\" Y=\"284\" Width=\"-12\" Height=\"16\" FontId=\"DefaultFont\" HideWhenDisabled=\"yes\">#(loc.WindowsDesktopDocumentationLinkText)</Hypertext>\n      <Hypertext HexStyle=\"00000000\" EnableCondition=\"WixBundleAction = 6\" Name=\"SuccessInstallHeader\" X=\"148\" Y=\"300\" Width=\"-12\" Height=\"16\" FontId=\"DefaultFont\" HideWhenDisabled=\"yes\">#(loc.ReleaseNotesLinkText)</Hypertext>\n      <Hypertext HexStyle=\"00000000\" EnableCondition=\"WixBundleAction = 6\" Name=\"SuccessInstallHeader\" X=\"148\" Y=\"316\" Width=\"-12\" Height=\"16\" FontId=\"DefaultFont\" HideWhenDisabled=\"yes\">#(loc.TutorialsLinkText)</Hypertext>\n\n      <Label X=\"148\" Y=\"-48\" Width=\"-12\" Height=\"34\" FontId=\"DefaultFont\" DisablePrefix=\"yes\" VisibleCondition=\"WixStdBARestartRequired\">\n        <Text>#(loc.SuccessRestartText)</Text>\n        <Text Condition=\"WixBundleAction = 3\">#(loc.SuccessUninstallRestartText)</Text>\n      </Label>\n\n      <!-- Calculate the relative offset as follows, assuming there are two buttons, right aligned:\n           First button, X=\"-12\" Width=\"100\"\n           Second button, X=\"-124\" (-12 - 100 (width of first button) - 12 (gap between buttons)) -->\n      <Button Name=\"SuccessRestartButton\" X=\"-124\" Y=\"-12\" Width=\"100\" Height=\"24\" TabStop=\"yes\" FontId=\"DefaultFont\" HideWhenDisabled=\"yes\">#(loc.SuccessRestartButton)</Button>\n      <Button Name=\"SuccessCloseButton\" X=\"-12\" Y=\"-12\" Width=\"100\" Height=\"24\" TabStop=\"yes\" FontId=\"DefaultFont\">\n        <Text>#(loc.SuccessCloseButton)</Text>\n        <CloseWindowAction />\n      </Button>\n    </Page>\n    <Page Name=\"Failure\">\n      <Label Name=\"FailureHeader\" X=\"148\" Y=\"80\" Width=\"-12\" Height=\"32\" HexStyle=\"00000000\" FontId=\"PageHeaderFont\">\n        <Text>#(loc.FailureHeader)</Text>\n        <Text Condition=\"WixBundleAction = 2\">#(loc.FailureLayoutHeader)</Text>\n        <Text Condition=\"WixBundleAction = 3\">#(loc.FailureUnsafeUninstallHeader)</Text>\n        <Text Condition=\"WixBundleAction = 4\">#(loc.FailureUninstallHeader)</Text>\n        <Text Condition=\"WixBundleAction = 5\">#(loc.FailureCacheHeader)</Text>\n        <Text Condition=\"WixBundleAction = 6\">#(loc.FailureInstallHeader)</Text>\n        <Text Condition=\"WixBundleAction = 7\">#(loc.FailureModifyHeader)</Text>\n        <Text Condition=\"WixBundleAction = 8\">#(loc.FailureRepairHeader)</Text>\n      </Label>\n\n      <!-- Reserve three lines of space (2 for the message plus a 3rd for a line break. -->\n      <Hypertext HexStyle=\"000000\" Name=\"FailureLogFileLink\" X=\"148\" Y=\"124\" Width=\"-12\" Height=\"48\" FontId=\"DefaultFont\" TabStop=\"yes\" HideWhenDisabled=\"yes\">#(loc.FailureHyperlinkLogText)</Hypertext>\n\n      <!-- This element is updated by the bootstrapper application. Reserve 3 lines of space. -->\n      <Hypertext HexStyle=\"000000\" Name=\"FailureMessageText\" X=\"148\" Y=\"172\" Width=\"-12\" Height=\"48\" FontId=\"ErrorFont\" TabStop=\"yes\" HideWhenDisabled=\"yes\" />\n\n      <!-- Reserve two lines of space to accommodate localized content. -->\n      <Label X=\"148\" Y=\"-48\" Width=\"-12\" Height=\"32\" FontId=\"DefaultFont\" DisablePrefix=\"yes\" VisibleCondition=\"WixStdBARestartRequired\">#(loc.FailureRestartText)</Label>\n      <Button Name=\"FailureRestartButton\" X=\"-124\" Y=\"-12\" Width=\"100\" Height=\"24\" TabStop=\"yes\" FontId=\"DefaultFont\" HideWhenDisabled=\"yes\">#(loc.FailureRestartButton)</Button>\n      <Button Name=\"FailureCloseButton\" X=\"-12\" Y=\"-12\" Width=\"100\" Height=\"24\" TabStop=\"yes\" FontId=\"DefaultFont\">\n        <Text>#(loc.FailureCloseButton)</Text>\n        <CloseWindowAction/>\n      </Button>\n    </Page>\n  </Window>\n</Theme>\n"
  },
  {
    "path": "src/windowsdesktop/src/bundle/bundle.wixproj",
    "content": "<Project Sdk=\"Microsoft.WixToolset.Sdk\">\n\n  <Import Project=\"Wix.props\" />\n\n  <PropertyGroup>\n    <!-- OutputType determines the extension, .msi, .wixlib, .exe, etc. -->\n    <OutputType>Bundle</OutputType>\n    \n    <!-- Enable Wixpack generation for all build types (PR, CI, local) -->\n    <WixCreateWixPackOutput>true</WixCreateWixPackOutput>\n    \n    <!-- Burn bundle stub must remain x86 regardless of payload architecture. -->\n    <BundlePlatform>x86</BundlePlatform>\n    <InstallerPlatform>x86</InstallerPlatform>\n    \n    <!-- Suppress WiX warning about bundle upgrades -->\n    <NoWarn>$(NoWarn);WIX1098</NoWarn>\n\n    <!-- Globbing will automatically find any .wxl relative to the project file. Since we're simshipping localized content for\n         the bundle UI, we either need to exclude the .wxl files or place them in a directory outside of the project. For simshipping\n         we only need to ensure the files are pulled in as additional payloads into the UX container. -->\n    <DefaultItemExcludes>$(DefaultItemExcludes);LCID\\**\\*;theme\\**\\*</DefaultItemExcludes>\n  </PropertyGroup>\n\n  <ItemGroup>\n    <!-- Use the working wix5 path - the new wix path has namespace issues -->\n    <Compile Include=\"$(PkgMicrosoft_DotNet_Build_Tasks_Installers)\\build\\wix5\\bundle\\upgradePolicies.wxs\" />\n    <Compile Include=\"dotnet-packages.wxs\" />\n\n    <!-- Workload manifests will be included only if the source fragment was generated. -->\n    <Compile Include=\"$(WorkloadManifestsWxsPath)\" Condition=\"'$(WorkloadManifestsWxsPath)' != '' AND Exists('$(WorkloadManifestsWxsPath)')\" />\n  </ItemGroup>\n\n  <ItemGroup>\n    <None Include=\"dotnet.ico\" />\n    <BundleSigningAsset Include=\"$(MSBuildThisFileDirectory)dotnet.ico\" />\n  </ItemGroup>\n\n  <ItemGroup>\n    <WixLocalization Include=\"theme\\**\\*.wxl\" />\n  </ItemGroup>\n\n  <Target Name=\"CopyBundleSigningAssets\" AfterTargets=\"PublishBundle\">\n    <PropertyGroup>\n      <_BundleOutputDir>$(TargetDir)</_BundleOutputDir>\n      <_BundleShippingDir Condition=\"'$(ArtifactsPackagesDir)' != ''\">$(ArtifactsPackagesDir)Shipping\\</_BundleShippingDir>\n    </PropertyGroup>\n\n    <MakeDir Directories=\"$(_BundleOutputDir)\" Condition=\"'$(_BundleOutputDir)' != ''\" />\n    <MakeDir Directories=\"$(_BundleShippingDir)\" Condition=\"'$(_BundleShippingDir)' != ''\" />\n\n    <Copy SourceFiles=\"@(BundleSigningAsset)\"\n          DestinationFolder=\"$(_BundleOutputDir)\"\n          SkipUnchangedFiles=\"true\"\n          Condition=\"'$(_BundleOutputDir)' != ''\" />\n\n    <Copy SourceFiles=\"@(BundleSigningAsset)\"\n          DestinationFolder=\"$(_BundleShippingDir)\"\n          SkipUnchangedFiles=\"true\"\n          Condition=\"'$(_BundleShippingDir)' != ''\" />\n  </Target>\n\n  <Target Name=\"BuildDependentProject\" BeforeTargets=\"BeforeBuild\">\n    <!-- Ensure the Windows Desktop Runtime is built before this bundle -->\n    <MSBuild Projects=\"..\\sfx\\Microsoft.WindowsDesktop.App.Runtime.sfxproj\"\n             Targets=\"Build\" />\n  </Target>\n\n  <!-- Import extracted WiX build targets -->\n  <Import Project=\"Wix.targets\" />\n\n</Project>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
  },
  {
    "path": "src/windowsdesktop/src/bundle/bundle.wxs",
    "content": "<Wix xmlns=\"http://wixtoolset.org/schemas/v4/wxs\" xmlns:bal=\"http://wixtoolset.org/schemas/v4/wxs/bal\" xmlns:util=\"http://wixtoolset.org/schemas/v4/wxs/util\">\n  <Bundle Name=\"$(SdkBrandName) $(Version) ($(TargetArchitecture))\" \n          Manufacturer=\"$(Manufacturer)\" \n          Version=\"$(BundleVersion)\" \n          UpgradeCode=\"$(UpgradeCode)\"\n          ProviderKey=\"$(ProviderKey)\"\n          AboutUrl=\"https://aka.ms/dotnet-windows-desktop\"\n          Compressed=\"yes\">\n\n  <!-- Related bundle for upgrade scenarios - upgrade any earlier version with same upgrade code -->\n  <!-- This enables preview -> RC -> GA -> servicing upgrade path -->\n\n  <!-- Primary upgrade relationship using current deterministic upgrade code (for GA and all servicing) -->\n  <RelatedBundle Code=\"$(UpgradeCode)\" Action=\"Upgrade\" />\n\n\n\n    <bal:Condition Message=\"#(loc.InstallPathx64x86)\" Condition=\"WixBundleInstalled OR (NOT DOTNETHOME_X64 ~= DOTNETHOME_X86) OR DOTNETHOMESIMILARITYCHECKOVERRIDE\" />\n\n    <bal:Condition Message=\"#(loc.InstallPathARM64x86)\" Condition=\"WixBundleInstalled OR (NOT DOTNETHOME_ARM64 ~= DOTNETHOME_X86) OR DOTNETHOMESIMILARITYCHECKOVERRIDE\" />\n\n    <!-- Permit same path on non-ARM64 machines since past SDKs always wrote this value -->\n    <bal:Condition Message=\"#(loc.InstallPathARM64x64)\" Condition=\"WixBundleInstalled OR (NOT DOTNETHOME_ARM64 ~= DOTNETHOME_X64) OR (NOT NativeMachine=&quot;$(NativeMachine_arm64)&quot;) OR DOTNETHOMESIMILARITYCHECKOVERRIDE\" />\n\n    <BootstrapperApplication>\n      <bal:WixStandardBootstrapperApplication LicenseFile=\"dummyeula.rtf\"\n                                              LocalizationFile=\"theme\\1033\\thm.wxl\"\n                                              ShowVersion=\"yes\"\n                                              SuppressDowngradeFailure=\"$(SuppressDowngradeFailure)\"\n                                              SuppressOptionsUI=\"yes\"\n                                              Theme=\"rtfLicense\"\n                                              ThemeFile=\"bundle.thm\" />\n\n      <?foreach lcid in 2052;1028;1029;1031;3082;1036;1040;1041;1042;1045;1046;1049;1055?>\n      <Payload Id=\"PL_bundle_$(lcid)\" SourceFile=\"theme\\$(lcid)\\thm.wxl\" Name=\"$(lcid)\\thm.wxl\" Compressed=\"yes\" />\n      <?endforeach?>\n\n      <Payload Name=\"DotNetLogo_256x.png\" Compressed=\"yes\" SourceFile=\"DotNetLogo_256x.png\" />\n      <Payload Name=\"dotnet.ico\" Compressed=\"yes\" SourceFile=\"dotnet.ico\" />\n    </BootstrapperApplication>\n\n    <!-- Do not use ProgramFiles6432Folder. It defaults to CSIDL_PROGRAM_FILES and will write\n         the tag to Program Files when installing the x86 runtime on 64-bit OS. -->\n    <?if $(PlatformToken)~=X86?>\n    <SoftwareTag Regid=\"microsoft.com\" InstallPath=\"[ProgramFilesFolder]dotnet\" />\n    <?else?>\n    <SoftwareTag Regid=\"microsoft.com\" InstallPath=\"[ProgramFiles64Folder]dotnet\" />\n    <?endif?>\n\n    <!-- Registry searches must be explicit about bitness to ensure the correct hive is checked. -->\n    <util:RegistrySearch Id=\"CheckDotnetInstallLocation_x86\"\n                         Key=\"SOFTWARE\\dotnet\\Setup\\InstalledVersions\\x86\"\n                         Result=\"exists\"\n                         Root=\"HKLM\"\n                         Value=\"InstallLocation\"\n                         Variable=\"DotnetInstallLocationExists_x86\"\n                         Bitness=\"always32\" />\n\n    <util:RegistrySearch After=\"CheckDotnetInstallLocation_x86\"\n                         Condition=\"DotnetInstallLocationExists_x86\"\n                         Id=\"DotnetInstallLocation_x86\"\n                         Variable=\"DOTNETHOME_X86\"\n                         Result=\"value\"\n                         Root=\"HKLM\"\n                         Key=\"SOFTWARE\\dotnet\\Setup\\InstalledVersions\\x86\"\n                         Value=\"InstallLocation\"\n                         Bitness=\"always32\" />\n\n    <util:FileSearch Id=\"DotnetExeSearch_x86\"\n                     After=\"DotnetInstallLocation_x86\"\n                     Variable=\"DotnetExeExists_x86\"\n                     Condition=\"NOT DotnetInstallLocationExists_x86\"\n                     Result=\"exists\"\n                     Path=\"[ProgramFilesFolder]dotnet\\dotnet.exe\"/>\n    <util:DirectorySearch Id=\"DotnetExeLocation_x86\"\n                          After=\"DotnetExeSearch_x86\"\n                          Condition=\"DotnetExeExists_x86\"\n                          Variable=\"DOTNETHOME_X86\"\n                          Path=\"[ProgramFilesFolder]dotnet\"/>\n\n    <?if $(TargetArchitecture)!=x86?>\n    <util:RegistrySearch Id=\"CheckDotnetInstallLocation_x64\"\n              Variable=\"DotnetInstallLocationExists_x64\"\n              Result=\"exists\"\n              Root=\"HKLM\"\n              Key=\"SOFTWARE\\dotnet\\Setup\\InstalledVersions\\x64\"\n              Value=\"InstallLocation\"\n              Bitness=\"always64\" />\n    <util:RegistrySearch Id=\"DotnetInstallLocation_x64\"\n              After=\"CheckDotnetInstallLocation_x64\"\n              Condition=\"DotnetInstallLocationExists_x64\"\n              Variable=\"DOTNETHOME_X64\"\n              Result=\"value\"\n              Root=\"HKLM\"\n              Key=\"SOFTWARE\\dotnet\\Setup\\InstalledVersions\\x64\"\n              Value=\"InstallLocation\"\n              Bitness=\"always64\" />\n\n    <!-- Check default location when on x64 OS-->\n    <util:FileSearch Id=\"DotnetExeSearch_x64\"\n              After=\"DotnetInstallLocation_x64\"\n              Variable=\"DotnetExeExists_x64\"\n              Condition=\"NOT DotnetInstallLocationExists_x64 AND (NOT NativeMachine OR NativeMachine=&quot;$(NativeMachine_x64)&quot;)\"\n              Result=\"exists\"\n              Path=\"[ProgramFiles64Folder]dotnet\\dotnet.exe\"/>\n    <util:DirectorySearch Id=\"DotnetExeLocation_x64\"\n              After=\"DotnetExeSearch_x64\"\n              Condition=\"DotnetExeExists_x64\"\n              Variable=\"DOTNETHOME_X64\"\n              Path=\"[ProgramFiles64Folder]dotnet\"/>\n\n    <!-- Check alternate location on non-x64 OS -->\n    <util:FileSearch Id=\"DotnetExeSearch_alt_x64\"\n              After=\"DotnetInstallLocation_x64\"\n              Variable=\"DotnetExeExists_alt_x64\"\n              Condition=\"NOT DotnetInstallLocationExists_x64 AND NOT NativeMachine=&quot;$(NativeMachine_x64)&quot;\"\n              Result=\"exists\"\n              Path=\"[ProgramFiles64Folder]dotnet\\x64\\dotnet.exe\"/>\n    <util:DirectorySearch Id=\"DotnetExeLocation_alt_x64\"\n              After=\"DotnetExeSearch_alt_x64\"\n              Condition=\"DotnetExeExists_alt_x64\"\n              Variable=\"DOTNETHOME_X64\"\n              Path=\"[ProgramFiles64Folder]dotnet\\x64\"/>\n    <?endif?>\n    <?if $(TargetArchitecture)=arm64?>\n    <util:RegistrySearch Id=\"CheckDotnetInstallLocation_arm64\"\n              Variable=\"DotnetInstallLocationExists_arm64\"\n              Result=\"exists\"\n              Root=\"HKLM\"\n              Key=\"SOFTWARE\\dotnet\\Setup\\InstalledVersions\\arm64\"\n              Value=\"InstallLocation\"\n              Bitness=\"always64\" />\n    <util:RegistrySearch Id=\"DotnetInstallLocation_arm64\"\n              After=\"CheckDotnetInstallLocation_arm64\"\n              Condition=\"DotnetInstallLocationExists_arm64\"\n              Variable=\"DOTNETHOME_ARM64\"\n              Result=\"value\"\n              Root=\"HKLM\"\n              Key=\"SOFTWARE\\dotnet\\Setup\\InstalledVersions\\arm64\"\n              Value=\"InstallLocation\"\n              Bitness=\"always64\" />\n\n    <util:FileSearch Id=\"DotnetExeSearch_arm64\"\n              After=\"DotnetInstallLocation_arm64\"\n              Variable=\"DotnetExeExists_arm64\"\n              Condition=\"NOT DotnetInstallLocationExists_arm64\"\n              Result=\"exists\"\n              Path=\"[ProgramFiles64Folder]dotnet\\dotnet.exe\"/>\n    <util:DirectorySearch Id=\"DotnetExeLocation_arm64\"\n              After=\"DotnetExeSearch_arm64\"\n              Condition=\"DotnetExeExists_arm64\"\n              Variable=\"DOTNETHOME_ARM64\"\n              Path=\"[ProgramFiles64Folder]dotnet\"/>\n    <?endif?>\n\n    <!-- References to upgrade policy registry searches defined in upgradePolicies.wxs -->\n    <util:RegistrySearchRef Id=\"RemovePreviousVersionRegistryKeySearch\" />\n    <util:RegistrySearchRef Id=\"RemoveSpecificPreviousVersionRegistryKeyExistsSearch\" />\n    <util:RegistrySearchRef Id=\"RemoveSpecificPreviousVersionRegistryKeySearch\" />\n\n    <!--\n        When installing the SDK bundle to a custom location using the commandline parameters, it is intended, not mandatory, that\n        both \"DOTNETHOME_X86\" and \"DOTNETHOME_X64\" should be used on the commandline and should take this convention:\n            DOTNETHOME_X86=<InstallFolder>\\x86\n            DOTNETHOME_X64=<InstallFolder>\\x64\n        Example:\n            dotnet-sdk-3.0.100-alpha1-009719-win-x64.exe /install DOTNETHOME_X64=\"D:\\dotnet\\x64\" DOTNETHOME_X86=\"D:\\dotnet\\x86\" /log \"installation.log\" /quiet /norestart\n    -->\n    <Variable Name=\"DOTNETHOME_X86\" bal:Overridable=\"yes\" />\n    <Variable Name=\"DOTNETHOME_X64\" bal:Overridable=\"yes\" />\n    <Variable Name=\"DOTNETHOME_ARM64\" bal:Overridable=\"yes\" />\n    <Variable Name=\"DOTNETHOME\" Type=\"formatted\" Value=\"[DOTNETHOME_$(PlatformToken)]\" bal:Overridable=\"no\" />\n    <Variable Name=\"BUNDLEMONIKER\" Type=\"string\" Value=\"$(SdkBrandName)\" bal:Overridable=\"no\" />\n    <Variable Name=\"DOTNETRUNTIMEVERSION\" Type=\"string\" Value=\"$(DotNetRuntimeVersion)\" bal:Overridable=\"no\" />\n    <Variable Name=\"DOTNETHOMESIMILARITYCHECKOVERRIDE\" Type=\"string\" Value=\"\" bal:Overridable=\"yes\" />\n    <Variable Name=\"VERSIONMAJOR\" Type=\"string\" Value=\"$(MajorVersion)\" bal:Overridable=\"no\" />\n    <Variable Name=\"VERSIONMINOR\" Type=\"string\" Value=\"$(MinorVersion)\" bal:Overridable=\"no\" />\n    <Variable Name=\"MINIMUMVSVERSION\" Type=\"string\" Value=\"$(MinimumVSVersion)\" bal:Overridable=\"no\" />\n\n    <Chain DisableSystemRestore=\"yes\" ParallelCache=\"yes\">\n      <!-- Rollback boundary ensures transaction safety for all MSI packages -->\n      <RollbackBoundary Id=\"WindowsDesktopBoundary\" />\n      \n      <!-- .NET Core components must be installed in dependency order -->\n      <!-- These are conditionally included only if the MSI files exist -->\n      \n      <!-- Host is the base component that everything else depends on -->\n      <MsiPackage \n        Id=\"DotNetHost\"\n        SourceFile=\"$(var.DotNetRedistHostInstaller)\"\n        Vital=\"yes\"\n        Cache=\"keep\"\n        DisplayName=\"Microsoft .NET Host\">\n        <MsiProperty Name=\"DOTNETHOME\" Value=\"[DOTNETHOME]\" />\n        <MsiProperty Name=\"ALLOWMSIINSTALL\" Value=\"True\" />\n      </MsiPackage>\n      \n      <!-- HostFxr depends on Host -->\n      <MsiPackage \n        Id=\"DotNetHostFxr\"\n        SourceFile=\"$(var.DotNetRedistHostfxrInstaller)\"\n        Vital=\"yes\"\n        Cache=\"keep\"\n        DisplayName=\"Microsoft .NET Host FX Resolver\">\n        <MsiProperty Name=\"DOTNETHOME\" Value=\"[DOTNETHOME]\" />\n        <MsiProperty Name=\"ALLOWMSIINSTALL\" Value=\"True\" />\n      </MsiPackage>\n      \n      <!-- Runtime depends on Host and HostFxr -->\n      <MsiPackage \n        Id=\"DotNetRuntime\"\n        SourceFile=\"$(var.DotNetRedistLtsInstaller)\"\n        Vital=\"yes\"\n        Cache=\"keep\"\n        DisplayName=\"Microsoft .NET Runtime\">\n        <MsiProperty Name=\"DOTNETHOME\" Value=\"[DOTNETHOME]\" />\n        <MsiProperty Name=\"ALLOWMSIINSTALL\" Value=\"True\" />\n      </MsiPackage>\n      \n      <!-- Windows Desktop Runtime depends on all the above .NET Core components -->\n      <MsiPackage \n        Id=\"WindowsDesktopRuntime\"\n        SourceFile=\"$(WindowsDesktopRuntimeMsiPath)\"\n        Vital=\"yes\"\n        Cache=\"keep\"\n        DisplayName=\"Microsoft Windows Desktop Runtime\">\n        <MsiProperty Name=\"DOTNETHOME\" Value=\"[DOTNETHOME]\" />\n        <MsiProperty Name=\"ALLOWMSIINSTALL\" Value=\"True\" />\n        <MsiProperty Name=\"ARPSYSTEMCOMPONENT\" Value=\"0\" />\n      </MsiPackage>\n    </Chain>\n  </Bundle>\n</Wix>"
  },
  {
    "path": "src/windowsdesktop/src/bundle/dotnet-packages.wxs",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Wix xmlns=\"http://wixtoolset.org/schemas/v4/wxs\" xmlns:util=\"http://wixtoolset.org/schemas/v4/wxs/util\">\n  <Fragment>\n    <!-- Detection for .NET Host - Base component that everything else depends on -->\n    <util:ProductSearch Id=\"DotNetHostInstalled\"\n                       UpgradeCode=\"{B7446807-9C0A-45C9-A20A-2CE596499A00}\"\n                       Result=\"version\"\n                       Variable=\"DotNetHostInstalledVersion\" />\n    \n    <!-- Detection for .NET HostFxr - Framework host resolver -->\n    <util:ProductSearch Id=\"DotNetHostFxrInstalled\"\n                       UpgradeCode=\"{44A6E04C-6EAC-485E-867B-ED2A6A858810}\"\n                       Result=\"version\"\n                       Variable=\"DotNetHostFxrInstalledVersion\" />\n    \n    <!-- Detection for .NET Runtime - Core runtime components -->\n    <util:ProductSearch Id=\"DotNetRuntimeInstalled\"\n                       UpgradeCode=\"{3FB2EED7-4BDD-4219-8A10-AB0C6C76F330}\"\n                       Result=\"version\"\n                       Variable=\"DotNetRuntimeInstalledVersion\" />\n    \n    <!-- Architecture-specific detection for .NET Host -->\n    <?if $(TargetArchitecture) = x64 ?>\n    <util:ProductSearch Id=\"DotNetHostInstalledx64\"\n                       UpgradeCode=\"{B7446807-9C0A-45C9-A20A-2CE596499A01}\"\n                       Result=\"version\"\n                       Variable=\"DotNetHostInstalledVersionx64\" />\n    <?endif?>\n    \n    <?if $(TargetArchitecture) = x86 ?>\n    <util:ProductSearch Id=\"DotNetHostInstalledx86\"\n                       UpgradeCode=\"{B7446807-9C0A-45C9-A20A-2CE596499A02}\"\n                       Result=\"version\"\n                       Variable=\"DotNetHostInstalledVersionx86\" />\n    <?endif?>\n    \n    <?if $(TargetArchitecture) = arm64 ?>\n    <util:ProductSearch Id=\"DotNetHostInstalledarm64\"\n                       UpgradeCode=\"{B7446807-9C0A-45C9-A20A-2CE596499A03}\"\n                       Result=\"version\"\n                       Variable=\"DotNetHostInstalledVersionarm64\" />\n    <?endif?>\n\n    <!-- Architecture-specific detection for .NET HostFxr -->\n    <?if $(TargetArchitecture) = x64 ?>\n    <util:ProductSearch Id=\"DotNetHostFxrInstalledx64\"\n                       UpgradeCode=\"{44A6E04C-6EAC-485E-867B-ED2A6A858811}\"\n                       Result=\"version\"\n                       Variable=\"DotNetHostFxrInstalledVersionx64\" />\n    <?endif?>\n    \n    <?if $(TargetArchitecture) = x86 ?>\n    <util:ProductSearch Id=\"DotNetHostFxrInstalledx86\"\n                       UpgradeCode=\"{44A6E04C-6EAC-485E-867B-ED2A6A858812}\"\n                       Result=\"version\"\n                       Variable=\"DotNetHostFxrInstalledVersionx86\" />\n    <?endif?>\n    \n    <?if $(TargetArchitecture) = arm64 ?>\n    <util:ProductSearch Id=\"DotNetHostFxrInstalledarm64\"\n                       UpgradeCode=\"{44A6E04C-6EAC-485E-867B-ED2A6A858813}\"\n                       Result=\"version\"\n                       Variable=\"DotNetHostFxrInstalledVersionarm64\" />\n    <?endif?>\n\n    <!-- Architecture-specific detection for .NET Runtime -->\n    <?if $(TargetArchitecture) = x64 ?>\n    <util:ProductSearch Id=\"DotNetRuntimeInstalledx64\"\n                       UpgradeCode=\"{3FB2EED7-4BDD-4219-8A10-AB0C6C76F331}\"\n                       Result=\"version\"\n                       Variable=\"DotNetRuntimeInstalledVersionx64\" />\n    <?endif?>\n    \n    <?if $(TargetArchitecture) = x86 ?>\n    <util:ProductSearch Id=\"DotNetRuntimeInstalledx86\"\n                       UpgradeCode=\"{3FB2EED7-4BDD-4219-8A10-AB0C6C76F332}\"\n                       Result=\"version\"\n                       Variable=\"DotNetRuntimeInstalledVersionx86\" />\n    <?endif?>\n    \n    <?if $(TargetArchitecture) = arm64 ?>\n    <util:ProductSearch Id=\"DotNetRuntimeInstalledarm64\"\n                       UpgradeCode=\"{3FB2EED7-4BDD-4219-8A10-AB0C6C76F333}\"\n                       Result=\"version\"\n                       Variable=\"DotNetRuntimeInstalledVersionarm64\" />\n    <?endif?>\n\n    <!-- Detection for existing WindowsDesktop MSI (RC1 compatibility) -->\n    <util:ProductSearch Id=\"WindowsDesktopRuntimeInstalled\"\n                       UpgradeCode=\"{A81EE51C-5913-400C-93A4-FB6E89F97345}\"\n                       Result=\"version\"\n                       Variable=\"WindowsDesktopRuntimeInstalledVersion\" />\n\n    <!-- Condition variables for prerequisite checks -->\n    <Variable Name=\"DotNetHostMeetsMinimumVersion\" Type=\"formatted\" \n              Value=\"[DotNetHostInstalledVersion$(PlatformToken)] &gt;= v$(DotNetRuntimeVersion)\" />\n    <Variable Name=\"DotNetHostFxrMeetsMinimumVersion\" Type=\"formatted\" \n              Value=\"[DotNetHostFxrInstalledVersion$(PlatformToken)] &gt;= v$(DotNetRuntimeVersion)\" />\n    <Variable Name=\"DotNetRuntimeMeetsMinimumVersion\" Type=\"formatted\" \n              Value=\"[DotNetRuntimeInstalledVersion$(PlatformToken)] &gt;= v$(DotNetRuntimeVersion)\" />\n\n    <!-- Combined prerequisite check -->\n    <Variable Name=\"DotNetPrerequisitesMet\" Type=\"formatted\" \n              Value=\"DotNetHostMeetsMinimumVersion AND DotNetHostFxrMeetsMinimumVersion AND DotNetRuntimeMeetsMinimumVersion\" />\n  </Fragment>\n</Wix>\n"
  },
  {
    "path": "src/windowsdesktop/src/bundle/dummyeula.rtf",
    "content": "{\\rtf1\\ansi\\deff0 {\\fonttbl {\\f0 Times New Roman;}}\n\\f0\\fs20 MICROSOFT .NET WINDOWS DESKTOP RUNTIME LICENSE\n\\par\n\\par\nPlease see the MIT license at https://github.com/dotnet/core/blob/main/LICENSE.TXT\n\\par\n}\n"
  },
  {
    "path": "src/windowsdesktop/src/bundle/theme/1028/thm.wxl",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<WixLocalization Culture=\"zh-TW\" Language=\"1028\" xmlns=\"http://wixtoolset.org/schemas/v4/wxl\">\n  <String Id=\"Caption\" Value=\"[WixBundleName] 安裝程式\" />\n  <String Id=\"Title\" Value=\"[BUNDLEMONIKER]\" />\n  <String Id=\"ConfirmCancelMessage\" Value=\"您確定要取消嗎?\" />\n  <String Id=\"ExecuteUpgradeRelatedBundleMessage\" Value=\"先前的版本\" />\n  <String Id=\"HelpHeader\" Value=\"安裝程式說明\" />\n  <String Id=\"HelpText\" Value=\"/install | /repair | /uninstall | /layout [directory] - 安裝、修復、解除安裝或在目錄中建立搭售方案的完整本機複本。預設會進行安裝。  /passive | /quiet - 顯示最基本的 UI 且不出現提示，或是不顯示任何 UI 且不出現提示。預設會顯示 UI 及所有提示。  /norestart - 抑制任何重新啟動嘗試。根據預設，UI 在重新啟動前會先提示。  /log log.txt - 記錄到特定檔案。預設會在 %TEMP% 中建立記錄檔。\" />\n  <String Id=\"HelpCloseButton\" Value=\"關閉(&amp;C)\" />\n  <String Id=\"InstallAcceptCheckbox\" Value=\"我同意授權條款和條件(&amp;A)\" />\n  <String Id=\"InstallOptionsButton\" Value=\"選項(&amp;O)\" />\n  <String Id=\"InstallInstallButton\" Value=\"安裝(&amp;I)\" />\n  <String Id=\"InstallCloseButton\" Value=\"關閉(&amp;C)\" />\n  <String Id=\"ProgressHeader\" Value=\"安裝程式進度\" />\n  <String Id=\"ProgressLabel\" Value=\"正在處理:\" />\n  <String Id=\"OverallProgressPackageText\" Value=\"正在初始化...\" />\n  <String Id=\"ProgressCancelButton\" Value=\"取消(&amp;C)\" />\n  <String Id=\"ModifyHeader\" Value=\"修改安裝程式\" />\n  <String Id=\"ModifyText\" Value=\"選擇「修復」以重新安裝產品，或選擇「解除安裝」以移除產品。\" />\n  <String Id=\"ModifyRepairButton\" Value=\"修復(&amp;R)\" />\n  <String Id=\"ModifyUninstallButton\" Value=\"解除安裝(&amp;U)\" />\n  <String Id=\"ModifyCloseButton\" Value=\"關閉(&amp;C)\" />\n  <String Id=\"SuccessRepairHeader\" Value=\"修復已成功完成\" />\n  <String Id=\"SuccessUninstallHeader\" Value=\"解除安裝已成功完成\" />\n  <String Id=\"SuccessInstallHeader\" Value=\"安裝已成功完成\" />\n  <String Id=\"SuccessHeader\" Value=\"安裝程式成功\" />\n  <String Id=\"SuccessLaunchButton\" Value=\"啟動(&amp;L)\" />\n  <String Id=\"SuccessRestartText\" Value=\"必須重新啟動電腦，才能使用此軟體。\" />\n  <String Id=\"SuccessRestartButton\" Value=\"重新啟動(&amp;R)\" />\n  <String Id=\"SuccessCloseButton\" Value=\"關閉(&amp;C)\" />\n  <String Id=\"FailureHeader\" Value=\"安裝程式失敗\" />\n  <String Id=\"FailureInstallHeader\" Value=\"安裝程式失敗\" />\n  <String Id=\"FailureUninstallHeader\" Value=\"解除安裝失敗\" />\n  <String Id=\"FailureRepairHeader\" Value=\"修復失敗\" />\n  <String Id=\"FailureHyperlinkLogText\" Value=\"一或多個問題導致設定失敗。請修正問題，然後重試安裝程式。如需詳細資訊，請參考&lt;a href=&quot;#&quot;&gt;記錄檔&lt;/a&gt;。\" />\n  <String Id=\"FailureRestartText\" Value=\"必須重新啟動電腦，才能完成軟體的復原。\" />\n  <String Id=\"FailureRestartButton\" Value=\"重新啟動(&amp;R)\" />\n  <String Id=\"FailureCloseButton\" Value=\"關閉(&amp;C)\" />\n  <String Id=\"FailureNotSupportedCurrentOperatingSystem\" Value=\"此作業系統不支援 [PRODUCT_NAME]。如需詳細資訊，請參閱 [LINK_PREREQ_PAGE]。\" />\n  <String Id=\"FailureNotSupportedX86OperatingSystem\" Value=\"x86 作業系統不支援 [PRODUCT_NAME]。請使用對應的 x86 安裝程式來安裝。\" />\n  <String Id=\"FilesInUseTitle\" Value=\"使用中的檔案\" />\n  <String Id=\"FilesInUseLabel\" Value=\"以下應用程式正在使用需要進行更新的檔案:\" />\n  <String Id=\"FilesInUseCloseRadioButton\" Value=\"請關閉應用程式然後嘗試重新啟動。(&amp;A)\" />\n  <String Id=\"FilesInUseDontCloseRadioButton\" Value=\"不要關閉應用程式(&amp;D)。需要重新啟動。\" />\n  <String Id=\"FilesInUseRetryButton\" Value=\"重試(&amp;R)\" />\n  <String Id=\"FilesInUseCancelButton\" Value=\"取消(&amp;C)\" />\n  <String Id=\"WelcomeHeader\" Value=\"Windows Desktop Runtime\" />\n  <String Id=\"WelcomeDescription\" Value=\".NET Windows Desktop Runtime 可用於在您的電腦上執行 Windows Forms 與 WPF 應用程式。.NET 為開放原始碼形式，且可跨平台運作，同時受到 Microsoft 支援。希望您會喜歡!\" />\n  <String Id=\"LearnMoreTitle\" Value=\"深入了解 .NET\" />\n  <String Id=\"SuccessInstallLocation\" Value=\"下列項目已安裝在 [DOTNETHOME]\" />\n  <String Id=\"SuccessInstallProductName\" Value=\" - [BUNDLEMONIKER] \" />\n  <String Id=\"ResourcesHeader\" Value=\"資源\" />\n  <String Id=\"DocumentationLink\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-docs&quot;&gt;文件&lt;/A&gt;\" />\n  <String Id=\"ReleaseNotesLink\" Value=\"&lt;A HREF=&quot;https://aka.ms/20-p2-rel-notes&quot;&gt;版本資訊&lt;/A&gt;\" />\n  <String Id=\"TutorialLink\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-tutorials&quot;&gt;教學課程&lt;/A&gt;\" />\n  <String Id=\"TelemetryLink\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-cli-telemetry&quot;&gt;.NET 遙測&lt;/A&gt;\" />\n  <String Id=\"PrivacyStatementLink\" Value=\"&lt;A HREF=&quot;https://aka.ms/dev-privacy&quot;&gt;隱私權聲明&lt;/A&gt;\" />\n  <String Id=\"EulaLink\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-license-windows&quot;&gt;.NET 授權資訊&lt;/A&gt;\" />\n  <String Id=\"LicenseAssent\" Value=\"按一下 [\\[]安裝[\\[] 即表示您同意下列條款。\" />\n  <String Id=\"VisualStudioWarning\" Value=\"如果計劃使用 .NET [VERSIONMAJOR].[VERSIONMINOR] 搭配 Visual Studio，需要 Visual Studio 2026 18.0 或更新版本。&lt;A HREF=&quot;https://aka.ms/dotnet[VERSIONMAJOR]-release-notes&quot;&gt;深入了解&lt;/A&gt;。\" />\n  <!-- Success page strings -->\n  <String Id=\"FirstTimeWelcomeMessage\" Value=\"感謝您安裝 [BUNDLEMONIKER]!您現在可以執行需要 .NET Windows 桌面執行階段的應用程式。\" />\n  <String Id=\"NetDocumentationLinkText\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-docs&quot;&gt;.NET 文件&lt;/A&gt;\" />\n  <String Id=\"WindowsDesktopDocumentationLinkText\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-desktop-docs&quot;&gt;Windows 桌面文件&lt;/A&gt;\" />\n  <String Id=\"ReleaseNotesLinkText\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet[VERSIONMAJOR]-release-notes&quot;&gt;版本資訊&lt;/A&gt;\" />\n  <String Id=\"TutorialsLinkText\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-tutorials&quot;&gt;.NET 教學課程&lt;/A&gt;\" />\n  <!-- Additional success headers -->\n  <String Id=\"SuccessLayoutHeader\" Value=\"配置已成功完成\" />\n  <String Id=\"SuccessUnsafeUninstallHeader\" Value=\"已成功完成不安全解除安裝\" />\n  <String Id=\"SuccessCacheHeader\" Value=\"快取已成功完成\" />\n  <String Id=\"SuccessModifyHeader\" Value=\"已成功完成修改\" />\n  <String Id=\"SuccessUninstallRestartText\" Value=\"您必須重新啟動電腦才能完成解除安裝。\" />\n  <!-- Additional failure headers -->\n  <String Id=\"FailureLayoutHeader\" Value=\"配置失敗\" />\n  <String Id=\"FailureUnsafeUninstallHeader\" Value=\"不安全解除安裝失敗\" />\n  <String Id=\"FailureCacheHeader\" Value=\"快取失敗\" />\n  <String Id=\"FailureModifyHeader\" Value=\"修改失敗\" />\n</WixLocalization>"
  },
  {
    "path": "src/windowsdesktop/src/bundle/theme/1029/thm.wxl",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<WixLocalization Culture=\"cs-CZ\" Language=\"1029\" xmlns=\"http://wixtoolset.org/schemas/v4/wxl\">\n  <String Id=\"Caption\" Value=\"Instalační program pro [WixBundleName]\" />\n  <String Id=\"Title\" Value=\"[BUNDLEMONIKER]\" />\n  <String Id=\"ConfirmCancelMessage\" Value=\"Opravdu chcete akci zrušit?\" />\n  <String Id=\"ExecuteUpgradeRelatedBundleMessage\" Value=\"Předchozí verze\" />\n  <String Id=\"HelpHeader\" Value=\"Nápověda k nastavení\" />\n  <String Id=\"HelpText\" Value=\"/install | /repair | /uninstall | /layout [adresář] – Nainstaluje, opraví, odinstaluje nebo vytvoří úplnou místní kopii sady v adresáři. Výchozí možností je instalace.  /passive | /quiet – Zobrazí minimální uživatelské rozhraní bez jakýchkoli výzev nebo nezobrazí žádné rozhraní ani výzvy. Ve výchozím nastavení se zobrazí uživatelské rozhraní a všechny výzvy.  /norestart – Potlačí všechny pokusy o restartování. Ve výchozím nastavení uživatelské rozhraní zobrazí před restartováním výzvu.  /log log.txt – zapíše protokol do konkrétního souboru. Ve výchozím nastavení bude soubor protokolu vytvořen v adresáři %TEMP%.\" />\n  <String Id=\"HelpCloseButton\" Value=\"&amp;Zavřít\" />\n  <String Id=\"InstallAcceptCheckbox\" Value=\"&amp;Souhlasím s licenčními podmínkami a ujednáními\" />\n  <String Id=\"InstallOptionsButton\" Value=\"&amp;Možnosti\" />\n  <String Id=\"InstallInstallButton\" Value=\"Na&amp;instalovat\" />\n  <String Id=\"InstallCloseButton\" Value=\"&amp;Zavřít\" />\n  <String Id=\"ProgressHeader\" Value=\"Průběh instalace\" />\n  <String Id=\"ProgressLabel\" Value=\"Zpracování:\" />\n  <String Id=\"OverallProgressPackageText\" Value=\"Probíhá inicializace...\" />\n  <String Id=\"ProgressCancelButton\" Value=\"&amp;Zrušit\" />\n  <String Id=\"ModifyHeader\" Value=\"Upravit nastavení\" />\n  <String Id=\"ModifyText\" Value=\"Pokud chcete produkt přeinstalovat, vyberte Opravit, pokud ho chcete odebrat, vyberte Odinstalovat.\" />\n  <String Id=\"ModifyRepairButton\" Value=\"&amp;Opravit\" />\n  <String Id=\"ModifyUninstallButton\" Value=\"&amp;Odinstalovat\" />\n  <String Id=\"ModifyCloseButton\" Value=\"&amp;Zavřít\" />\n  <String Id=\"SuccessRepairHeader\" Value=\"Oprava byla úspěšně dokončena.\" />\n  <String Id=\"SuccessUninstallHeader\" Value=\"Odinstalace se úspěšně dokončila.\" />\n  <String Id=\"SuccessInstallHeader\" Value=\"Instalace se úspěšně dokončila\" />\n  <String Id=\"SuccessHeader\" Value=\"Instalace byla úspěšná\" />\n  <String Id=\"SuccessLaunchButton\" Value=\"&amp;Spustit\" />\n  <String Id=\"SuccessRestartText\" Value=\"Před použitím tohoto softwaru musíte restartovat počítač.\" />\n  <String Id=\"SuccessRestartButton\" Value=\"&amp;Restartovat\" />\n  <String Id=\"SuccessCloseButton\" Value=\"&amp;Zavřít\" />\n  <String Id=\"FailureHeader\" Value=\"Instalace selhala.\" />\n  <String Id=\"FailureInstallHeader\" Value=\"Instalace selhala.\" />\n  <String Id=\"FailureUninstallHeader\" Value=\"Odinstalace selhala.\" />\n  <String Id=\"FailureRepairHeader\" Value=\"Oprava selhala.\" />\n  <String Id=\"FailureHyperlinkLogText\" Value=\"Nejméně jeden problém způsobil, že instalace selhala. Opravte prosím tyto problémy a zkuste instalaci zopakovat. Další informace najdete v &lt;a href=&quot;#&quot;&gt;souboru protokolu&lt;/a&gt;.\" />\n  <String Id=\"FailureRestartText\" Value=\"Pro dokončení vrácení změn tohoto softwaru je potřeba restartovat počítač.\" />\n  <String Id=\"FailureRestartButton\" Value=\"&amp;Restartovat\" />\n  <String Id=\"FailureCloseButton\" Value=\"&amp;Zavřít\" />\n  <String Id=\"FailureNotSupportedCurrentOperatingSystem\" Value=\"[PRODUCT_NAME] se tomto operačním systému nepodporuje. Další informace: [LINK_PREREQ_PAGE]\" />\n  <String Id=\"FailureNotSupportedX86OperatingSystem\" Value=\"[PRODUCT_NAME] se v operačních systémech pro platformu x86 nepodporuje. Použijte prosím k instalaci odpovídající instalační program pro platformu x86.\" />\n  <String Id=\"FilesInUseTitle\" Value=\"Soubory jsou používány.\" />\n  <String Id=\"FilesInUseLabel\" Value=\"Následující aplikace používají soubory, které je potřeba aktualizovat:\" />\n  <String Id=\"FilesInUseCloseRadioButton\" Value=\"&amp;Zavřít aplikace a pokusit se je znovu spustit\" />\n  <String Id=\"FilesInUseDontCloseRadioButton\" Value=\"&amp;Nezavírat aplikace Bude nutné restartovat počítač.\" />\n  <String Id=\"FilesInUseRetryButton\" Value=\"Opakov&amp;at\" />\n  <String Id=\"FilesInUseCancelButton\" Value=\"&amp;Zrušit\" />\n  <String Id=\"WelcomeHeader\" Value=\"Windows Desktop Runtime\" />\n  <String Id=\"WelcomeDescription\" Value=\"Modul .NET Windows Desktop Runtime se používá ke spouštění aplikací Windows Forms a WPF na počítači. .NET je open source, k dispozici pro více platforem a podporovaný Microsoftem. Doufáme, že se vám bude líbit!\" />\n  <String Id=\"LearnMoreTitle\" Value=\"Další informace o .NET\" />\n  <String Id=\"SuccessInstallLocation\" Value=\"Do [DOTNETHOME] se nainstalovaly následující položky.\" />\n  <String Id=\"SuccessInstallProductName\" Value=\" - [BUNDLEMONIKER] \" />\n  <String Id=\"ResourcesHeader\" Value=\"Prostředky\" />\n  <String Id=\"DocumentationLink\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-docs&quot;&gt;Dokumentace&lt;/A&gt;\" />\n  <String Id=\"ReleaseNotesLink\" Value=\"&lt;A HREF=&quot;https://aka.ms/20-p2-rel-notes&quot;&gt;Poznámky k verzi&lt;/A&gt;\" />\n  <String Id=\"TutorialLink\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-tutorials&quot;&gt;Kurzy&lt;/A&gt;\" />\n  <String Id=\"TelemetryLink\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-cli-telemetry&quot;&gt;Telemetrie .NET&lt;/A&gt;\" />\n  <String Id=\"PrivacyStatementLink\" Value=\"&lt;A HREF=&quot;https://aka.ms/dev-privacy&quot;&gt;Prohlášení o zásadách ochrany osobních údajů&lt;/A&gt;\" />\n  <String Id=\"EulaLink\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-license-windows&quot;&gt;Informace o licencování pro .NET&lt;/A&gt;\" />\n  <String Id=\"LicenseAssent\" Value=\"Kliknutím na Nainstalovat vyjadřujete souhlas s následujícími podmínkami.\" />\n  <String Id=\"VisualStudioWarning\" Value=\"Pokud plánujete používat rozhraní .NET [VERSIONMAJOR].[VERSIONMINOR] se sadou Visual Studio, je vyžadována verze Visual Studio 2026 18.0 nebo novější. &lt;A HREF=&quot;https://aka.ms/dotnet[VERSIONMAJOR]-release-notes&quot;&gt;Přečtěte si další informace&lt;/A&gt;.\" />\n  <!-- Success page strings -->\n  <String Id=\"FirstTimeWelcomeMessage\" Value=\"Děkujeme, že jste si nainstalovali [BUNDLEMONIKER]! Teď můžete spouštět aplikace, které vyžadují prostředí .NET Windows Desktop Runtime.\" />\n  <String Id=\"NetDocumentationLinkText\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-docs&quot;&gt;Dokumentace k rozhraní .NET&lt;/A&gt;\" />\n  <String Id=\"WindowsDesktopDocumentationLinkText\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-desktop-docs&quot;&gt;Windows Desktop – dokumentace&lt;/A&gt;\" />\n  <String Id=\"ReleaseNotesLinkText\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet[VERSIONMAJOR]-release-notes&quot;&gt;Poznámky k verzi&lt;/A&gt;\" />\n  <String Id=\"TutorialsLinkText\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-tutorials&quot;&gt;.NET – kurzy&lt;/A&gt;\" />\n  <!-- Additional success headers -->\n  <String Id=\"SuccessLayoutHeader\" Value=\"Rozložení se úspěšně dokončilo.\" />\n  <String Id=\"SuccessUnsafeUninstallHeader\" Value=\"Odinstalace bez ověření bezpečnosti byla úspěšně dokončena\" />\n  <String Id=\"SuccessCacheHeader\" Value=\"Úspěšné dokončení mezipaměti\" />\n  <String Id=\"SuccessModifyHeader\" Value=\"Úprava se úspěšně dokončila\" />\n  <String Id=\"SuccessUninstallRestartText\" Value=\"Aby bylo možné dokončit odinstalaci, je nutné restartovat počítač.\" />\n  <!-- Additional failure headers -->\n  <String Id=\"FailureLayoutHeader\" Value=\"Rozložení selhalo.\" />\n  <String Id=\"FailureUnsafeUninstallHeader\" Value=\"Odinstalace bez ověření bezpečnosti selhala\" />\n  <String Id=\"FailureCacheHeader\" Value=\"Mezipaměť selhala.\" />\n  <String Id=\"FailureModifyHeader\" Value=\"Úprava selhala\" />\n</WixLocalization>"
  },
  {
    "path": "src/windowsdesktop/src/bundle/theme/1031/thm.wxl",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<WixLocalization Culture=\"de-DE\" Language=\"1031\" xmlns=\"http://wixtoolset.org/schemas/v4/wxl\">\n  <String Id=\"Caption\" Value=\"[WixBundleName]-Installationsprogramm\" />\n  <String Id=\"Title\" Value=\"[BUNDLEMONIKER]\" />\n  <String Id=\"ConfirmCancelMessage\" Value=\"Möchten Sie den Vorgang wirklich abbrechen?\" />\n  <String Id=\"ExecuteUpgradeRelatedBundleMessage\" Value=\"Vorherige Version\" />\n  <String Id=\"HelpHeader\" Value=\"Setuphilfe\" />\n  <String Id=\"HelpText\" Value=\"/install | /repair | /uninstall | /layout [directory] - installs, repairs, uninstalls or creates a complete local copy of the bundle in directory. Install is the default.  /passive | /quiet - displays minimal UI with no prompts or displays no UI and no prompts. By default UI and all prompts are displayed.  /norestart - suppress any attempts to restart. By default UI will prompt before restart.  /log log.txt - logs to a specific file. By default a log file is created in %TEMP%.\" />\n  <String Id=\"HelpCloseButton\" Value=\"&amp;Schließen\" />\n  <String Id=\"InstallAcceptCheckbox\" Value=\"Ich &amp;stimme den Bedingungen des Lizenzvertrags zu\" />\n  <String Id=\"InstallOptionsButton\" Value=\"&amp;Optionen\" />\n  <String Id=\"InstallInstallButton\" Value=\"&amp;Installieren\" />\n  <String Id=\"InstallCloseButton\" Value=\"&amp;Schließen\" />\n  <String Id=\"ProgressHeader\" Value=\"Setupstatus\" />\n  <String Id=\"ProgressLabel\" Value=\"Verarbeitung:\" />\n  <String Id=\"OverallProgressPackageText\" Value=\"Initialisierung wird ausgeführt...\" />\n  <String Id=\"ProgressCancelButton\" Value=\"&amp;Abbrechen\" />\n  <String Id=\"ModifyHeader\" Value=\"Setup ändern\" />\n  <String Id=\"ModifyText\" Value=\"Wählen Sie „Reparieren“ aus, um das Produkt neu zu installieren, oder „Deinstallieren“, um es zu entfernen.\" />\n  <String Id=\"ModifyRepairButton\" Value=\"&amp;Reparieren\" />\n  <String Id=\"ModifyUninstallButton\" Value=\"&amp;Deinstallieren\" />\n  <String Id=\"ModifyCloseButton\" Value=\"&amp;Schließen\" />\n  <String Id=\"SuccessRepairHeader\" Value=\"Reparatur erfolgreich abgeschlossen\" />\n  <String Id=\"SuccessUninstallHeader\" Value=\"Deinstallation erfolgreich abgeschlossen\" />\n  <String Id=\"SuccessInstallHeader\" Value=\"Installation erfolgreich abgeschlossen\" />\n  <String Id=\"SuccessHeader\" Value=\"Setup wurde erfolgreich abgeschlossen\" />\n  <String Id=\"SuccessLaunchButton\" Value=\"&amp;Starten\" />\n  <String Id=\"SuccessRestartText\" Value=\"Sie müssen den Computer neu starten, bevor Sie die Software verwenden können.\" />\n  <String Id=\"SuccessRestartButton\" Value=\"&amp;Neu starten\" />\n  <String Id=\"SuccessCloseButton\" Value=\"&amp;Schließen\" />\n  <String Id=\"FailureHeader\" Value=\"Fehler beim Setup\" />\n  <String Id=\"FailureInstallHeader\" Value=\"Fehler beim Setup\" />\n  <String Id=\"FailureUninstallHeader\" Value=\"Fehler bei der Deinstallation\" />\n  <String Id=\"FailureRepairHeader\" Value=\"Fehler bei der Reparatur\" />\n  <String Id=\"FailureHyperlinkLogText\" Value=\"Mindestens ein Problem hat zu einem Fehler beim Setup geführt. Beheben Sie die Probleme, und wiederholen Sie dann die Einrichtung. Weitere Informationen finden Sie in der &lt;a href=&quot;#&quot;&gt;Protokolldatei&lt;/a&gt;.\" />\n  <String Id=\"FailureRestartText\" Value=\"Sie müssen den Computer neu starten, um das Zurücksetzen der Software abzuschließen.\" />\n  <String Id=\"FailureRestartButton\" Value=\"&amp;Neu starten\" />\n  <String Id=\"FailureCloseButton\" Value=\"&amp;Schließen\" />\n  <String Id=\"FailureNotSupportedCurrentOperatingSystem\" Value=\"[PRODUCT_NAME] wird auf diesem Betriebssystem nicht unterstützt. Weitere Informationen finden Sie unter [LINK_PREREQ_PAGE].\" />\n  <String Id=\"FailureNotSupportedX86OperatingSystem\" Value=\"[PRODUCT_NAME] wird auf x86-Betriebssystemen nicht unterstützt. Installieren Sie das entsprechende x86-Installationsprogramm.\" />\n  <String Id=\"FilesInUseTitle\" Value=\"Dateien in Verwendung\" />\n  <String Id=\"FilesInUseLabel\" Value=\"Die folgenden Anwendungen verwenden Dateien, die aktualisiert werden müssen:\" />\n  <String Id=\"FilesInUseCloseRadioButton\" Value=\"Schließen Sie die &amp;Anwendungen, und versuchen Sie sie erneut zu starten.\" />\n  <String Id=\"FilesInUseDontCloseRadioButton\" Value=\"&amp;Schließen Sie die Anwendungen nicht. Ein Neustart ist erforderlich.\" />\n  <String Id=\"FilesInUseRetryButton\" Value=\"&amp;Wiederholen\" />\n  <String Id=\"FilesInUseCancelButton\" Value=\"&amp;Abbrechen\" />\n  <String Id=\"WelcomeHeader\" Value=\"Windows Desktop Runtime\" />\n  <String Id=\"WelcomeDescription\" Value=\"Die .NET Windows Desktop-Laufzeit wird zum Ausführen von Windows Forms- und WPF-Anwendungen auf Ihrem Computer verwendet. .NET ist Open Source-, plattformübergreifend und wird von Microsoft unterstützt. Viel Spaß!\" />\n  <String Id=\"LearnMoreTitle\" Value=\"Weitere Informationen zu .NET\" />\n  <String Id=\"SuccessInstallLocation\" Value=\"Folgendes wurde unter [DOTNETHOME] installiert.\" />\n  <String Id=\"SuccessInstallProductName\" Value=\" - [BUNDLEMONIKER] \" />\n  <String Id=\"ResourcesHeader\" Value=\"Ressourcen\" />\n  <String Id=\"DocumentationLink\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-docs&quot;&gt;Dokumentation&lt;/A&gt;\" />\n  <String Id=\"ReleaseNotesLink\" Value=\"&lt;A HREF=&quot;https://aka.ms/20-p2-rel-notes&quot;&gt;Versionshinweise&lt;/A&gt;\" />\n  <String Id=\"TutorialLink\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-tutorials&quot;&gt;Tutorials&lt;/A&gt;\" />\n  <String Id=\"TelemetryLink\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-cli-telemetry&quot;&gt;.NET-Telemetry&lt;/A&gt;\" />\n  <String Id=\"PrivacyStatementLink\" Value=\"&lt;A HREF=&quot;https://aka.ms/dev-privacy&quot;&gt;Datenschutzerklärung&lt;/A&gt;\" />\n  <String Id=\"EulaLink\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-license-windows&quot;&gt;Lizenzierungsinformationen für .NET&lt;/A&gt;\" />\n  <String Id=\"LicenseAssent\" Value=\"Durch Klicken auf &quot;Installieren&quot; stimmen Sie den nachstehenden Bedingungen zu.\" />\n  <String Id=\"VisualStudioWarning\" Value=\"Wenn Sie beabsichtigen, .NET [VERSIONMAJOR]. [VERSIONMINOR] mit Visual Studio zu verwenden, ist Visual Studio 2026 18.0 oder neuer erforderlich. &lt;A HREF=&quot;https://aka.ms/dotnet[VERSIONMAJOR]-release-notes&quot;&gt;Weitere Informationen&lt;/A&gt;.\" />\n  <!-- Success page strings -->\n  <String Id=\"FirstTimeWelcomeMessage\" Value=\"Thank you for installing [BUNDLEMONIKER]! You can now run applications that require the .NET Windows Desktop Runtime.\" />\n  <String Id=\"NetDocumentationLinkText\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-docs&quot;&gt;.NET-Dokumentation&lt;/A&gt;\" />\n  <String Id=\"WindowsDesktopDocumentationLinkText\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-desktop-docs&quot;&gt;Windows Desktop Documentation&lt;/A&gt;\" />\n  <String Id=\"ReleaseNotesLinkText\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet[VERSIONMAJOR]-release-notes&quot;&gt;Release Notes&lt;/A&gt;\" />\n  <String Id=\"TutorialsLinkText\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-tutorials&quot;&gt;.NET Tutorials&lt;/A&gt;\" />\n  <!-- Additional success headers -->\n  <String Id=\"SuccessLayoutHeader\" Value=\"Layout erfolgreich abgeschlossen\" />\n  <String Id=\"SuccessUnsafeUninstallHeader\" Value=\"Unsafe Uninstall Successfully Completed\" />\n  <String Id=\"SuccessCacheHeader\" Value=\"Zwischenspeichern erfolgreich abgeschlossen\" />\n  <String Id=\"SuccessModifyHeader\" Value=\"Modification Successfully Completed\" />\n  <String Id=\"SuccessUninstallRestartText\" Value=\"You must restart your computer to complete the uninstallation.\" />\n  <!-- Additional failure headers -->\n  <String Id=\"FailureLayoutHeader\" Value=\"Fehler beim Layout\" />\n  <String Id=\"FailureUnsafeUninstallHeader\" Value=\"Unsafe Uninstall Failed\" />\n  <String Id=\"FailureCacheHeader\" Value=\"Fehler beim Zwischenspeichern\" />\n  <String Id=\"FailureModifyHeader\" Value=\"Modification Failed\" />\n</WixLocalization>"
  },
  {
    "path": "src/windowsdesktop/src/bundle/theme/1033/thm.wxl",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<WixLocalization Culture=\"en-us\" Language=\"1033\" xmlns=\"http://wixtoolset.org/schemas/v4/wxl\">\n  <String Id=\"Caption\" Value=\"[WixBundleName] Installer\" />\n  <String Id=\"Title\" Value=\"[BUNDLEMONIKER]\" />\n  <String Id=\"ConfirmCancelMessage\" Value=\"Are you sure you want to cancel?\" />\n  <String Id=\"ExecuteUpgradeRelatedBundleMessage\" Value=\"Previous version\" />\n  <String Id=\"HelpHeader\" Value=\"Setup Help\" />\n  <String Id=\"HelpText\" Value=\"/install | /repair | /uninstall | /layout [directory] - installs, repairs, uninstalls or creates a complete local copy of the bundle in directory. Install is the default.&#xA;&#xA;/passive | /quiet - displays minimal UI with no prompts or displays no UI and no prompts. By default UI and all prompts are displayed.&#xA;&#xA;/norestart - suppress any attempts to restart. By default UI will prompt before restart.&#xA;&#xA;/log log.txt - logs to a specific file. By default a log file is created in %TEMP%.\" />\n  <String Id=\"HelpCloseButton\" Value=\"&amp;Close\" />\n  <String Id=\"InstallAcceptCheckbox\" Value=\"I &amp;agree to the license terms and conditions\" />\n  <String Id=\"InstallOptionsButton\" Value=\"&amp;Options\" />\n  <String Id=\"InstallInstallButton\" Value=\"&amp;Install\" />\n  <String Id=\"InstallCloseButton\" Value=\"&amp;Close\" />\n  <String Id=\"ProgressHeader\" Value=\"Setup Progress\" />\n  <String Id=\"ProgressLabel\" Value=\"Processing:\" />\n  <String Id=\"OverallProgressPackageText\" Value=\"Initializing...\" />\n  <String Id=\"ProgressCancelButton\" Value=\"&amp;Cancel\" />\n  <String Id=\"ModifyHeader\" Value=\"Modify Setup\" />\n  <String Id=\"ModifyText\" Value=\"Select repair to reinstall the product or uninstall to remove it.\" />\n  <String Id=\"ModifyRepairButton\" Value=\"&amp;Repair\" />\n  <String Id=\"ModifyUninstallButton\" Value=\"&amp;Uninstall\" />\n  <String Id=\"ModifyCloseButton\" Value=\"&amp;Close\" />\n  <String Id=\"SuccessRepairHeader\" Value=\"Repair Successfully Completed\" />\n  <String Id=\"SuccessUninstallHeader\" Value=\"Uninstall Successfully Completed\" />\n  <String Id=\"SuccessInstallHeader\" Value=\"Installation Successfully Completed\" />\n  <String Id=\"SuccessHeader\" Value=\"Setup Successful\" />\n  <String Id=\"SuccessLaunchButton\" Value=\"&amp;Launch\" />\n  <String Id=\"SuccessRestartText\" Value=\"You must restart your computer before you can use the software.\" />\n  <String Id=\"SuccessRestartButton\" Value=\"&amp;Restart\" />\n  <String Id=\"SuccessCloseButton\" Value=\"&amp;Close\" />\n  <String Id=\"FailureHeader\" Value=\"Setup Failed\" />\n  <String Id=\"FailureInstallHeader\" Value=\"Setup Failed\" />\n  <String Id=\"FailureUninstallHeader\" Value=\"Uninstall Failed\" />\n  <String Id=\"FailureRepairHeader\" Value=\"Repair Failed\" />\n  <String Id=\"FailureHyperlinkLogText\" Value=\"One or more issues caused the setup to fail. Please fix the issues and then retry setup. For more information see the &lt;a href=&quot;#&quot;&gt;log file&lt;/a&gt;.\" />\n  <String Id=\"FailureRestartText\" Value=\"You must restart your computer to complete the rollback of the software.\" />\n  <String Id=\"FailureRestartButton\" Value=\"&amp;Restart\" />\n  <String Id=\"FailureCloseButton\" Value=\"&amp;Close\" />\n  <String Id=\"FailureNotSupportedCurrentOperatingSystem\" Value=\"The [PRODUCT_NAME] is not supported on this operating system. For more information, see [LINK_PREREQ_PAGE].\" />\n  <String Id=\"FailureNotSupportedX86OperatingSystem\" Value=\"The [PRODUCT_NAME] isn't supported on x86 operating systems. Please install using the corresponding x86 installer.\" />\n  <String Id=\"FilesInUseTitle\" Value=\"Files In Use\" />\n  <String Id=\"FilesInUseLabel\" Value=\"The following applications are using files that need to be updated:\" />\n  <String Id=\"FilesInUseCloseRadioButton\" Value=\"Close the &amp;applications and attempt to restart them.\" />\n  <String Id=\"FilesInUseDontCloseRadioButton\" Value=\"&amp;Do not close applications. A reboot will be required.\" />\n  <String Id=\"FilesInUseRetryButton\" Value=\"&amp;Retry\" />\n  <String Id=\"FilesInUseCancelButton\" Value=\"&amp;Cancel\" />\n  <String Id=\"WelcomeHeader\" Value=\"Windows Desktop Runtime\" />\n  <String Id=\"WelcomeDescription\" Value=\"The .NET Windows Desktop Runtime is used to run Windows Forms and WPF applications on your computer. .NET is open source, cross platform, and supported by Microsoft. We hope you enjoy it!\" />\n  <String Id=\"LearnMoreTitle\" Value=\"Learn more about .NET\" />\n  <String Id=\"SuccessInstallLocation\" Value=\"The following was installed at [DOTNETHOME]\" />\n  <String Id=\"SuccessInstallProductName\" Value=\" - [BUNDLEMONIKER] \" />\n  <String Id=\"ResourcesHeader\" Value=\"Resources\" />\n  <String Id=\"DocumentationLink\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-docs&quot;&gt;Documentation&lt;/A&gt;\" />\n  <String Id=\"ReleaseNotesLink\" Value=\"&lt;A HREF=&quot;https://aka.ms/20-p2-rel-notes&quot;&gt;Release Notes&lt;/A&gt;\" />\n  <String Id=\"TutorialLink\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-tutorials&quot;&gt;Tutorials&lt;/A&gt;\" />\n  <String Id=\"TelemetryLink\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-cli-telemetry&quot;&gt;.NET Telemetry&lt;/A&gt;\" />\n  <String Id=\"PrivacyStatementLink\" Value=\"&lt;A HREF=&quot;https://aka.ms/dev-privacy&quot;&gt;Privacy Statement&lt;/A&gt;\" />\n  <String Id=\"EulaLink\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-license-windows&quot;&gt;Licensing Information for .NET&lt;/A&gt;\" />\n  <String Id=\"LicenseAssent\" Value=\"By clicking Install, you agree to the following terms.\" />\n  <String Id=\"VisualStudioWarning\" Value=\"If you plan to use .NET [VERSIONMAJOR].[VERSIONMINOR] with Visual Studio, Visual Studio 2026 18.0 or newer is required. &lt;A HREF=&quot;https://aka.ms/dotnet[VERSIONMAJOR]-release-notes&quot;&gt;Learn more&lt;/A&gt;.\" />\n  \n  <!-- Success page strings -->\n  <String Id=\"FirstTimeWelcomeMessage\" Value=\"Thank you for installing [BUNDLEMONIKER]! You can now run applications that require the .NET Windows Desktop Runtime.\" />\n  <String Id=\"NetDocumentationLinkText\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-docs&quot;&gt;.NET Documentation&lt;/A&gt;\" />\n  <String Id=\"WindowsDesktopDocumentationLinkText\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-desktop-docs&quot;&gt;Windows Desktop Documentation&lt;/A&gt;\" />\n  <String Id=\"ReleaseNotesLinkText\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet[VERSIONMAJOR]-release-notes&quot;&gt;Release Notes&lt;/A&gt;\" />\n  <String Id=\"TutorialsLinkText\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-tutorials&quot;&gt;.NET Tutorials&lt;/A&gt;\" />\n  \n  <!-- Additional success headers -->\n  <String Id=\"SuccessLayoutHeader\" Value=\"Layout Successfully Completed\" />\n  <String Id=\"SuccessUnsafeUninstallHeader\" Value=\"Unsafe Uninstall Successfully Completed\" />\n  <String Id=\"SuccessCacheHeader\" Value=\"Cache Successfully Completed\" />\n  <String Id=\"SuccessModifyHeader\" Value=\"Modification Successfully Completed\" />\n  <String Id=\"SuccessUninstallRestartText\" Value=\"You must restart your computer to complete the uninstallation.\" />\n  \n  <!-- Additional failure headers -->\n  <String Id=\"FailureLayoutHeader\" Value=\"Layout Failed\" />\n  <String Id=\"FailureUnsafeUninstallHeader\" Value=\"Unsafe Uninstall Failed\" />\n  <String Id=\"FailureCacheHeader\" Value=\"Cache Failed\" />\n  <String Id=\"FailureModifyHeader\" Value=\"Modification Failed\" />\n</WixLocalization>"
  },
  {
    "path": "src/windowsdesktop/src/bundle/theme/1036/thm.wxl",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<WixLocalization Culture=\"fr-FR\" Language=\"1036\" xmlns=\"http://wixtoolset.org/schemas/v4/wxl\">\n  <String Id=\"Caption\" Value=\"Programme d’installation de [WixBundleName]\" />\n  <String Id=\"Title\" Value=\"[BUNDLEMONIKER]\" />\n  <String Id=\"ConfirmCancelMessage\" Value=\"Voulez-vous vraiment annuler ?\" />\n  <String Id=\"ExecuteUpgradeRelatedBundleMessage\" Value=\"Version précédente\" />\n  <String Id=\"HelpHeader\" Value=\"Aide sur l’installation\" />\n  <String Id=\"HelpText\" Value=\"/install | /repair | /uninstall | /layout [directory] – permet d’installer, réparer, désinstaller ou créer une copie locale complète du pack dans un répertoire. L’installation constitue la valeur par défaut.  /passive | /quiet – permet d’afficher une interface utilisateur minimale sans aucune requête ou de n’afficher ni interface utilisateur, ni requêtes. Par défaut, l’interface utilisateur et toutes les requêtes sont affichées.  /norestart – permet de supprimer toutes les tentatives de redémarrage. Par défaut, l’interface utilisateur vous invite à redémarrer.  /log log.txt – permet d’enregistrer dans un fichier spécifique. Par défaut, un fichier journal est créé dans %TEMP%.\" />\n  <String Id=\"HelpCloseButton\" Value=\"&amp;Fermer\" />\n  <String Id=\"InstallAcceptCheckbox\" Value=\"J’&amp;accepte les conditions générales de la licence\" />\n  <String Id=\"InstallOptionsButton\" Value=\"&amp;Options\" />\n  <String Id=\"InstallInstallButton\" Value=\"&amp;Installer\" />\n  <String Id=\"InstallCloseButton\" Value=\"&amp;Fermer\" />\n  <String Id=\"ProgressHeader\" Value=\"Progression de l’opération\" />\n  <String Id=\"ProgressLabel\" Value=\"Traitement :\" />\n  <String Id=\"OverallProgressPackageText\" Value=\"Initialisation en cours... Merci de patienter.\" />\n  <String Id=\"ProgressCancelButton\" Value=\"&amp;Annuler\" />\n  <String Id=\"ModifyHeader\" Value=\"Modifier la configuration\" />\n  <String Id=\"ModifyText\" Value=\"Sélectionnez l’option Réparer pour réinstaller le produit ou désinstallez-le pour le supprimer.\" />\n  <String Id=\"ModifyRepairButton\" Value=\"&amp;Réparer\" />\n  <String Id=\"ModifyUninstallButton\" Value=\"&amp;Désinstaller\" />\n  <String Id=\"ModifyCloseButton\" Value=\"&amp;Fermer\" />\n  <String Id=\"SuccessRepairHeader\" Value=\"Réparation correctement terminée\" />\n  <String Id=\"SuccessUninstallHeader\" Value=\"Désinstallation correctement terminée\" />\n  <String Id=\"SuccessInstallHeader\" Value=\"Installation correctement terminée\" />\n  <String Id=\"SuccessHeader\" Value=\"Installation réussie\" />\n  <String Id=\"SuccessLaunchButton\" Value=\"&amp;Lancement\" />\n  <String Id=\"SuccessRestartText\" Value=\"Vous devez redémarrer votre ordinateur avant de pouvoir utiliser le logiciel.\" />\n  <String Id=\"SuccessRestartButton\" Value=\"&amp;Redémarrer\" />\n  <String Id=\"SuccessCloseButton\" Value=\"&amp;Fermer\" />\n  <String Id=\"FailureHeader\" Value=\"Nous n’avons pas pu effectuer l’installation\" />\n  <String Id=\"FailureInstallHeader\" Value=\"Nous n’avons pas pu effectuer l’installation\" />\n  <String Id=\"FailureUninstallHeader\" Value=\"Nous n’avons pas pu effectuer la désinstallation\" />\n  <String Id=\"FailureRepairHeader\" Value=\"Nous n’avons pas pu effectuer la réparation\" />\n  <String Id=\"FailureHyperlinkLogText\" Value=\"Un ou plusieurs problèmes ont provoqué l’échec de l’installation. Veuillez résoudre les problèmes, puis réessayer la configuration. Pour découvrir plus d’informations, consultez le &lt;a href=&quot;#&quot;&gt;fichier journal&lt;/a&gt;.\" />\n  <String Id=\"FailureRestartText\" Value=\"Vous devez redémarrer votre ordinateur pour terminer l'opération de restauration du logiciel.\" />\n  <String Id=\"FailureRestartButton\" Value=\"&amp;Redémarrer\" />\n  <String Id=\"FailureCloseButton\" Value=\"&amp;Fermer\" />\n  <String Id=\"FailureNotSupportedCurrentOperatingSystem\" Value=\"[PRODUCT_NAME] n'est pas pris en charge sur ce système d'exploitation. Pour plus d'informations, consultez [LINK_PREREQ_PAGE].\" />\n  <String Id=\"FailureNotSupportedX86OperatingSystem\" Value=\"[PRODUCT_NAME] n'est pas pris en charge sur les systèmes d'exploitation x86. Effectuez l'installation à l'aide du programme d'installation x86 correspondant.\" />\n  <String Id=\"FilesInUseTitle\" Value=\"Fichiers en cours d’utilisation\" />\n  <String Id=\"FilesInUseLabel\" Value=\"Les applications suivantes utilisent des fichiers qui doivent être mis à jour :\" />\n  <String Id=\"FilesInUseCloseRadioButton\" Value=\"Fermer les &amp;applications et essayer de les redémarrer.\" />\n  <String Id=\"FilesInUseDontCloseRadioButton\" Value=\"&amp;Ne fermez pas les applications. Un redémarrage sera nécessaire.\" />\n  <String Id=\"FilesInUseRetryButton\" Value=\"&amp;Recommencer\" />\n  <String Id=\"FilesInUseCancelButton\" Value=\"&amp;Annuler\" />\n  <String Id=\"WelcomeHeader\" Value=\"Windows Desktop Runtime\" />\n  <String Id=\"WelcomeDescription\" Value=\"Le Runtime .NET Windows Desktop est utilisé pour exécuter les applications Windows Forms et WPF sur votre ordinateur. .NET est open source, multiplateforme et pris en charge par Microsoft. Nous espérons que cela vous plaira !\" />\n  <String Id=\"LearnMoreTitle\" Value=\"En savoir plus sur .NET\" />\n  <String Id=\"SuccessInstallLocation\" Value=\"L'élément suivant a été installé sur [DOTNETHOME]\" />\n  <String Id=\"SuccessInstallProductName\" Value=\" - [BUNDLEMONIKER] \" />\n  <String Id=\"ResourcesHeader\" Value=\"Ressources\" />\n  <String Id=\"DocumentationLink\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-docs&quot;&gt;Documentation&lt;/A&gt;\" />\n  <String Id=\"ReleaseNotesLink\" Value=\"&lt;A HREF=&quot;https://aka.ms/20-p2-rel-notes&quot;&gt; Notes de publication&lt;/A&gt;\" />\n  <String Id=\"TutorialLink\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-tutorials&quot;&gt;Tutoriels&lt;/A&gt;\" />\n  <String Id=\"TelemetryLink\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-cli-telemetry&quot;&gt;Télémétrie .NET&lt;/A&gt;\" />\n  <String Id=\"PrivacyStatementLink\" Value=\"&lt;A HREF=&quot;https://aka.ms/dev-privacy&quot;&gt;Déclaration de confidentialité&lt;/A&gt;\" />\n  <String Id=\"EulaLink\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-license-windows&quot;&gt;Informations de licence pour .NET&lt;/A&gt;\" />\n  <String Id=\"LicenseAssent\" Value=\"En cliquant sur Installer, vous acceptez les conditions suivantes.\" />\n  <String Id=\"VisualStudioWarning\" Value=\"Si vous envisagez d’utiliser .NET [VERSIONMAJOR].[VERSIONMINOR] avec Visual Studio, Visual Studio 2026 18.0 ou une version ultérieure est nécessaire. &lt;A HREF=&quot;https://aka.ms/dotnet[VERSIONMAJOR]-release-notes&quot;&gt;Découvrez plus d’informations&lt;/A&gt;.\" />\n  <!-- Success page strings -->\n  <String Id=\"FirstTimeWelcomeMessage\" Value=\"Thank you for installing [BUNDLEMONIKER]! You can now run applications that require the .NET Windows Desktop Runtime.\" />\n  <String Id=\"NetDocumentationLinkText\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-docs&quot;&gt;Documentation .NET&lt;/A&gt;\" />\n  <String Id=\"WindowsDesktopDocumentationLinkText\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-desktop-docs&quot;&gt;Documentation Windows Desktop&lt;/A&gt;\" />\n  <String Id=\"ReleaseNotesLinkText\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet[VERSIONMAJOR]-release-notes&quot;&gt;Notes de publication&lt;/A&gt;\" />\n  <String Id=\"TutorialsLinkText\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-tutorials&quot;&gt;Tutoriels .NET&lt;/A&gt;\" />\n  <!-- Additional success headers -->\n  <String Id=\"SuccessLayoutHeader\" Value=\"Mise en page correctement terminée\" />\n  <String Id=\"SuccessUnsafeUninstallHeader\" Value=\"Désinstallation non sécurisée correctement terminée\" />\n  <String Id=\"SuccessCacheHeader\" Value=\"Cache correctement terminé\" />\n  <String Id=\"SuccessModifyHeader\" Value=\"Modification correctement terminée\" />\n  <String Id=\"SuccessUninstallRestartText\" Value=\"Vous devez redémarrer votre ordinateur pour terminer la désinstallation.\" />\n  <!-- Additional failure headers -->\n  <String Id=\"FailureLayoutHeader\" Value=\"Échec de la mise en page\" />\n  <String Id=\"FailureUnsafeUninstallHeader\" Value=\"Nous n’avons pas pu effectuer désinstallation non sécurisée\" />\n  <String Id=\"FailureCacheHeader\" Value=\"Échec du cache\" />\n  <String Id=\"FailureModifyHeader\" Value=\"Nous n’avons pas pu effectuer la modification\" />\n</WixLocalization>"
  },
  {
    "path": "src/windowsdesktop/src/bundle/theme/1040/thm.wxl",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<WixLocalization Culture=\"it-IT\" Language=\"1040\" xmlns=\"http://wixtoolset.org/schemas/v4/wxl\">\n  <String Id=\"Caption\" Value=\"Programma di installazione di [WixBundleName]\" />\n  <String Id=\"Title\" Value=\"[BUNDLEMONIKER]\" />\n  <String Id=\"ConfirmCancelMessage\" Value=\"Annullare?\" />\n  <String Id=\"ExecuteUpgradeRelatedBundleMessage\" Value=\"Versione precedente\" />\n  <String Id=\"HelpHeader\" Value=\"Guida all'installazione\" />\n  <String Id=\"HelpText\" Value=\"/install | /repair | /uninstall | /layout [directory] - Consente di installare, riparare, disinstallare o creare una copia locale del pacchetto nella directory. Install è l'opzione predefinita.  /passive | /quiet - Consente di visualizzare un'interfaccia utente minima senza richieste o di non visualizzare alcuna interfaccia utente e alcuna richiesta. Per impostazione predefinita, vengono visualizzate l'interfaccia utente e tutte le richieste.  /norestart - Consente di impedire qualsiasi tentativo di riavvio. Per impostazione predefinita, prima del riavvio verrà visualizzata una richiesta nell'interfaccia utente.  /log log.txt - Consente di eseguire la registrazione in un file specifico. Per impostazione predefinita, viene creato un file di log in %TEMP%.\" />\n  <String Id=\"HelpCloseButton\" Value=\"&amp;Chiudi\" />\n  <String Id=\"InstallAcceptCheckbox\" Value=\"A&amp;ccetto i termini e le condizioni di licenza\" />\n  <String Id=\"InstallOptionsButton\" Value=\"&amp;Opzioni\" />\n  <String Id=\"InstallInstallButton\" Value=\"&amp;Installa\" />\n  <String Id=\"InstallCloseButton\" Value=\"&amp;Chiudi\" />\n  <String Id=\"ProgressHeader\" Value=\"Stato dell'installazione\" />\n  <String Id=\"ProgressLabel\" Value=\"Elaborazione:\" />\n  <String Id=\"OverallProgressPackageText\" Value=\"Inizializzazione in corso...\" />\n  <String Id=\"ProgressCancelButton\" Value=\"&amp;Annulla\" />\n  <String Id=\"ModifyHeader\" Value=\"Modifica installazione\" />\n  <String Id=\"ModifyText\" Value=\"Selezionare Ripara per reinstallare il prodotto o Disinstalla per rimuoverlo.\" />\n  <String Id=\"ModifyRepairButton\" Value=\"&amp;Ripristina\" />\n  <String Id=\"ModifyUninstallButton\" Value=\"&amp;Disinstalla\" />\n  <String Id=\"ModifyCloseButton\" Value=\"&amp;Chiudi\" />\n  <String Id=\"SuccessRepairHeader\" Value=\"Riparazione completata\" />\n  <String Id=\"SuccessUninstallHeader\" Value=\"Disinstallazione completata\" />\n  <String Id=\"SuccessInstallHeader\" Value=\"Installazione completata correttamente\" />\n  <String Id=\"SuccessHeader\" Value=\"Configurazione completata\" />\n  <String Id=\"SuccessLaunchButton\" Value=\"&amp;Avvio\" />\n  <String Id=\"SuccessRestartText\" Value=\"Per poter usare il software, è necessario riavviare il computer.\" />\n  <String Id=\"SuccessRestartButton\" Value=\"&amp;Riavvia\" />\n  <String Id=\"SuccessCloseButton\" Value=\"&amp;Chiudi\" />\n  <String Id=\"FailureHeader\" Value=\"Configurazione non riuscita\" />\n  <String Id=\"FailureInstallHeader\" Value=\"Configurazione non riuscita\" />\n  <String Id=\"FailureUninstallHeader\" Value=\"Disinstallazione non riuscita\" />\n  <String Id=\"FailureRepairHeader\" Value=\"Riparazione non riuscita\" />\n  <String Id=\"FailureHyperlinkLogText\" Value=\"L'installazione non è stata completata a causa di uno o più problemi. Risolvere i problemi e quindi riprovare a eseguire l'installazione. Per altre informazioni, vedere il &lt;a href=&quot;#&quot;&gt;file di log&lt;/a&gt;.\" />\n  <String Id=\"FailureRestartText\" Value=\"Per completare il rollback del software, è necessario riavviare il computer.\" />\n  <String Id=\"FailureRestartButton\" Value=\"&amp;Riavvia\" />\n  <String Id=\"FailureCloseButton\" Value=\"&amp;Chiudi\" />\n  <String Id=\"FailureNotSupportedCurrentOperatingSystem\" Value=\"[PRODUCT_NAME] non è supportato in questo sistema operativo. Per altre informazioni, vedere [LINK_PREREQ_PAGE].\" />\n  <String Id=\"FailureNotSupportedX86OperatingSystem\" Value=\"[PRODUCT_NAME] non è supportato in sistemi operativi x86. Eseguire l'installazione usando il programma di installazione x86 corrispondente.\" />\n  <String Id=\"FilesInUseTitle\" Value=\"File in uso\" />\n  <String Id=\"FilesInUseLabel\" Value=\"Le applicazioni seguenti usano file che necessitano di aggiornamento:\" />\n  <String Id=\"FilesInUseCloseRadioButton\" Value=\"&amp;Chiudi tutte le applicazioni e tenta di riavviarle.\" />\n  <String Id=\"FilesInUseDontCloseRadioButton\" Value=\"&amp;Non chiudere le applicazioni. Sarà necessario riavviare il sistema.\" />\n  <String Id=\"FilesInUseRetryButton\" Value=\"&amp;Riprova\" />\n  <String Id=\"FilesInUseCancelButton\" Value=\"&amp;Annulla\" />\n  <String Id=\"WelcomeHeader\" Value=\"Runtime di Windows Desktop\" />\n  <String Id=\"WelcomeDescription\" Value=\".NET Windows Desktop Runtime consente di eseguire applicazioni Windows Forms e WPF nel computer. .NET è open source, multipiattaforma e supportato da Microsoft. Microsoft si augura che venga apprezzato.\" />\n  <String Id=\"LearnMoreTitle\" Value=\"Altre informazioni su .NET\" />\n  <String Id=\"SuccessInstallLocation\" Value=\"I componenti seguenti sono stati installati in [DOTNETHOME]\" />\n  <String Id=\"SuccessInstallProductName\" Value=\" - [BUNDLEMONIKER] \" />\n  <String Id=\"ResourcesHeader\" Value=\"Risorse\" />\n  <String Id=\"DocumentationLink\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-docs&quot;&gt;Documentazione&lt;/A&gt;\" />\n  <String Id=\"ReleaseNotesLink\" Value=\"&lt;A HREF=&quot;https://aka.ms/20-p2-rel-notes&quot;&gt;Note sulla versione&lt;/A&gt;\" />\n  <String Id=\"TutorialLink\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-tutorials&quot;&gt;Esercitazioni&lt;/A&gt;\" />\n  <String Id=\"TelemetryLink\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-cli-telemetry&quot;&gt;Telemetria .NET&lt;/A&gt;\" />\n  <String Id=\"PrivacyStatementLink\" Value=\"&lt;A HREF=&quot;https://aka.ms/dev-privacy&quot;&gt;Informativa sulla privacy&lt;/A&gt;\" />\n  <String Id=\"EulaLink\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-license-windows&quot;&gt;Informazioni sulle licenze per .NET&lt;/A&gt;\" />\n  <String Id=\"LicenseAssent\" Value=\"Facendo clic su Installa, si accettano le condizioni seguenti.\" />\n  <String Id=\"VisualStudioWarning\" Value=\"Se si prevede di usare .NET [VERSIONMAJOR]. [VERSIONMINOR] con Visual Studio, è necessario Visual Studio 2026 18.0 o versione successiva. &lt;A HREF=&quot;https://aka.ms/dotnet[VERSIONMAJOR]-release-notes&quot;&gt;Altre informazioni&lt;/A&gt;.\" />\n  <!-- Success page strings -->\n  <String Id=\"FirstTimeWelcomeMessage\" Value=\"Grazie per aver installato [BUNDLEMONIKER]! Ora è possibile eseguire applicazioni che richiedono .NET Windows Desktop Runtime.\" />\n  <String Id=\"NetDocumentationLinkText\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-docs&quot;&gt;Documentazione .NET&lt;/A&gt;\" />\n  <String Id=\"WindowsDesktopDocumentationLinkText\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-desktop-docs&quot;&gt;Documentazione di Windows Desktop&lt;/A&gt;\" />\n  <String Id=\"ReleaseNotesLinkText\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet[VERSIONMAJOR]-release-notes&quot;&gt;Note sulla versione&lt;/A&gt;\" />\n  <String Id=\"TutorialsLinkText\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-tutorials&quot;&gt;Esercitazioni su .NET&lt;/A&gt;\" />\n  <!-- Additional success headers -->\n  <String Id=\"SuccessLayoutHeader\" Value=\"Layout completato\" />\n  <String Id=\"SuccessUnsafeUninstallHeader\" Value=\"Disinstallazione non sicura completata\" />\n  <String Id=\"SuccessCacheHeader\" Value=\"Memorizzazione nella cache completata\" />\n  <String Id=\"SuccessModifyHeader\" Value=\"Modifica completata\" />\n  <String Id=\"SuccessUninstallRestartText\" Value=\"Per completare la disinstallazione, è necessario riavviare il computer.\" />\n  <!-- Additional failure headers -->\n  <String Id=\"FailureLayoutHeader\" Value=\"Layout non riuscito\" />\n  <String Id=\"FailureUnsafeUninstallHeader\" Value=\"Disinstallazione non sicura non riuscita\" />\n  <String Id=\"FailureCacheHeader\" Value=\"Memorizzazione nella cache non riuscita\" />\n  <String Id=\"FailureModifyHeader\" Value=\"Modifica non riuscita\" />\n</WixLocalization>"
  },
  {
    "path": "src/windowsdesktop/src/bundle/theme/1041/thm.wxl",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<WixLocalization Culture=\"ja-JP\" Language=\"1041\" xmlns=\"http://wixtoolset.org/schemas/v4/wxl\">\n  <String Id=\"Caption\" Value=\"[WixBundleName] インストーラー\" />\n  <String Id=\"Title\" Value=\"[BUNDLEMONIKER]\" />\n  <String Id=\"ConfirmCancelMessage\" Value=\"取り消しますか?\" />\n  <String Id=\"ExecuteUpgradeRelatedBundleMessage\" Value=\"以前のバージョン\" />\n  <String Id=\"HelpHeader\" Value=\"セットアップのヘルプ\" />\n  <String Id=\"HelpText\" Value=\"/install | /repair | /uninstall | /layout [directory] - installs, repairs, uninstalls or creates a complete local copy of the bundle in directory. Install is the default.  /passive | /quiet - displays minimal UI with no prompts or displays no UI and no prompts. By default UI and all prompts are displayed.  /norestart - suppress any attempts to restart. By default UI will prompt before restart.  /log log.txt - logs to a specific file. By default a log file is created in %TEMP%.\" />\n  <String Id=\"HelpCloseButton\" Value=\"閉じる(&amp;C)\" />\n  <String Id=\"InstallAcceptCheckbox\" Value=\"ライセンス条項および条件に同意します(&amp;A)\" />\n  <String Id=\"InstallOptionsButton\" Value=\"オプション(&amp;O)\" />\n  <String Id=\"InstallInstallButton\" Value=\"インストール(&amp;I)\" />\n  <String Id=\"InstallCloseButton\" Value=\"閉じる(&amp;C)\" />\n  <String Id=\"ProgressHeader\" Value=\"セットアップの進行状況\" />\n  <String Id=\"ProgressLabel\" Value=\"処理中:\" />\n  <String Id=\"OverallProgressPackageText\" Value=\"初期化しています...\" />\n  <String Id=\"ProgressCancelButton\" Value=\"キャンセル(&amp;C)\" />\n  <String Id=\"ModifyHeader\" Value=\"セットアップの変更\" />\n  <String Id=\"ModifyText\" Value=\"修復を選択して製品を再インストールするか、アンインストールを選択して削除します。\" />\n  <String Id=\"ModifyRepairButton\" Value=\"修復(&amp;R)\" />\n  <String Id=\"ModifyUninstallButton\" Value=\"アンインストール(&amp;U)\" />\n  <String Id=\"ModifyCloseButton\" Value=\"閉じる(&amp;C)\" />\n  <String Id=\"SuccessRepairHeader\" Value=\"修復が正常に完了しました\" />\n  <String Id=\"SuccessUninstallHeader\" Value=\"アンインストールが正常に完了しました\" />\n  <String Id=\"SuccessInstallHeader\" Value=\"インストールが正常に完了しました\" />\n  <String Id=\"SuccessHeader\" Value=\"セットアップに成功しました\" />\n  <String Id=\"SuccessLaunchButton\" Value=\"起動(&amp;L)\" />\n  <String Id=\"SuccessRestartText\" Value=\"ソフトウェアを使用する前にコンピューターを再起動する必要があります。\" />\n  <String Id=\"SuccessRestartButton\" Value=\"再起動(&amp;R)\" />\n  <String Id=\"SuccessCloseButton\" Value=\"閉じる(&amp;C)\" />\n  <String Id=\"FailureHeader\" Value=\"セットアップに失敗しました\" />\n  <String Id=\"FailureInstallHeader\" Value=\"セットアップに失敗しました\" />\n  <String Id=\"FailureUninstallHeader\" Value=\"アンインストールに失敗しました\" />\n  <String Id=\"FailureRepairHeader\" Value=\"修復に失敗しました\" />\n  <String Id=\"FailureHyperlinkLogText\" Value=\"1 つ以上の問題が原因でセットアップが失敗しました。問題を修正してから、セットアップを再試行してください。詳細については、&lt;a href=&quot;#&quot;&gt;ログ ファイル&lt;/a&gt;を参照してください。\" />\n  <String Id=\"FailureRestartText\" Value=\"ソフトウェアのロールバックを完了するには、コンピューターを再起動する必要があります。\" />\n  <String Id=\"FailureRestartButton\" Value=\"再起動(&amp;R)\" />\n  <String Id=\"FailureCloseButton\" Value=\"閉じる(&amp;C)\" />\n  <String Id=\"FailureNotSupportedCurrentOperatingSystem\" Value=\"[PRODUCT_NAME] は、このオペレーティング システムではサポートされていません。詳細については、[LINK_PREREQ_PAGE] を参照してください。\" />\n  <String Id=\"FailureNotSupportedX86OperatingSystem\" Value=\"x86 オペレーティング システムでは、[PRODUCT_NAME] はサポートされていません。対応する x86 インストーラーを使用してインストールしてください。\" />\n  <String Id=\"FilesInUseTitle\" Value=\"ファイルが使用中\" />\n  <String Id=\"FilesInUseLabel\" Value=\"次のアプリケーションは、更新の必要があるファイルを使用しています:\" />\n  <String Id=\"FilesInUseCloseRadioButton\" Value=\"アプリケーションを終了してから再起動します(&amp;A)。\" />\n  <String Id=\"FilesInUseDontCloseRadioButton\" Value=\"アプリケーションを閉じません(&amp;D)。再起動が必要です。\" />\n  <String Id=\"FilesInUseRetryButton\" Value=\"再試行(&amp;R)\" />\n  <String Id=\"FilesInUseCancelButton\" Value=\"キャンセル(&amp;C)\" />\n  <String Id=\"WelcomeHeader\" Value=\"Windows Desktop Runtime\" />\n  <String Id=\"WelcomeDescription\" Value=\".NET Windows Desktop Runtime は、コンピューター上で Windows フォームおよび WPF アプリケーションを実行するために使用されます。.NET はオープン ソース、クロス プラットフォームであり、Microsoft によってサポートされています。お楽しみください!\" />\n  <String Id=\"LearnMoreTitle\" Value=\".Net の詳細情報\" />\n  <String Id=\"SuccessInstallLocation\" Value=\"[DOTNETHOME] に以下がインストールされました\" />\n  <String Id=\"SuccessInstallProductName\" Value=\" - [BUNDLEMONIKER] \" />\n  <String Id=\"ResourcesHeader\" Value=\"リソース\" />\n  <String Id=\"DocumentationLink\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-docs&quot;&gt;ドキュメント&lt;/A&gt;\" />\n  <String Id=\"ReleaseNotesLink\" Value=\"&lt;A HREF=&quot;https://aka.ms/20-p2-rel-notes&quot;&gt;リリース ノート&lt;/A&gt;\" />\n  <String Id=\"TutorialLink\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-tutorials&quot;&gt;チュートリアル&lt;/A&gt;\" />\n  <String Id=\"TelemetryLink\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-cli-telemetry&quot;&gt;.NET テレメトリ&lt;/A&gt;\" />\n  <String Id=\"PrivacyStatementLink\" Value=\"&lt;A HREF=&quot;https://aka.ms/dev-privacy&quot;&gt;プライバシーに関する声明&lt;/A&gt;\" />\n  <String Id=\"EulaLink\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-license-windows&quot;&gt;.NET のライセンス情報&lt;/A&gt;\" />\n  <String Id=\"LicenseAssent\" Value=\"インストール をクリックすると、次の条項に同意したものと見なされます。\" />\n  <String Id=\"VisualStudioWarning\" Value=\".NET [VERSIONMAJOR].[VERSIONMINOR] を Visual Studio と使用する場合は、Visual Studio 2026 18.0 以降が必要です。&lt;A HREF=&quot;https://aka.ms/dotnet[VERSIONMAJOR]-release-notes&quot;&gt;詳細情報&lt;/A&gt;。\" />\n  <!-- Success page strings -->\n  <String Id=\"FirstTimeWelcomeMessage\" Value=\"Thank you for installing [BUNDLEMONIKER]! You can now run applications that require the .NET Windows Desktop Runtime.\" />\n  <String Id=\"NetDocumentationLinkText\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-docs&quot;&gt;.NET ドキュメント&lt;/A&gt;\" />\n  <String Id=\"WindowsDesktopDocumentationLinkText\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-desktop-docs&quot;&gt;Windows Desktop Documentation&lt;/A&gt;\" />\n  <String Id=\"ReleaseNotesLinkText\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet[VERSIONMAJOR]-release-notes&quot;&gt;Release Notes&lt;/A&gt;\" />\n  <String Id=\"TutorialsLinkText\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-tutorials&quot;&gt;.NET Tutorials&lt;/A&gt;\" />\n  <!-- Additional success headers -->\n  <String Id=\"SuccessLayoutHeader\" Value=\"レイアウトが正常に完了しました\" />\n  <String Id=\"SuccessUnsafeUninstallHeader\" Value=\"Unsafe Uninstall Successfully Completed\" />\n  <String Id=\"SuccessCacheHeader\" Value=\"キャッシュが正常に完了しました\" />\n  <String Id=\"SuccessModifyHeader\" Value=\"Modification Successfully Completed\" />\n  <String Id=\"SuccessUninstallRestartText\" Value=\"You must restart your computer to complete the uninstallation.\" />\n  <!-- Additional failure headers -->\n  <String Id=\"FailureLayoutHeader\" Value=\"レイアウトに失敗しました\" />\n  <String Id=\"FailureUnsafeUninstallHeader\" Value=\"Unsafe Uninstall Failed\" />\n  <String Id=\"FailureCacheHeader\" Value=\"キャッシュに失敗しました\" />\n  <String Id=\"FailureModifyHeader\" Value=\"Modification Failed\" />\n</WixLocalization>"
  },
  {
    "path": "src/windowsdesktop/src/bundle/theme/1042/thm.wxl",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<WixLocalization Culture=\"ko-KR\" Language=\"1042\" xmlns=\"http://wixtoolset.org/schemas/v4/wxl\">\n  <String Id=\"Caption\" Value=\"[WixBundleName] 설치 관리자\" />\n  <String Id=\"Title\" Value=\"[BUNDLEMONIKER]\" />\n  <String Id=\"ConfirmCancelMessage\" Value=\"취소하시겠습니까?\" />\n  <String Id=\"ExecuteUpgradeRelatedBundleMessage\" Value=\"이전 버전\" />\n  <String Id=\"HelpHeader\" Value=\"설치 도움말\" />\n  <String Id=\"HelpText\" Value=\"/install | /repair | /uninstall | /layout [directory] - 디렉터리에서 번들의 전체 로컬 복사본을 설치, 복구, 제거하거나 만드세요. 설치가 기본값입니다.  /passive | /quiet - 프롬프트 없이 최소 UI를 표시하거나 UI 및 프롬프트를 모두 표시하지 않습니다. 기본적으로 UI와 모든 프롬프트가 표시됩니다.  /norestart - 다시 시작 시도를 중지합니다. 기본적으로 UI는 다시 시작하기 전에 메시지를 표시합니다.  /log log.txt - 특정 파일에 로그합니다. 기본적으로 로그 파일은 %TEMP%에 만들어집니다.\" />\n  <String Id=\"HelpCloseButton\" Value=\"닫기(&amp;C)\" />\n  <String Id=\"InstallAcceptCheckbox\" Value=\"라이선스 사용 약관에 동의합니다(&amp;A).\" />\n  <String Id=\"InstallOptionsButton\" Value=\"옵션(&amp;O)\" />\n  <String Id=\"InstallInstallButton\" Value=\"설치(&amp;I)\" />\n  <String Id=\"InstallCloseButton\" Value=\"닫기(&amp;C)\" />\n  <String Id=\"ProgressHeader\" Value=\"설치 진행률\" />\n  <String Id=\"ProgressLabel\" Value=\"처리하는 중:\" />\n  <String Id=\"OverallProgressPackageText\" Value=\"초기화하는 중...\" />\n  <String Id=\"ProgressCancelButton\" Value=\"취소(&amp;C)\" />\n  <String Id=\"ModifyHeader\" Value=\"설치 수정\" />\n  <String Id=\"ModifyText\" Value=\"제품을 다시 설치하려면 복구를 선택하고, 제거하려면 제거를 선택하세요.\" />\n  <String Id=\"ModifyRepairButton\" Value=\"복구(&amp;R)\" />\n  <String Id=\"ModifyUninstallButton\" Value=\"제거(&amp;U)\" />\n  <String Id=\"ModifyCloseButton\" Value=\"닫기(&amp;C)\" />\n  <String Id=\"SuccessRepairHeader\" Value=\"복구 완료됨\" />\n  <String Id=\"SuccessUninstallHeader\" Value=\"제거 완료됨\" />\n  <String Id=\"SuccessInstallHeader\" Value=\"설치 완료됨\" />\n  <String Id=\"SuccessHeader\" Value=\"설치 완료\" />\n  <String Id=\"SuccessLaunchButton\" Value=\"시작(&amp;L)\" />\n  <String Id=\"SuccessRestartText\" Value=\"소프트웨어를 사용하려면 먼저 컴퓨터를 다시 시작해야 합니다.\" />\n  <String Id=\"SuccessRestartButton\" Value=\"다시 시작(&amp;R)\" />\n  <String Id=\"SuccessCloseButton\" Value=\"닫기(&amp;C)\" />\n  <String Id=\"FailureHeader\" Value=\"설치 실패\" />\n  <String Id=\"FailureInstallHeader\" Value=\"설치 실패\" />\n  <String Id=\"FailureUninstallHeader\" Value=\"제거 실패\" />\n  <String Id=\"FailureRepairHeader\" Value=\"복구 실패\" />\n  <String Id=\"FailureHyperlinkLogText\" Value=\"하나 이상의 문제로 인해 설치가 실패했습니다. 문제를 해결한 후 설치를 다시 시도하세요. 자세한 내용은 &lt;a href=&quot;#&quot;&gt;로그 파일&lt;/a&gt;을 참조하세요.\" />\n  <String Id=\"FailureRestartText\" Value=\"소프트웨어 롤백을 완료하려면 먼저 컴퓨터를 다시 시작해야 합니다.\" />\n  <String Id=\"FailureRestartButton\" Value=\"다시 시작(&amp;R)\" />\n  <String Id=\"FailureCloseButton\" Value=\"닫기(&amp;C)\" />\n  <String Id=\"FailureNotSupportedCurrentOperatingSystem\" Value=\"이 운영 체제에서는 [PRODUCT_NAME]이(가) 지원되지 않습니다. 자세한 내용은 [LINK_PREREQ_PAGE]을(를) 참조하세요.\" />\n  <String Id=\"FailureNotSupportedX86OperatingSystem\" Value=\"x86 운영 체제에서는 [PRODUCT_NAME]이(가) 지원되지 않습니다. 해당 x86 설치 관리자를 사용하여 설치하세요.\" />\n  <String Id=\"FilesInUseTitle\" Value=\"사용 중인 파일\" />\n  <String Id=\"FilesInUseLabel\" Value=\"다음의 응용 프로그램이 업데이트해야 할 파일을 사용 중입니다.\" />\n  <String Id=\"FilesInUseCloseRadioButton\" Value=\"애플리케이션을 닫고 다시 시작합니다(&amp;A).\" />\n  <String Id=\"FilesInUseDontCloseRadioButton\" Value=\"애플리케이션을 닫지 마세요(&amp;D). 다시 부팅해야 합니다.\" />\n  <String Id=\"FilesInUseRetryButton\" Value=\"다시 시도(&amp;R)\" />\n  <String Id=\"FilesInUseCancelButton\" Value=\"취소(&amp;C)\" />\n  <String Id=\"WelcomeHeader\" Value=\"Windows 데스크톱 런타임\" />\n  <String Id=\"WelcomeDescription\" Value=\".NET Windows 데스크톱 런타임은 컴퓨터에서 Windows Forms 및 WPF 애플리케이션을 실행하는 데 사용됩니다. .NET은 오픈 소스, 플랫폼 간이며 Microsoft에서 지원합니다. .NET SDK를 유용하게 사용하시길 바랍니다.\" />\n  <String Id=\"LearnMoreTitle\" Value=\".NET에 대한 자세한 정보\" />\n  <String Id=\"SuccessInstallLocation\" Value=\"다음이 [DOTNETHOME]에 설치되었습니다.\" />\n  <String Id=\"SuccessInstallProductName\" Value=\" - [BUNDLEMONIKER] \" />\n  <String Id=\"ResourcesHeader\" Value=\"리소스\" />\n  <String Id=\"DocumentationLink\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-docs&quot;&gt;설명서&lt;/A&gt;\" />\n  <String Id=\"ReleaseNotesLink\" Value=\"&lt;A HREF=&quot;https://aka.ms/20-p2-rel-notes&quot;&gt;릴리스 정보&lt;/A&gt;\" />\n  <String Id=\"TutorialLink\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-tutorials&quot;&gt;자습서&lt;/A&gt;\" />\n  <String Id=\"TelemetryLink\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-cli-telemetry&quot;&gt;.NET 원격 분석&lt;/A&gt;\" />\n  <String Id=\"PrivacyStatementLink\" Value=\"&lt;A HREF=&quot;https://aka.ms/dev-privacy&quot;&gt;개인정보처리방침&lt;/A&gt;\" />\n  <String Id=\"EulaLink\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-license-windows&quot;&gt;.NET에 대한 라이선싱 정보&lt;/A&gt;\" />\n  <String Id=\"LicenseAssent\" Value=\"설치를 클릭하면 다음 사용 약관에 동의하는 것입니다.\" />\n  <String Id=\"VisualStudioWarning\" Value=\"Visual Studio에서 .NET [VERSIONMAJOR].[VERSIONMINOR]을(를) 사용하려는 경우 Visual Studio 2026 18.0 이상이 필요합니다. &lt;A HREF=&quot;https://aka.ms/dotnet[VERSIONMAJOR]-release-notes&quot;&gt;자세히 알아보세요&lt;/A&gt;.\" />\n  <!-- Success page strings -->\n  <String Id=\"FirstTimeWelcomeMessage\" Value=\"Thank you for installing [BUNDLEMONIKER]! You can now run applications that require the .NET Windows Desktop Runtime.\" />\n  <String Id=\"NetDocumentationLinkText\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-docs&quot;&gt;.NET 설명서&lt;/A&gt;\" />\n  <String Id=\"WindowsDesktopDocumentationLinkText\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-desktop-docs&quot;&gt;Windows 데스크톱 문서&lt;/A&gt;\" />\n  <String Id=\"ReleaseNotesLinkText\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet[VERSIONMAJOR]-release-notes&quot;&gt;릴리스 정보&lt;/A&gt;\" />\n  <String Id=\"TutorialsLinkText\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-tutorials&quot;&gt;.NET 자습서&lt;/A&gt;\" />\n  <!-- Additional success headers -->\n  <String Id=\"SuccessLayoutHeader\" Value=\"레이아웃 완료됨\" />\n  <String Id=\"SuccessUnsafeUninstallHeader\" Value=\"안전하지 않은 제거 완료\" />\n  <String Id=\"SuccessCacheHeader\" Value=\"캐시가 완료됨\" />\n  <String Id=\"SuccessModifyHeader\" Value=\"수정 완료\" />\n  <String Id=\"SuccessUninstallRestartText\" Value=\"제거를 완료하려면 컴퓨터를 다시 시작해야 합니다.\" />\n  <!-- Additional failure headers -->\n  <String Id=\"FailureLayoutHeader\" Value=\"레이아웃 실패\" />\n  <String Id=\"FailureUnsafeUninstallHeader\" Value=\"안전하지 않은 제거 실패\" />\n  <String Id=\"FailureCacheHeader\" Value=\"캐시 실패\" />\n  <String Id=\"FailureModifyHeader\" Value=\"수정 실패\" />\n</WixLocalization>"
  },
  {
    "path": "src/windowsdesktop/src/bundle/theme/1045/thm.wxl",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<WixLocalization Culture=\"pl-PL\" Language=\"1045\" xmlns=\"http://wixtoolset.org/schemas/v4/wxl\">\n  <String Id=\"Caption\" Value=\"Instalator pakietu [WixBundleName]\" />\n  <String Id=\"Title\" Value=\"[BUNDLEMONIKER]\" />\n  <String Id=\"ConfirmCancelMessage\" Value=\"Czy na pewno chcesz anulować?\" />\n  <String Id=\"ExecuteUpgradeRelatedBundleMessage\" Value=\"Poprzednia wersja\" />\n  <String Id=\"HelpHeader\" Value=\"Konfiguracja — Pomoc\" />\n  <String Id=\"HelpText\" Value=\"/install | /repair | /uninstall | /layout [directory] - installs, repairs, uninstalls or creates a complete local copy of the bundle in directory. Install is the default.  /passive | /quiet - displays minimal UI with no prompts or displays no UI and no prompts. By default UI and all prompts are displayed.  /norestart - suppress any attempts to restart. By default UI will prompt before restart.  /log log.txt - logs to a specific file. By default a log file is created in %TEMP%.\" />\n  <String Id=\"HelpCloseButton\" Value=\"&amp;Zamknij\" />\n  <String Id=\"InstallAcceptCheckbox\" Value=\"&amp;Akceptuję postanowienia licencyjne\" />\n  <String Id=\"InstallOptionsButton\" Value=\"&amp;Opcje\" />\n  <String Id=\"InstallInstallButton\" Value=\"&amp;Zainstaluj\" />\n  <String Id=\"InstallCloseButton\" Value=\"&amp;Zamknij\" />\n  <String Id=\"ProgressHeader\" Value=\"Postęp konfiguracji\" />\n  <String Id=\"ProgressLabel\" Value=\"Przetwarzanie:\" />\n  <String Id=\"OverallProgressPackageText\" Value=\"Trwa inicjowanie...\" />\n  <String Id=\"ProgressCancelButton\" Value=\"&amp;Anuluj\" />\n  <String Id=\"ModifyHeader\" Value=\"Modyfikowanie instalacji\" />\n  <String Id=\"ModifyText\" Value=\"Wybierz opcję naprawy, aby ponownie zainstalować produkt, lub odinstaluj, aby go usunąć.\" />\n  <String Id=\"ModifyRepairButton\" Value=\"&amp;Napraw\" />\n  <String Id=\"ModifyUninstallButton\" Value=\"&amp;Odinstaluj\" />\n  <String Id=\"ModifyCloseButton\" Value=\"&amp;Zamknij\" />\n  <String Id=\"SuccessRepairHeader\" Value=\"Pomyślnie ukończono naprawę\" />\n  <String Id=\"SuccessUninstallHeader\" Value=\"Pomyślnie ukończono operację odinstalowania\" />\n  <String Id=\"SuccessInstallHeader\" Value=\"Pomyślnie ukończono instalację\" />\n  <String Id=\"SuccessHeader\" Value=\"Konfiguracja powiodła się\" />\n  <String Id=\"SuccessLaunchButton\" Value=\"&amp;Uruchom\" />\n  <String Id=\"SuccessRestartText\" Value=\"Aby móc korzystać z oprogramowania, musisz uruchomić ponownie komputer.\" />\n  <String Id=\"SuccessRestartButton\" Value=\"&amp;Uruchom ponownie\" />\n  <String Id=\"SuccessCloseButton\" Value=\"&amp;Zamknij\" />\n  <String Id=\"FailureHeader\" Value=\"Konfiguracja nie powiodła się\" />\n  <String Id=\"FailureInstallHeader\" Value=\"Konfiguracja nie powiodła się\" />\n  <String Id=\"FailureUninstallHeader\" Value=\"Operacja odinstalowania nie powiodła się\" />\n  <String Id=\"FailureRepairHeader\" Value=\"Naprawa nie powiodła się\" />\n  <String Id=\"FailureHyperlinkLogText\" Value=\"Co najmniej jeden problem spowodował niepowodzenie konfiguracji. Rozwiąż problemy, a następnie ponów próbę konfiguracji. Aby uzyskać więcej informacji, zobacz &lt;a href=&quot;#&quot;&gt;plik dziennika&lt;/a&gt;.\" />\n  <String Id=\"FailureRestartText\" Value=\"Aby ukończyć wycofywanie oprogramowania, musisz uruchomić ponownie komputer.\" />\n  <String Id=\"FailureRestartButton\" Value=\"&amp;Uruchom ponownie\" />\n  <String Id=\"FailureCloseButton\" Value=\"&amp;Zamknij\" />\n  <String Id=\"FailureNotSupportedCurrentOperatingSystem\" Value=\"Produkt [PRODUCT_NAME] nie jest obsługiwany w tym systemie operacyjnym. Aby uzyskać więcej informacji, zobacz [LINK_PREREQ_PAGE].\" />\n  <String Id=\"FailureNotSupportedX86OperatingSystem\" Value=\"Produkt [PRODUCT_NAME] nie jest obsługiwany w systemach operacyjnych x86. Przeprowadź instalację przy użyciu odpowiedniego instalatora x86.\" />\n  <String Id=\"FilesInUseTitle\" Value=\"Pliki w użyciu\" />\n  <String Id=\"FilesInUseLabel\" Value=\"Następujące aplikacje korzystają z plików, które muszą zostać zaktualizowane:\" />\n  <String Id=\"FilesInUseCloseRadioButton\" Value=\"Zamknij &amp;aplikacje i spróbuj je ponownie uruchomić.\" />\n  <String Id=\"FilesInUseDontCloseRadioButton\" Value=\"&amp;Nie zamykaj aplikacji. Wymagany będzie ponowny rozruch.\" />\n  <String Id=\"FilesInUseRetryButton\" Value=\"&amp;Ponów próbę\" />\n  <String Id=\"FilesInUseCancelButton\" Value=\"&amp;Anuluj\" />\n  <String Id=\"WelcomeHeader\" Value=\"Windows Desktop Runtime\" />\n  <String Id=\"WelcomeDescription\" Value=\"Środowisko uruchomieniowe platformy .NET dla komputerów z systemem Windows służy do uruchamiania aplikacji Windows Forms i WPF na komputerze. Platforma .NET jest oprogramowaniem typu open source, działa na różnych platformach i jest obsługiwana przez firmę Microsoft. Mamy nadzieję, że Ci się podoba!\" />\n  <String Id=\"LearnMoreTitle\" Value=\"Dowiedz się więcej o platformie .NET\" />\n  <String Id=\"SuccessInstallLocation\" Value=\"Następujące elementy zainstalowano w [DOTNETHOME]\" />\n  <String Id=\"SuccessInstallProductName\" Value=\" - [BUNDLEMONIKER] \" />\n  <String Id=\"ResourcesHeader\" Value=\"Zasoby\" />\n  <String Id=\"DocumentationLink\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-docs&quot;&gt;Dokumentacja&lt;/A&gt;\" />\n  <String Id=\"ReleaseNotesLink\" Value=\"&lt;A HREF=&quot;https://aka.ms/20-p2-rel-notes&quot;&gt;Informacje o wersji&lt;/A&gt;\" />\n  <String Id=\"TutorialLink\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-tutorials&quot;&gt;Samouczki&lt;/A&gt;\" />\n  <String Id=\"TelemetryLink\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-cli-telemetry&quot;&gt;Telemetria platformy .NET&lt;/A&gt;\" />\n  <String Id=\"PrivacyStatementLink\" Value=\"&lt;A HREF=&quot;https://aka.ms/dev-privacy&quot;&gt;Oświadczenie o ochronie prywatności&lt;/A&gt;\" />\n  <String Id=\"EulaLink\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-license-windows&quot;&gt;Informacje licencyjne dla platformy .NET&lt;/A&gt;\" />\n  <String Id=\"LicenseAssent\" Value=\"Klikając pozycję Zainstaluj, wyrażasz zgodę na następujące warunki.\" />\n  <String Id=\"VisualStudioWarning\" Value=\"Jeśli planujesz używać platformy .NET [VERSIONMAJOR].[VERSIONMINOR] za pomocą programu Visual Studio, wymaga to wersji programu Visual Studio 2026 18.0 lub nowszej. &lt;A HREF=&quot;https://aka.ms/dotnet[VERSIONMAJOR]-release-notes&quot;&gt;Dowiedz się więcej&lt;/A&gt;.\" />\n  <!-- Success page strings -->\n  <String Id=\"FirstTimeWelcomeMessage\" Value=\"Thank you for installing [BUNDLEMONIKER]! You can now run applications that require the .NET Windows Desktop Runtime.\" />\n  <String Id=\"NetDocumentationLinkText\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-docs&quot;&gt;.NET — dokumentacja&lt;/A&gt;\" />\n  <String Id=\"WindowsDesktopDocumentationLinkText\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-desktop-docs&quot;&gt;Windows Desktop Documentation&lt;/A&gt;\" />\n  <String Id=\"ReleaseNotesLinkText\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet[VERSIONMAJOR]-release-notes&quot;&gt;Release Notes&lt;/A&gt;\" />\n  <String Id=\"TutorialsLinkText\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-tutorials&quot;&gt;.NET Tutorials&lt;/A&gt;\" />\n  <!-- Additional success headers -->\n  <String Id=\"SuccessLayoutHeader\" Value=\"Układ został ukończony pomyślnie\" />\n  <String Id=\"SuccessUnsafeUninstallHeader\" Value=\"Unsafe Uninstall Successfully Completed\" />\n  <String Id=\"SuccessCacheHeader\" Value=\"Buforowanie zostało ukończone pomyślnie\" />\n  <String Id=\"SuccessModifyHeader\" Value=\"Modification Successfully Completed\" />\n  <String Id=\"SuccessUninstallRestartText\" Value=\"You must restart your computer to complete the uninstallation.\" />\n  <!-- Additional failure headers -->\n  <String Id=\"FailureLayoutHeader\" Value=\"Układ nie powiódł się\" />\n  <String Id=\"FailureUnsafeUninstallHeader\" Value=\"Unsafe Uninstall Failed\" />\n  <String Id=\"FailureCacheHeader\" Value=\"Buforowanie nie powiodło się\" />\n  <String Id=\"FailureModifyHeader\" Value=\"Modification Failed\" />\n</WixLocalization>"
  },
  {
    "path": "src/windowsdesktop/src/bundle/theme/1046/thm.wxl",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<WixLocalization Culture=\"pt-BR\" Language=\"1046\" xmlns=\"http://wixtoolset.org/schemas/v4/wxl\">\n  <String Id=\"Caption\" Value=\"Instalador do [WixBundleName]\" />\n  <String Id=\"Title\" Value=\"[BUNDLEMONIKER]\" />\n  <String Id=\"ConfirmCancelMessage\" Value=\"Tem certeza de que deseja cancelar?\" />\n  <String Id=\"ExecuteUpgradeRelatedBundleMessage\" Value=\"Versão anterior\" />\n  <String Id=\"HelpHeader\" Value=\"Ajuda de Configuração\" />\n  <String Id=\"HelpText\" Value=\"/install | /repair | /uninstall | /layout [directory] - installs, repairs, uninstalls or creates a complete local copy of the bundle in directory. Install is the default.  /passive | /quiet - displays minimal UI with no prompts or displays no UI and no prompts. By default UI and all prompts are displayed.  /norestart - suppress any attempts to restart. By default UI will prompt before restart.  /log log.txt - logs to a specific file. By default a log file is created in %TEMP%.\" />\n  <String Id=\"HelpCloseButton\" Value=\"&amp;Fechar\" />\n  <String Id=\"InstallAcceptCheckbox\" Value=\"Eu &amp;concordo com os termos e condições da licença\" />\n  <String Id=\"InstallOptionsButton\" Value=\"&amp;Opções\" />\n  <String Id=\"InstallInstallButton\" Value=\"I&amp;nstalar\" />\n  <String Id=\"InstallCloseButton\" Value=\"&amp;Fechar\" />\n  <String Id=\"ProgressHeader\" Value=\"Progresso da Instalação\" />\n  <String Id=\"ProgressLabel\" Value=\"Processamento:\" />\n  <String Id=\"OverallProgressPackageText\" Value=\"Inicializando...\" />\n  <String Id=\"ProgressCancelButton\" Value=\"&amp;Cancelar\" />\n  <String Id=\"ModifyHeader\" Value=\"Modificar Instalação\" />\n  <String Id=\"ModifyText\" Value=\"Selecione reparar para reinstalar o produto ou desinstalar para removê-lo.\" />\n  <String Id=\"ModifyRepairButton\" Value=\"&amp;Reparar\" />\n  <String Id=\"ModifyUninstallButton\" Value=\"&amp;Desinstalar\" />\n  <String Id=\"ModifyCloseButton\" Value=\"&amp;Fechar\" />\n  <String Id=\"SuccessRepairHeader\" Value=\"Reparo Concluído com Sucesso\" />\n  <String Id=\"SuccessUninstallHeader\" Value=\"Desinstalação Concluída com Sucesso\" />\n  <String Id=\"SuccessInstallHeader\" Value=\"Instalação Concluída com Sucesso\" />\n  <String Id=\"SuccessHeader\" Value=\"Instalação bem-sucedida\" />\n  <String Id=\"SuccessLaunchButton\" Value=\"&amp;Iniciar\" />\n  <String Id=\"SuccessRestartText\" Value=\"Você deve reiniciar seu computador antes de usar o software.\" />\n  <String Id=\"SuccessRestartButton\" Value=\"&amp;Reiniciar\" />\n  <String Id=\"SuccessCloseButton\" Value=\"&amp;Fechar\" />\n  <String Id=\"FailureHeader\" Value=\"Falha na Instalação\" />\n  <String Id=\"FailureInstallHeader\" Value=\"Falha na Instalação\" />\n  <String Id=\"FailureUninstallHeader\" Value=\"Falha ao Desinstalar\" />\n  <String Id=\"FailureRepairHeader\" Value=\"Falha no Reparo\" />\n  <String Id=\"FailureHyperlinkLogText\" Value=\"Um ou mais problemas fizeram com que a instalação falhasse. Corrija os problemas e, em seguida, tente a instalação novamente. Para mais informações, consulte o &lt;a href=&quot;#&quot;&gt;arquivo de log&lt;/a&gt;.\" />\n  <String Id=\"FailureRestartText\" Value=\"Você deve reiniciar o computador para concluir a reversão do software.\" />\n  <String Id=\"FailureRestartButton\" Value=\"&amp;Reiniciar\" />\n  <String Id=\"FailureCloseButton\" Value=\"&amp;Fechar\" />\n  <String Id=\"FailureNotSupportedCurrentOperatingSystem\" Value=\"Não há suporte para o [PRODUCT_NAME] neste sistema operacional. Para obter mais informações, confira [LINK_PREREQ_PAGE].\" />\n  <String Id=\"FailureNotSupportedX86OperatingSystem\" Value=\"O [PRODUCT_NAME] não tem suporte em sistemas operacionais x86. Instale usando o instalador x86 correspondente.\" />\n  <String Id=\"FilesInUseTitle\" Value=\"Arquivos em Uso\" />\n  <String Id=\"FilesInUseLabel\" Value=\"Os aplicativos a seguir estão usando arquivos que precisam ser atualizados:\" />\n  <String Id=\"FilesInUseCloseRadioButton\" Value=\"Feche os &amp;aplicativos e tente reiniciá-los.\" />\n  <String Id=\"FilesInUseDontCloseRadioButton\" Value=\"&amp;Não fechar aplicativos. Uma reinicialização será necessária.\" />\n  <String Id=\"FilesInUseRetryButton\" Value=\"&amp;Repetir\" />\n  <String Id=\"FilesInUseCancelButton\" Value=\"&amp;Cancelar\" />\n  <String Id=\"WelcomeHeader\" Value=\"Windows Desktop Runtime\" />\n  <String Id=\"WelcomeDescription\" Value=\"O Runtime do .NET Windows Desktop é usado para executar aplicativos do Windows Forms e do WPF no seu computador. O .NET é um software livre, com plataforma cruzada e possui o suporte da Microsoft. Esperamos que você goste!\" />\n  <String Id=\"LearnMoreTitle\" Value=\"Saiba mais sobre o .NET\" />\n  <String Id=\"SuccessInstallLocation\" Value=\"O seguinte foi instalado em [DOTNETHOME]\" />\n  <String Id=\"SuccessInstallProductName\" Value=\" - [BUNDLEMONIKER] \" />\n  <String Id=\"ResourcesHeader\" Value=\"Recursos\" />\n  <String Id=\"DocumentationLink\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-docs&quot;&gt;Documentação&lt;/A&gt;\" />\n  <String Id=\"ReleaseNotesLink\" Value=\"&lt;A HREF=&quot;https://aka.ms/20-p2-rel-notes&quot;&gt;Notas de Versão&lt;/A&gt;\" />\n  <String Id=\"TutorialLink\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-tutorials&quot;&gt;Tutoriais&lt;/A&gt;\" />\n  <String Id=\"TelemetryLink\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-cli-telemetry&quot;&gt;Telemetria do .NET&lt;/A&gt;\" />\n  <String Id=\"PrivacyStatementLink\" Value=\"&lt;A HREF=&quot;https://aka.ms/dev-privacy&quot;&gt;Política de privacidade&lt;/A&gt;\" />\n  <String Id=\"EulaLink\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-license-windows&quot;&gt;Informações de licenciamento para .NET&lt;/A&gt;\" />\n  <String Id=\"LicenseAssent\" Value=\"Ao clicar em instalar, você concorda com os termos a seguir.\" />\n  <String Id=\"VisualStudioWarning\" Value=\"Se você planeja usar .NET [VERSIONMAJOR].[VERSIONMINOR] com o Visual Studio, é necessário o Visual Studio 2026 18.0 ou mais recente. &lt;A HREF=&quot;https://aka.ms/dotnet[VERSIONMAJOR]-release-notes&quot;&gt;Saiba mais&lt;/A&gt;.\" />\n  <!-- Success page strings -->\n  <String Id=\"FirstTimeWelcomeMessage\" Value=\"Thank you for installing [BUNDLEMONIKER]! You can now run applications that require the .NET Windows Desktop Runtime.\" />\n  <String Id=\"NetDocumentationLinkText\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-docs&quot;&gt;Documentação do .NET&lt;/A&gt;\" />\n  <String Id=\"WindowsDesktopDocumentationLinkText\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-desktop-docs&quot;&gt;Windows Desktop Documentation&lt;/A&gt;\" />\n  <String Id=\"ReleaseNotesLinkText\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet[VERSIONMAJOR]-release-notes&quot;&gt;Release Notes&lt;/A&gt;\" />\n  <String Id=\"TutorialsLinkText\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-tutorials&quot;&gt;.NET Tutorials&lt;/A&gt;\" />\n  <!-- Additional success headers -->\n  <String Id=\"SuccessLayoutHeader\" Value=\"Layout Concluído com Sucesso\" />\n  <String Id=\"SuccessUnsafeUninstallHeader\" Value=\"Unsafe Uninstall Successfully Completed\" />\n  <String Id=\"SuccessCacheHeader\" Value=\"Cache Concluído com Sucesso\" />\n  <String Id=\"SuccessModifyHeader\" Value=\"Modification Successfully Completed\" />\n  <String Id=\"SuccessUninstallRestartText\" Value=\"You must restart your computer to complete the uninstallation.\" />\n  <!-- Additional failure headers -->\n  <String Id=\"FailureLayoutHeader\" Value=\"Falha no Layout\" />\n  <String Id=\"FailureUnsafeUninstallHeader\" Value=\"Unsafe Uninstall Failed\" />\n  <String Id=\"FailureCacheHeader\" Value=\"Falha no Cache\" />\n  <String Id=\"FailureModifyHeader\" Value=\"Modification Failed\" />\n</WixLocalization>"
  },
  {
    "path": "src/windowsdesktop/src/bundle/theme/1049/thm.wxl",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<WixLocalization Culture=\"ru-RU\" Language=\"1049\" xmlns=\"http://wixtoolset.org/schemas/v4/wxl\">\n  <String Id=\"Caption\" Value=\"Установщик [WixBundleName]\" />\n  <String Id=\"Title\" Value=\"[BUNDLEMONIKER]\" />\n  <String Id=\"ConfirmCancelMessage\" Value=\"Вы действительно хотите отменить?\" />\n  <String Id=\"ExecuteUpgradeRelatedBundleMessage\" Value=\"Предыдущая версия\" />\n  <String Id=\"HelpHeader\" Value=\"Справка по установке\" />\n  <String Id=\"HelpText\" Value=\"/install | /repair | /uninstall | /layout [directory] — устанавливает, исправляет, удаляет пакет или создает полную локальную копию пакета в каталоге. По умолчанию выполняется установка.  /passive | /quiet — выводит минимальный пользовательский интерфейс без запросов или вообще не выводит пользовательский интерфейс и запросы. По умолчанию отображаются пользовательский интерфейс и все запросы.  /norestart — подавляет все попытки перезапуска. По умолчанию пользовательский интерфейс запрашивает подтверждение перед перезапуском.  /log log.txt — журналы в определенном файле. По умолчанию файл журнала создается в папке %TEMP%.\" />\n  <String Id=\"HelpCloseButton\" Value=\"&amp;Закрыть\" />\n  <String Id=\"InstallAcceptCheckbox\" Value=\"Я &amp;принимаю условия лицензии\" />\n  <String Id=\"InstallOptionsButton\" Value=\"&amp;Параметры\" />\n  <String Id=\"InstallInstallButton\" Value=\"&amp;Установить\" />\n  <String Id=\"InstallCloseButton\" Value=\"&amp;Закрыть\" />\n  <String Id=\"ProgressHeader\" Value=\"Ход установки\" />\n  <String Id=\"ProgressLabel\" Value=\"Выполняется обработка:\" />\n  <String Id=\"OverallProgressPackageText\" Value=\"Выполняется инициализация…\" />\n  <String Id=\"ProgressCancelButton\" Value=\"&amp;Отмена\" />\n  <String Id=\"ModifyHeader\" Value=\"Изменение установки\" />\n  <String Id=\"ModifyText\" Value=\"Выберите &quot;Исправить&quot;, чтобы переустановить продукт, или &quot;Удалить&quot;, чтобы его удалить.\" />\n  <String Id=\"ModifyRepairButton\" Value=\"&amp;Исправить\" />\n  <String Id=\"ModifyUninstallButton\" Value=\"&amp;Удалить\" />\n  <String Id=\"ModifyCloseButton\" Value=\"&amp;Закрыть\" />\n  <String Id=\"SuccessRepairHeader\" Value=\"Исправление успешно завершено\" />\n  <String Id=\"SuccessUninstallHeader\" Value=\"Удаление успешно завершено\" />\n  <String Id=\"SuccessInstallHeader\" Value=\"Установка успешно завершена\" />\n  <String Id=\"SuccessHeader\" Value=\"Настройка успешно завершена\" />\n  <String Id=\"SuccessLaunchButton\" Value=\"&amp;Запустить\" />\n  <String Id=\"SuccessRestartText\" Value=\"Перед использованием программного обеспечения необходимо перезапустить компьютер.\" />\n  <String Id=\"SuccessRestartButton\" Value=\"&amp;Перезагрузить\" />\n  <String Id=\"SuccessCloseButton\" Value=\"&amp;Закрыть\" />\n  <String Id=\"FailureHeader\" Value=\"Не удалось выполнить установку\" />\n  <String Id=\"FailureInstallHeader\" Value=\"Не удалось выполнить установку\" />\n  <String Id=\"FailureUninstallHeader\" Value=\"Не удалось выполнить удаление\" />\n  <String Id=\"FailureRepairHeader\" Value=\"Не удалось выполнить исправление\" />\n  <String Id=\"FailureHyperlinkLogText\" Value=\"Возникли ошибки, вызвавшие сбой настройки. Устраните проблемы и повторите попытку настройки. Дополнительные сведения см. в &lt;a href=&quot;#&quot;&gt;файле журнала&lt;/a&gt;.\" />\n  <String Id=\"FailureRestartText\" Value=\"Необходимо перезагрузить компьютер перед тем, как выполнять откат программного обеспечения.\" />\n  <String Id=\"FailureRestartButton\" Value=\"&amp;Перезагрузить\" />\n  <String Id=\"FailureCloseButton\" Value=\"&amp;Закрыть\" />\n  <String Id=\"FailureNotSupportedCurrentOperatingSystem\" Value=\"Продукт [PRODUCT_NAME] не поддерживается в этой операционной системе. Дополнительные сведения: [LINK_PREREQ_PAGE].\" />\n  <String Id=\"FailureNotSupportedX86OperatingSystem\" Value=\"Продукт [PRODUCT_NAME] не поддерживается в операционных системах x86. Установите с помощью соответствующего установщика x86.\" />\n  <String Id=\"FilesInUseTitle\" Value=\"Используемые файлы\" />\n  <String Id=\"FilesInUseLabel\" Value=\"Следующие приложения используют файлы, которые следует обновить:\" />\n  <String Id=\"FilesInUseCloseRadioButton\" Value=\"&amp;Закрыть приложения и попробовать перезапустить их.\" />\n  <String Id=\"FilesInUseDontCloseRadioButton\" Value=\"&amp;Не закрывать приложения. Потребуется перезагрузка.\" />\n  <String Id=\"FilesInUseRetryButton\" Value=\"&amp;Повторить\" />\n  <String Id=\"FilesInUseCancelButton\" Value=\"&amp;Отмена\" />\n  <String Id=\"WelcomeHeader\" Value=\"Среда выполнения Windows Desktop\" />\n  <String Id=\"WelcomeDescription\" Value=\"Среда выполнения .NET Windows Desktop используется для запуска приложений Windows Forms и WPF на компьютерах. .NET является открытой, кроссплатформенной средой и поддерживается Майкрософт. Надеемся, что вам понравится!\" />\n  <String Id=\"LearnMoreTitle\" Value=\"Дополнительные сведения о .NET\" />\n  <String Id=\"SuccessInstallLocation\" Value=\"Следующее было установлено в [DOTNETHOME]\" />\n  <String Id=\"SuccessInstallProductName\" Value=\" - [BUNDLEMONIKER] \" />\n  <String Id=\"ResourcesHeader\" Value=\"Ресурсы\" />\n  <String Id=\"DocumentationLink\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-docs&quot;&gt;Документация&lt;/A&gt;\" />\n  <String Id=\"ReleaseNotesLink\" Value=\"&lt;A HREF=&quot;https://aka.ms/20-p2-rel-notes&quot;&gt;Заметки о выпуске&lt;/A&gt;\" />\n  <String Id=\"TutorialLink\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-tutorials&quot;&gt;Руководства&lt;/A&gt;\" />\n  <String Id=\"TelemetryLink\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-cli-telemetry&quot;&gt;Телеметрия .NET&lt;/A&gt;\" />\n  <String Id=\"PrivacyStatementLink\" Value=\"&lt;A HREF=&quot;https://aka.ms/dev-privacy&quot;&gt;Заявление о конфиденциальности&lt;/A&gt;\" />\n  <String Id=\"EulaLink\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-license-windows&quot;&gt;Сведения о лицензировании для .NET&lt;/A&gt;\" />\n  <String Id=\"LicenseAssent\" Value=\"Нажимая кнопку &quot;Установить&quot;, вы принимаете следующие условия.\" />\n  <String Id=\"VisualStudioWarning\" Value=\"Если вы планируете использовать .NET [VERSIONMAJOR].[VERSIONMINOR] с Visual Studio, вам потребуется Visual Studio 2026 версии не ниже 18.0. &lt;A HREF=&quot;https://aka.ms/dotnet[VERSIONMAJOR]-release-notes&quot;&gt;Подробнее&lt;/A&gt;.\" />\n  <!-- Success page strings -->\n  <String Id=\"FirstTimeWelcomeMessage\" Value=\"Благодарим за установку [BUNDLEMONIKER]! Теперь вы можете запускать приложения, требующие среды выполнения .NET Windows Desktop.\" />\n  <String Id=\"NetDocumentationLinkText\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-docs&quot;&gt;Документация .NET&lt;/A&gt;\" />\n  <String Id=\"WindowsDesktopDocumentationLinkText\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-desktop-docs&quot;&gt;Документация по Windows Desktop&lt;/A&gt;\" />\n  <String Id=\"ReleaseNotesLinkText\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet[VERSIONMAJOR]-release-notes&quot;&gt;Заметки о выпуске&lt;/A&gt;\" />\n  <String Id=\"TutorialsLinkText\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-tutorials&quot;&gt;Руководства по .NET&lt;/A&gt;\" />\n  <!-- Additional success headers -->\n  <String Id=\"SuccessLayoutHeader\" Value=\"Компоновка успешно завершена\" />\n  <String Id=\"SuccessUnsafeUninstallHeader\" Value=\"Небезопасное удаление завершено\" />\n  <String Id=\"SuccessCacheHeader\" Value=\"Кэширование успешно завершено\" />\n  <String Id=\"SuccessModifyHeader\" Value=\"Изменение завершено\" />\n  <String Id=\"SuccessUninstallRestartText\" Value=\"Для завершения установки необходимо перезагрузить компьютер.\" />\n  <!-- Additional failure headers -->\n  <String Id=\"FailureLayoutHeader\" Value=\"Сбой макета\" />\n  <String Id=\"FailureUnsafeUninstallHeader\" Value=\"Сбой небезопасного удаления\" />\n  <String Id=\"FailureCacheHeader\" Value=\"Сбой кэша\" />\n  <String Id=\"FailureModifyHeader\" Value=\"Сбой изменения\" />\n</WixLocalization>"
  },
  {
    "path": "src/windowsdesktop/src/bundle/theme/1055/thm.wxl",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<WixLocalization Culture=\"tr-TR\" Language=\"1055\" xmlns=\"http://wixtoolset.org/schemas/v4/wxl\">\n  <String Id=\"Caption\" Value=\"[WixBundleName] Yükleyicisi\" />\n  <String Id=\"Title\" Value=\"[BUNDLEMONIKER]\" />\n  <String Id=\"ConfirmCancelMessage\" Value=\"İptal etmek istediğinizden emin misiniz?\" />\n  <String Id=\"ExecuteUpgradeRelatedBundleMessage\" Value=\"Önceki sürüm\" />\n  <String Id=\"HelpHeader\" Value=\"Kurulum Yardımı\" />\n  <String Id=\"HelpText\" Value=\"/install | /repair | /uninstall | /layout [directory] - dizindeki paketin eksiksiz bir yerel kopyasını yükler, onarır, kaldırır veya oluşturur. Yükleme varsayılandır.  /passive | /quiet - minimum kullanıcı arayüzü gösterir, hiçbir uyarı göstermez veya hiçbir kullanıcı arayüzü ve uyarı göstermez. Varsayılan olarak kullanıcı arabirimi ve tüm istemler görüntülenir.  /norestart - yeniden başlatma girişimlerini durdurur. Varsayılan olarak kullanıcı arabirimi yeniden başlatmadan önce soracaktır.  /log log.txt - belirli bir dosyaya kaydeder. Varsayılan olarak %TEMP% içinde bir günlük dosyası oluşturulur.\" />\n  <String Id=\"HelpCloseButton\" Value=\"&amp;Kapat\" />\n  <String Id=\"InstallAcceptCheckbox\" Value=\"Lisans hüküm ve koşullarını &amp;kabul ediyorum\" />\n  <String Id=\"InstallOptionsButton\" Value=\"&amp;Seçenekler\" />\n  <String Id=\"InstallInstallButton\" Value=\"&amp;Yükle\" />\n  <String Id=\"InstallCloseButton\" Value=\"&amp;Kapat\" />\n  <String Id=\"ProgressHeader\" Value=\"Kurulum İlerleme Durumu\" />\n  <String Id=\"ProgressLabel\" Value=\"İşleniyor:\" />\n  <String Id=\"OverallProgressPackageText\" Value=\"Başlatılıyor...\" />\n  <String Id=\"ProgressCancelButton\" Value=\"İ&amp;ptal\" />\n  <String Id=\"ModifyHeader\" Value=\"Kurulumu Değiştir\" />\n  <String Id=\"ModifyText\" Value=\"Ürünü yeniden yüklemek için onarımı, kaldırmak için kaldırmayı seçin.\" />\n  <String Id=\"ModifyRepairButton\" Value=\"&amp;Onar\" />\n  <String Id=\"ModifyUninstallButton\" Value=\"&amp;Kaldır\" />\n  <String Id=\"ModifyCloseButton\" Value=\"&amp;Kapat\" />\n  <String Id=\"SuccessRepairHeader\" Value=\"Onarım Başarıyla Tamamlandı\" />\n  <String Id=\"SuccessUninstallHeader\" Value=\"Kaldırma Başarıyla Tamamlandı\" />\n  <String Id=\"SuccessInstallHeader\" Value=\"Yükleme Başarıyla Tamamlandı\" />\n  <String Id=\"SuccessHeader\" Value=\"Kurulum Başarılı\" />\n  <String Id=\"SuccessLaunchButton\" Value=\"&amp;Başlatma\" />\n  <String Id=\"SuccessRestartText\" Value=\"Yazılımı kullanabilmek için bilgisayarınızı yeniden başlatmanız gerekiyor.\" />\n  <String Id=\"SuccessRestartButton\" Value=\"&amp;Yeniden Başlat\" />\n  <String Id=\"SuccessCloseButton\" Value=\"&amp;Kapat\" />\n  <String Id=\"FailureHeader\" Value=\"Kurulum Başarısız\" />\n  <String Id=\"FailureInstallHeader\" Value=\"Kurulum Başarısız\" />\n  <String Id=\"FailureUninstallHeader\" Value=\"Kaldırılamadı\" />\n  <String Id=\"FailureRepairHeader\" Value=\"Onarım Başarısız\" />\n  <String Id=\"FailureHyperlinkLogText\" Value=\"Bir veya daha fazla sorun kurulumun başarısız olmasına neden oldu. Lütfen sorunları düzeltin ve kurulumu yeniden deneyin. Daha fazla bilgi için &lt;a href=&quot;#&quot;&gt;günlük dosyasına&lt;/a&gt; bakın.\" />\n  <String Id=\"FailureRestartText\" Value=\"Yazılımın geri alınmasını tamamlamak için bilgisayarınızı yeniden başlatmanız gerekiyor.\" />\n  <String Id=\"FailureRestartButton\" Value=\"&amp;Yeniden Başlat\" />\n  <String Id=\"FailureCloseButton\" Value=\"&amp;Kapat\" />\n  <String Id=\"FailureNotSupportedCurrentOperatingSystem\" Value=\"[PRODUCT_NAME] bu işletim sisteminde desteklenmiyor. Daha fazla bilgi için bkz. [LINK_PREREQ_PAGE].\" />\n  <String Id=\"FailureNotSupportedX86OperatingSystem\" Value=\"[PRODUCT_NAME], x86 işletim sistemlerinde desteklenmiyor. Lütfen karşılık gelen x86 yükleyicisini kullanarak yükleyin.\" />\n  <String Id=\"FilesInUseTitle\" Value=\"Kullanımda Olan Dosyalar\" />\n  <String Id=\"FilesInUseLabel\" Value=\"Şu uygulamalar güncelleştirilmesi gereken dosyaları kullanıyor:\" />\n  <String Id=\"FilesInUseCloseRadioButton\" Value=\"&amp;Uygulamaları kapatın ve yeniden başlatmayı deneyin.\" />\n  <String Id=\"FilesInUseDontCloseRadioButton\" Value=\"&amp;Uygulamaları kapatmayın. Yeniden başlatma gerekiyor.\" />\n  <String Id=\"FilesInUseRetryButton\" Value=\"&amp;Yeniden Dene\" />\n  <String Id=\"FilesInUseCancelButton\" Value=\"İ&amp;ptal\" />\n  <String Id=\"WelcomeHeader\" Value=\"Windows Masaüstü Çalışma Zamanı\" />\n  <String Id=\"WelcomeDescription\" Value=\".NET Windows Masaüstü Çalışma Zamanı, bilgisayarınızda Windows Forms ve WPF uygulamalarını çalıştırmak için kullanılır. .NET açık kaynaklı, çapraz platformdur ve Microsoft tarafından desteklenmektedir. Beğeneceğinizi umuyoruz!\" />\n  <String Id=\"LearnMoreTitle\" Value=\".NET hakkında daha fazla bilgi edinin\" />\n  <String Id=\"SuccessInstallLocation\" Value=\"Aşağıdakiler [DOTNETHOME] konumunda yüklendi\" />\n  <String Id=\"SuccessInstallProductName\" Value=\" - [BUNDLEMONIKER] \" />\n  <String Id=\"ResourcesHeader\" Value=\"Kaynaklar\" />\n  <String Id=\"DocumentationLink\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-docs&quot;&gt;Belgeler&lt;/A&gt;\" />\n  <String Id=\"ReleaseNotesLink\" Value=\"&lt;A HREF=&quot;https://aka.ms/20-p2-rel-notes&quot;&gt;Sürüm Notları&lt;/A&gt;\" />\n  <String Id=\"TutorialLink\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-tutorials&quot;&gt;Öğreticiler&lt;/A&gt;\" />\n  <String Id=\"TelemetryLink\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-cli-telemetry&quot;&gt;.NET Telemetri&lt;/A&gt;\" />\n  <String Id=\"PrivacyStatementLink\" Value=\"&lt;A HREF=&quot;https://aka.ms/dev-privacy&quot;&gt;Gizlilik Bildirimi&lt;/A&gt;\" />\n  <String Id=\"EulaLink\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-license-windows&quot;&gt;.NET için Lisans Bilgileri&lt;/A&gt;\" />\n  <String Id=\"LicenseAssent\" Value=\"Yükle'ye tıklayarak aşağıdaki koşulları kabul etmiş olursunuz.\" />\n  <String Id=\"VisualStudioWarning\" Value=\"Visual Studio ile .NET [VERSIONMAJOR].[VERSIONMINOR] kullanmayı planlıyorsanız Visual Studio 2026 18.0 veya üzeri bir sürüm gerekir. &lt;A HREF=&quot;https://aka.ms/dotnet[VERSIONMAJOR]-release-notes&quot;&gt;Daha fazla bilgi edinin&lt;/A&gt;.\" />\n  <!-- Success page strings -->\n  <String Id=\"FirstTimeWelcomeMessage\" Value=\"[BUNDLEMONIKER] uygumalasını yüklediğiniz için teşekkür ederiz! Artık .NET Windows Masaüstü Çalışma Zamanı gerektiren uygulamaları çalıştırabilirsiniz.\" />\n  <String Id=\"NetDocumentationLinkText\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-docs&quot;&gt;.NET Belgeleri&lt;/A&gt;\" />\n  <String Id=\"WindowsDesktopDocumentationLinkText\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-desktop-docs&quot;&gt;Windows Masaüstü Belgeleri&lt;/A&gt;\" />\n  <String Id=\"ReleaseNotesLinkText\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet[VERSIONMAJOR]-release-notes&quot;&gt;Sürüm Notları&lt;/A&gt;\" />\n  <String Id=\"TutorialsLinkText\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-tutorials&quot;&gt;.NET Öğreticileri&lt;/A&gt;\" />\n  <!-- Additional success headers -->\n  <String Id=\"SuccessLayoutHeader\" Value=\"Düzen Başarıyla Tamamlandı\" />\n  <String Id=\"SuccessUnsafeUninstallHeader\" Value=\"Güvenli Olmayan Kaldırma İşlemi Başarıyla Tamamlandı\" />\n  <String Id=\"SuccessCacheHeader\" Value=\"Önbellek Başarıyla Tamamlandı\" />\n  <String Id=\"SuccessModifyHeader\" Value=\"Değişiklik Başarıyla Tamamlandı\" />\n  <String Id=\"SuccessUninstallRestartText\" Value=\"Kaldırma işlemini tamamlamak için bilgisayarınızı yeniden başlatmanız gerekir.\" />\n  <!-- Additional failure headers -->\n  <String Id=\"FailureLayoutHeader\" Value=\"Düzen Başarısız\" />\n  <String Id=\"FailureUnsafeUninstallHeader\" Value=\"Güvenli Olmayan Kaldırma İşlemi Başarısız\" />\n  <String Id=\"FailureCacheHeader\" Value=\"Önbellek Başarısız\" />\n  <String Id=\"FailureModifyHeader\" Value=\"Değişiklik Başarısız\" />\n</WixLocalization>"
  },
  {
    "path": "src/windowsdesktop/src/bundle/theme/2052/thm.wxl",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<WixLocalization Culture=\"zh-CN\" Language=\"2052\" xmlns=\"http://wixtoolset.org/schemas/v4/wxl\">\n  <String Id=\"Caption\" Value=\"[WixBundleName] 安装程序\" />\n  <String Id=\"Title\" Value=\"[BUNDLEMONIKER]\" />\n  <String Id=\"ConfirmCancelMessage\" Value=\"是否确实要取消?\" />\n  <String Id=\"ExecuteUpgradeRelatedBundleMessage\" Value=\"上一个版本\" />\n  <String Id=\"HelpHeader\" Value=\"安装帮助\" />\n  <String Id=\"HelpText\" Value=\"/install | /repair | /uninstall | /layout [directory] - 在目录中安装、修复、卸载或创建捆绑包的完整本地副本。Install 为默认值。  /passive | /quiet - 在无提示的情况下显示最小 UI 或不显示 UI 和提示。默认情况下，将显示 UI 和所有提示。  /norestart - 抑制任何重启尝试。默认情况下，UI 将在重启前提示。  /log log.txt - 记录到特定文件。默认在 %TEMP% 中创建日志文件。\" />\n  <String Id=\"HelpCloseButton\" Value=\"关闭(&amp;C)\" />\n  <String Id=\"InstallAcceptCheckbox\" Value=\"我同意(&amp;A)许可条款和条件\" />\n  <String Id=\"InstallOptionsButton\" Value=\"选项(&amp;O)\" />\n  <String Id=\"InstallInstallButton\" Value=\"安装(&amp;I)\" />\n  <String Id=\"InstallCloseButton\" Value=\"关闭(&amp;C)\" />\n  <String Id=\"ProgressHeader\" Value=\"安装进度\" />\n  <String Id=\"ProgressLabel\" Value=\"正在处理:\" />\n  <String Id=\"OverallProgressPackageText\" Value=\"正在初始化...\" />\n  <String Id=\"ProgressCancelButton\" Value=\"取消(&amp;C)\" />\n  <String Id=\"ModifyHeader\" Value=\"修改安装\" />\n  <String Id=\"ModifyText\" Value=\"选择“修复”以重新安装产品或选择“卸载”以将其移除。\" />\n  <String Id=\"ModifyRepairButton\" Value=\"修复(&amp;R)\" />\n  <String Id=\"ModifyUninstallButton\" Value=\"卸载(&amp;U)\" />\n  <String Id=\"ModifyCloseButton\" Value=\"关闭(&amp;C)\" />\n  <String Id=\"SuccessRepairHeader\" Value=\"已成功完成修复\" />\n  <String Id=\"SuccessUninstallHeader\" Value=\"已成功完成卸载\" />\n  <String Id=\"SuccessInstallHeader\" Value=\"已成功完成安装\" />\n  <String Id=\"SuccessHeader\" Value=\"安装成功\" />\n  <String Id=\"SuccessLaunchButton\" Value=\"启动(&amp;L)\" />\n  <String Id=\"SuccessRestartText\" Value=\"在使用此软件之前，您必须重新启动计算机。\" />\n  <String Id=\"SuccessRestartButton\" Value=\"重启(&amp;R)\" />\n  <String Id=\"SuccessCloseButton\" Value=\"关闭(&amp;C)\" />\n  <String Id=\"FailureHeader\" Value=\"安装失败\" />\n  <String Id=\"FailureInstallHeader\" Value=\"安装失败\" />\n  <String Id=\"FailureUninstallHeader\" Value=\"卸载失败\" />\n  <String Id=\"FailureRepairHeader\" Value=\"修复失败\" />\n  <String Id=\"FailureHyperlinkLogText\" Value=\"一个或多个问题导致了安装失败。请修复问题，然后重试安装。有关详细信息，请参阅&lt;a href=&quot;#&quot;&gt;日志文件&lt;/a&gt;。\" />\n  <String Id=\"FailureRestartText\" Value=\"必须重新启动计算机才能完成软件回退。\" />\n  <String Id=\"FailureRestartButton\" Value=\"重启(&amp;R)\" />\n  <String Id=\"FailureCloseButton\" Value=\"关闭(&amp;C)\" />\n  <String Id=\"FailureNotSupportedCurrentOperatingSystem\" Value=\"此操作系统不支持 [PRODUCT_NAME]。有关详细信息，请参阅[LINK_PREREQ_PAGE]。\" />\n  <String Id=\"FailureNotSupportedX86OperatingSystem\" Value=\"x86 操作系统不支持该 [PRODUCT_NAME]。请使用相应的 x86 安装程序进行安装。\" />\n  <String Id=\"FilesInUseTitle\" Value=\"文件正在使用\" />\n  <String Id=\"FilesInUseLabel\" Value=\"以下应用程序正在使用的文件需要更新:\" />\n  <String Id=\"FilesInUseCloseRadioButton\" Value=\"关闭应用程序，并尝试重启它们(&amp;A)。\" />\n  <String Id=\"FilesInUseDontCloseRadioButton\" Value=\"不关闭应用程序(&amp;D)。需要重新启动。\" />\n  <String Id=\"FilesInUseRetryButton\" Value=\"重试(&amp;R)\" />\n  <String Id=\"FilesInUseCancelButton\" Value=\"取消(&amp;C)\" />\n  <String Id=\"WelcomeHeader\" Value=\"Windows Desktop 运行时\" />\n  <String Id=\"WelcomeDescription\" Value=\".NET Windows Desktop 运行时用于在你的计算机上运行 Windows 窗体和 WPF 应用程序。.NET 是开放源代码、跨平台的，并由 Microsoft 提供支持。希望你会喜欢它!\" />\n  <String Id=\"LearnMoreTitle\" Value=\"了解有关 .NET 的详细信息\" />\n  <String Id=\"SuccessInstallLocation\" Value=\"以下项已安装到 [DOTNETHOME]\" />\n  <String Id=\"SuccessInstallProductName\" Value=\" - [BUNDLEMONIKER] \" />\n  <String Id=\"ResourcesHeader\" Value=\"资源\" />\n  <String Id=\"DocumentationLink\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-docs&quot;&gt;文档&lt;/A&gt;\" />\n  <String Id=\"ReleaseNotesLink\" Value=\"&lt;A HREF=&quot;https://aka.ms/20-p2-rel-notes&quot;&gt;发行说明&lt;/A&gt;\" />\n  <String Id=\"TutorialLink\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-tutorials&quot;&gt;教程&lt;/A&gt;\" />\n  <String Id=\"TelemetryLink\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-cli-telemetry&quot;&gt;.NET 遥测&lt;/A&gt;\" />\n  <String Id=\"PrivacyStatementLink\" Value=\"&lt;A HREF=&quot;https://aka.ms/dev-privacy&quot;&gt;隐私声明&lt;/A&gt;\" />\n  <String Id=\"EulaLink\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-license-windows&quot;&gt;.NET 的许可信息&lt;/A&gt;\" />\n  <String Id=\"LicenseAssent\" Value=\"单击“安装”即表示你同意以下条款。\" />\n  <String Id=\"VisualStudioWarning\" Value=\"如果计划将 .NET [VERSIONMAJOR].[VERSIONMINOR] 与 Visual Studio 配合使用，则需使用 Visual Studio 2026 18.0 或更高版本。&lt;A HREF=&quot;https://aka.ms/dotnet[VERSIONMAJOR]-release-notes&quot;&gt;了解详细信息&lt;/A&gt;.\" />\n  <!-- Success page strings -->\n  <String Id=\"FirstTimeWelcomeMessage\" Value=\"感谢安装 [BUNDLEMONIKER]!现在可以运行需要 .NET Windows 桌面运行时的应用程序。\" />\n  <String Id=\"NetDocumentationLinkText\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-docs&quot;&gt;.NET 文档&lt;/A&gt;\" />\n  <String Id=\"WindowsDesktopDocumentationLinkText\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-desktop-docs&quot;&gt;Windows 桌面文档&lt;/A&gt;\" />\n  <String Id=\"ReleaseNotesLinkText\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet[VERSIONMAJOR]-release-notes&quot;&gt;发行说明&lt;/A&gt;\" />\n  <String Id=\"TutorialsLinkText\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-tutorials&quot;&gt;.NET 教程&lt;/A&gt;\" />\n  <!-- Additional success headers -->\n  <String Id=\"SuccessLayoutHeader\" Value=\"已成功完成布局\" />\n  <String Id=\"SuccessUnsafeUninstallHeader\" Value=\"已成功完成不安全卸载\" />\n  <String Id=\"SuccessCacheHeader\" Value=\"已成功完成缓存\" />\n  <String Id=\"SuccessModifyHeader\" Value=\"已成功完成迁移\" />\n  <String Id=\"SuccessUninstallRestartText\" Value=\"必须重启计算机才能完成卸载。\" />\n  <!-- Additional failure headers -->\n  <String Id=\"FailureLayoutHeader\" Value=\"布局失败\" />\n  <String Id=\"FailureUnsafeUninstallHeader\" Value=\"不安全卸载失败\" />\n  <String Id=\"FailureCacheHeader\" Value=\"缓存失败\" />\n  <String Id=\"FailureModifyHeader\" Value=\"修改失败\" />\n</WixLocalization>"
  },
  {
    "path": "src/windowsdesktop/src/bundle/theme/3082/thm.wxl",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<WixLocalization Culture=\"es-ES\" Language=\"3082\" xmlns=\"http://wixtoolset.org/schemas/v4/wxl\">\n  <String Id=\"Caption\" Value=\"Instalador de [WixBundleName]\" />\n  <String Id=\"Title\" Value=\"[BUNDLEMONIKER]\" />\n  <String Id=\"ConfirmCancelMessage\" Value=\"¿Está seguro de que desea cancelar?\" />\n  <String Id=\"ExecuteUpgradeRelatedBundleMessage\" Value=\"Versión anterior\" />\n  <String Id=\"HelpHeader\" Value=\"Ayuda del programa de configuración\" />\n  <String Id=\"HelpText\" Value=\"/install | /repair | /uninstall | /layout [directory]: instala, repara, desinstala o crea una copia local completa del conjunto en el directorio. Instalar es el valor predeterminado.  /passive | /quiet: muestra una interfaz de usuario mínima sin indicaciones o no muestra ninguna interfaz de usuario ni ninguna indicación. De manera predeterminada, se muestran la interfaz de usuario y todas las indicaciones.  /norestart: suprime los intentos de reinicio. De manera predeterminada, la interfaz de usuario le avisará antes del reinicio.  /log log.txt: registra en un archivo específico. De manera predeterminada, se crea un archivo de registro en %TEMP%.\" />\n  <String Id=\"HelpCloseButton\" Value=\"&amp;Cerrar\" />\n  <String Id=\"InstallAcceptCheckbox\" Value=\"&amp;Acepto los términos y las condiciones de la licencia\" />\n  <String Id=\"InstallOptionsButton\" Value=\"&amp;Opciones\" />\n  <String Id=\"InstallInstallButton\" Value=\"&amp;Instalar\" />\n  <String Id=\"InstallCloseButton\" Value=\"&amp;Cerrar\" />\n  <String Id=\"ProgressHeader\" Value=\"Progreso de la instalación\" />\n  <String Id=\"ProgressLabel\" Value=\"Procesando:\" />\n  <String Id=\"OverallProgressPackageText\" Value=\"Inicializando...\" />\n  <String Id=\"ProgressCancelButton\" Value=\"&amp;Cancelar\" />\n  <String Id=\"ModifyHeader\" Value=\"Modificar configuración\" />\n  <String Id=\"ModifyText\" Value=\"Seleccione Reparar para reinstalar el producto o Desinstalar para quitarlo.\" />\n  <String Id=\"ModifyRepairButton\" Value=\"&amp;Reparar\" />\n  <String Id=\"ModifyUninstallButton\" Value=\"&amp;Desinstalar\" />\n  <String Id=\"ModifyCloseButton\" Value=\"&amp;Cerrar\" />\n  <String Id=\"SuccessRepairHeader\" Value=\"La reparación se completó correctamente\" />\n  <String Id=\"SuccessUninstallHeader\" Value=\"La desinstalación se completó correctamente\" />\n  <String Id=\"SuccessInstallHeader\" Value=\"La instalación se completó correctamente\" />\n  <String Id=\"SuccessHeader\" Value=\"La configuración se realizó correctamente\" />\n  <String Id=\"SuccessLaunchButton\" Value=\"&amp;Iniciar\" />\n  <String Id=\"SuccessRestartText\" Value=\"Debe reiniciar el equipo para poder usar el software.\" />\n  <String Id=\"SuccessRestartButton\" Value=\"&amp;Reiniciar\" />\n  <String Id=\"SuccessCloseButton\" Value=\"&amp;Cerrar\" />\n  <String Id=\"FailureHeader\" Value=\"No se pudo configurar\" />\n  <String Id=\"FailureInstallHeader\" Value=\"No se pudo configurar\" />\n  <String Id=\"FailureUninstallHeader\" Value=\"No se pudo desinstalar\" />\n  <String Id=\"FailureRepairHeader\" Value=\"No se pudo reparar\" />\n  <String Id=\"FailureHyperlinkLogText\" Value=\"Ha habido algún problema que ha provocado un error en la configuración. Corrija los problemas y vuelva a intentar la instalación. Para más información, consulte el &lt;a href=&quot;#&quot;&gt;archivo de registro&lt;/a&gt;.\" />\n  <String Id=\"FailureRestartText\" Value=\"Debe reiniciar el equipo para completar la reversión del software.\" />\n  <String Id=\"FailureRestartButton\" Value=\"&amp;Reiniciar\" />\n  <String Id=\"FailureCloseButton\" Value=\"&amp;Cerrar\" />\n  <String Id=\"FailureNotSupportedCurrentOperatingSystem\" Value=\"[PRODUCT_NAME] no se admite en este sistema operativo. Para obtener más información, consulte [LINK_PREREQ_PAGE].\" />\n  <String Id=\"FailureNotSupportedX86OperatingSystem\" Value=\"[PRODUCT_NAME] no es compatible con los sistemas operativos x86. Instálelo con el instalador x86 correspondiente.\" />\n  <String Id=\"FilesInUseTitle\" Value=\"Archivos en uso\" />\n  <String Id=\"FilesInUseLabel\" Value=\"Las siguientes aplicaciones usan archivos que se deben actualizar:\" />\n  <String Id=\"FilesInUseCloseRadioButton\" Value=\"Cierre las &amp;aplicaciones e intente reiniciarlas.\" />\n  <String Id=\"FilesInUseDontCloseRadioButton\" Value=\"&amp;No cerrar aplicaciones. Será necesario un reinicio.\" />\n  <String Id=\"FilesInUseRetryButton\" Value=\"&amp;Reintentar\" />\n  <String Id=\"FilesInUseCancelButton\" Value=\"&amp;Cancelar\" />\n  <String Id=\"WelcomeHeader\" Value=\"Entorno de ejecución de escritorio de Windows\" />\n  <String Id=\"WelcomeDescription\" Value=\".NET Windows Desktop Runtime se usa para ejecutar aplicaciones de Windows Forms y WPF en el equipo. Microsoft admite .NET, un código abierto multiplataforma. Esperamos que lo disfrute.\" />\n  <String Id=\"LearnMoreTitle\" Value=\"Más información sobre .NET\" />\n  <String Id=\"SuccessInstallLocation\" Value=\"Lo siguiente se instaló en [DOTNETHOME]\" />\n  <String Id=\"SuccessInstallProductName\" Value=\" - [BUNDLEMONIKER] \" />\n  <String Id=\"ResourcesHeader\" Value=\"Recursos\" />\n  <String Id=\"DocumentationLink\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-docs&quot;&gt;Documentación&lt;/A&gt;\" />\n  <String Id=\"ReleaseNotesLink\" Value=\"&lt;A HREF=&quot;https://aka.ms/20-p2-rel-notes&quot;&gt;Notas de la versión&lt;/A&gt;\" />\n  <String Id=\"TutorialLink\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-tutorials&quot;&gt;Tutoriales&lt;/A&gt;\" />\n  <String Id=\"TelemetryLink\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-cli-telemetry&quot;&gt;Telemetría de .NET&lt;/A&gt;\" />\n  <String Id=\"PrivacyStatementLink\" Value=\"&lt;A HREF=&quot;https://aka.ms/dev-privacy&quot;&gt;Declaración de privacidad&lt;/A&gt;\" />\n  <String Id=\"EulaLink\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-license-windows&quot;&gt;Información de licencias para .NET&lt;/A&gt;\" />\n  <String Id=\"LicenseAssent\" Value=\"Al hacer clic en Instalar, acepta los términos siguientes.\" />\n  <String Id=\"VisualStudioWarning\" Value=\"Si tiene previsto usar .NET [VERSIONMAJOR]. [VERSIONMINOR] con Visual Studio, se requiere Visual Studio 2026 18.0 o posterior. &lt;A HREF=&quot;https://aka.ms/dotnet[VERSIONMAJOR]-release-notes&quot;&gt;Más información&lt;/A&gt;.\" />\n  <!-- Success page strings -->\n  <String Id=\"FirstTimeWelcomeMessage\" Value=\"Gracias por instalar [BUNDLEMONIKER]. Ahora puede ejecutar aplicaciones que requieran el entorno de ejecución de escritorio de Windows de .NET.\" />\n  <String Id=\"NetDocumentationLinkText\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-docs&quot;&gt;Documentación de .NET&lt;/A&gt;\" />\n  <String Id=\"WindowsDesktopDocumentationLinkText\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-desktop-docs&quot;&gt;Documentación de escritorio de Windows&lt;/A&gt;\" />\n  <String Id=\"ReleaseNotesLinkText\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet[VERSIONMAJOR]-release-notes&quot;&gt;Notas de la versión&lt;/A&gt;\" />\n  <String Id=\"TutorialsLinkText\" Value=\"&lt;A HREF=&quot;https://aka.ms/dotnet-tutorials&quot;&gt;Tutoriales de .NET&lt;/A&gt;\" />\n  <!-- Additional success headers -->\n  <String Id=\"SuccessLayoutHeader\" Value=\"El diseño se completó correctamente\" />\n  <String Id=\"SuccessUnsafeUninstallHeader\" Value=\"La desinstalación no segura se completó correctamente\" />\n  <String Id=\"SuccessCacheHeader\" Value=\"El almacenamiento en caché se completó correctamente\" />\n  <String Id=\"SuccessModifyHeader\" Value=\"La modificación se completó correctamente\" />\n  <String Id=\"SuccessUninstallRestartText\" Value=\"Debe reiniciar el equipo para completar la desinstalación.\" />\n  <!-- Additional failure headers -->\n  <String Id=\"FailureLayoutHeader\" Value=\"Error de diseño\" />\n  <String Id=\"FailureUnsafeUninstallHeader\" Value=\"Se produjo un error en la desinstalación no segura\" />\n  <String Id=\"FailureCacheHeader\" Value=\"No se pudo almacenar en caché\" />\n  <String Id=\"FailureModifyHeader\" Value=\"Error de modificación\" />\n</WixLocalization>"
  },
  {
    "path": "src/windowsdesktop/src/sfx/Directory.Build.props",
    "content": "<Project>\n\n  <!-- Don't use MSBuildProjectName for the output paths to reduce path lengths. -->\n  <PropertyGroup>\n    <OutDirName Condition=\"'$(MSBuildProjectName)' == 'Microsoft.WindowsDesktop.App.Ref'\">windowsdesktop-ref</OutDirName>\n    <OutDirName Condition=\"'$(MSBuildProjectName)' == 'Microsoft.WindowsDesktop.App.Runtime'\">windowsdesktop-runtime</OutDirName>\n  </PropertyGroup>\n\n  <Import Project=\"$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory).., Directory.Build.props))\\Directory.Build.props\" />\n\n  <PropertyGroup>\n    <!--\n      Disable FileVersion check for WindowsDesktop. Files with no FileVersion, as of writing:\n\n      runtimes\\win-x86\\native\\PenImc_cor3.dll\n      runtimes\\win-x86\\native\\PresentationNative_cor3.dll\n      runtimes\\win-x86\\native\\wpfgfx_cor3.dll\n      runtimes\\win-x86\\lib\\netcoreapp3.0\\DirectWriteForwarder.dll\n      runtimes\\win-x86\\lib\\netcoreapp3.0\\System.Printing.dll\n    -->\n    <PermitDllAndExeFilesLackingFileVersion>true</PermitDllAndExeFilesLackingFileVersion>\n    <DisableImplicitFrameworkReferences>false</DisableImplicitFrameworkReferences>\n  </PropertyGroup>\n\n  <PropertyGroup>\n    <SharedFrameworkName>Microsoft.WindowsDesktop.App</SharedFrameworkName>\n    <SharedFrameworkFriendlyName>Windows Desktop</SharedFrameworkFriendlyName>\n    <RuntimeFrameworkVersion>$(MicrosoftNETCoreAppRefVersion)</RuntimeFrameworkVersion>\n    <GenerateInstallers>true</GenerateInstallers>\n    <GenerateVSInsertionPackages>true</GenerateVSInsertionPackages>\n  </PropertyGroup>\n  \n</Project>\n"
  },
  {
    "path": "src/windowsdesktop/src/sfx/Directory.Build.targets",
    "content": "<Project>\n\n  <Import Project=\"$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory).., Directory.Build.targets))\\Directory.Build.targets\" />\n\n  <!-- Update to use the referenced Microsoft.NetCore.App from runtime. This uses the Arcade TargetingPacks support. -->\n  <PropertyGroup>\n    <KnownFrameworkReferenceMicrosoftNETCoreAppCurrentDefaultRuntimeFrameworkVersion>$(MicrosoftNETCoreAppRefVersion)</KnownFrameworkReferenceMicrosoftNETCoreAppCurrentDefaultRuntimeFrameworkVersion>\n    <KnownFrameworkReferenceMicrosoftNETCoreAppCurrentLatestRuntimeFrameworkVersion>$(MicrosoftNETCoreAppRefVersion)</KnownFrameworkReferenceMicrosoftNETCoreAppCurrentLatestRuntimeFrameworkVersion>\n    <KnownFrameworkReferenceMicrosoftNETCoreAppCurrentTargetingPackVersion>$(MicrosoftNETCoreAppRefVersion)</KnownFrameworkReferenceMicrosoftNETCoreAppCurrentTargetingPackVersion>\n    <KnownCrossgen2PackCurrentVersion>$(MicrosoftNETCoreAppRefVersion)</KnownCrossgen2PackCurrentVersion>\n  </PropertyGroup>\n\n  <ItemGroup>\n    <KnownFrameworkReference Remove=\"Microsoft.AspNetCore.App\" />\n    <KnownFrameworkReference Remove=\"Microsoft.WindowsDesktop.App\" />\n    <KnownFrameworkReference Remove=\"Microsoft.WindowsDesktop.App.WindowsForms\" />\n    <KnownFrameworkReference Remove=\"Microsoft.WindowsDesktop.App.WPF\" />\n  </ItemGroup>\n\n  <!-- Redistribute package content from other nuget packages. -->\n  <ItemGroup>\n    <PackageReference Include=\"Microsoft.DotNet.Wpf.GitHub\" />\n    <PackageReference Include=\"Microsoft.Private.Winforms\" GeneratePathProperty=\"true\" />\n    <PackageReference Include=\"Microsoft.Internal.Runtime.WindowsDesktop.Transport\" />\n  </ItemGroup>\n\n  <!-- Profile is intentionally undefined so that the reference will only be included when no profile is specified i.e. both WPF and WindowsForms are in use https://github.com/dotnet/wpf/blob/bbfc24fd13804a191e20064acd599b0a359092df/packaging/Microsoft.NET.Sdk.WindowsDesktop/targets/Microsoft.NET.Sdk.WindowsDesktop.props#L45-L46 -->\n  <ItemGroup>\n    <FrameworkListFileClass Include=\"WindowsFormsIntegration.dll\" />\n  </ItemGroup>\n\n  <!-- References that are common to both WinForms and WPF -->\n  <ItemGroup>\n    <FrameworkListFileClass Include=\"Accessibility.dll\" Profile=\"WindowsForms;WPF\" />\n    <FrameworkListFileClass Include=\"Microsoft.Win32.Registry.AccessControl.dll\" Profile=\"WindowsForms;WPF\" />\n    <FrameworkListFileClass Include=\"Microsoft.Win32.SystemEvents.dll\" Profile=\"WindowsForms;WPF\" />\n    <FrameworkListFileClass Include=\"System.CodeDom.dll\" Profile=\"WindowsForms;WPF\" />\n    <FrameworkListFileClass Include=\"System.Configuration.ConfigurationManager.dll\" Profile=\"WindowsForms;WPF\" />\n    <FrameworkListFileClass Include=\"System.Diagnostics.EventLog.dll\" Profile=\"WindowsForms;WPF\" />\n    <FrameworkListFileClass Include=\"System.Diagnostics.PerformanceCounter.dll\" Profile=\"WindowsForms;WPF\" />\n    <FrameworkListFileClass Include=\"System.DirectoryServices.dll\" Profile=\"WindowsForms;WPF\" />\n    <FrameworkListFileClass Include=\"System.Formats.Nrbf.dll\" Profile=\"WindowsForms;WPF\" />\n    <FrameworkListFileClass Include=\"System.IO.Packaging.dll\" Profile=\"WindowsForms;WPF\" />\n    <FrameworkListFileClass Include=\"System.Resources.Extensions.dll\" Profile=\"WindowsForms;WPF\" />\n    <FrameworkListFileClass Include=\"System.Security.Cryptography.Pkcs.dll\" Profile=\"WindowsForms;WPF\" />\n    <FrameworkListFileClass Include=\"System.Security.Cryptography.ProtectedData.dll\" Profile=\"WindowsForms;WPF\" />\n    <FrameworkListFileClass Include=\"System.Security.Cryptography.Xml.dll\" Profile=\"WindowsForms;WPF\" />\n    <FrameworkListFileClass Include=\"System.Security.Permissions.dll\" Profile=\"WindowsForms;WPF\" />\n    <FrameworkListFileClass Include=\"System.Windows.Extensions.dll\" Profile=\"WindowsForms;WPF\" />\n  </ItemGroup>\n\n  <!--\n    Windows Forms specific references\n    see: https://github.com/dotnet/winforms/tree/main/pkg/Microsoft.Private.Winforms/sdk/dotnet-windowsdesktop\n    -->\n  <Import Project=\"$(PkgMicrosoft_Private_Winforms)\\sdk\\dotnet-windowsdesktop\\System.Windows.Forms.FileClassification.props\"\n          Condition=\"Exists('$(PkgMicrosoft_Private_Winforms)')\" />\n\n  <!-- WPF specific references -->\n  <ItemGroup>\n    <FrameworkListFileClass Include=\"PresentationCore.dll\" Profile=\"WPF\" />\n    <FrameworkListFileClass Include=\"PresentationFramework.Aero.dll\" Profile=\"WPF\" />\n    <FrameworkListFileClass Include=\"PresentationFramework.Aero2.dll\" Profile=\"WPF\" />\n    <FrameworkListFileClass Include=\"PresentationFramework.AeroLite.dll\" Profile=\"WPF\" />\n    <FrameworkListFileClass Include=\"PresentationFramework.Classic.dll\" Profile=\"WPF\" />\n    <FrameworkListFileClass Include=\"PresentationFramework.dll\" Profile=\"WPF\" />\n    <FrameworkListFileClass Include=\"PresentationFramework.Luna.dll\" Profile=\"WPF\" />\n    <FrameworkListFileClass Include=\"PresentationFramework.Royale.dll\" Profile=\"WPF\" />\n    <FrameworkListFileClass Include=\"PresentationUI.dll\" Profile=\"WPF\" />\n    <FrameworkListFileClass Include=\"ReachFramework.dll\" Profile=\"WPF\" />\n    <FrameworkListFileClass Include=\"System.Printing.dll\" Profile=\"WPF\" />\n    <FrameworkListFileClass Include=\"System.Windows.Controls.Ribbon.dll\" Profile=\"WPF\" />\n    <FrameworkListFileClass Include=\"System.Windows.Input.Manipulations.dll\" Profile=\"WPF\" />\n    <FrameworkListFileClass Include=\"System.Windows.Presentation.dll\" Profile=\"WPF\" />\n    <FrameworkListFileClass Include=\"System.Windows.Primitives.dll\" Profile=\"WPF\" />\n    <FrameworkListFileClass Include=\"System.Xaml.dll\" Profile=\"WPF\" />\n    <FrameworkListFileClass Include=\"UIAutomationClient.dll\" Profile=\"WPF\" />\n    <FrameworkListFileClass Include=\"UIAutomationClientSideProviders.dll\" Profile=\"WPF\" />\n    <FrameworkListFileClass Include=\"UIAutomationProvider.dll\" Profile=\"WPF\" />\n    <FrameworkListFileClass Include=\"UIAutomationTypes.dll\" Profile=\"WPF\" />\n    <FrameworkListFileClass Include=\"WindowsBase.dll\" Profile=\"WPF\" />\n  </ItemGroup>\n\n  <ItemGroup>\n    <PackageReference Include=\"Microsoft.DotNet.Build.Tasks.Templating\" />\n    <PackageReference Include=\"Microsoft.DotNet.Build.Tasks.Archives\" />\n  </ItemGroup>\n\n  <ItemGroup>\n    <ExcludeFromDuplicateTypes Include=\"PresentationFramework.Aero\" />\n    <ExcludeFromDuplicateTypes Include=\"PresentationFramework.Aero2\" />\n    <ExcludeFromDuplicateTypes Include=\"PresentationFramework.AeroLite\" />\n    <ExcludeFromDuplicateTypes Include=\"PresentationFramework.Classic\" />\n    <ExcludeFromDuplicateTypes Include=\"PresentationFramework.Luna\" />\n    <ExcludeFromDuplicateTypes Include=\"PresentationFramework.Royale\" />\n  </ItemGroup>\n  \n  <ItemGroup>\n    <!-- There is a known cycle. More info at https://github.com/dotnet/wpf/issues/607 -->\n    <IgnoredReference Include=\"PresentationFramework\" />\n    <IgnoredReference Include=\"ReachFramework\" />\n    <IgnoredReference Include=\"System.Printing\" />\n    \n    <!-- C++/CLI tooling adds an assemblyref to System.Runtime.InteropServices.WindowsRuntime even though it is unused.\n        Ignore validating this reference when we validate the runtime and ref pack closures since we never use the assembly\n        and it was removed in .NET 5.\n    -->\n    <IgnoredReference Include=\"System.Runtime.InteropServices.WindowsRuntime\" />\n  </ItemGroup>\n\n  <Target Name=\"ReturnProductVersion\" Returns=\"$(Version)\" />\n\n  <Target Name=\"CreatePackageOverrides\">\n    <PropertyGroup>\n      <PackageOverridesInputPath>$(MSBuildThisFileDirectory)PackageOverrides.txt</PackageOverridesInputPath>\n      <PackageOverridesOutputPath>$(BaseOutputPath)PackageOverrides.txt</PackageOverridesOutputPath>\n\n      <!-- Add the RuntimeWindowsDesktopPackageLibrary item information from the Microsoft.Internal.Runtime.WindowsDesktop.Transport package. -->\n      <RuntimeWindowsDesktopPackageLibraries>@(RuntimeWindowsDesktopPackageLibrary->'%(PackageId)|%(PackageVersion)', '\n')</RuntimeWindowsDesktopPackageLibraries>\n      <WinformsWindowsDesktopPackageLibraries>@(WinformsWindowsDesktopPackageLibrary->'%(PackageId)|%(PackageVersion)', '\n')</WinformsWindowsDesktopPackageLibraries>\n    </PropertyGroup>\n\n    <!-- Every file we add to package overrides must be exposed for FrameworkListFileClass Profile=\"WindowsForms;WPF\"\n         Emit an error if any are not. -->\n    <ItemGroup>\n      <_allProfileFiles Include=\"%(FrameworkListFileClass.FileName)\" Condition=\"'%(FrameworkListFileClass.Profile)' == 'WindowsForms;WPF'\" />\n      <_packageOverrideErrors Include=\"@(RuntimeWindowsDesktopPackageLibrary->'%(PackageId)');@(WinformsWindowsDesktopPackageLibrary->'%(PackageId)')\"\n                              Exclude=\"@(_allProfileFiles)\"/>\n    </ItemGroup>\n\n    <Error Text=\"Package override(s) '@(_packageOverrideErrors)' must be exposed for Profile='WindowsForms;WPF'.  Please update their FrameworkListFileClass item(s).\" \n           Condition=\"'@(_packageOverrideErrors)' != ''\" />\n\n    <ItemGroup>\n      <CreatePackageOverridesTemplateProperty Include=\"RuntimeWindowsDesktopPackageLibraries=$(RuntimeWindowsDesktopPackageLibraries)\" />\n      <CreatePackageOverridesTemplateProperty Include=\"WinformsWindowsDesktopPackageLibraries=$(WinformsWindowsDesktopPackageLibraries)\" />\n    </ItemGroup>\n\n    <GenerateFileFromTemplate\n      TemplateFile=\"$(PackageOverridesInputPath)\"\n      Properties=\"@(CreatePackageOverridesTemplateProperty)\"\n      OutputPath=\"$(PackageOverridesOutputPath)\" />\n\n    <ItemGroup>\n      <PackageOverridesFile Include=\"$(PackageOverridesOutputPath)\" />\n    </ItemGroup>\n  </Target>\n\n</Project>\n"
  },
  {
    "path": "src/windowsdesktop/src/sfx/Microsoft.WindowsDesktop.App.Ref.sfxproj",
    "content": "<Project Sdk=\"Microsoft.NET.Sdk\">\n\n  <Sdk Name=\"Microsoft.DotNet.SharedFramework.Sdk\" />\n\n  <PropertyGroup>\n    <PlatformPackageType>TargetingPack</PlatformPackageType>\n    <RuntimePackProjectPath>$(MSBuildThisFileDirectory)Microsoft.WindowsDesktop.App.Runtime.sfxproj</RuntimePackProjectPath>\n    <ArchiveName>windowsdesktop-targeting-pack</ArchiveName>\n    <InstallerName>windowsdesktop-targeting-pack</InstallerName>\n    <InstallerRuntimeIdentifiers>win-x64;win-x86;win-arm64</InstallerRuntimeIdentifiers>\n    <VSInsertionShortComponentName>WindowsDesktop.TargetingPack</VSInsertionShortComponentName>\n    <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>\n    <PackageReadmeFile>PACKAGE.md</PackageReadmeFile>\n  </PropertyGroup>\n\n  <ItemGroup>\n    <None Include=\"PACKAGE.md\" Pack=\"true\" PackagePath=\"\"/>\n  </ItemGroup>\n\n  <ItemGroup>\n    <!-- We don't have a ref assembly for DirectWriteForwarder -->\n    <IgnoredReference Include=\"DirectWriteForwarder\" />\n  </ItemGroup>\n\n  <!-- Windows Forms validation and packaging -->\n  <Import Project=\"WindowsForms.Packaging.targets\" />\n\n</Project>\n"
  },
  {
    "path": "src/windowsdesktop/src/sfx/Microsoft.WindowsDesktop.App.Runtime.sfxproj",
    "content": "<Project Sdk=\"Microsoft.NET.Sdk\">\n  <Sdk Name=\"Microsoft.DotNet.SharedFramework.Sdk\" />\n\n  <PropertyGroup>\n    <PlatformPackageType>RuntimePack</PlatformPackageType>\n    <ArchiveName>windowsdesktop-runtime</ArchiveName>\n    <InstallerName>windowsdesktop-runtime</InstallerName>\n    <VSInsertionShortComponentName>WindowsDesktop.SharedFramework</VSInsertionShortComponentName>\n    <RollForward>LatestPatch</RollForward>\n  </PropertyGroup>\n\n  <!-- Profile is intentionally undefined so that the reference will only be included when no profile is specified i.e. both WPF and WindowsForms are in use https://github.com/dotnet/wpf/blob/bbfc24fd13804a191e20064acd599b0a359092df/packaging/Microsoft.NET.Sdk.WindowsDesktop/targets/Microsoft.NET.Sdk.WindowsDesktop.props#L45-L46 -->\n  <ItemGroup>\n    <FrameworkListFileClass Include=\"WindowsFormsIntegration.resources.dll\" />\n  </ItemGroup>\n\n  <!-- Runtime only files that are common to both WinForms and WPF -->\n  <ItemGroup>\n    <FrameworkListFileClass Include=\"System.Diagnostics.EventLog.Messages.dll\" Profile=\"WindowsForms;WPF\" />\n  </ItemGroup>\n\n  <!-- WPF specific runtime-only files -->\n  <ItemGroup>\n    <FrameworkListFileClass Condition=\"'$(PlatformTarget)' != 'ARM64'\" Include=\"D3DCompiler_47_cor3.dll\" Profile=\"WPF\" />\n    <FrameworkListFileClass Include=\"DirectWriteForwarder.dll\" Profile=\"WPF\" />\n    <FrameworkListFileClass Include=\"PenImc_cor3.dll\" Profile=\"WPF\" />\n    <FrameworkListFileClass Include=\"PresentationCore.resources.dll\" Profile=\"WPF\" />\n    <FrameworkListFileClass Include=\"PresentationFramework.Fluent.dll\" Profile=\"WPF\" />\n    <FrameworkListFileClass Include=\"PresentationFramework.resources.dll\" Profile=\"WPF\" />\n    <FrameworkListFileClass Include=\"PresentationUI.resources.dll\" Profile=\"WPF\" />\n    <FrameworkListFileClass Include=\"PresentationFramework-SystemCore.dll\" Profile=\"WPF\" />\n    <FrameworkListFileClass Include=\"PresentationFramework-SystemData.dll\" Profile=\"WPF\" />\n    <FrameworkListFileClass Include=\"PresentationFramework-SystemDrawing.dll\" Profile=\"WPF\" />\n    <FrameworkListFileClass Include=\"PresentationFramework-SystemXml.dll\" Profile=\"WPF\" />\n    <FrameworkListFileClass Include=\"PresentationFramework-SystemXmlLinq.dll\" Profile=\"WPF\" />\n    <FrameworkListFileClass Include=\"PresentationNative_cor3.dll\" Profile=\"WPF\" />\n    <FrameworkListFileClass Include=\"ReachFramework.resources.dll\" Profile=\"WPF\" />\n    <FrameworkListFileClass Include=\"System.Windows.Controls.Ribbon.resources.dll\" Profile=\"WPF\" />\n    <FrameworkListFileClass Include=\"System.Windows.Input.Manipulations.resources.dll\" Profile=\"WPF\" />\n    <FrameworkListFileClass Include=\"System.Xaml.resources.dll\" Profile=\"WPF\" />\n    <FrameworkListFileClass Include=\"UIAutomationClient.resources.dll\" Profile=\"WPF\" />\n    <FrameworkListFileClass Include=\"UIAutomationClientSideProviders.resources.dll\" Profile=\"WPF\" />\n    <FrameworkListFileClass Include=\"UIAutomationProvider.resources.dll\" Profile=\"WPF\" />\n    <FrameworkListFileClass Include=\"UIAutomationTypes.resources.dll\" Profile=\"WPF\" />\n    <FrameworkListFileClass Include=\"vcruntime140_cor3.dll\" Profile=\"WPF\" />\n    <FrameworkListFileClass Include=\"WindowsBase.resources.dll\" Profile=\"WPF\" />\n    <FrameworkListFileClass Include=\"wpfgfx_cor3.dll\" Profile=\"WPF\" />\n  </ItemGroup>\n</Project>\n"
  },
  {
    "path": "src/windowsdesktop/src/sfx/PACKAGE.md",
    "content": "## About\n\nMicrosoft.WindowsDesktop.App.Ref is a packaging of the Windows Desktop runtimes of Windows Forms (WinForms) and Windows Presentation Foundation (WPF).\n\n## How to Use\n\nWhen developing a WinForms or WPF application, you do not need to install the Microsoft.WindowsDesktop.App.Ref package separately. This package is automatically included as part of the .NET SDK for WinForms and WPF apps, which means you can start using WinForms or WPF namespaces right away in your WinForms or WPF projects.\n\n## Addtional Documentation\n\n- [System.Windows.Forms namespace](https://learn.microsoft.com/dotnet/api/system.windows.forms)\n- [System.Windows namespace](https://learn.microsoft.com/dotnet/api/system.windows)\n\n\n## Feedback & Contributing\n\nWinForms and WPF is released as open source under the [MIT license](https://licenses.nuget.org/MIT). Bug reports and contributions are welcomed at the [WinForms GitHub repository](https://github.com/dotnet/winforms) and the [WPF GitHub repository](https://github.com/dotnet/wpf)."
  },
  {
    "path": "src/windowsdesktop/src/sfx/PackageOverrides.txt",
    "content": "${RuntimeWindowsDesktopPackageLibraries}\n${WinformsWindowsDesktopPackageLibraries}"
  },
  {
    "path": "src/windowsdesktop/src/sfx/WindowsForms.Packaging.targets",
    "content": "<!--\n    This props file comes from dotnet/winforms. It gets ingested by dotnet/windowsdesktop and processed by\n    pkg\\windowsdesktop\\sfx\\Microsoft.WindowsDesktop.App.Ref.sfxproj.\n   -->\n\n<Project>\n\n  <PropertyGroup>\n    <_WindowsFormsNuGetPath>$(PkgMicrosoft_Private_Winforms)</_WindowsFormsNuGetPath>\n  </PropertyGroup>\n\n  <!--\n    ============================================================\n                      _ValidateWindowsFormsPackagingContent\n    Validates the content of Microsoft.Private.Winforms NuGet package\n    to ensure we correctly import and reference props and targets.\n    ============================================================\n   -->\n  <Target Name=\"_ValidateWindowsFormsPackagingContent\"\n          BeforeTargets=\"PrepareForBuild\">\n\n    <PropertyGroup>\n      <_WindowsFormsRequiredFileName>System.Windows.Forms.FileClassification.props</_WindowsFormsRequiredFileName>\n    </PropertyGroup>\n\n    <Error Text=\"Unable to resolve path to Microsoft.Private.Winforms NuGet package. Is %24(PkgMicrosoft_Private_Winforms) defined?\"\n           Condition=\"'$(_WindowsFormsNuGetPath)' == ''\"/>\n\n    <ItemGroup>\n      <!-- Enumerate all transported files -->\n      <_WindowsFormsContent Include=\"$(_WindowsFormsNuGetPath)/sdk/analyzers/**/*.*\" />\n      <_WindowsFormsContent Include=\"$(_WindowsFormsNuGetPath)/sdk/dotnet-windowsdesktop/*\" />\n\n      <!-- ...and verify System.Windows.Forms.FileClassification.props is present -->\n      <_WindowsFormsContentFiles Include=\"@(_WindowsFormsContent->'%(FileName)%(Extension)')\"\n          Condition=\" '%(FileName)%(Extension)' == '$(_WindowsFormsRequiredFileName)' \"/>\n      <!-- ...and analyzers are present too -->\n      <_WindowsFormsContentFiles Include=\"@(_WindowsFormsContent->'%(FileName)%(Extension)')\"\n          Condition=\"$([System.String]::Copy('%(Filename)').Contains('Analyzer', StringComparison.OrdinalIgnoreCase)) \"/>\n          <!--  -->\n    </ItemGroup>\n\n    <!-- Fail if the required files are missing -->\n    <Error Text=\"Microsoft.Private.Winforms NuGet package does not contain $(_WindowsFormsRequiredFileName) or analyzers\"\n           Condition=\"@(_WindowsFormsContentFiles->Count()) &lt; 2\"/>\n  </Target>\n\n\n  <!--\n    ============================================================\n                      _IdentifyWindowsFormsPackageAssets\n    Add props/targets shipped by Windows Forms to the collection of files that get packaged\n    in to Microsoft.NET.Sdk.WindowsDesktop.<configuration>.<version>.nupkg.\n    ============================================================\n  -->\n  <Target Name=\"_IdentifyWindowsFormsPackageAssets\"\n          BeforeTargets=\"_GenerateFrameworkList\"\n          DependsOnTargets=\"_ValidateWindowsFormsPackagingContent\">\n\n    <!-- Package our analyzer into the Windows Desktop shipping bundles -->\n    <ItemGroup>\n      <WindowsFormsAnalyzers Include=\"$(PkgMicrosoft_Private_Winforms)/sdk/analyzers/**/*.*\" />\n      <FilesToPackage Include=\"@(WindowsFormsAnalyzers)\" ExcludeFromValidation=\"true\" TargetPath=\"analyzers/%(RecursiveDir)\" />\n    </ItemGroup>\n  </Target>\n\n\n</Project>\n"
  },
  {
    "path": "src/windowsdesktop/tests/Directory.Build.targets",
    "content": "<Project>\n\n  <Import Project=\"$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory).., Directory.Build.targets))\\Directory.Build.targets\" />\n\n  <Target Name=\"SetupTestContextVariables\"\n          BeforeTargets=\"Build\">\n    <PropertyGroup>\n      <TestRestorePackagesPath>$(ArtifactsObjDir)TestPackageCache\\</TestRestorePackagesPath>\n    </PropertyGroup>\n\n    <!--\n      Fetch the package version of Microsoft.WindowsDesktop.App. Use the runtime nupkg project\n      because it always ships.\n\n      Some test projects end in \".Tests\", which Arcade detects and applies IsShipping=false. This\n      makes ProductVersion non-stable, so we can't rely on the test project's ProductVersion to be\n      the same as the package's version. Fetch this directly from the project to avoid guesswork.\n    -->\n    <MSBuild\n      Projects=\"$(MSBuildThisFileDirectory)..\\src\\sfx\\Microsoft.WindowsDesktop.App.Runtime.sfxproj\"\n      Targets=\"ReturnProductVersion\">\n      <Output TaskParameter=\"TargetOutputs\" PropertyName=\"WindowsDesktopRuntimeVersion\" />\n    </MSBuild>\n\n    <!--\n      Set up properties used inside tests. Write them to a text file so that they can be found\n      inside the VS Test Explorer context the same way as the XUnit runner will find them.\n      See https://github.com/dotnet/arcade/issues/3077.\n    -->\n    <ItemGroup>\n      <TestContextVariable Include=\"NUGET_PACKAGES=$(TestRestorePackagesPath)\" />\n      <TestContextVariable Include=\"BUILDRID=win-$(TargetArchitecture)\" />\n      <TestContextVariable Include=\"BUILD_ARCHITECTURE=$(TargetArchitecture)\" />\n      <TestContextVariable Include=\"BUILD_CONFIGURATION=$(Configuration)\" />\n      <TestContextVariable Include=\"MNA_VERSION=$(WindowsDesktopRuntimeVersion)\" />\n    </ItemGroup>\n\n    <WriteLinesToFile\n      File=\"$(OutDir)TestContextVariables.txt\"\n      Overwrite=\"true\"\n      Lines=\"@(TestContextVariable)\" />\n  </Target>\n\n</Project>\n"
  },
  {
    "path": "src/windowsdesktop/tests/Microsoft.WindowsDesktop.App.Tests.csproj",
    "content": "﻿<Project Sdk=\"Microsoft.NET.Sdk\">\n\n  <PropertyGroup>\n    <TargetFramework>$(NetCurrent)</TargetFramework>\n  </PropertyGroup>\n\n  <ItemGroup>\n    <!-- Ensure the packaging projects build first. Don't do this in VS: the build takes too long and isn't incremental. -->\n    <ProjectReference Include=\"..\\src\\sfx\\Microsoft.WindowsDesktop.App.Ref.sfxproj;\n                               ..\\src\\sfx\\Microsoft.WindowsDesktop.App.Runtime.sfxproj\"\n                      ReferenceOutputAssembly=\"false\"\n                      SkipGetTargetFrameworkProperties=\"true\"\n                      Condition=\"'$(SkipBuildingSharedFrameworkTestDependencies)' != 'true' and\n                                 '$(BuildingInsideVisualStudio)' != 'true'\" />\n  </ItemGroup>\n\n  <ItemGroup>\n    <PackageReference Include=\"NuGet.Packaging\" />\n  </ItemGroup>\n\n</Project>\n"
  },
  {
    "path": "src/windowsdesktop/tests/NuGetArtifactTester.cs",
    "content": "﻿// Licensed to the .NET Foundation under one or more agreements.\n// The .NET Foundation licenses this file to you under the MIT license.\n\nusing NuGet.Packaging;\nusing NuGet.Packaging.Core;\nusing NuGet.Versioning;\nusing System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.IO.Compression;\nusing System.Linq;\nusing System.Xml.Linq;\nusing Xunit;\n\nnamespace Microsoft.DotNet.WindowsDesktop.App.Tests;\n\ninternal class NuGetArtifactTester : IDisposable\n{\n    public static NuGetArtifactTester Open(\n        RepoDirectoriesProvider dirs,\n        string project,\n        string id = null)\n    {\n        var tester = OpenOrNull(dirs, project, id);\n        Assert.NotNull(tester);\n        return tester;\n    }\n\n    public static NuGetArtifactTester OpenOrNull(\n        RepoDirectoriesProvider dirs,\n        string project,\n        string id = null)\n    {\n        id = id ?? project;\n\n        string nupkgPath = Path.Combine(\n            dirs.BaseArtifactsFolder,\n            \"packages\",\n            dirs.Configuration,\n            \"Shipping\",\n            $\"{id}.{dirs.MicrosoftNETCoreAppVersion}.nupkg\");\n\n        if (!File.Exists(nupkgPath))\n        {\n            return null;\n        }\n\n        return new NuGetArtifactTester(nupkgPath);\n    }\n\n    public PackageIdentity Identity { get; }\n    public NuGetVersion PackageVersion { get; }\n\n    private readonly PackageArchiveReader _reader;\n\n    public NuGetArtifactTester(string file)\n    {\n        _reader = new PackageArchiveReader(ZipFile.Open(file, ZipArchiveMode.Read));\n        Identity = _reader.NuspecReader.GetIdentity();\n        PackageVersion = _reader.NuspecReader.GetVersion();\n    }\n\n    public void Dispose()\n    {\n        _reader.Dispose();\n    }\n\n    public void IsTargetingPack()\n    {\n        IsFrameworkPack();\n\n        Assert.NotEmpty(_reader.GetFiles(\"ref\"));\n        Assert.Empty(_reader.GetFiles(\"runtimes\"));\n        Assert.Empty(_reader.GetFiles(\"lib\"));\n\n        ContainsFrameworkList(\"FrameworkList.xml\");\n    }\n\n    public void IsTargetingPackForPlatform()\n    {\n        IsFrameworkPack();\n\n        HasGoodPlatformManifest();\n    }\n\n    public void IsRuntimePack()\n    {\n        IsRuntimeSpecificPack();\n\n        HasOnlyTheseDataFiles(\"data/RuntimeList.xml\");\n\n        ContainsFrameworkList(\"RuntimeList.xml\");\n    }\n\n    public void HasOnlyTheseDataFiles(params string[] expectedDataFiles)\n    {\n        HashSet<string> dataFileSet = _reader.GetFiles(\"data\").ToHashSet();\n\n        Assert.True(\n            dataFileSet.SetEquals(expectedDataFiles),\n            \"Invalid set of data files: \" +\n                $\"expected '{string.Join(\", \", expectedDataFiles)}', \" +\n                $\"actual '{string.Join(\", \", dataFileSet)}'\");\n    }\n\n    public void HasGoodPlatformManifest()\n    {\n        string platformManifestContent = ReadEntryContent(\n            _reader.GetEntry(\"data/PlatformManifest.txt\"));\n\n        // Sanity: check if the manifest has some content.\n        Assert.Contains(\".dll\", platformManifestContent);\n\n        // Check that the lines contain the package ID where they're supposed to.\n        foreach (var parts in platformManifestContent\n            .Split('\\r', '\\n')\n            .Select(line => line.Split(\"|\"))\n            .Where(parts => parts.Length > 1))\n        {\n            Assert.True(\n                parts[1] == Identity.Id,\n                $\"Platform manifest package id column '{parts[1]}' doesn't match \" +\n                    $\"actual package id '{Identity.Id}'\");\n        }\n    }\n\n    public string ReadEntryContent(string entry)\n    {\n        return ReadEntryContent(_reader.GetEntry(entry));\n    }\n\n    public XDocument ReadEntryXDocument(string entry)\n    {\n        return ReadEntryXDocument(_reader.GetEntry(entry));\n    }\n\n    private void IsFrameworkPack()\n    {\n        Assert.Empty(_reader.GetPackageDependencies());\n\n        var expectedTypes = new[] { new PackageType(\"DotnetPlatform\", new Version(0, 0)) };\n        var types = _reader.GetPackageTypes().ToArray();\n        Assert.Equal(expectedTypes, types);\n    }\n\n    private void IsRuntimeSpecificPack()\n    {\n        IsFrameworkPack();\n\n        Assert.Empty(_reader.GetFiles(\"ref\"));\n        Assert.NotEmpty(_reader.GetFiles(\"runtimes\"));\n        Assert.Empty(_reader.GetFiles(\"lib\"));\n    }\n\n    private void ContainsFrameworkList(string name)\n    {\n        XDocument frameworkList = ReadEntryXDocument(\n            _reader.GetEntry($\"data/{name}\"));\n\n        XElement[] frameworkListFiles = frameworkList\n            .Element(\"FileList\")\n            .Elements(\"File\")\n            .ToArray();\n\n        // Sanity: check if the list has some content.\n        Assert.NotEmpty(frameworkListFiles);\n    }\n\n    private static string ReadEntryContent(ZipArchiveEntry entry)\n    {\n        using var reader = new StreamReader(entry.Open());\n        return reader.ReadToEnd();\n    }\n\n    private static XDocument ReadEntryXDocument(ZipArchiveEntry entry)\n    {\n        return XDocument.Parse(ReadEntryContent(entry));\n    }\n}\n"
  },
  {
    "path": "src/windowsdesktop/tests/RepoDirectoriesProvider.cs",
    "content": "// Licensed to the .NET Foundation under one or more agreements.\n// The .NET Foundation licenses this file to you under the MIT license.\n\nusing System;\nusing System.Collections.Immutable;\nusing System.IO;\n\nnamespace Microsoft.DotNet.WindowsDesktop.App.Tests;\n\ninternal class RepoDirectoriesProvider\n{\n    private readonly string _testContextVariableFilePath;\n    private readonly ImmutableDictionary<string, string> _testContextVariables;\n\n    public string BuildRID { get; }\n    public string MicrosoftNETCoreAppVersion { get; }\n    public string Configuration { get; }\n    public string RepoRoot { get; }\n    public string BaseArtifactsFolder { get; }\n\n    public RepoDirectoriesProvider(\n        string repoRoot = null,\n        string artifacts = null,\n        string microsoftNETCoreAppVersion = null)\n    {\n        RepoRoot = repoRoot ?? GetRepoRootDirectory();\n        _testContextVariableFilePath = Path.Combine(Directory.GetCurrentDirectory(), \"TestContextVariables.txt\");\n\n        _testContextVariables = File.ReadAllLines(_testContextVariableFilePath)\n            .ToImmutableDictionary(\n                line => line[..line.IndexOf('=')],\n                line => line[(line.IndexOf('=') + 1)..],\n                StringComparer.OrdinalIgnoreCase);\n\n        BaseArtifactsFolder = artifacts ?? Path.Combine(RepoRoot, \"artifacts\");\n        BuildRID = GetTestContextVariable(\"BUILDRID\");\n        MicrosoftNETCoreAppVersion = microsoftNETCoreAppVersion ?? GetTestContextVariable(\"MNA_VERSION\");\n        Configuration = GetTestContextVariable(\"BUILD_CONFIGURATION\");\n    }\n\n    public string GetTestContextVariable(string name)\n    {\n        // Allow env var override, although normally the test context variables file is used.\n        // Don't accept NUGET_PACKAGES env override specifically: Arcade sets this and it leaks\n        // in during build.cmd/sh runs, replacing the test-specific dir.\n        if (!name.Equals(\"NUGET_PACKAGES\", StringComparison.OrdinalIgnoreCase))\n        {\n            if (Environment.GetEnvironmentVariable(name) is string envValue)\n            {\n                return envValue;\n            }\n        }\n\n        if (_testContextVariables.TryGetValue(name, out string value))\n        {\n            return value;\n        }\n\n        throw new ArgumentException($\"Unable to find variable '{name}' in test context variable file '{_testContextVariableFilePath}'\");\n    }\n\n    private static string GetRepoRootDirectory()\n    {\n        string currentDirectory = Directory.GetCurrentDirectory();\n\n        while (currentDirectory != null)\n        {\n            string gitDirOrFile = Path.Combine(currentDirectory, \".git\");\n            if (Directory.Exists(gitDirOrFile) || File.Exists(gitDirOrFile))\n            {\n                break;\n            }\n            currentDirectory = Directory.GetParent(currentDirectory)?.FullName;\n        }\n\n        if (currentDirectory == null)\n        {\n            throw new Exception(\"Cannot find the git repository root\");\n        }\n\n        return currentDirectory;\n    }\n}\n"
  },
  {
    "path": "src/windowsdesktop/tests/WindowsDesktopNupkgTests.cs",
    "content": "﻿// Licensed to the .NET Foundation under one or more agreements.\n// The .NET Foundation licenses this file to you under the MIT license.\n\nusing System;\nusing System.Linq;\nusing System.Xml.Linq;\nusing Xunit;\n\nnamespace Microsoft.DotNet.WindowsDesktop.App.Tests;\n\npublic class WindowsDesktopNupkgTests\n{\n    private readonly RepoDirectoriesProvider dirs = new();\n\n    [Fact]\n    public void WindowsDesktopTargetingPackIsValid()\n    {\n        // Use \"OrNull\" variant to get null if this nupkg doesn't exist. WindowsDesktop is only\n        // built on officially supported platforms.\n        using var tester = NuGetArtifactTester.OpenOrNull(\n            dirs,\n            \"Microsoft.WindowsDesktop.App.Ref\");\n\n        if (CurrentRidShouldCreateNupkg)\n        {\n            // Allow no targeting pack in case this is a servicing build.\n            // This condition should be tightened: https://github.com/dotnet/core-setup/issues/8830\n            if (tester == null)\n            {\n                return;\n            }\n\n            tester.IsTargetingPackForPlatform();\n            tester.HasOnlyTheseDataFiles(\n                \"data/FrameworkList.xml\",\n                \"data/PlatformManifest.txt\",\n                \"data/PackageOverrides.txt\");\n        }\n        else\n        {\n            Assert.Null(tester);\n        }\n    }\n\n    [Fact]\n    public void WindowsDesktopFrameworkListHasClassifications()\n    {\n        using var tester = NuGetArtifactTester.OpenOrNull(\n            dirs,\n            \"Microsoft.WindowsDesktop.App.Ref\");\n        // Let other test case handle if this is OK.\n        if (tester == null)\n        {\n            return;\n        }\n\n        XDocument fxList = tester.ReadEntryXDocument(\"data/FrameworkList.xml\");\n        var files = fxList.Element(\"FileList\").Elements(\"File\").ToArray();\n\n        // Sanity check: did any elements we expect make it into the final file?\n        foreach (var attributeName in new[] { \"Profile\" })\n        {\n            Assert.True(\n                files.Any(x => !string.IsNullOrEmpty(x.Attribute(attributeName)?.Value)),\n                $\"Can't find a non-empty '{attributeName}' attribute in framework list.\");\n        }\n    }\n\n    [Fact]\n    public void WindowsDesktopRuntimePackIsValid()\n    {\n        using var tester = NuGetArtifactTester.OpenOrNull(\n            dirs,\n            \"Microsoft.WindowsDesktop.App.Runtime\",\n            $\"Microsoft.WindowsDesktop.App.Runtime.{dirs.BuildRID}\");\n\n        if (CurrentRidShouldCreateNupkg)\n        {\n            Assert.NotNull(tester);\n\n            tester.IsRuntimePack();\n        }\n        else\n        {\n            Assert.Null(tester);\n        }\n    }\n\n    private bool CurrentRidShouldCreateNupkg =>\n        new[]\n        {\n            \"win-arm64\",\n            \"win-x64\",\n            \"win-x86\"\n        }.Contains(dirs.BuildRID);\n}\n"
  }
]