Skip to content

Commit e97360e

Browse files
hez20100x5bfa
authored andcommitted
WASDK 1.6: Fix build and tests (#16276)
Co-authored-by: 0x5BFA <[email protected]>
1 parent 94c0d57 commit e97360e

File tree

13 files changed

+59
-29
lines changed

13 files changed

+59
-29
lines changed

src/Files.App (Package)/Files.Package.wapproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@
108108
</ItemGroup>
109109
<ItemGroup>
110110
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.6.240829007" IncludeAssets="build" />
111-
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.3233" IncludeAssets="build" />
111+
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.26100.1742" IncludeAssets="build" />
112112
</ItemGroup>
113113
<Import Project="$(WapProjPath)\Microsoft.DesktopBridge.targets" />
114114
<Target Name="RemoveOutOfProcWinMD" BeforeTargets="_GenerateCurrentProjectAppxManifest">

src/Files.App.Controls/Files.App.Controls.csproj

+1-2
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,8 @@
1717
</PropertyGroup>
1818

1919
<ItemGroup>
20-
<PackageReference Include="CommunityToolkit.WinUI.UI" Version="7.1.2" />
2120
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.6.240829007" />
22-
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.3233" />
21+
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.26100.1742" />
2322
<PackageReference Include="Microsoft.Windows.CsWinRT" Version="2.1.3" />
2423
</ItemGroup>
2524

src/Files.App.Controls/ThemedIcon/ThemedIcon.cs

+27-3
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
using Microsoft.UI.Xaml.Media;
77
using Microsoft.UI.Xaml.Markup;
88
using Microsoft.UI.Xaml.Shapes;
9-
using CommunityToolkit.WinUI.UI;
109
using Microsoft.UI.Xaml.Controls.Primitives;
1110
using System.Linq;
1211
using System.Collections.Generic;
1312
using System.Reflection.Emit;
13+
using System;
1414

1515
namespace Files.App.Controls
1616
{
@@ -371,6 +371,30 @@ private void UpdateIconColorTypeStates()
371371
layer.IconColorType = IconColorType;
372372
}
373373
}
374-
}
375-
}
374+
}
375+
376+
private T? FindAscendant<T>() where T : notnull, DependencyObject
377+
{
378+
T val;
379+
DependencyObject element = this;
380+
while (true)
381+
{
382+
DependencyObject parent = VisualTreeHelper.GetParent(element);
383+
if (parent is null)
384+
{
385+
return null;
386+
}
387+
388+
if (parent is T target)
389+
{
390+
val = target;
391+
break;
392+
}
393+
394+
element = parent;
395+
}
396+
397+
return val;
398+
}
399+
}
376400
}

src/Files.App.Launcher/Files.App.Launcher.vcxproj

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!-- Copyright (c) 2024 Files Community. Licensed under the MIT License. See the LICENSE. -->
33
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
4-
<Import Project="..\..\packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.props" Condition="Exists('..\..\packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.props')" />
4+
<Import Project="..\..\packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.props" Condition="Exists('..\..\packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.props')" />
55
<ItemGroup Label="ProjectConfigurations">
66
<ProjectConfiguration Include="Debug|arm64">
77
<Configuration>Debug</Configuration>
@@ -329,15 +329,15 @@
329329
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
330330
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
331331
<ImportGroup Label="ExtensionTargets">
332-
<Import Project="..\..\packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.targets" Condition="Exists('..\..\packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.targets')" />
333-
<Import Project="..\..\packages\Microsoft.Windows.ImplementationLibrary.1.0.240122.1\build\native\Microsoft.Windows.ImplementationLibrary.targets" Condition="Exists('..\..\packages\Microsoft.Windows.ImplementationLibrary.1.0.240122.1\build\native\Microsoft.Windows.ImplementationLibrary.targets')" />
332+
<Import Project="..\..\packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.targets" Condition="Exists('..\..\packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.targets')" />
333+
<Import Project="..\..\packages\Microsoft.Windows.ImplementationLibrary.1.0.240803.1\build\native\Microsoft.Windows.ImplementationLibrary.targets" Condition="Exists('..\..\packages\Microsoft.Windows.ImplementationLibrary.1.0.240803.1\build\native\Microsoft.Windows.ImplementationLibrary.targets')" />
334334
</ImportGroup>
335335
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
336336
<PropertyGroup>
337337
<ErrorText>This project references a NuGet package that is not on this computer. To download those packages, use Restore NuGet Packages. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
338338
</PropertyGroup>
339-
<Error Condition="!Exists('..\..\packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.props'))" />
340-
<Error Condition="!Exists('..\..\packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.targets'))" />
341-
<Error Condition="!Exists('..\..\packages\Microsoft.Windows.ImplementationLibrary.1.0.240122.1\build\native\Microsoft.Windows.ImplementationLibrary.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.Windows.ImplementationLibrary.1.0.240122.1\build\native\Microsoft.Windows.ImplementationLibrary.targets'))" />
339+
<Error Condition="!Exists('..\..\packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.props'))" />
340+
<Error Condition="!Exists('..\..\packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.targets'))" />
341+
<Error Condition="!Exists('..\..\packages\Microsoft.Windows.ImplementationLibrary.1.0.240803.1\build\native\Microsoft.Windows.ImplementationLibrary.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.Windows.ImplementationLibrary.1.0.240803.1\build\native\Microsoft.Windows.ImplementationLibrary.targets'))" />
342342
</Target>
343-
</Project>
343+
</Project>
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="Microsoft.Windows.CppWinRT" version="2.0.240111.5" targetFramework="native" />
4-
<package id="Microsoft.Windows.ImplementationLibrary" version="1.0.240122.1" targetFramework="native" />
3+
<package id="Microsoft.Windows.CppWinRT" version="2.0.240405.15" targetFramework="native" />
4+
<package id="Microsoft.Windows.ImplementationLibrary" version="1.0.240803.1" targetFramework="native" />
55
</packages>

src/Files.App/Files.App.csproj

+8-8
Original file line numberDiff line numberDiff line change
@@ -67,29 +67,29 @@
6767

6868
<ItemGroup>
6969
<PackageReference Include="ByteSize" Version="2.1.2" />
70-
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.2.2" />
70+
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.3.2" />
7171
<PackageReference Include="DiscUtils.Udf" Version="0.16.13" />
7272
<PackageReference Include="FluentFTP" Version="43.0.1" />
7373
<PackageReference Include="LibGit2Sharp" Version="0.30.0" />
74-
<PackageReference Include="MessageFormat" Version="7.1.0" />
74+
<PackageReference Include="MessageFormat" Version="7.1.1" />
7575
<PackageReference Include="Microsoft.Data.Sqlite.Core" Version="8.0.8" />
7676
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
7777
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
7878
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0" />
79-
<PackageReference Include="Microsoft.Web.WebView2" Version="1.0.2739.15" />
80-
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.3233" />
81-
<PackageReference Include="Sentry" Version="4.10.2" />
79+
<PackageReference Include="Microsoft.Web.WebView2" Version="1.0.2792.45" />
80+
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.26100.1742" />
81+
<PackageReference Include="Sentry" Version="4.11.0" />
8282
<PackageReference Include="SevenZipSharp" Version="1.0.2" />
83-
<PackageReference Include="SQLitePCLRaw.bundle_green" Version="2.1.8" />
83+
<PackageReference Include="SQLitePCLRaw.bundle_green" Version="2.1.10" />
8484
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.6.240829007" />
8585
<PackageReference Include="Microsoft.Graphics.Win2D" Version="1.2.0" />
8686
<PackageReference Include="CommunityToolkit.WinUI.UI.Behaviors" Version="7.1.2" />
8787
<PackageReference Include="CommunityToolkit.WinUI.UI.Controls" Version="7.1.2" />
8888
<PackageReference Include="TagLibSharp" Version="2.3.0" />
8989
<PackageReference Include="Tulpep.ActiveDirectoryObjectPicker" Version="3.0.11" />
9090
<PackageReference Include="WinUIEx" Version="2.3.4" />
91-
<PackageReference Include="Vanara.Windows.Extensions" Version="4.0.1" />
92-
<PackageReference Include="Vanara.Windows.Shell" Version="4.0.1" />
91+
<PackageReference Include="Vanara.Windows.Extensions" Version="4.0.4" />
92+
<PackageReference Include="Vanara.Windows.Shell" Version="4.0.4" />
9393
<PackageReference Include="Microsoft.Management.Infrastructure" Version="3.0.0" />
9494
<PackageReference Include="Microsoft.Management.Infrastructure.Runtime.Win" Version="3.0.0" />
9595
<PackageReference Include="Microsoft.Windows.CsWinRT" Version="2.1.3" />

src/Files.App/Utils/Storage/Operations/FileOperationsHelpers.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ public static Task SetClipboard(string[] filesToCopy, DataPackageOperation opera
127127
{
128128
using var shi = new ShellItem(fileToDeletePath[i]);
129129
using var file = SafetyExtensions.IgnoreExceptions(() => GetFirstFile(shi)) ?? shi;
130-
if ((uint?)file.Properties.GetValueOrDefault(PKEY_FilePlaceholderStatus) == PS_CLOUDFILE_PLACEHOLDER)
130+
if (file.Properties.TryGetValue(PKEY_FilePlaceholderStatus, out var value) && (uint?)value == PS_CLOUDFILE_PLACEHOLDER)
131131
{
132132
// Online only files cannot be tried for deletion, so they are treated as to be permanently deleted.
133133
shellOperationResult.Items.Add(new ShellOperationItemResult()

src/Files.App/Utils/Storage/Operations/FilesystemHelpers.cs

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
using System.IO;
99
using System.Runtime.InteropServices;
1010
using System.Runtime.InteropServices.ComTypes;
11+
using Vanara.Extensions;
1112
using Vanara.PInvoke;
1213
using Vanara.Windows.Shell;
1314
using Windows.ApplicationModel.DataTransfer;

src/Files.App/Views/Layouts/BaseLayoutPage.cs

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
using System.IO;
1616
using System.Runtime.CompilerServices;
1717
using System.Runtime.InteropServices.ComTypes;
18+
using Vanara.Extensions;
1819
using Vanara.PInvoke;
1920
using Windows.ApplicationModel.DataTransfer;
2021
using Windows.ApplicationModel.DataTransfer.DragDrop;

tests/Files.App.UITests/Files.App.UITests.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
</ItemGroup>
2929

3030
<ItemGroup>
31-
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.3233" />
31+
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.26100.1742" />
3232
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.6.240829007" />
3333
<PackageReference Include="Microsoft.Windows.CsWinRT" Version="2.1.3" />
3434
<Manifest Include="$(ApplicationManifest)" />

tests/Files.InteractionTests/Files.InteractionTests.csproj

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919

2020
<ItemGroup>
2121
<PackageReference Include="Appium.WebDriver" Version="4.4.5" />
22-
<PackageReference Include="Axe.Windows" Version="2.4.0" />
22+
<PackageReference Include="Axe.Windows" Version="2.4.1" />
2323
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
24-
<PackageReference Include="MSTest.TestAdapter" Version="3.5.2" />
25-
<PackageReference Include="MSTest.TestFramework" Version="3.5.2" />
24+
<PackageReference Include="MSTest.TestAdapter" Version="3.6.0" />
25+
<PackageReference Include="MSTest.TestFramework" Version="3.6.0" />
2626
</ItemGroup>
2727

2828
</Project>

tests/Files.InteractionTests/Helper/AxeHelper.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ internal static void InitializeAxe()
2424

2525
public static void AssertNoAccessibilityErrors()
2626
{
27-
var testResult = AccessibilityScanner.Scan(null).WindowScanOutputs.SelectMany(output => output.Errors).Where(error => error.Rule.ID != RuleId.BoundingRectangleNotNull);
27+
var testResult = AccessibilityScanner.Scan(null).WindowScanOutputs.SelectMany(output => output.Errors)
28+
.Where(error => !(error.Rule.ID is RuleId.BoundingRectangleNotNull or RuleId.SiblingUniqueAndFocusable));
2829
if (testResult.Count() != 0)
2930
{
3031
var mappedResult = testResult.Select(result => "Element " + result.Element.Properties["ControlType"] + " violated rule '" + result.Rule.Description + "'.");

tests/Files.InteractionTests/Tests/FolderTests.cs

+4
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
using OpenQA.Selenium;
55
using OpenQA.Selenium.Interactions;
6+
using System.Linq;
67
using System.Threading;
78

89
namespace Files.InteractionTests.Tests
@@ -65,6 +66,8 @@ private void CreateFolderTest()
6566
// Check for accessibility issues in the new folder prompt
6667
AxeHelper.AssertNoAccessibilityErrors();
6768

69+
SessionManager.Session.FindElementsByClassName("TextBox").Last().Click();
70+
6871
// Type the folder name
6972
var action = new Actions(SessionManager.Session);
7073
action.SendKeys("New Folder").Perform();
@@ -137,6 +140,7 @@ private void DeleteFolderTest()
137140
var action = new Actions(SessionManager.Session);
138141
action.SendKeys(Keys.Enter).Perform();
139142

143+
Thread.Sleep(3000);
140144

141145
// Select the "Renamed Folder - Copy" folder and clicks the "delete" button on the toolbar
142146
TestHelper.InvokeButtonByName("Renamed Folder - Copy");

0 commit comments

Comments
 (0)