Skip to content

Commit 0351091

Browse files
authored
Merge branch 'uwp-net8-windows' into net9.0
2 parents 85b0d4b + 69121b1 commit 0351091

13 files changed

+58
-25
lines changed

Build-Toolkit-Components.ps1

+7-2
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ Param (
6767
[Alias("c")]
6868
[string[]]$Components = @("all"),
6969

70-
[string[]]$ExcludeComponents,
70+
[string[]]$ExcludeComponents = @(),
7171

7272
[string]$DateForVersion = (Get-Date -UFormat %y%m%d),
7373

@@ -199,9 +199,14 @@ foreach ($ComponentName in $Components) {
199199
foreach ($componentCsproj in Get-ChildItem -Path "$PSScriptRoot/../components/$ComponentName/$ComponentDir/*.csproj") {
200200
# Get component name from csproj path
201201
$componentPath = Get-Item "$componentCsproj/../../"
202+
$componentName = $($componentPath.BaseName);
203+
204+
if ($componenName -in $ExcludeComponents) {
205+
continue;
206+
}
202207

203208
# Get supported MultiTarget for this component
204-
$supportedMultiTargets = & $PSScriptRoot\MultiTarget\Get-MultiTargets.ps1 -component $($componentPath.BaseName)
209+
$supportedMultiTargets = & $PSScriptRoot\MultiTarget\Get-MultiTargets.ps1 -component $componentName
205210

206211
# Flag to check if any of the requested targets are supported by the component
207212
$isTargetSupported = $false

CommunityToolkit.App.Shared/Pages/GettingStartedPage.xaml

+6-7
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
55
xmlns:behaviors="using:CommunityToolkit.App.Shared.Behaviors"
66
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
7-
xmlns:interactions="using:Microsoft.Xaml.Interactions.Core"
87
xmlns:interactivity="using:Microsoft.Xaml.Interactivity"
98
xmlns:local="using:CommunityToolkit.App.Shared"
109
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
@@ -104,9 +103,9 @@
104103
</StackPanel>
105104
</Button.Content>
106105
<interactivity:Interaction.Behaviors>
107-
<interactions:EventTriggerBehavior EventName="Click">
106+
<interactivity:EventTriggerBehavior EventName="Click">
108107
<behaviors:NavigateToUriAction NavigateUri="https://aka.ms/toolkit/docs" />
109-
</interactions:EventTriggerBehavior>
108+
</interactivity:EventTriggerBehavior>
110109
</interactivity:Interaction.Behaviors>
111110
</Button>
112111
<Button win:AutomationProperties.Name="Learn more on GitHub">
@@ -122,9 +121,9 @@
122121
</StackPanel>
123122
</Button.Content>
124123
<interactivity:Interaction.Behaviors>
125-
<interactions:EventTriggerBehavior EventName="Click">
124+
<interactivity:EventTriggerBehavior EventName="Click">
126125
<behaviors:NavigateToUriAction NavigateUri="https://aka.ms/toolkit/windows" />
127-
</interactions:EventTriggerBehavior>
126+
</interactivity:EventTriggerBehavior>
128127
</interactivity:Interaction.Behaviors>
129128
</Button>
130129

@@ -141,9 +140,9 @@
141140
</StackPanel>
142141
</Button.Content>
143142
<interactivity:Interaction.Behaviors>
144-
<interactions:EventTriggerBehavior EventName="Click">
143+
<interactivity:EventTriggerBehavior EventName="Click">
145144
<behaviors:NavigateToUriAction NavigateUri="https://aka.ms/wct/discord" />
146-
</interactions:EventTriggerBehavior>
145+
</interactivity:EventTriggerBehavior>
147146
</interactivity:Interaction.Behaviors>
148147
</Button>
149148
</StackPanel>

CommunityToolkit.App.Shared/Renderers/ToolkitDocumentationRenderer.xaml

+4-5
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
xmlns:behaviors="using:CommunityToolkit.App.Shared.Behaviors"
66
xmlns:converters="using:CommunityToolkit.WinUI.Converters"
77
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
8-
xmlns:interactions="using:Microsoft.Xaml.Interactions.Core"
98
xmlns:interactivity="using:Microsoft.Xaml.Interactivity"
109
xmlns:local="using:CommunityToolkit.App.Shared"
1110
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
@@ -216,9 +215,9 @@
216215
Text="API doc" />
217216
</StackPanel>
218217
<interactivity:Interaction.Behaviors>
219-
<interactions:EventTriggerBehavior EventName="Click">
218+
<interactivity:EventTriggerBehavior EventName="Click">
220219
<behaviors:NavigateToUriAction NavigateUri="{x:Bind renderer:ToolkitDocumentationRenderer.ToGitHubUri('discussions', Metadata.DiscussionId), Mode=OneWay}" />
221-
</interactions:EventTriggerBehavior>
220+
</interactivity:EventTriggerBehavior>
222221
</interactivity:Interaction.Behaviors>
223222
</Button>-->
224223
<Button win:AutomationProperties.Name="Source code">
@@ -230,9 +229,9 @@
230229
<TextBlock Text="Source code" />
231230
</StackPanel>
232231
<interactivity:Interaction.Behaviors>
233-
<interactions:EventTriggerBehavior EventName="Click">
232+
<interactivity:EventTriggerBehavior EventName="Click">
234233
<behaviors:NavigateToUriAction NavigateUri="{x:Bind renderer:ToolkitDocumentationRenderer.ToComponentUri(Metadata.ComponentName), Mode=OneWay}" />
235-
</interactions:EventTriggerBehavior>
234+
</interactivity:EventTriggerBehavior>
236235
</interactivity:Interaction.Behaviors>
237236
</Button>
238237
<muxc:DropDownButton win:AutomationProperties.Name="Package info">

MultiTarget/AvailableTargetFrameworks.props

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project>
22
<PropertyGroup>
3-
<UwpTargetFramework Condition="'$(UwpTargetFramework)' == ''">uap10.0.17763</UwpTargetFramework>
3+
<UwpTargetFramework Condition="'$(UwpTargetFramework)' == ''">uap10.0.17763;net8.0-windows10.0.26100.0;</UwpTargetFramework>
44
<WinAppSdkTargetFramework Condition="'$(WinAppSdkTargetFramework)' == ''">net9.0-windows10.0.19041.0;net8.0-windows10.0.19041.0;net7.0-windows10.0.19041.0;net6.0-windows10.0.19041.0;</WinAppSdkTargetFramework>
55

66
<WasmHeadTargetFramework Condition="'$(WasmHeadTargetFramework)' == ''">net9.0;</WasmHeadTargetFramework>

MultiTarget/EnabledTargetFrameworks.props

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project>
22
<PropertyGroup>
3-
<UwpTargetFramework Condition="'$(UwpTargetFramework)' == ''">uap10.0.17763</UwpTargetFramework>
3+
<UwpTargetFramework Condition="'$(UwpTargetFramework)' == ''">uap10.0.17763;net8.0-windows10.0.26100.0;</UwpTargetFramework>
44
<WinAppSdkTargetFramework Condition="'$(WinAppSdkTargetFramework)' == ''">net9.0-windows10.0.19041.0;net8.0-windows10.0.19041.0;net7.0-windows10.0.19041.0;net6.0-windows10.0.19041.0;</WinAppSdkTargetFramework>
55

66
<WasmHeadTargetFramework Condition="'$(WasmHeadTargetFramework)' == ''">net9.0;</WasmHeadTargetFramework>
@@ -18,6 +18,6 @@
1818

1919
<!-- Used for defining TargetFramework under platforms that need it -->
2020

21-
<DotnetCommonTargetFramework Condition="'$(DotnetCommonTargetFramework)' == ''">net9.0;</DotnetCommonTargetFramework>
21+
2222
</PropertyGroup>
2323
</Project>

MultiTarget/Library.props

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
<!-- Enable project identifiers -->
1717
<Import Project="$(ToolingDirectory)\MultiTarget\MultiTargetIdentifiers.props" />
1818
<Import Project="$(ToolingDirectory)\MultiTarget\DefinedConstants.props" />
19+
<Import Project="$(ToolingDirectory)\MultiTarget\NoWarn.props"/>
1920

2021
<!-- Add platform package dependencies -->
2122
<Import Project="$(ToolingDirectory)\MultiTarget\PackageReferences\Uno.props" Condition="$(IsUno) == 'true'" />

MultiTarget/MultiTargetIdentifiers.props

+5-3
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
<IsGtkLib Condition="'$(IsGtkLib)' == '' AND $(LinuxLibTargetFramework.Contains('$(TargetFramework);')) AND '$(LinuxLibTargetFramework)' != '' AND '$(MultiTargetsLinuxGtk)' == 'true'">true</IsGtkLib>
4242
<IsGtk Condition="'$(IsGtk)' == '' AND ('$(IsGtkHead)' == 'true' or '$(IsGtkLib)' == 'true')">true</IsGtk>
4343

44-
<IsUwp Condition="'$(IsUwp)' == '' AND '$(TargetFramework)' == '$(UwpTargetFramework)' AND '$(UwpTargetFramework)' != '' AND '$(MultiTargetsUwp)' == 'true'">true</IsUwp>
44+
<IsUwp Condition="'$(IsUwp)' == '' AND $(UwpTargetFramework.Contains('$(TargetFramework);')) AND '$(UwpTargetFramework)' != '' AND '$(MultiTargetsUwp)' == 'true'">true</IsUwp>
4545
<IsWinAppSdk Condition="'$(IsWinAppSdk)' == '' AND $(WinAppSdkTargetFramework.Contains('$(TargetFramework);')) AND '$(WinAppSdkTargetFramework)' != '' AND '$(MultiTargetsWasdk)' == 'true'">true</IsWinAppSdk>
4646

4747
<IsDroid Condition="'$(IsDroid)' == '' AND $(AndroidLibTargetFramework.Contains('$(TargetFramework);')) AND '$(AndroidLibTargetFramework)' != '' AND '$(MultiTargetsDroid)' == 'true'">true</IsDroid>
@@ -57,7 +57,9 @@
5757
This property is only for changing the version used by Uno.
5858
Force the version to 2 for UWP and 3 for WinAppSDK.
5959
-->
60-
<WinUIMajorVersion Condition="'$(HasWinUI)' == 'true' AND '$(IsUwp)' == 'true'">2</WinUIMajorVersion>
61-
<WinUIMajorVersion Condition="'$(HasWinUI)' == 'true' AND '$(IsWinAppSdk)' == 'true'">3</WinUIMajorVersion>
60+
<WinUIMajorVersion Condition="'$(HasWinUI)' == 'true' AND '$(IsUwp)' == 'true' AND $(WinUIMajorVersion) == ''">2</WinUIMajorVersion>
61+
<WinUIMajorVersion Condition="'$(HasWinUI)' == 'true' AND '$(IsWinAppSdk)' == 'true' AND $(WinUIMajorVersion) == ''">3</WinUIMajorVersion>
62+
63+
<UseUwp Condition="'$(HasWinUI)' == 'true' AND '$(IsUwp)' == 'true' AND $([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">true</UseUwp>
6264
</PropertyGroup>
6365
</Project>

MultiTarget/NoWarn.props

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<Project>
2+
<!-- Disable warnings for 'This call site is reachable on all platforms.' caused by underlying platform. -->
3+
<PropertyGroup Condition="'$(IsUwp)' == 'true' AND $([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">
4+
<NoWarn>$(NoWarn);CA1416;NETSDK1219;</NoWarn>
5+
</PropertyGroup>
6+
7+
<!--
8+
WinUI 2 preview suppression
9+
'Microsoft.UI.Xaml.*' is for evaluation purposes only and is subject to change or removal in future updates.
10+
-->
11+
<PropertyGroup Condition="'$(IsUwp)' == 'true'">
12+
<NoWarn>$(NoWarn);CS8305;</NoWarn>
13+
</PropertyGroup>
14+
</Project>
+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<Project>
22
<ItemGroup>
3-
<PackageReference Condition="'$(HasWinUI)' == 'true'" Include="Microsoft.UI.Xaml" Version="2.7.0" />
3+
<PackageReference Condition="'$(HasWinUI)' == 'true'" Include="Microsoft.UI.Xaml" Version="2.8.7-prerelease.241119001" />
4+
<PackageReference Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'" Include="Microsoft.Windows.CsWinRT" Version="2.1.6" PrivateAssets="all" />
45
</ItemGroup>
56
</Project>

MultiTarget/WinUI.Extra.props

+13-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
-->
1818
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
1919
<SupportedOSPlatformVersion>$(TargetPlatformMinVersion)</SupportedOSPlatformVersion>
20-
<TargetPlatformVersion>10.0.19041.0</TargetPlatformVersion>
20+
<TargetPlatformVersion>10.0.26100.0</TargetPlatformVersion>
2121
</PropertyGroup>
2222

2323
<!-- Workaround, improved error message when consuming from Uno projects with mismatched TFMs -->
@@ -28,6 +28,13 @@
2828
<None PackagePath="lib/net7.0-windows10.0.18362" Include="$(MSBuildThisFileDirectory)/_._" Pack="true" />
2929
</ItemGroup>
3030

31+
<PropertyGroup Condition="'$(IsUwp)' == 'true'">
32+
<Platforms>x86;x64;arm64</Platforms>
33+
34+
<WindowsSdkPackageVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.26100.54</WindowsSdkPackageVersion>
35+
<RuntimeIdentifiers Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">win-x86;win-x64;win-arm64</RuntimeIdentifiers>
36+
</PropertyGroup>
37+
3138
<PropertyGroup Condition="'$(IsWinAppSdk)' == 'true'">
3239
<!-- See https://github.com/microsoft/WindowsAppSDK/issues/3842 -->
3340
<UseRidGraph>true</UseRidGraph>
@@ -48,6 +55,11 @@
4855
<!-- These suppressions are for references between generated assemblies and that VS can keep in the Error List once resolved -->
4956
<NoWarn>$(NoWarn);WMC1006;CS8034;</NoWarn>
5057
</PropertyGroup>
58+
59+
<!-- Disable warnings for 'This call site is reachable on all platforms.' caused by underlying platform. -->
60+
<PropertyGroup Condition="'$(IsUwp)' == 'true' AND $([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">
61+
<NoWarn>$(NoWarn);CA1416;</NoWarn>
62+
</PropertyGroup>
5163

5264
<ItemGroup>
5365
<Compile Include="$(ToolingDirectory)\GlobalUsings_WinUI.cs" />

ProjectHeads/App.Head.Uwp.Dependencies.props

+1-1
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="2.0.1" />
6+
<PackageReference Include="Microsoft.Xaml.Behaviors.Uwp.Managed" Version="3.0.0-preview1" />
77
<PackageReference Include="System.Collections.Immutable" Version="9.0.0" />
88
</ItemGroup>
99
</Project>

ProjectHeads/App.Head.Uwp.props

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
33

44
<PropertyGroup>
5-
<TargetFramework>$(UwpTargetFramework)</TargetFramework>
5+
<TargetFramework>$(UwpTargetFramework.Split(';')[0])</TargetFramework>
66
<DependencyVariant>Uwp</DependencyVariant>
77
</PropertyGroup>
88

ToolkitComponent.SampleProject.props

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<!-- Set up the MultiTarget system -->
77
<Import Project="$(ToolingDirectory)\MultiTarget\Library.props" />
88

9-
<Sdk Condition="'$(IsUwp)' == 'true'" Name="MSBuild.Sdk.Extras" Version="3.0.23" />
9+
<Sdk Condition="'$(IsUwp)' == 'true' AND $([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) != 'windows'" Name="MSBuild.Sdk.Extras" Version="3.0.23" />
1010

1111
<!-- Import this component's source project -->
1212
<ItemGroup>

0 commit comments

Comments
 (0)