Skip to content

Commit cddaacd

Browse files
author
Morten Nielsen
committed
Upgrade to Windows App SDK 1.8
1 parent 160e6f6 commit cddaacd

File tree

7 files changed

+14
-16
lines changed

7 files changed

+14
-16
lines changed

docs/concepts/Maui.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@
55
Add WinUIEx to the Windows build target by adding a package reference in the `.csproj` file:
66
```xml
77
<ItemGroup>
8-
<PackageReference Include="WinUIEx" Version="2.3.0" Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'" />
8+
<PackageReference Include="WinUIEx" Version="2.8.0" Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'" />
99
</ItemGroup>
1010
```
1111

1212
If the referenced version of WinUIEx relies on a newer version of the Windows App SDK than .NET MAUI implicitly references, you'll likely see errors like this:
1313
```
14-
Error NU1605 Warning As Error: Detected package downgrade: Microsoft.WindowsAppSDK from 1.4.230822000 to 1.2.221209.1.
15-
Reference the package directly from the project to select a different version. MauiApp8 -> WinUIEx 2.3.0 -> Microsoft.WindowsAppSDK (>= 1.4.230822000)
14+
Error NU1605 Warning As Error: Detected package downgrade: Microsoft.WindowsAppSDK from 1.8.250907003 to 1.7.250310001.
15+
Reference the package directly from the project to select a different version. MauiApp8 -> WinUIEx 2.8.0 -> Microsoft.WindowsAppSDK (>= 1.8.250907003)
1616
```
1717
To address that, explicitly reference the Windows App SDK package with the version mentioned in the error. For example:
1818
```xml
1919
<ItemGroup>
20-
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.4.230822000" Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'" />
20+
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.8.250907003" Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'" />
2121
</ItemGroup>
2222
```
2323

src/Dependencies.targets

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
<Project>
22

33
<PropertyGroup>
4-
<WinAppSDKVersion>1.7.250310001</WinAppSDKVersion>
5-
<WinAppSDKToolsVersion>10.0.26100.1</WinAppSDKToolsVersion>
4+
<WinAppSDKVersion>1.8.250907003</WinAppSDKVersion>
5+
<WinUIVersion>1.8.250906003</WinUIVersion>
6+
<WinAppSDKToolsVersion>10.0.26100.4654</WinAppSDKToolsVersion>
67
</PropertyGroup>
78

89
</Project>

src/Directory.Build.targets

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<Authors>Morten Nielsen - https://xaml.dev</Authors>
1818
<Company>Morten Nielsen - https://xaml.dev</Company>
1919
<PackageIcon>logo.png</PackageIcon>
20-
<Version>2.7.0</Version>
20+
<Version>2.8.0</Version>
2121
</PropertyGroup>
2222

2323
<ItemGroup Condition="'$(PackageId)'!=''">
@@ -30,7 +30,7 @@
3030
</PropertyGroup>
3131

3232
<PropertyGroup Label="PackageValidationSettings">
33-
<PackageValidationBaselineVersion>2.6.0</PackageValidationBaselineVersion>
33+
<PackageValidationBaselineVersion>2.7.0</PackageValidationBaselineVersion>
3434
<GenerateCompatibilitySuppressionFile>false</GenerateCompatibilitySuppressionFile>
3535
</PropertyGroup>
3636

src/WinUIEx/NumberBox/NumberBox.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ namespace WinUIEx
2323
/// <para><note type="caution">Note: It is recommended to NOT set <see cref="NumberBox{T}.AcceptsExpression"/> to <c>true</c>
2424
/// when working with Decimals, since the calculations will be performed with <c>double</c> accuracy only.</note></para>
2525
/// <note type="tip">
26-
/// Note: To be able to assign <see cref="System.Decimal"/> values to the <see cref="NumberBoxDecimal"/> control, it can't be done in XAML (although x:Bind works). Support for decimal values is a limitation in the Windows App SDK and is currently planned to be addressed in v1.8.
26+
/// Note: To be able to assign <see cref="System.Decimal"/> values to the <see cref="NumberBoxDecimal"/> control, it can't be done in XAML (although x:Bind works). Support for decimal values is a limitation in the Windows App SDK.
2727
/// </note>
2828
/// </para>
2929
/// </remarks>

src/WinUIEx/WinUIEx.csproj

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,7 @@
2525
<PackageId>WinUIEx</PackageId>
2626
<Product>WinUI Extensions</Product>
2727
<PackageReleaseNotes>
28-
- WinUIEx now requires at least .NET 8.
29-
- Added NumberBox for Decimal and Integer types, as well as a generic version for easily extensibility with any number type.
30-
- Disable Tab navigation to window content container control (#226).
28+
- WinUIEx now requires Windows App SDK 1.8, but no longer takes a dependency on the metapackage. Only a reference to `Microsoft.WindowsAppSDK.WinUI` is now needed.
3129
</PackageReleaseNotes>
3230
</PropertyGroup>
3331

@@ -36,7 +34,7 @@
3634
<PrivateAssets>all</PrivateAssets>
3735
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
3836
</PackageReference>
39-
<PackageReference Include="Microsoft.WindowsAppSDK" Version="$(WinAppSDKVersion)" />
37+
<PackageReference Include="Microsoft.WindowsAppSDK.WinUI" Version="$(WinUIVersion)" />
4038
<None Include="README.md" Pack="true" PackagePath="\" />
4139
</ItemGroup>
4240

src/WinUIExMauiSample/WinUIExMauiSample.csproj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,7 @@
5454

5555
<Import Project="..\Dependencies.targets" Condition="'$(WinAppSDKVersion)'==''" />
5656
<ItemGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">
57-
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.7.250513003" />
58-
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.756" />
57+
<PackageReference Include="Microsoft.WindowsAppSDK" Version="$(WinAppSDKVersion)" />
5958
</ItemGroup>
6059

6160
</Project>

src/WinUIExSample/WinUIExSample.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
<Import Project="..\Dependencies.targets" Condition="'$(WinAppSDKVersion)'==''" />
3737
<ItemGroup>
3838
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.4.0" />
39-
<PackageReference Include="Microsoft.WindowsAppSDK" Version="$(WinAppSDKVersion)" />
39+
<PackageReference Include="Microsoft.WindowsAppSDK.WinUI" Version="$(WinUIVersion)" />
4040
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="$(WinAppSDKToolsVersion)" />
4141
<PackageReference Include="Microsoft.Windows.CsWinRT" Version="2.1.3" />
4242
<Manifest Include="$(ApplicationManifest)" />

0 commit comments

Comments
 (0)