diff --git a/build/pipelines/templates-v2/job-build-project.yml b/build/pipelines/templates-v2/job-build-project.yml index 35d342236f9..d3c10bb8226 100644 --- a/build/pipelines/templates-v2/job-build-project.yml +++ b/build/pipelines/templates-v2/job-build-project.yml @@ -142,6 +142,10 @@ jobs: - template: .\steps-restore-nuget.yml + - pwsh: |- + .\build\scripts\Set-LatestVCToolsVersion.ps1 + displayName: Work around DD-1541167 (VCToolsVersion) + - ${{ parameters.beforeBuildSteps }} - task: VSBuild@1 diff --git a/build/scripts/Set-LatestVCToolsVersion.ps1 b/build/scripts/Set-LatestVCToolsVersion.ps1 new file mode 100644 index 00000000000..54a43b3a01f --- /dev/null +++ b/build/scripts/Set-LatestVCToolsVersion.ps1 @@ -0,0 +1,8 @@ +$VSInstances = ([xml](& 'C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe' -latest -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -include packages -format xml)) +$VSPackages = $VSInstances.instances.instance.packages.package +$LatestVCPackage = ($VSInstances.instances.instance.packages.package | ? { $_.id -eq "Microsoft.VisualCpp.CRT.Source" }) +$LatestVCToolsVersion = $LatestVCPackage.version; + +Write-Output "Latest VCToolsVersion: $LatestVCToolsVersion" +Write-Output "Updating VCToolsVersion environment variable for job" +Write-Output "##vso[task.setvariable variable=VCToolsVersion]$LatestVCToolsVersion" diff --git a/src/interactivity/onecore/SystemConfigurationProvider.cpp b/src/interactivity/onecore/SystemConfigurationProvider.cpp index 21de54447af..7e5b7c59abf 100644 --- a/src/interactivity/onecore/SystemConfigurationProvider.cpp +++ b/src/interactivity/onecore/SystemConfigurationProvider.cpp @@ -61,6 +61,7 @@ void SystemConfigurationProvider::GetSettingsFromLink( // Hence, we make it seem like the console is in fact configured to use a // TrueType font by the user. +#pragma warning(suppress : 26485) // This isn't even really _supposed to be_ an array-to-pointer decay: it's passed as a string view. pLinkSettings->SetFaceName(DEFAULT_TT_FONT_FACENAME); pLinkSettings->SetFontFamily(TMPF_TRUETYPE);