Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable .NET 8 for uwp MultiTarget, upgrade packages #235

Merged
merged 111 commits into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
111 commits
Select commit Hold shift + click to select a range
9e54bb0
Update to WinAppSdk 1.6.240531000-experimental1
Arlodotexe Jun 20, 2024
9349c6c
Enabled AoT for WinAppSdk 1.6-experimental1. Added RuntimeIdentifier …
Arlodotexe Jun 20, 2024
82f8495
Update MultiTarget/PackageReferences/WinAppSdk.props
Arlodotexe Jun 28, 2024
5e643c4
Merge branch 'main' into wasdk/1.6
Arlodotexe Jun 28, 2024
49cb231
Update MultiTarget/PackageReferences/WinAppSdk.props
Arlodotexe Jul 2, 2024
a9d1270
Update to prerelease packages for Wasdk AoT
Arlodotexe Jul 29, 2024
371a247
Disabled AoT on test head, enabled on gallery
Arlodotexe Aug 1, 2024
063405b
Merge branch 'main' into wasdk/1.6
Arlodotexe Aug 1, 2024
0985e1b
Enable PublishAot in debug mode for gallery head
Arlodotexe Aug 1, 2024
c461b3f
Enable RuntimeIdentifier in debug mode
Arlodotexe Aug 1, 2024
7aa3d5d
Merge branch 'main' into wasdk/1.6
Arlodotexe Aug 2, 2024
54f6314
Add net8.0-windows10.0.22621.0 and required flags to Uwp TFMs
Arlodotexe Aug 2, 2024
d705880
Fixes to $ExcludeComponents parameter
Arlodotexe Aug 5, 2024
842b05a
Fix IsUwp flag when using multiple TFMs
Arlodotexe Aug 5, 2024
c5759e8
Declare WindowsSdkPackageVersion on both Wasdk and Uwp
Arlodotexe Aug 5, 2024
4d335d7
Use preview versions of WinUI 2 and CsWinRT
Arlodotexe Aug 5, 2024
9b94a66
Use preview version of behaviors
Arlodotexe Aug 5, 2024
a808e65
Suppress CA1416 on modern uwp
Arlodotexe Aug 5, 2024
db6b20d
Fix syntax error
Arlodotexe Aug 5, 2024
a9f259c
Avoid using anycpu for uwp libraries
Arlodotexe Aug 5, 2024
49f9814
Bump CsWinRT
Arlodotexe Aug 6, 2024
ca2f72b
Only use MSBuild Extras on UAP
Arlodotexe Aug 6, 2024
729f096
Enabled NoWarn suppression on non-WinUI UWP
Arlodotexe Aug 6, 2024
ed07936
Bump Microsoft.Windows.CsWinRT
Arlodotexe Aug 7, 2024
d013d13
Merge branch 'main' into wasdk/1.6
Arlodotexe Aug 7, 2024
84ae3a8
Fixed syntax error
Arlodotexe Aug 7, 2024
66595f7
Update to Microsoft.WindowsAppSDK 1.6.240701003-experimental2
Arlodotexe Aug 7, 2024
15e3d12
Bump CsWinRT and WindowsSdkPackageVersion to latest stable version
Arlodotexe Aug 9, 2024
127bdc3
Add WinAppSDK 1.6 workaround. See https://github.com/CommunityToolkit…
Arlodotexe Aug 9, 2024
25c4ea8
Revert WindowsSdkPackageVersion to 10.0.22621.37-preview to align wit…
Arlodotexe Aug 9, 2024
edda2be
Update Microsoft.WindowsAppSDK to 1.6.240807006-preview1
Arlodotexe Aug 14, 2024
336ef4c
Update WindowsSdkPackageVersion for Wasdk 1.6 preview1
Arlodotexe Aug 14, 2024
236955c
Update transient WebView2 reference to 1.0.2730-prerelease
Arlodotexe Aug 14, 2024
2fcca69
Revert WindowsSdkPackageVersion to 10.0.22621.37-preview for WindowsA…
Arlodotexe Aug 15, 2024
c3d33c3
Add partial to resolve CsWinRT1028
Arlodotexe Aug 16, 2024
287689f
Restore default enabled TFMs
Arlodotexe Aug 16, 2024
4dbd18a
Reverting 49cb231c9e26fce7627e6491890774b71a9552db. See https://githu…
Arlodotexe Aug 16, 2024
456673a
Remove clean task to resolve https://github.com/CommunityToolkit/Wind…
Arlodotexe Aug 19, 2024
05d93b1
Merge
Arlodotexe Aug 19, 2024
d1789db
Merge
Arlodotexe Aug 23, 2024
2936f5f
Merge branch 'main' into uwp-net8-windows
Arlodotexe Sep 20, 2024
bd6ec8a
Package updates and fixes for modern dotnet on uwp
Arlodotexe Sep 25, 2024
01984d3
Merge
Arlodotexe Nov 13, 2024
3268bed
Upgrade .NET to 9.0, update config, add TargetFramework.
Arlodotexe Nov 18, 2024
b1f5056
Adjust TargetFramework declaration to support multiple values.
Arlodotexe Nov 18, 2024
89d14cb
Update packages, migrate Uno/Wasm to 9.0
Arlodotexe Nov 22, 2024
0a88074
Update uno-check version to 1.27.1 in dotnet-tools.json
Arlodotexe Nov 18, 2024
eb0c0eb
Fixed version number for CommunityToolkit.WinUI.UI.Controls.Markdown
Arlodotexe Nov 25, 2024
4f12e80
Align versions for Uno.Microsoft.Xaml.Behaviors.Uwp.Managed
Arlodotexe Nov 25, 2024
529a23d
Upgrade to latest Microsoft.Xaml.Behaviors.Uwp.Managed and Microsoft.…
Arlodotexe Dec 3, 2024
697dcb6
Update MultiTarget/WinUI.Extra.props
Arlodotexe Dec 4, 2024
85b0d4b
Merge branch 'main' into net9.0
Arlodotexe Dec 4, 2024
1c05f6a
Update MultiTarget/NoWarn.props
Arlodotexe Dec 4, 2024
6eedf0c
Update MultiTarget/PackageReferences/Uwp.props
Arlodotexe Dec 4, 2024
ab5c7f1
Update MultiTarget/MultiTargetIdentifiers.props
Arlodotexe Dec 4, 2024
69121b1
Merge branch 'main' into uwp-net8-windows
Arlodotexe Dec 4, 2024
0351091
Merge branch 'uwp-net8-windows' into net9.0
Arlodotexe Dec 4, 2024
3a1ee18
Add logic to exclude conflicting MultiTargets based on WinUIMajorVersion
Arlodotexe Dec 4, 2024
0c30f12
Update Uno Xaml Behaviors package references to version 3.0.0-dev.17.…
Arlodotexe Dec 4, 2024
db3bd50
Merge pull request #230 from CommunityToolkit/net9.0
Arlodotexe Dec 4, 2024
0ddbd1b
Merge
Arlodotexe Dec 4, 2024
ce6127b
Merge
Arlodotexe Dec 4, 2024
2522bb3
Remove hardcoded dotnet installation path, enable net9.0 from container
Arlodotexe Dec 4, 2024
fd7999b
Align single-component sln generation script with capabilities of gal…
Arlodotexe Dec 4, 2024
f0aaac1
Add temporary workaround for Windows SDK dependency in Uwp.props
Arlodotexe Dec 4, 2024
422fa54
Update comment to clarify purpose of props generation for "All" solut…
Arlodotexe Dec 4, 2024
58dd1c5
Don't include Microsoft.Windows.SDK.CPP when HasWinUI isn't set
Arlodotexe Dec 4, 2024
f3f18bd
Bump CommonUnoPackageVersion from 5.5.66 to 5.5.87
Arlodotexe Dec 5, 2024
7625ac5
Include Microsoft.Windows.SDK.CPP package on both uap* and net*-windo…
Arlodotexe Dec 5, 2024
9741fe7
Update ProjectHeads/GenerateSingleSampleHeads.ps1
Arlodotexe Dec 10, 2024
9517fee
Revert removal of comparison values in default EnabledTargetFrameworks
Arlodotexe Dec 10, 2024
218a656
Disable modern .NET for UWP when building in Visual Studio
Arlodotexe Dec 10, 2024
1ee86f4
Add condition to only include Microsoft.Windows.SDK.CPP for Windows t…
Arlodotexe Dec 11, 2024
446aa75
Set TargetPlatformVersion based on target framework for improved comp…
Arlodotexe Dec 11, 2024
f342a14
Introduced IsWindowsTfm MultiTargetIdentifier shorthand
Arlodotexe Dec 11, 2024
3a181ac
Introduce TargetPlatformIdentifier property for value comparisons
Arlodotexe Dec 11, 2024
c0d535d
Use custom property instead of TargetPlatformIdentifier to avoid SDK …
Arlodotexe Dec 11, 2024
35b9e39
Removal of IsWindowsTfm bool in favor of value checks on MultiTargetP…
Arlodotexe Dec 11, 2024
00974a2
Fixed declaration order for MultiTargetPlatformIdentifier definition …
Arlodotexe Dec 11, 2024
8b58455
Restrict reference to Microsoft.Windows.SDK.CPP to non-head projects.
Arlodotexe Dec 11, 2024
7fae1c0
Fix conditional PackageReference being ignored VS by moving into dedi…
Arlodotexe Dec 12, 2024
8d56d3f
Only use Microsoft.Windows.SDK.CPP on modern .NET
Arlodotexe Dec 12, 2024
5c0d074
Fixed .NET 9 auto-discovery of custom build asset wwwroot/index.html …
Arlodotexe Dec 12, 2024
4fac683
Upgrade Microsoft.Xaml.Behaviors.WinUI.Managed to latest version, rem…
Arlodotexe Dec 12, 2024
83624f6
Add workaround to remove WebView2Loader.dll due to broken reference i…
Arlodotexe Dec 13, 2024
4115929
Apply suggestions from code review
Arlodotexe Dec 14, 2024
326cdec
Update appxrecipe file name with multitarget-aligned project name
Arlodotexe Dec 14, 2024
6b523cd
Use WinUI version of Uno Behaviors package where needed
Arlodotexe Dec 16, 2024
5966fdd
Add property group to suppress IL2026 warnings for Uno behaviors
Arlodotexe Dec 16, 2024
7b62731
Suppress Uno0006 warning after .NET 9 update and adjust IL2026 warnin…
Arlodotexe Dec 16, 2024
9a22078
Add Uno.WinUI.Lottie package reference to project dependencies
Arlodotexe Dec 16, 2024
602f7d5
Convert to file-scoped namespace
Arlodotexe Dec 16, 2024
ce7724f
Fix test report log file naming in build workflow
Arlodotexe Dec 17, 2024
bd39501
Change warning suppression from WarningsNotAsErrors to NoWarn for IL2…
Arlodotexe Dec 17, 2024
9772e3e
Update workflow to support building and testing in with matrixed mult…
Arlodotexe Dec 17, 2024
4e30ec6
Cleanup test report conditions
Arlodotexe Dec 17, 2024
4ca8e99
Fix quoting in build workflow script for component path
Arlodotexe Dec 17, 2024
ccd93a6
Update multitarget options in build workflow to limit platforms
Arlodotexe Dec 17, 2024
3724fa7
Include empty ExcludeMultiTargets in script invocation to work around…
Arlodotexe Dec 17, 2024
453b498
Align ExcludeMultiTargets parameter declaration with GenerateAllSolution
Arlodotexe Dec 17, 2024
143d574
Remove ExcludeMultiTargets parameter from GenerateSingleSampleHeads s…
Arlodotexe Dec 17, 2024
5292429
Add NoWarn.props import to Head.Uwp.props
Arlodotexe Dec 17, 2024
63aaf33
Suppress IL2026 on Wasdk head, Add NoWarn.props import to App.Head.Un…
Arlodotexe Dec 17, 2024
7a46f49
Update Microsoft.Xaml.Behaviors package references to version 3.0.0-p…
Arlodotexe Dec 18, 2024
523a9bd
Update default enabled TFMs, Wasdk and Uwp can no longer build simult…
Arlodotexe Dec 18, 2024
c857bb1
Use stable Microsoft.UI.Xaml on UWP, prerelease on modern .NET
Arlodotexe Dec 18, 2024
5e6420e
Use only known MultiTargetPlatformIdentifer values
Arlodotexe Dec 18, 2024
12e1957
Update rational for conditional MUX reference
Arlodotexe Dec 18, 2024
45f6f8d
Add workaround to prevent Microsoft.VCLibs.Desktop inclusion on UAP
Arlodotexe Dec 18, 2024
f36651c
Add explicit WebView2 reference to prevent Microsoft.VCLibs.Desktop i…
Arlodotexe Dec 19, 2024
228d7c5
Add workaround to prevent Microsoft.VCLibs.Desktop inclusion for WebV…
Arlodotexe Dec 19, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"uno.check": {
"version": "1.20.2",
"version": "1.27.1",
"commands": [
"uno-check"
]
Expand Down
7 changes: 2 additions & 5 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.208.0/containers/dotnet/.devcontainer/base.Dockerfile

# [Choice] .NET version: 6.0, 5.0, 3.1, 6.0-bullseye, 5.0-bullseye, 3.1-bullseye, 6.0-focal, 5.0-focal, 3.1-focal
ARG VARIANT="6.0-bullseye-slim"
FROM mcr.microsoft.com/vscode/devcontainers/dotnet:0-${VARIANT}
# See https://github.com/devcontainers/images/tree/main/src/dotnet for image choices
FROM mcr.microsoft.com/vscode/devcontainers/dotnet:9.0

# [Choice] Node.js version: none, lts/*, 16, 14, 12, 10
ARG NODE_VERSION="none"
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"args": {
// Update 'VARIANT' to pick a .NET Core version: 3.1, 5.0, 6.0
// Append -bullseye or -focal to pin to an OS version.
"VARIANT": "8.0",
"VARIANT": "9.0",
// Options
"NODE_VERSION": "lts/*"
}
Expand Down
33 changes: 21 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ on:
workflow_dispatch:

env:
DOTNET_VERSION: ${{ '8.0.x' }}
DOTNET_INSTALL_DIR: dotnet-install
DOTNET_ROOT: dotnet-install
DOTNET_VERSION: ${{ '9.0.x' }}
ENABLE_DIAGNOSTICS: false
#COREHOST_TRACE: 1
COREHOST_TRACEFILE: corehosttrace.log
Expand Down Expand Up @@ -142,6 +140,20 @@ jobs:
# Test job to build a single experiment to ensure our changes work for both our main types of solutions at the moment
new-experiment:
runs-on: windows-latest

strategy:
fail-fast: false # prevent one matrix pipeline from being cancelled if one fails, we want them all to run to completion.
matrix:
winui: [2, 3]
multitarget: ['uwp', 'wasdk', 'wasm']
exclude:
# WinUI 2 not supported on wasdk
- winui: 2
multitarget: wasdk
# WinUI 3 not supported on uwp
- winui: 3
multitarget: uwp

env:
HEADS_DIRECTORY: tooling/ProjectHeads
PROJECT_DIRECTORY: tooling/ProjectTemplate
Expand Down Expand Up @@ -202,7 +214,7 @@ jobs:

- name: Add project heads to ${{ env.TEST_PROJECT_NAME }}
working-directory: ./${{ env.TEST_PROJECT_DIRECTORY }}
run: ${{ github.workspace }}/${{ env.HEADS_DIRECTORY }}/GenerateSingleSampleHeads.ps1 -componentPath ${{ github.workspace }}/${{ env.TEST_PROJECT_DIRECTORY }}${{ env.ENABLE_DIAGNOSTICS == 'true' && ' -UseDiagnostics' || '' }}
run: ${{ github.workspace }}/${{ env.HEADS_DIRECTORY }}/GenerateSingleSampleHeads.ps1 -MultiTargets ${{ matrix.multitarget }} -winui ${{ matrix.winui }} -componentPath "${{ github.workspace }}/${{ env.TEST_PROJECT_DIRECTORY }}${{ env.ENABLE_DIAGNOSTICS == 'true' && ' -UseDiagnostics' || '' }}"

- name: MSBuild
working-directory: ./${{ env.TEST_PROJECT_DIRECTORY }}
Expand All @@ -217,18 +229,15 @@ jobs:
with:
domain: ${{ github.repository_owner }}

- name: Run tests in the generated experiment against UWP
id: test-uwp
run: vstest.console.exe ./components/${{ env.TEST_PROJECT_NAME }}/**/${{ env.TEST_PROJECT_NAME }}.Tests.UWP.build.appxrecipe /Framework:FrameworkUap10 /logger:"trx;LogFileName=${{ env.TEST_PROJECT_NAME }}UWP.trx"

- name: Run tests in the generated experiment against WinAppSDK
id: test-winappsdk
run: vstest.console.exe ./components/${{ env.TEST_PROJECT_NAME }}/**/${{ env.TEST_PROJECT_NAME }}.Tests.WinAppSdk.build.appxrecipe /Framework:FrameworkUap10 /logger:"trx;LogFileName=${{ env.TEST_PROJECT_NAME }}WinAppSdk.trx"
- name: Run tests in the generated experiment against ${{ matrix.multitarget }}
if: ${{ matrix.multitarget == 'uwp' || matrix.multitarget == 'wasdk' }}
id: test-platform
run: vstest.console.exe ./components/${{ env.TEST_PROJECT_NAME }}/**/${{ env.TEST_PROJECT_NAME }}.Tests.${{ matrix.multitarget }}.build.appxrecipe /Framework:FrameworkUap10 /logger:"trx;LogFileName=${{ env.TEST_PROJECT_NAME }}${{ matrix.multitarget }}.trx" /Blame

- name: Create test reports
run: |
testspace '[New Experiment]./TestResults/*.trx'
if: ${{ always() && (steps.test-uwp.conclusion == 'success' || steps.test-winappsdk.conclusion == 'success') }}
if: ${{ (matrix.multitarget == 'uwp' || matrix.multitarget == 'wasdk') && (steps.test-platform.conclusion == 'success') }}

- name: Artifact - Diagnostic Logs
uses: actions/upload-artifact@v4
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/config/Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
<Project>
<ItemGroup>
<!-- Workaround for WebView2 on uap pulling in Microsoft.VCLibs.Desktop when it shouldn't -->
<SDKReference Remove="Microsoft.VCLibs.Desktop, Version=14.0" />
</ItemGroup>

<ItemGroup>
<SlnGenSolutionItem Include="$(MSBuildThisFileDirectory).editorconfig" />
<SlnGenSolutionItem Include="$(MSBuildThisFileDirectory)settings.xamlstyler" />
Expand Down
23 changes: 21 additions & 2 deletions Build-Toolkit-Components.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Param (
[Alias("c")]
[string[]]$Components = @("all"),

[string[]]$ExcludeComponents,
[string[]]$ExcludeComponents = @(),

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

Expand Down Expand Up @@ -104,6 +104,20 @@ if ($null -eq $ExcludeMultiTargets)
$ExcludeMultiTargets = @()
}

# Both uwp and wasdk share a targetframework. Both cannot be enabled at once.
# If both are supplied, remove one based on WinUIMajorVersion.
if ($MultiTargets.Contains('uwp') -and $MultiTargets.Contains('wasdk'))
{
if ($WinUIMajorVersion -eq 2)
{
$ExcludeMultiTargets = $ExcludeMultiTargets + 'wasdk'
}
else
{
$ExcludeMultiTargets = $ExcludeMultiTargets + 'uwp'
}
}

Comment on lines +107 to +120
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like we're doing this in 3 places, should we have a helper function and start making another helper script these all include and reference? (maybe https://learn.microsoft.com/en-us/powershell/scripting/learn/ps101/10-script-modules ? )

Copy link
Member Author

@Arlodotexe Arlodotexe Dec 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are chunks of these files with overlapping functionality, not just this. For now, the code should be largely aligned to make it easier to extract later. We can file a ticket for it, if you like. I'd like to get them all, not just the one.

$MultiTargets = $MultiTargets | Where-Object { $_ -notin $ExcludeMultiTargets }

if ($Components -eq @('all')) {
Expand Down Expand Up @@ -199,9 +213,14 @@ foreach ($ComponentName in $Components) {
foreach ($componentCsproj in Get-ChildItem -Path "$PSScriptRoot/../components/$ComponentName/$ComponentDir/*.csproj") {
# Get component name from csproj path
$componentPath = Get-Item "$componentCsproj/../../"
$componentName = $($componentPath.BaseName);

if ($componenName -in $ExcludeComponents) {
continue;
}

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

# Flag to check if any of the requested targets are supported by the component
$isTargetSupported = $false
Expand Down
14 changes: 14 additions & 0 deletions Build-Toolkit-Gallery.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,20 @@ if ($null -eq $ExcludeMultiTargets)
$ExcludeMultiTargets = @()
}

# Both uwp and wasdk share a targetframework. Both cannot be enabled at once.
# If both are supplied, remove one based on WinUIMajorVersion.
if ($MultiTargets.Contains('uwp') -and $MultiTargets.Contains('wasdk'))
{
if ($WinUIMajorVersion -eq 2)
{
$ExcludeMultiTargets = $ExcludeMultiTargets + 'wasdk'
}
else
{
$ExcludeMultiTargets = $ExcludeMultiTargets + 'uwp'
}
}

if ($MultiTargets -eq 'all') {
$MultiTargets = @('wasm', 'uwp', 'wasdk', 'wpf', 'linuxgtk', 'macos', 'ios', 'android', 'netstandard')
}
Expand Down
13 changes: 6 additions & 7 deletions CommunityToolkit.App.Shared/Pages/GettingStartedPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:behaviors="using:CommunityToolkit.App.Shared.Behaviors"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:interactions="using:Microsoft.Xaml.Interactions.Core"
xmlns:interactivity="using:Microsoft.Xaml.Interactivity"
xmlns:local="using:CommunityToolkit.App.Shared"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Expand Down Expand Up @@ -104,9 +103,9 @@
</StackPanel>
</Button.Content>
<interactivity:Interaction.Behaviors>
<interactions:EventTriggerBehavior EventName="Click">
<interactivity:EventTriggerBehavior EventName="Click">
<behaviors:NavigateToUriAction NavigateUri="https://aka.ms/toolkit/docs" />
</interactions:EventTriggerBehavior>
</interactivity:EventTriggerBehavior>
</interactivity:Interaction.Behaviors>
</Button>
<Button win:AutomationProperties.Name="Learn more on GitHub">
Expand All @@ -122,9 +121,9 @@
</StackPanel>
</Button.Content>
<interactivity:Interaction.Behaviors>
<interactions:EventTriggerBehavior EventName="Click">
<interactivity:EventTriggerBehavior EventName="Click">
<behaviors:NavigateToUriAction NavigateUri="https://aka.ms/toolkit/windows" />
</interactions:EventTriggerBehavior>
</interactivity:EventTriggerBehavior>
</interactivity:Interaction.Behaviors>
</Button>

Expand All @@ -141,9 +140,9 @@
</StackPanel>
</Button.Content>
<interactivity:Interaction.Behaviors>
<interactions:EventTriggerBehavior EventName="Click">
<interactivity:EventTriggerBehavior EventName="Click">
<behaviors:NavigateToUriAction NavigateUri="https://aka.ms/wct/discord" />
</interactions:EventTriggerBehavior>
</interactivity:EventTriggerBehavior>
</interactivity:Interaction.Behaviors>
</Button>
</StackPanel>
Expand Down
21 changes: 10 additions & 11 deletions CommunityToolkit.App.Shared/Pages/SettingsPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,17 @@

using Windows.ApplicationModel;

namespace CommunityToolkit.App.Shared.Pages
namespace CommunityToolkit.App.Shared.Pages;

/// <summary>
/// An empty page that can be used on its own or navigated to within a Frame.
/// </summary>
public sealed partial class SettingsPage : Page
{
/// <summary>
/// An empty page that can be used on its own or navigated to within a Frame.
/// </summary>
public sealed partial class SettingsPage : Page
{
public string AppVersion => $"Version {Package.Current.Id.Version.Major}.{Package.Current.Id.Version.Minor}.{Package.Current.Id.Version.Build}";
public string AppVersion => $"Version {Package.Current.Id.Version.Major}.{Package.Current.Id.Version.Minor}.{Package.Current.Id.Version.Build}";

public SettingsPage()
{
this.InitializeComponent();
}
public SettingsPage()
{
this.InitializeComponent();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
xmlns:behaviors="using:CommunityToolkit.App.Shared.Behaviors"
xmlns:converters="using:CommunityToolkit.WinUI.Converters"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:interactions="using:Microsoft.Xaml.Interactions.Core"
xmlns:interactivity="using:Microsoft.Xaml.Interactivity"
xmlns:local="using:CommunityToolkit.App.Shared"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Expand Down Expand Up @@ -216,9 +215,9 @@
Text="API doc" />
</StackPanel>
<interactivity:Interaction.Behaviors>
<interactions:EventTriggerBehavior EventName="Click">
<interactivity:EventTriggerBehavior EventName="Click">
<behaviors:NavigateToUriAction NavigateUri="{x:Bind renderer:ToolkitDocumentationRenderer.ToGitHubUri('discussions', Metadata.DiscussionId), Mode=OneWay}" />
</interactions:EventTriggerBehavior>
</interactivity:EventTriggerBehavior>
</interactivity:Interaction.Behaviors>
</Button>-->
<Button win:AutomationProperties.Name="Source code">
Expand All @@ -230,9 +229,9 @@
<TextBlock Text="Source code" />
</StackPanel>
<interactivity:Interaction.Behaviors>
<interactions:EventTriggerBehavior EventName="Click">
<interactivity:EventTriggerBehavior EventName="Click">
<behaviors:NavigateToUriAction NavigateUri="{x:Bind renderer:ToolkitDocumentationRenderer.ToComponentUri(Metadata.ComponentName), Mode=OneWay}" />
</interactions:EventTriggerBehavior>
</interactivity:EventTriggerBehavior>
</interactivity:Interaction.Behaviors>
</Button>
<muxc:DropDownButton win:AutomationProperties.Name="Package info">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.8.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.11.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
<PackageReference Include="MSTest.TestAdapter" Version="2.2.10" />
<PackageReference Include="MSTest.TestFramework" Version="2.2.10" />
<PackageReference Include="MSTest.TestAdapter" Version="3.6.3" />
<PackageReference Include="MSTest.TestFramework" Version="3.6.3" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.8.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.11.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
<PackageReference Include="MSTest.TestAdapter" Version="2.2.10" />
<PackageReference Include="MSTest.TestFramework" Version="2.2.10" />
Expand Down
16 changes: 15 additions & 1 deletion GenerateAllSolution.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,23 @@ if ($null -eq $ExcludeMultiTargets)
$ExcludeMultiTargets = @()
}

# Both uwp and wasdk share a targetframework. Both cannot be enabled at once.
# If both are supplied, remove one based on WinUIMajorVersion.
if ($MultiTargets.Contains('uwp') -and $MultiTargets.Contains('wasdk'))
{
if ($WinUIMajorVersion -eq 2)
{
$ExcludeMultiTargets = $ExcludeMultiTargets + 'wasdk'
}
else
{
$ExcludeMultiTargets = $ExcludeMultiTargets + 'uwp'
}
}

$MultiTargets = $MultiTargets | Where-Object { $_ -notin $ExcludeMultiTargets }

# Generate required props for "All" solution.
# Generate required props for "All" solution preferences.
& ./tooling/MultiTarget/GenerateAllProjectReferences.ps1 -MultiTargets $MultiTargets -Components $Components -ExcludeComponents $ExcludeComponents
& ./tooling/MultiTarget/UseTargetFrameworks.ps1 -MultiTargets $MultiTargets
& ./tooling/MultiTarget/UseUnoWinUI.ps1 $WinUIMajorVersion
Expand Down
26 changes: 14 additions & 12 deletions MultiTarget/AvailableTargetFrameworks.props
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
<Project>
<PropertyGroup>
<UwpTargetFramework Condition="'$(UwpTargetFramework)' == ''">uap10.0.17763</UwpTargetFramework>
<WinAppSdkTargetFramework Condition="'$(WinAppSdkTargetFramework)' == ''">net8.0-windows10.0.19041.0;net7.0-windows10.0.19041.0;net6.0-windows10.0.19041.0;</WinAppSdkTargetFramework>
<!-- See https://github.com/CommunityToolkit/Tooling-Windows-Submodule/pull/235#issuecomment-2530131559 -->
<UwpTargetFramework Condition="'$(UwpTargetFramework)' == '' AND '$(BuildingInsideVisualStudio)' == 'true'">uap10.0.17763;</UwpTargetFramework>
<UwpTargetFramework Condition="'$(UwpTargetFramework)' == '' AND '$(BuildingInsideVisualStudio)' != 'true'">uap10.0.17763;net8.0-windows10.0.26100.0;</UwpTargetFramework>
<WinAppSdkTargetFramework Condition="'$(WinAppSdkTargetFramework)' == ''">net9.0-windows10.0.19041.0;net8.0-windows10.0.19041.0;</WinAppSdkTargetFramework>

<WasmHeadTargetFramework Condition="'$(WasmHeadTargetFramework)' == ''">net8.0</WasmHeadTargetFramework>
<LinuxHeadTargetFramework Condition="'$(LinuxHeadTargetFramework)' == ''">net8.0</LinuxHeadTargetFramework>
<WpfHeadTargetFramework Condition="'$(WpfHeadTargetFramework)' == ''">net8.0</WpfHeadTargetFramework>
<WasmHeadTargetFramework Condition="'$(WasmHeadTargetFramework)' == ''">net9.0;</WasmHeadTargetFramework>
<LinuxHeadTargetFramework Condition="'$(LinuxHeadTargetFramework)' == ''">net9.0;</LinuxHeadTargetFramework>
<WpfHeadTargetFramework Condition="'$(WpfHeadTargetFramework)' == ''">net9.0;</WpfHeadTargetFramework>

<AndroidLibTargetFramework Condition="'$(AndroidLibTargetFramework)' == ''">net8.0-android34.0</AndroidLibTargetFramework>
<MacOSLibTargetFramework Condition="'$(MacOSLibTargetFramework)' == ''">net8.0-maccatalyst</MacOSLibTargetFramework>
<iOSLibTargetFramework Condition="'$(iOSLibTargetFramework)' == ''">net8.0-ios</iOSLibTargetFramework>
<AndroidLibTargetFramework Condition="'$(AndroidLibTargetFramework)' == ''">net9.0-android;</AndroidLibTargetFramework>
<MacOSLibTargetFramework Condition="'$(MacOSLibTargetFramework)' == ''">net9.0-maccatalyst;</MacOSLibTargetFramework>
<iOSLibTargetFramework Condition="'$(iOSLibTargetFramework)' == ''">net9.0-ios;</iOSLibTargetFramework>

<!-- Used for comparison to current TargetFramework -->
<LinuxLibTargetFramework Condition="'$(LinuxLibTargetFramework)' == ''">net8.0</LinuxLibTargetFramework>
<WasmLibTargetFramework Condition="'$(WasmLibTargetFramework)' == ''">net8.0</WasmLibTargetFramework>
<WpfLibTargetFramework Condition="'$(WpfLibTargetFramework)' == ''">net8.0</WpfLibTargetFramework>
<LinuxLibTargetFramework Condition="'$(LinuxLibTargetFramework)' == ''">net9.0;</LinuxLibTargetFramework>
<WasmLibTargetFramework Condition="'$(WasmLibTargetFramework)' == ''">net9.0;</WasmLibTargetFramework>
<WpfLibTargetFramework Condition="'$(WpfLibTargetFramework)' == ''">net9.0;</WpfLibTargetFramework>

<!-- Used for defining TargetFramework under platforms that need it -->
<DotnetStandardCommonTargetFramework Condition="'$(DotnetStandardCommonTargetFramework)' == ''">netstandard2.0</DotnetStandardCommonTargetFramework>
<DotnetCommonTargetFramework Condition="'$(DotnetCommonTargetFramework)' == ''">net8.0</DotnetCommonTargetFramework>
<DotnetCommonTargetFramework Condition="'$(DotnetCommonTargetFramework)' == ''">net9.0;</DotnetCommonTargetFramework>
</PropertyGroup>
</Project>
1 change: 1 addition & 0 deletions MultiTarget/DefinedConstants.props
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<DefineConstants Condition="'$(IsWpf)' == 'true'">$(DefineConstants);HAS_UNO_SKIA;__SKIA__;WINDOWS_WPF;</DefineConstants>
<DefineConstants Condition="'$(IsGtk)' == 'true'">$(DefineConstants);HAS_UNO_SKIA;__SKIA__;__GTK__;</DefineConstants>

<DefineConstants Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net9.0'))">$(DefineConstants);NET9_0_OR_GREATER</DefineConstants>
<DefineConstants Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))">$(DefineConstants);NET8_0_OR_GREATER</DefineConstants>
<DefineConstants Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net7.0'))">$(DefineConstants);NET7_0_OR_GREATER</DefineConstants>
<DefineConstants Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net6.0'))">$(DefineConstants);NET6_0_OR_GREATER</DefineConstants>
Expand Down
Loading
Loading