Skip to content

Commit 8dbe164

Browse files
authored
Merge branch 'main' into solution-generation/launch-param
2 parents 078ac72 + 94888f1 commit 8dbe164

File tree

9 files changed

+45
-26
lines changed

9 files changed

+45
-26
lines changed

.config/dotnet-tools.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"isRoot": true,
44
"tools": {
55
"uno.check": {
6-
"version": "1.27.1",
6+
"version": "1.27.4",
77
"commands": [
88
"uno-check"
99
]
@@ -15,7 +15,7 @@
1515
]
1616
},
1717
"microsoft.visualstudio.slngen.tool": {
18-
"version": "11.2.3",
18+
"version": "12.0.13",
1919
"commands": [
2020
"slngen"
2121
]

Build-Toolkit-Components.ps1

Lines changed: 34 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
Param (
6060
[ValidateSet('all', 'wasm', 'uwp', 'wasdk', 'wpf', 'linuxgtk', 'macos', 'ios', 'android', 'netstandard')]
6161
[Alias("mt")]
62-
[string[]]$MultiTargets = @('uwp', 'wasdk', 'wasm'), # default settings
62+
[string[]]$MultiTargets = @('uwp', 'wasm'), # default settings
6363

6464
[ValidateSet('wasm', 'uwp', 'wasdk', 'wpf', 'linuxgtk', 'macos', 'ios', 'android', 'netstandard')]
6565
[string[]]$ExcludeMultiTargets = @(), # default settings
@@ -207,6 +207,12 @@ function Invoke-MSBuildWithBinlog {
207207
}
208208
}
209209

210+
# List of WinUI-2 compatible multitargets
211+
$WinUI2MultiTargets = @('uwp', 'wasm', 'wpf', 'linuxgtk', 'macos', 'ios', 'android')
212+
213+
# List of WinUI-3 compatible multitargets
214+
$WinUI3MultiTargets = @('wasdk', 'wasm', 'wpf', 'linuxgtk', 'macos', 'ios', 'android')
215+
210216
# Components are built individually
211217
foreach ($ComponentName in $Components) {
212218
# Find all components source csproj (when wildcard), or find specific component csproj by name.
@@ -215,26 +221,45 @@ foreach ($ComponentName in $Components) {
215221
$componentPath = Get-Item "$componentCsproj/../../"
216222
$componentName = $($componentPath.BaseName);
217223

218-
if ($componenName -in $ExcludeComponents) {
224+
if ($componentName -in $ExcludeComponents) {
219225
continue;
220226
}
221227

222228
# Get supported MultiTarget for this component
223229
$supportedMultiTargets = & $PSScriptRoot\MultiTarget\Get-MultiTargets.ps1 -component $componentName
224-
230+
231+
# If the component does not support at least one target that supports the requested WinUI major version, skip the component
232+
$isWinUIMajorVersionSupported = $false
233+
225234
# Flag to check if any of the requested targets are supported by the component
226-
$isTargetSupported = $false
235+
$isRequestedTargetSupported = $false
227236

228237
foreach ($requestedTarget in $MultiTargets) {
229-
if ($requestedTarget -in $supportedMultiTargets) {
230-
$isTargetSupported = $true
231-
break
238+
if ($false -eq $isRequestedTargetSupported) {
239+
$isRequestedTargetSupported = $requestedTarget -in $supportedMultiTargets
240+
}
241+
}
242+
243+
foreach ($supportedMultiTarget in $supportedMultiTargets) {
244+
if ($false -eq $isWinUIMajorVersionSupported) {
245+
if ($WinUIMajorVersion -eq 2) {
246+
$isWinUIMajorVersionSupported = $supportedMultiTarget -in $WinUI2MultiTargets;
247+
}
248+
249+
if ($WinUIMajorVersion -eq 3) {
250+
$isWinUIMajorVersionSupported = $supportedMultiTarget -in $WinUI3MultiTargets;
251+
}
232252
}
233253
}
234254

235255
# If none of the requested targets are supported by the component, we can skip build to save time and avoid errors.
236-
if (-not $isTargetSupported) {
237-
Write-Warning "Skipping $($componentPath.BaseName), none of the requested MultiTargets are enabled for this component."
256+
if (-not $isRequestedTargetSupported) {
257+
Write-Warning "Skipping $($componentPath.BaseName), none of the requested MultiTargets '$MultiTargets' are enabled for this component."
258+
continue
259+
}
260+
261+
if (-not $isWinUIMajorVersionSupported) {
262+
Write-Warning "Skipping $($componentPath.BaseName), none of the supported MultiTargets '$supportedMultiTargets' support WinUI $WinUIMajorVersion."
238263
continue
239264
}
240265

MultiTarget/Extra.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<PropertyGroup Condition="'$(IsUwp)' == 'true'">
2424
<Platforms>x86;x64;arm64</Platforms>
2525

26-
<WindowsSdkPackageVersion Condition="'$(MultiTargetPlatformIdentifier)' == 'windows'">10.0.26100.54</WindowsSdkPackageVersion>
26+
<WindowsSdkPackageVersion Condition="'$(MultiTargetPlatformIdentifier)' == 'windows'">10.0.26100.57</WindowsSdkPackageVersion>
2727
<RuntimeIdentifiers Condition="'$(MultiTargetPlatformIdentifier)' == 'windows'">win-x86;win-x64;win-arm64</RuntimeIdentifiers>
2828
</PropertyGroup>
2929

MultiTarget/PackageReferences/Uwp/Microsoft.UI.Xaml.props

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,9 @@
11
<Project>
22
<!-- Condition must be on a <When> statement in its own file for this to work in Visual Studio. https://stackoverflow.com/a/16557059 -->
33
<Choose>
4-
<When Condition="'$(HasWinUI)' == 'true' AND '$(MultiTargetPlatformIdentifier)' != 'windows'" >
4+
<When Condition="'$(HasWinUI)' == 'true'" >
55
<ItemGroup>
6-
<PackageReference Include="Microsoft.UI.Xaml" Version="2.8.6" />
7-
</ItemGroup>
8-
</When>
9-
<When Condition="'$(HasWinUI)' == 'true' AND '$(MultiTargetPlatformIdentifier)' == 'windows'" >
10-
<ItemGroup>
11-
<!-- Prerelease version needed for TargetFramework support. Not needed by uap. -->
12-
<PackageReference Include="Microsoft.UI.Xaml" Version="2.8.7-prerelease.241119001" />
6+
<PackageReference Include="Microsoft.UI.Xaml" Version="2.8.7" />
137
</ItemGroup>
148
</When>
159
<Otherwise>

MultiTarget/PackageReferences/Uwp/Microsoft.Windows.CsWinRT.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<Choose>
44
<When Condition="'$(MultiTargetPlatformIdentifier)' == 'windows'" >
55
<ItemGroup>
6-
<PackageReference Include="Microsoft.Windows.CsWinRT" Version="2.1.6" PrivateAssets="all" />
6+
<PackageReference Include="Microsoft.Windows.CsWinRT" Version="2.2.0" PrivateAssets="all" />
77
</ItemGroup>
88
</When>
99
<Otherwise>
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project>
22
<ItemGroup>
3-
<PackageReference Condition="'$(HasWinUI)' == 'true'" Include="Microsoft.WindowsAppSDK" Version="1.6.241114003" />
4-
<PackageReference Condition="'$(HasWinUI)' == 'true'" Include="Microsoft.Windows.CsWinRt" Version="2.1.6" PrivateAssets="all" />
3+
<PackageReference Condition="'$(HasWinUI)' == 'true'" Include="Microsoft.WindowsAppSDK" Version="1.6.250108002" />
4+
<PackageReference Condition="'$(HasWinUI)' == 'true'" Include="Microsoft.Windows.CsWinRt" Version="2.2.0" PrivateAssets="all" />
55
<PackageReference Condition="'$(HasWinUI)' == 'true'" Include="Microsoft.Web.WebView2" Version="1.0.2903.40" PrivateAssets="all" />
66
</ItemGroup>
77
</Project>

ProjectHeads/App.Head.Uwp.Dependencies.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<Project>
44
<ItemGroup>
55
<PackageReference Include="Microsoft.Toolkit.Uwp.UI.Controls.Markdown" Version="7.1.3" />
6-
<PackageReference Include="Microsoft.Xaml.Behaviors.Uwp.Managed" Version="3.0.0-preview2" />
6+
<PackageReference Include="Microsoft.Xaml.Behaviors.Uwp.Managed" Version="3.0.0" />
77
<PackageReference Include="System.Collections.Immutable" Version="9.0.0" />
88
</ItemGroup>
99
</Project>

ProjectHeads/App.Head.Wasm.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
<PackageReference Include="Microsoft.Extensions.Logging" Version="9.0.0" />
7070
<PackageReference Include="Uno.Extensions.Logging.WebAssembly.Console" Version="1.9.0-dev.2" />
7171
<PackageReference Include="Uno.UI.Adapter.Microsoft.Extensions.Logging" Version="5.5.66" />
72-
<PackageReference Include="Uno.Wasm.Bootstrap" Version="9.0.8" />
72+
<PackageReference Include="Uno.Wasm.Bootstrap" Version="9.0.10" />
7373
<PackageReference Include="Microsoft.NET.ILLink.Tasks" Version="9.0.0" />
7474
</ItemGroup>
7575

ProjectHeads/App.Head.WinAppSdk.Dependencies.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
<Project>
44
<ItemGroup>
55
<PackageReference Include="CommunityToolkit.WinUI.UI.Controls.Markdown" Version="7.1.2" />
6-
<PackageReference Include="Microsoft.Xaml.Behaviors.WinUI.Managed" Version="3.0.0-preview2" />
6+
<PackageReference Include="Microsoft.Xaml.Behaviors.WinUI.Managed" Version="3.0.0" />
77
</ItemGroup>
88
</Project>

0 commit comments

Comments
 (0)