Skip to content

Commit 021dfc4

Browse files
authored
[net10.0] Update net10.0 with main (#31699)
<!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> ### Description of Change <!-- Enter description of the fix in this section --> ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> Fixes # <!-- Are you targeting main? All PRs should target the main branch unless otherwise noted. -->
2 parents aeff2cf + 31e6e35 commit 021dfc4

File tree

1,229 files changed

+27273
-3025
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,229 files changed

+27273
-3025
lines changed

.github/copilot-instructions.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,9 @@ public class IssueXXXXX : _IssuesUITest
153153
- Compile both the HostApp project and TestCases.Shared.Tests project to ensure no build errors
154154
- Verify AutomationId references match between XAML and test code
155155
- Ensure tests follow the established naming and inheritance patterns
156+
- There should be only one `[Category]` attribute per test, pick the most appropriate one
157+
158+
IMPORTANT NOTE: When a new UI test category is added to `UITestCategories.cs`, we need to also update the `ui-tests.yml` to include this new category. Make sure to detect this in your reviews.
156159

157160
### Code Formatting
158161

Microsoft.Maui-dev.sln

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Controls.Foldable", "src\Co
130130
EndProject
131131
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{A9C514B9-1EE2-4A12-8E8A-CE16D87545C3}"
132132
EndProject
133-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MauiBlazorWebView.DeviceTests", "src\BlazorWebView\tests\MauiDeviceTests\MauiBlazorWebView.DeviceTests.csproj", "{5FEA7500-0ACE-4C26-9A7B-2EB3958CBBC6}"
133+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MauiBlazorWebView.DeviceTests", "src\BlazorWebView\tests\DeviceTests\MauiBlazorWebView.DeviceTests.csproj", "{5FEA7500-0ACE-4C26-9A7B-2EB3958CBBC6}"
134134
EndProject
135135
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SharedSource", "SharedSource", "{4F2926C8-43AB-4328-A735-D9EAD699F81D}"
136136
ProjectSection(SolutionItems) = preProject

Microsoft.Maui-mac.slnf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"src\\BlazorWebView\\samples\\MauiRazorClassLibrarySample\\MauiRazorClassLibrarySample.csproj",
66
"src\\BlazorWebView\\samples\\WebViewAppShared\\WebViewAppShared.csproj",
77
"src\\BlazorWebView\\src\\Maui\\Microsoft.AspNetCore.Components.WebView.Maui.csproj",
8-
"src\\BlazorWebView\\tests\\MauiDeviceTests\\MauiBlazorWebView.DeviceTests.csproj",
8+
"src\\BlazorWebView\\tests\\DeviceTests\\MauiBlazorWebView.DeviceTests.csproj",
99
"src\\Controls\\Foldable\\src\\Controls.Foldable.csproj",
1010
"src\\Controls\\Maps\\src\\Controls.Maps.csproj",
1111
"src\\Controls\\samples\\Controls.Sample.Profiling\\Maui.Controls.Sample.Profiling.csproj",

Microsoft.Maui-vscode.sln

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Controls.Foldable", "src\Co
123123
EndProject
124124
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{A9C514B9-1EE2-4A12-8E8A-CE16D87545C3}"
125125
EndProject
126-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MauiBlazorWebView.DeviceTests", "src\BlazorWebView\tests\MauiDeviceTests\MauiBlazorWebView.DeviceTests.csproj", "{5FEA7500-0ACE-4C26-9A7B-2EB3958CBBC6}"
126+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MauiBlazorWebView.DeviceTests", "src\BlazorWebView\tests\DeviceTests\MauiBlazorWebView.DeviceTests.csproj", "{5FEA7500-0ACE-4C26-9A7B-2EB3958CBBC6}"
127127
EndProject
128128
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SharedSource", "SharedSource", "{4F2926C8-43AB-4328-A735-D9EAD699F81D}"
129129
ProjectSection(SolutionItems) = preProject

Microsoft.Maui-windows.slnf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"src\\BlazorWebView\\src\\Maui\\Microsoft.AspNetCore.Components.WebView.Maui.csproj",
1010
"src\\BlazorWebView\\src\\WindowsForms\\Microsoft.AspNetCore.Components.WebView.WindowsForms.csproj",
1111
"src\\BlazorWebView\\src\\Wpf\\Microsoft.AspNetCore.Components.WebView.Wpf.csproj",
12-
"src\\BlazorWebView\\tests\\MauiDeviceTests\\MauiBlazorWebView.DeviceTests.csproj",
12+
"src\\BlazorWebView\\tests\\DeviceTests\\MauiBlazorWebView.DeviceTests.csproj",
1313
"src\\Controls\\Foldable\\src\\Controls.Foldable.csproj",
1414
"src\\Controls\\Maps\\src\\Controls.Maps.csproj",
1515
"src\\Controls\\samples\\Controls.Sample.Profiling\\Maui.Controls.Sample.Profiling.csproj",

Microsoft.Maui.LegacyControlGallery.sln

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Controls.Foldable", "src\Co
130130
EndProject
131131
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{A9C514B9-1EE2-4A12-8E8A-CE16D87545C3}"
132132
EndProject
133-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MauiBlazorWebView.DeviceTests", "src\BlazorWebView\tests\MauiDeviceTests\MauiBlazorWebView.DeviceTests.csproj", "{5FEA7500-0ACE-4C26-9A7B-2EB3958CBBC6}"
133+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MauiBlazorWebView.DeviceTests", "src\BlazorWebView\tests\DeviceTests\MauiBlazorWebView.DeviceTests.csproj", "{5FEA7500-0ACE-4C26-9A7B-2EB3958CBBC6}"
134134
EndProject
135135
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SharedSource", "SharedSource", "{4F2926C8-43AB-4328-A735-D9EAD699F81D}"
136136
ProjectSection(SolutionItems) = preProject

Microsoft.Maui.sln

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Controls.Foldable", "src\Co
138138
EndProject
139139
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{A9C514B9-1EE2-4A12-8E8A-CE16D87545C3}"
140140
EndProject
141-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MauiBlazorWebView.DeviceTests", "src\BlazorWebView\tests\MauiDeviceTests\MauiBlazorWebView.DeviceTests.csproj", "{5FEA7500-0ACE-4C26-9A7B-2EB3958CBBC6}"
141+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MauiBlazorWebView.DeviceTests", "src\BlazorWebView\tests\DeviceTests\MauiBlazorWebView.DeviceTests.csproj", "{5FEA7500-0ACE-4C26-9A7B-2EB3958CBBC6}"
142142
EndProject
143143
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SharedSource", "SharedSource", "{4F2926C8-43AB-4328-A735-D9EAD699F81D}"
144144
ProjectSection(SolutionItems) = preProject

docs/DevelopmentTips.md

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,3 +188,116 @@ These tests can be run using the Test Explorer in VS, or from the command line w
188188
```bash
189189
dotnet test src/TestUtils/src/Microsoft.Maui.IntegrationTests --logger "console;verbosity=diagnostic" --filter "Name=Build\(%22maui%22,%22net7.0%22,%22Debug%22,False\)"
190190
```
191+
192+
## Running Device Tests on Helix
193+
194+
.NET MAUI now supports running device tests on [.NET Engineering Services Helix](https://helix.dot.net) using XHarness. Helix provides cloud-based device testing infrastructure that enables running tests across multiple platforms and devices in parallel.
195+
196+
### Overview
197+
198+
Device tests can be run on the following platforms via Helix:
199+
200+
201+
The device test projects include:
202+
- `Controls.DeviceTests` - UI control tests
203+
- `Core.DeviceTests` - Core framework tests
204+
- `Graphics.DeviceTests` - Graphics and drawing tests
205+
- `Essentials.DeviceTests` - Platform API tests
206+
- `MauiBlazorWebView.DeviceTests` - Blazor WebView tests
207+
208+
209+
### Available Helix Queues
210+
211+
Check available queues at [helix.dot.net](https://helix.dot.net). The current configuration uses:
212+
213+
- **iOS**: `osx.15.arm64.Open`
214+
- **Mac Catalyst**: `osx.15.arm64.Open`
215+
- **Android**: `ubuntu.2204.amd64.android.33.open`
216+
217+
### Running Device Tests Locally
218+
219+
#### Step 1: Build Build Tasks
220+
First, restore tools and build the required MSBuild tasks:
221+
222+
```bash
223+
# Restore dotnet tools
224+
dotnet tool restore
225+
226+
# Build the Build tasks (required)
227+
./build.sh -restore -build -configuration Release -projects './Microsoft.Maui.BuildTasks.slnf' /bl:BuildBuildTasks.binlog -warnAsError false
228+
```
229+
230+
#### Step 2: Build Device Tests
231+
Build the device test projects:
232+
233+
```bash
234+
# Build device tests for all platforms
235+
./build.sh -restore -build -configuration Release /p:BuildDeviceTests=true /bl:BuildDeviceTests.binlog -warnAsError false
236+
```
237+
238+
#### Step 3: Send to Helix
239+
Submit the tests to Helix for execution:
240+
241+
```bash
242+
# Send to Helix for Android
243+
./eng/common/msbuild.sh ./eng/helix_xharness.proj /restore /p:TreatWarningsAsErrors=false /t:Test /p:TargetOS=android /bl:sendhelix.binlog -verbosity:diag
244+
245+
# Send to Helix for iOS
246+
./eng/common/msbuild.sh ./eng/helix_xharness.proj /restore /p:TreatWarningsAsErrors=false /t:Test /p:TargetOS=ios /bl:sendhelix.binlog -verbosity:diag
247+
248+
# Send to Helix for Mac Catalyst
249+
./eng/common/msbuild.sh ./eng/helix_xharness.proj /restore /p:TreatWarningsAsErrors=false /t:Test /p:TargetOS=maccatalyst /bl:sendhelix.binlog -verbosity:diag
250+
```
251+
252+
### Windows Commands
253+
254+
For Windows development, use the corresponding `.cmd` files:
255+
256+
```cmd
257+
REM Build Build tasks
258+
.\build.cmd -restore -build -configuration Release -projects ".\Microsoft.Maui.BuildTasks.slnf" /bl:BuildBuildTasks.binlog -warnAsError false
259+
260+
REM Build device tests
261+
.\build.cmd -restore -build -configuration Release /p:BuildDeviceTests=true /bl:BuildDeviceTests.binlog -warnAsError false
262+
263+
REM Send to Helix (Android example)
264+
.\eng\common\msbuild.cmd .\eng\helix_xharness.proj /restore /p:TreatWarningsAsErrors=false /t:Test /p:TargetOS=android /bl:sendhelix.binlog -verbosity:diag
265+
```
266+
267+
### Configuration Details
268+
269+
The Helix configuration is defined in `eng/helix_xharness.proj` and includes:
270+
271+
- **Timeouts**: 2-hour work item timeout, 1-hour test timeout
272+
- **Test Discovery**: Automatically discovers test bundles for each scenario
273+
- **Platform Targeting**: Specific target frameworks per platform
274+
- **Queue Selection**: Platform-appropriate Helix queues
275+
- **XHarness Integration**: Uses XHarness for device orchestration
276+
277+
### Troubleshooting
278+
279+
#### Common Issues
280+
281+
1. **Build failures**: Ensure you've built the BuildTasks first
282+
2. **Missing devices**: Check queue availability at [helix.dot.net](https://helix.dot.net)
283+
3. **Authentication**: For CI scenarios, ensure proper Azure DevOps access tokens
284+
4. **Timeouts**: Tests have generous timeouts but may need adjustment for complex scenarios
285+
286+
#### Logging and Diagnostics
287+
288+
- Use `/bl:filename.binlog` for detailed MSBuild logs
289+
- Add `-verbosity:diag` for maximum diagnostic output
290+
- Check Helix job results at the provided URL after submission
291+
292+
### CI Integration
293+
294+
The device tests are integrated into the CI pipeline via:
295+
- `eng/pipelines/common/stage-device-tests.yml` - Pipeline template
296+
- `eng/test-configuration.json` - Test retry configuration
297+
- Automatic execution on PR builds for qualifying changes
298+
299+
### Additional Resources
300+
301+
- [XHarness on Helix Documentation](https://github.com/dotnet/arcade/blob/main/src/Microsoft.DotNet.Helix/Sdk/tools/xharness-runner/Readme.md#android-apk-payloads)
302+
- [Helix Documentation](https://github.com/dotnet/arcade/tree/main/src/Microsoft.DotNet.Helix)
303+
- [Example Helix Run](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1115383&view=results)

docs/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ The table below outlines the different docs in this folder and what they are hel
1212
|----------------------|---------------------|---------------------|
1313
| [CG Manifest](CgManifest.md) | Guide to Component Governance manifest generation and management | Contributors who need to manage third-party dependencies or include CG manifest in packages |
1414
| [Code Documentation Guidelines](CodeDocumentationGuidelines.md) | Overview of the guidelines for the inline code documentation | Community members and collaborators looking to understand how to add good inline code comments that fuel our IntelliSense and online API docs |
15+
| [Development Tips](DevelopmentTips.md) | Development tips including debugging, building, and device testing on Helix | Contributors who need guidance on development workflows, including running device tests on cloud infrastructure |
1516
| [Issue management](IssueManagementPolicies.md) | Overview of policies in place to manage issues| Community members and collaborators looking to understand how we handle closed issues, issues that need author feedback, etc. |
1617
| [Release Schedule](ReleaseSchedule.md) | Overview of .NET MAUI version releases | Anyone who is interested in .NET MAUI versions and release dates |
1718
| [Triage process](TriageProcess.md)| Overview of the issue triage process used in the repo | Anyone looking to understand the triage process on the repo |

eng/Build.props

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
22
<ItemGroup>
3-
<ProjectToBuild Include="$(RepoRoot)Microsoft.Maui.BuildTasks.slnf" />
4-
<ProjectToBuild Include="$(RepoRoot)eng/Microsoft.Maui.Packages-mac.slnf" Condition="'$(OS)' != 'Windows_NT'" />
5-
<ProjectToBuild Include="$(RepoRoot)eng/Microsoft.Maui.Packages.slnf" Condition="'$(OS)' == 'Windows_NT'" />
3+
<ProjectToBuild Include="$(RepoRoot)Microsoft.Maui.BuildTasks.slnf" Condition="'$(BuildDeviceTests)' != 'true'" />
4+
<ProjectToBuild Include="$(RepoRoot)eng/Microsoft.Maui.Packages-mac.slnf" Condition="'$(OS)' != 'Windows_NT' And '$(BuildDeviceTests)' != 'true'" />
5+
<ProjectToBuild Include="$(RepoRoot)eng/Microsoft.Maui.Packages.slnf" Condition="'$(OS)' == 'Windows_NT' and '$(BuildDeviceTests)' != 'true'" />
6+
<ProjectToBuild Include="$(RepoRoot)src/Controls/tests/DeviceTests/Controls.DeviceTests.csproj" Condition="'$(BuildDeviceTests)' == 'true'" BuildInParallel="false"/>
7+
<ProjectToBuild Include="$(RepoRoot)src/Core/tests/DeviceTests/Core.DeviceTests.csproj" Condition="'$(BuildDeviceTests)' == 'true'" BuildInParallel="false"/>
8+
<ProjectToBuild Include="$(RepoRoot)src/Graphics/tests/DeviceTests/Graphics.DeviceTests.csproj" Condition="'$(BuildDeviceTests)' == 'true'" BuildInParallel="false" />
9+
<ProjectToBuild Include="$(RepoRoot)src/Essentials/test/DeviceTests/Essentials.DeviceTests.csproj" Condition="'$(BuildDeviceTests)' == 'true'" BuildInParallel="false">
10+
<AdditionalProperties>CodesignRequireProvisioningProfile=false</AdditionalProperties>
11+
</ProjectToBuild>
12+
<ProjectToBuild Include="$(RepoRoot)src/BlazorWebView/tests/DeviceTests/MauiBlazorWebView.DeviceTests.csproj" Condition="'$(BuildDeviceTests)' == 'true'" BuildInParallel="false" />
613
</ItemGroup>
714
</Project>

0 commit comments

Comments
 (0)