Skip to content

Commit f5e9e8e

Browse files
authored
Consolidate our MSIX distribution back down to one package (microsoft#15031)
We ship a separate package to Windows 10, which contains a copy of XAML embedded in it, because of a bug in activating classes from framework packages while we're elevated. We did this to avoid wasting disk space on Windows 11 installs (which is critical given that we're preinstalled in the Windows image.) The fix for this issue was released in a servicing update in April 2022. Thanks to KB5011831, we no longer need this workaround! And finally, this means that we no longer need to depend on a copy of "pre-release" XAML. We only did that because it would copy all of its assets into our package. Introduced in microsoft#12560 Closes microsoft#14106 Closes (discussion) microsoft#14981 Reverts microsoft#14660
1 parent 36c6b77 commit f5e9e8e

19 files changed

+31
-150
lines changed

Diff for: .github/workflows/winget.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
types: [published]
66

77
env:
8-
REGEX: 'Microsoft\.WindowsTerminal(?:Preview)?_Win10_([\d.]+)_8wekyb3d8bbwe\.msixbundle$'
8+
REGEX: 'Microsoft\.WindowsTerminal(?:Preview)?_([\d.]+)_8wekyb3d8bbwe\.msixbundle$'
99

1010
jobs:
1111
publish:
@@ -14,7 +14,7 @@ jobs:
1414
- name: Publish Windows Terminal ${{ github.event.release.prerelease && 'Preview' || 'Stable' }}
1515
run: |
1616
$assets = '${{ toJSON(github.event.release.assets) }}' | ConvertFrom-Json
17-
$wingetRelevantAsset = $assets | Where-Object { $_.name -like '*Win10*' } | Select-Object -First 1
17+
$wingetRelevantAsset = $assets | Where-Object { $_.name -like '*.msixbundle' } | Select-Object -First 1
1818
$regex = [Regex]::New($env:REGEX)
1919
$version = $regex.Match($wingetRelevantAsset.name).Groups[1].Value
2020

Diff for: build/packages.config

-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
<package id="MUXCustomBuildTasks" version="1.0.48" targetFramework="native" />
44
<package id="Microsoft.Taef" version="10.60.210621002" targetFramework="native" />
55
<package id="Microsoft.Internal.PGO-Helpers.Cpp" version="0.2.34" targetFramework="native" />
6-
<!-- This cannot be included in another project that depends on XAML (as it would be a duplicate package ID) -->
7-
<package id="Microsoft.UI.Xaml" version="2.7.3" targetFramework="native" />
86
<package id="Microsoft.Debugging.Tools.PdbStr" version="20220617.1556.0" targetFramework="native" />
97
<package id="Microsoft.Debugging.Tools.SrcTool" version="20220617.1556.0" targetFramework="native" />
108
</packages>

Diff for: build/pipelines/release.yml

+21-45
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,6 @@ parameters:
5656
- x64
5757
- x86
5858
- arm64
59-
- name: buildWindowsVersions
60-
type: object
61-
default:
62-
- Win10
63-
- Win11
6459

6560
variables:
6661
MakeAppxPath: 'C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\x86\MakeAppx.exe'
@@ -87,13 +82,6 @@ variables:
8782
NuGetPackBetaVersion: preview
8883
${{ elseif eq(variables['Build.SourceBranchName'], 'main') }}:
8984
NuGetPackBetaVersion: experimental
90-
# The NuGet packages have to use *somebody's* DLLs. We used to force them to
91-
# use the Win10 build outputs, but if there isn't a Win10 build we should use
92-
# the Win11 one.
93-
${{ if containsValue(parameters.buildWindowsVersions, 'Win10') }}:
94-
TerminalBestVersionForNuGetPackages: Win10
95-
${{ else }}:
96-
TerminalBestVersionForNuGetPackages: Win11
9785

9886
name: $(BuildDefinitionName)_$(date:yyMM).$(date:dd)$(rev:rrr)
9987
resources:
@@ -107,11 +95,9 @@ jobs:
10795
matrix:
10896
${{ each config in parameters.buildConfigurations }}:
10997
${{ each platform in parameters.buildPlatforms }}:
110-
${{ each windowsVersion in parameters.buildWindowsVersions }}:
111-
${{ config }}_${{ platform }}_${{ windowsVersion }}:
112-
BuildConfiguration: ${{ config }}
113-
BuildPlatform: ${{ platform }}
114-
TerminalTargetWindowsVersion: ${{ windowsVersion }}
98+
${{ config }}_${{ platform }}:
99+
BuildConfiguration: ${{ config }}
100+
BuildPlatform: ${{ platform }}
115101
displayName: Build
116102
timeoutInMinutes: 240
117103
cancelTimeoutInMinutes: 1
@@ -185,10 +171,6 @@ jobs:
185171
arguments: -MarkdownNoticePath .\NOTICE.md -OutputPath .\src\cascadia\CascadiaPackage\NOTICE.html
186172
pwsh: true
187173
- ${{ if eq(parameters.buildTerminal, true) }}:
188-
- pwsh: |-
189-
./build/scripts/Patch-ManifestsToWindowsVersion.ps1 -NewWindowsVersion "10.0.22000.0"
190-
displayName: Update manifest target version to Win11 (if necessary)
191-
condition: and(succeeded(), eq(variables['TerminalTargetWindowsVersion'], 'Win11'))
192174
- task: VSBuild@1
193175
displayName: Build solution **\OpenConsole.sln
194176
condition: true
@@ -205,7 +187,7 @@ jobs:
205187
continueOnError: True
206188
inputs:
207189
PathtoPublish: $(Build.SourcesDirectory)\msbuild.binlog
208-
ArtifactName: binlog-$(BuildPlatform)-$(TerminalTargetWindowsVersion)
190+
ArtifactName: binlog-$(BuildPlatform)
209191
- task: PowerShell@2
210192
displayName: Check MSIX for common regressions
211193
inputs:
@@ -297,7 +279,7 @@ jobs:
297279
displayName: Publish Artifact (appx)
298280
inputs:
299281
PathtoPublish: $(Build.ArtifactStagingDirectory)/appx
300-
ArtifactName: appx-$(BuildPlatform)-$(BuildConfiguration)-$(TerminalTargetWindowsVersion)
282+
ArtifactName: appx-$(BuildPlatform)-$(BuildConfiguration)
301283
- ${{ if eq(parameters.buildConPTY, true) }}:
302284
- task: CopyFiles@2
303285
displayName: Copy ConPTY to Artifacts
@@ -315,7 +297,7 @@ jobs:
315297
displayName: Publish Artifact (ConPTY)
316298
inputs:
317299
PathtoPublish: $(Build.ArtifactStagingDirectory)/conpty
318-
ArtifactName: conpty-dll-$(BuildPlatform)-$(BuildConfiguration)-$(TerminalTargetWindowsVersion)
300+
ArtifactName: conpty-dll-$(BuildPlatform)-$(BuildConfiguration)
319301
- ${{ if eq(parameters.buildWPF, true) }}:
320302
- task: CopyFiles@2
321303
displayName: Copy PublicTerminalCore.dll to Artifacts
@@ -329,7 +311,7 @@ jobs:
329311
displayName: Publish Artifact (PublicTerminalCore)
330312
inputs:
331313
PathtoPublish: $(Build.ArtifactStagingDirectory)/wpf
332-
ArtifactName: wpf-dll-$(BuildPlatform)-$(BuildConfiguration)-$(TerminalTargetWindowsVersion)
314+
ArtifactName: wpf-dll-$(BuildPlatform)-$(BuildConfiguration)
333315

334316
- task: PublishSymbols@2
335317
displayName: Publish symbols path
@@ -347,11 +329,6 @@ jobs:
347329

348330
- ${{ if eq(parameters.buildTerminal, true) }}:
349331
- job: BundleAndSign
350-
strategy:
351-
matrix:
352-
${{ each windowsVersion in parameters.buildWindowsVersions }}:
353-
${{ windowsVersion }}:
354-
TerminalTargetWindowsVersion: ${{ windowsVersion }}
355332
displayName: Create and sign AppX/MSIX bundles
356333
variables:
357334
${{ if eq(parameters.branding, 'Release') }}:
@@ -373,9 +350,9 @@ jobs:
373350
disableOutputRedirect: true
374351
- ${{ each platform in parameters.buildPlatforms }}:
375352
- task: DownloadBuildArtifacts@0
376-
displayName: Download Artifacts ${{ platform }} $(TerminalTargetWindowsVersion)
353+
displayName: Download Artifacts ${{ platform }}
377354
inputs:
378-
artifactName: appx-${{ platform }}-Release-$(TerminalTargetWindowsVersion)
355+
artifactName: appx-${{ platform }}-Release
379356
# Add 3000 to the major version component, but only for the bundle.
380357
# This is to ensure that it is newer than "2022.xx.yy.zz" or whatever the original bundle versions were before
381358
# we switched to uniform naming.
@@ -385,7 +362,7 @@ jobs:
385362
$Components[0] = ([int]$Components[0] + $VersionEpoch)
386363
$BundleVersion = $Components -Join "."
387364
New-Item -Type Directory "$(System.ArtifactsDirectory)\bundle"
388-
.\build\scripts\Create-AppxBundle.ps1 -InputPath "$(System.ArtifactsDirectory)" -ProjectName CascadiaPackage -BundleVersion $BundleVersion -OutputPath "$(System.ArtifactsDirectory)\bundle\$(BundleStemName)_$(TerminalTargetWindowsVersion)_$(XES_APPXMANIFESTVERSION)_8wekyb3d8bbwe.msixbundle"
365+
.\build\scripts\Create-AppxBundle.ps1 -InputPath "$(System.ArtifactsDirectory)" -ProjectName CascadiaPackage -BundleVersion $BundleVersion -OutputPath "$(System.ArtifactsDirectory)\bundle\$(BundleStemName)_$(XES_APPXMANIFESTVERSION)_8wekyb3d8bbwe.msixbundle"
389366
displayName: Create WindowsTerminal*.msixbundle
390367
- task: EsrpCodeSigning@1
391368
displayName: Submit *.msixbundle to ESRP for code signing
@@ -426,7 +403,7 @@ jobs:
426403
displayName: 'Publish Artifact: appxbundle-signed'
427404
inputs:
428405
PathtoPublish: $(System.ArtifactsDirectory)\bundle
429-
ArtifactName: appxbundle-signed-$(TerminalTargetWindowsVersion)
406+
ArtifactName: appxbundle-signed
430407

431408
- ${{ if eq(parameters.buildConPTY, true) }}:
432409
- job: PackageAndSignConPTY
@@ -451,7 +428,7 @@ jobs:
451428
- task: DownloadBuildArtifacts@0
452429
displayName: Download ${{ platform }} ConPTY binaries
453430
inputs:
454-
artifactName: conpty-dll-${{ platform }}-$(BuildConfiguration)-$(TerminalBestVersionForNuGetPackages)
431+
artifactName: conpty-dll-${{ platform }}-$(BuildConfiguration)
455432
downloadPath: bin\${{ platform }}\$(BuildConfiguration)\
456433
extractTars: false
457434
- task: PowerShell@2
@@ -542,7 +519,7 @@ jobs:
542519
- task: DownloadBuildArtifacts@0
543520
displayName: Download ${{ platform }} PublicTerminalCore
544521
inputs:
545-
artifactName: wpf-dll-${{ platform }}-$(BuildConfiguration)-$(TerminalBestVersionForNuGetPackages)
522+
artifactName: wpf-dll-${{ platform }}-$(BuildConfiguration)
546523
itemPattern: '**/*.dll'
547524
downloadPath: bin\${{ platform }}\$(BuildConfiguration)\
548525
extractTars: false
@@ -640,11 +617,10 @@ jobs:
640617

641618
# Download the appx-PLATFORM-CONFIG-VERSION artifact for every platform/version combo
642619
- ${{ each platform in parameters.buildPlatforms }}:
643-
- ${{ each windowsVersion in parameters.buildWindowsVersions }}:
644-
- task: DownloadBuildArtifacts@0
645-
displayName: Download Symbols ${{ platform }} ${{ windowsVersion }}
646-
inputs:
647-
artifactName: appx-${{ platform }}-Release-${{ windowsVersion }}
620+
- task: DownloadBuildArtifacts@0
621+
displayName: Download Symbols ${{ platform }}
622+
inputs:
623+
artifactName: appx-${{ platform }}-Release
648624

649625
# It seems easier to do this -- download every appxsym -- then enumerate all the PDBs in the build directory for the
650626
# public symbol push. Otherwise, we would have to list all of the PDB files one by one.
@@ -704,7 +680,7 @@ jobs:
704680
- task: DownloadBuildArtifacts@0
705681
displayName: Download Build Artifacts
706682
inputs:
707-
artifactName: appxbundle-signed-Win11
683+
artifactName: appxbundle-signed
708684
extractTars: false
709685
- task: PowerShell@2
710686
displayName: Rename and stage packages for vpack
@@ -713,21 +689,21 @@ jobs:
713689
script: >-
714690
# Rename to known/fixed name for Windows build system
715691
716-
Get-ChildItem Microsoft.WindowsTerminal_Win11_*.msixbundle | Rename-Item -NewName { 'Microsoft.WindowsTerminal_8wekyb3d8bbwe.msixbundle' }
692+
Get-ChildItem Microsoft.WindowsTerminal_*.msixbundle | Rename-Item -NewName { 'Microsoft.WindowsTerminal_8wekyb3d8bbwe.msixbundle' }
717693
718694
719695
# Create vpack directory and place item inside
720696
721697
mkdir WindowsTerminal.app
722698
723699
mv Microsoft.WindowsTerminal_8wekyb3d8bbwe.msixbundle .\WindowsTerminal.app\
724-
workingDirectory: $(System.ArtifactsDirectory)\appxbundle-signed-Win11
700+
workingDirectory: $(System.ArtifactsDirectory)\appxbundle-signed
725701
- task: PkgESVPack@12
726702
displayName: 'Package ES - VPack'
727703
env:
728704
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
729705
inputs:
730-
sourceDirectory: $(System.ArtifactsDirectory)\appxbundle-signed-Win11\WindowsTerminal.app
706+
sourceDirectory: $(System.ArtifactsDirectory)\appxbundle-signed\WindowsTerminal.app
731707
description: VPack for the Windows Terminal Application
732708
pushPkgName: WindowsTerminal.app
733709
owner: conhost

Diff for: build/scripts/Patch-ManifestsToWindowsVersion.ps1

-14
This file was deleted.

Diff for: common.openconsole.props

-18
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,4 @@
1010
<OpenConsoleDir>$(MSBuildThisFileDirectory)</OpenConsoleDir>
1111
</PropertyGroup>
1212

13-
<PropertyGroup>
14-
<!--
15-
For the Windows 10 build, we're targeting the prerelease version of Microsoft.UI.Xaml.
16-
This version emits every XAML DLL directly into our package.
17-
This is a workaround for us not having deliverable MSFT-21242953 on this version of Windows.
18-
19-
This version should be tracked in all project packages.config files for projects that depend on Xaml.
20-
-->
21-
<TerminalMUXVersion>2.7.3-prerelease.220816001</TerminalMUXVersion>
22-
<!--
23-
For the Windows 11-specific build, we're targeting the public version of Microsoft.UI.Xaml.
24-
This version emits a package dependency instead of embedding the dependency in our own package.
25-
26-
This version should be tracked in build/packages.config.
27-
-->
28-
<TerminalMUXVersion Condition="'$(TerminalTargetWindowsVersion)'=='Win11'">2.7.3</TerminalMUXVersion>
29-
</PropertyGroup>
30-
3113
</Project>

Diff for: custom.props

-12
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,6 @@
22
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<!-- This file is read by XES, which we use in our Release builds. -->
44
<PropertyGroup Label="Version">
5-
<!--
6-
The Windows 11 build is going to have the same package name, so it *must* have a different version.
7-
The easiest way for us to do this is to add 1 to the revision field.
8-
In short, for a given Terminal build 1.11, we will emit two different versions (assume this is build
9-
4 on day 23 of the year):
10-
- 1.11.234.0 for Windows 10
11-
- 1.11.235.0 for Windows 11
12-
This presents a potential for conflicts if we want to ship two builds produced back to back on the
13-
same day... which is terribly unlikely.
14-
-->
15-
<VersionBuildRevision Condition="'$(TerminalTargetWindowsVersion)'=='Win11' and '$(VersionBuildRevision)'!=''">$([MSBuild]::Add($(VersionBuildRevision), 1))</VersionBuildRevision>
16-
175
<XesUseOneStoreVersioning>true</XesUseOneStoreVersioning>
186
<XesBaseYearForStoreVersion>2023</XesBaseYearForStoreVersion>
197
<VersionMajor>1</VersionMajor>

Diff for: dep/nuget/packages.config

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<package id="Microsoft.VCRTForwarders.140" version="1.0.4" targetFramework="native" />
99
<package id="Microsoft.Internal.Windows.Terminal.ThemeHelpers" version="0.6.220404001" targetFramework="native" />
1010
<package id="Microsoft.VisualStudio.Setup.Configuration.Native" version="2.3.2262" targetFramework="native" developmentDependency="true" />
11-
<package id="Microsoft.UI.Xaml" version="2.7.3-prerelease.220816001" targetFramework="native" />
11+
<package id="Microsoft.UI.Xaml" version="2.7.3" targetFramework="native" />
1212
<package id="Microsoft.Windows.ImplementationLibrary" version="1.0.220201.1" targetFramework="native" developmentDependency="true" />
1313

1414
<!-- Managed packages -->

Diff for: src/cascadia/LocalTests_SettingsModel/SettingsModel.LocalTests.vcxproj

+1-11
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
<ConfigurationType>DynamicLibrary</ConfigurationType>
2121
<OpenConsoleCppWinRTProject>true</OpenConsoleCppWinRTProject>
2222
<!-- TerminalCppWinrt is not set intentionally -->
23+
<TerminalMUX>true</TerminalMUX>
2324
</PropertyGroup>
2425

2526
<Import Project="$(SolutionDir)\common.openconsole.props" Condition="'$(OpenConsoleDir)'==''" />
@@ -97,15 +98,4 @@
9798
<Import Project="$(OpenConsoleDir)src\common.build.post.props" />
9899
<Import Project="$(OpenConsoleDir)src\common.build.tests.props" />
99100
<Import Project="$(OpenConsoleDir)src\common.nugetversions.targets" />
100-
101-
<PropertyGroup>
102-
<!-- From Microsoft.UI.Xaml.targets -->
103-
<Native-Platform Condition="'$(Platform)' == 'Win32'">x86</Native-Platform>
104-
<Native-Platform Condition="'$(Platform)' != 'Win32'">$(Platform)</Native-Platform>
105-
<_MUXBinRoot>&quot;$(OpenConsoleDir)packages\Microsoft.UI.Xaml.$(TerminalMUXVersion)\runtimes\win10-$(Native-Platform)\native\&quot;</_MUXBinRoot>
106-
</PropertyGroup>
107-
108-
<!-- We actually can just straight up reference MUX here, it's fine -->
109-
<Import Project="..\..\..\packages\Microsoft.UI.Xaml.$(TerminalMUXVersion)\build\native\Microsoft.UI.Xaml.targets" Condition="Exists('..\..\..\packages\Microsoft.UI.Xaml.$(TerminalMUXVersion)\build\native\Microsoft.UI.Xaml.targets')" />
110-
111101
</Project>

Diff for: src/cascadia/LocalTests_TerminalApp/TerminalApp.LocalTests.vcxproj

+1-11
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424
<PropertyGroup Label="NuGet Dependencies">
2525
<!-- TerminalCppWinrt is intentionally not set -->
26+
<TerminalMUX>true</TerminalMUX>
2627
</PropertyGroup>
2728

2829
<Import Project="$(SolutionDir)\common.openconsole.props" Condition="'$(OpenConsoleDir)'==''" />
@@ -85,15 +86,4 @@
8586
<Import Project="$(OpenConsoleDir)src\common.build.post.props" />
8687
<Import Project="$(OpenConsoleDir)src\common.build.tests.props" />
8788
<Import Project="$(OpenConsoleDir)src\common.nugetversions.targets" />
88-
89-
<PropertyGroup>
90-
<!-- From Microsoft.UI.Xaml.targets -->
91-
<Native-Platform Condition="'$(Platform)' == 'Win32'">x86</Native-Platform>
92-
<Native-Platform Condition="'$(Platform)' != 'Win32'">$(Platform)</Native-Platform>
93-
<_MUXBinRoot>&quot;$(OpenConsoleDir)packages\Microsoft.UI.Xaml.$(TerminalMUXVersion)\runtimes\win10-$(Native-Platform)\native\&quot;</_MUXBinRoot>
94-
</PropertyGroup>
95-
96-
<!-- We actually can just straight up reference MUX here, it's fine -->
97-
<Import Project="..\..\..\packages\Microsoft.UI.Xaml.$(TerminalMUXVersion)\build\native\Microsoft.UI.Xaml.targets" Condition="Exists('..\..\..\packages\Microsoft.UI.Xaml.$(TerminalMUXVersion)\build\native\Microsoft.UI.Xaml.targets')" />
98-
9989
</Project>

Diff for: src/cascadia/LocalTests_TerminalApp/TestHostApp/TestHostApp.vcxproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
<OpenConsoleCppWinRTProject>true</OpenConsoleCppWinRTProject>
1717
<EnableHybridCRT>false</EnableHybridCRT> <!-- C++/CLI projects can't deal -->
1818

19+
<TerminalMUX>true</TerminalMUX>
20+
1921
<!--
2022
These two properties are very important!
2123
Without them, msbuild will stomp MinVersion and MaxVersionTested in the
@@ -126,8 +128,6 @@
126128
</Reference>
127129
</ItemGroup>
128130

129-
<Import Project="$(OpenConsoleDir)\packages\Microsoft.UI.Xaml.$(TerminalMUXVersion)\build\native\Microsoft.UI.Xaml.targets" Condition="Exists('$(OpenConsoleDir)\packages\Microsoft.UI.Xaml.$(TerminalMUXVersion)\build\native\Microsoft.UI.Xaml.targets')" />
130-
131131
<Import Project="$(OpenConsoleDir)\src\common.build.post.props" />
132132
<Import Project="$(OpenConsoleDir)\src\common.nugetversions.targets" />
133133

Diff for: src/cascadia/TerminalApp/TerminalAppLib.vcxproj

-1
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,6 @@
316316
<PRIResource Include="Resources\en-US\Resources.resw" />
317317
<PRIResource Include="Resources\en-US\ContextMenu.resw" />
318318
<OCResourceDirectory Include="Resources" />
319-
<None Include="packages.config" />
320319
</ItemGroup>
321320
<!-- ========================= Project References ======================== -->
322321
<ItemGroup>

Diff for: src/cascadia/TerminalApp/packages.config

-4
This file was deleted.

Diff for: src/cascadia/TerminalSettingsEditor/Microsoft.Terminal.Settings.Editor.vcxproj

-1
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,6 @@
353353
</PRIResource>
354354
<OCResourceDirectory Include="Resources" />
355355
<None Include="$(ProjectName).def" />
356-
<None Include="packages.config" />
357356
</ItemGroup>
358357
<!-- ========================= Project References ======================== -->
359358
<ItemGroup>

Diff for: src/cascadia/TerminalSettingsEditor/packages.config

-4
This file was deleted.

Diff for: src/cascadia/TerminalSettingsModel/CascadiaSettings.cpp

+1-6
Original file line numberDiff line numberDiff line change
@@ -1015,12 +1015,7 @@ winrt::hstring CascadiaSettings::ApplicationVersion()
10151015
{
10161016
const auto package{ winrt::Windows::ApplicationModel::Package::Current() };
10171017
const auto version{ package.Id().Version() };
1018-
// As of about 2022, the ones digit of the Build of our version is a
1019-
// placeholder value to differentiate the Windows 10 build from the
1020-
// Windows 11 build. Let's trim that out. For additional clarity,
1021-
// let's omit the Revision, which _must_ be .0, and doesn't provide any
1022-
// value to report.
1023-
winrt::hstring formatted{ wil::str_printf<std::wstring>(L"%u.%u.%u", version.Major, version.Minor, version.Build / 10) };
1018+
winrt::hstring formatted{ wil::str_printf<std::wstring>(L"%u.%u.%u.%u", version.Major, version.Minor, version.Build, version.Revision) };
10241019
return formatted;
10251020
}
10261021
CATCH_LOG();

0 commit comments

Comments
 (0)