Skip to content
Draft
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
8695ed8
Add device tests for CommunityToolkit.Maui
ne0rrmatrix Aug 2, 2026
1e5b5d7
Add unit tests for MediaElement and Views components
ne0rrmatrix Aug 2, 2026
e293d0a
Add build mappings for Debug and Release configurations in solution f…
ne0rrmatrix Aug 2, 2026
d3d1950
Potential fix for pull request finding
ne0rrmatrix Aug 2, 2026
58f4a28
Merge branch 'main' into DeviceTests
ne0rrmatrix Aug 2, 2026
c96a70e
Updated to Use Maui XHarness
ne0rrmatrix Aug 2, 2026
830f254
Updated to match Maui Xharness behavior
ne0rrmatrix Aug 2, 2026
eda34bf
Merge branch 'DeviceTests' of https://github.com/ne0rrmatrix/MauiOld …
ne0rrmatrix Aug 2, 2026
4657c7a
Fix bad merge
ne0rrmatrix Aug 2, 2026
2c4af21
Remove unused configuration sections from solution files
ne0rrmatrix Aug 2, 2026
dc33c44
Suppress warning for unused PropertyChanged event in TestPopupViewModel
ne0rrmatrix Aug 2, 2026
8323f87
Enhance DeviceRunner and VisualRunnerPage with timeout handling and d…
ne0rrmatrix Aug 2, 2026
89f409a
Refactor device tests to use DeviceRunners infrastructure
ne0rrmatrix Aug 3, 2026
906b24f
Update .gitignore for benchmarks, test results, CLAUDE.md
ne0rrmatrix Aug 3, 2026
845c5a9
Update test infra: remove test runner, clarify docs, add tools
ne0rrmatrix Aug 3, 2026
b718bd7
Merge branch 'main' into DeviceTests
ne0rrmatrix Aug 3, 2026
cd79712
Remove dotnet-tools.json
ne0rrmatrix Aug 3, 2026
a486ffd
Enhance device test configurations and update Snackbar tests for expe…
ne0rrmatrix Aug 3, 2026
2d6d7e3
Remove unnecessary dependencies for device test jobs in CI workflow
ne0rrmatrix Aug 3, 2026
c3ed00b
Add Xcode version setup step and mark DeviceIdiom test as expected fa…
ne0rrmatrix Aug 3, 2026
203e6df
Add Xcode version environment variable for macOS Catalyst device tests
ne0rrmatrix Aug 3, 2026
13a5515
Refactor tests to eliminate reflection usage for accessing internal m…
ne0rrmatrix Aug 3, 2026
f3adc2b
Remove "ExpectedFailure" trait from various test classes to streamlin…
ne0rrmatrix Aug 4, 2026
3d2b3d8
Add "ExpectedFailure" trait to DeviceIdiom test for improved categori…
ne0rrmatrix Aug 4, 2026
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
44 changes: 44 additions & 0 deletions .github/instructions/device-tests.instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
description: 'Building and running device tests for the .NET MAUI Community Toolkit: the XHarness/XunitFrontController test runner, handler creation without page navigation, and avoiding infinite re-run loops'
applyTo: 'src/CommunityToolkit.Maui.DeviceTests/**/*.cs'
---

## Device Tests

Device tests live in `src/CommunityToolkit.Maui.DeviceTests` and run inside a real MAUI application on a target platform (Windows, Android, iOS, MacCatalyst). They verify platform-specific behavior that unit tests cannot.

### Test runner architecture

The runner mirrors the [dotnet/maui](https://github.com/dotnet/maui) team's approach:

- **`DeviceRunner`** discovers and executes tests directly through xunit's `XunitFrontController` (from the `xunit.runner.utility` package). Do **not** load the XHarness runner types via reflection (`Activator.CreateInstance` for `XUnitTestRunner`, or `XmlResultJargon` for results) — that fails silently and tests never run.
- Results are counted per-test from the execution sink messages (`ITestPassed`, `ITestFailed`, `ITestSkipped`). `ITestAssemblyFinished` does not expose a summary in the xunit version in use.
- The execution sink implements `IExecutionSink` directly (including `OnMessageWithTypes`) and must be marked `partial` to satisfy the CsWinRT analyzer on Windows (CsWinRT1028). The outer `DeviceRunner` must also be `partial` for the same reason.

### Creating handlers in tests

When a test needs a handler/platform view, create it directly with `element.ToHandler(context)` using the application's `MauiContext` — do **not** replace `window.Page` to force handler creation:

```csharp
var context = Application.Current?.Handler?.MauiContext;
var handler = element.ToHandler(context);
```

Replacing `window.Page` hides the visual test runner page (leaving stray content such as a "Click Me" button) and forces the runner to restore the page afterward. Handler creation must run on the main thread (`MainThread.InvokeOnMainThreadAsync`).

### Run tests exactly once

`VisualRunnerPage` runs tests from `OnAppearing`. Anything that reassigns `window.Page` (or otherwise re-shows the page) re-fires `OnAppearing` and can cause an infinite re-run loop. Guard with a `hasRun` flag so the suite executes a single time per app launch.

### Packages and feeds

- xunit **v2** (`2.9.3`) is required — XHarness is not compatible with xunit v3.
- XHarness packages (`Microsoft.DotNet.XHarness.TestRunners.Xunit`) come from the `dotnet-eng` Azure DevOps NuGet feed configured in `NuGet.config`, not nuget.org.

### Running

```bash
dotnet build src/CommunityToolkit.Maui.DeviceTests/CommunityToolkit.Maui.DeviceTests.csproj -f net10.0-windows10.0.19041.0 -t:Run
```

The visual runner displays results in the app UI and reports pass/fail counts to the trace log.
5 changes: 2 additions & 3 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -216,10 +216,9 @@ https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitati
</WarningsAsErrors>

<!--
Once the repo moves to .NET 10 SDK, TestingPlatformDotnetTestSupport should be
replaced by dotnet.config that opts in the new dotnet test experience for Microsoft.Testing.Platform
MTP mode for dotnet test is enabled via the "test" section in global.json.
TestingPlatformDotnetTestSupport is no longer needed on .NET 10 SDK+.
-->
<TestingPlatformDotnetTestSupport>true</TestingPlatformDotnetTestSupport>
<UseMicrosoftTestingPlatformRunner>true</UseMicrosoftTestingPlatformRunner>
</PropertyGroup>

Expand Down
3 changes: 3 additions & 0 deletions global.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,8 @@
"version": "10.0.100",
"rollForward": "latestFeature",
"allowPrerelease": false
},
"test": {
"runner": "Microsoft.Testing.Platform"
}
}
141 changes: 123 additions & 18 deletions samples/CommunityToolkit.Maui.Sample.slnx
Original file line number Diff line number Diff line change
@@ -1,20 +1,74 @@
<Solution>
<Folder Name="/Analyzers/">
<Project Path="../src/CommunityToolkit.Maui.Analyzers.CodeFixes/CommunityToolkit.Maui.Analyzers.CodeFixes.csproj" />
<Project Path="../src/CommunityToolkit.Maui.Analyzers/CommunityToolkit.Maui.Analyzers.csproj" />
<Project Path="../src/CommunityToolkit.Maui.Camera.Analyzers.CodeFixes/CommunityToolkit.Maui.Camera.Analyzers.CodeFixes.csproj" />
<Project Path="../src/CommunityToolkit.Maui.Camera.Analyzers/CommunityToolkit.Maui.Camera.Analyzers.csproj" />
<Project Path="../src/CommunityToolkit.Maui.MediaElement.Analyzers.CodeFixes/CommunityToolkit.Maui.MediaElement.Analyzers.CodeFixes.csproj" />
<Project Path="../src/CommunityToolkit.Maui.MediaElement.Analyzers/CommunityToolkit.Maui.MediaElement.Analyzers.csproj" />
<Project Path="../src/CommunityToolkit.Maui.MediaElement.SourceGenerators/CommunityToolkit.Maui.MediaElement.SourceGenerators.csproj" />
<Project Path="../src/CommunityToolkit.Maui.SourceGenerators/CommunityToolkit.Maui.SourceGenerators.csproj" />
<Project Path="../src/CommunityToolkit.Maui.Analyzers.CodeFixes/CommunityToolkit.Maui.Analyzers.CodeFixes.csproj">
<BuildMappings>
<BuildMapping Configuration="Debug" Platform="Any CPU" ProjectConfiguration="Debug" ProjectPlatform="Any CPU" />
<BuildMapping Configuration="Release" Platform="Any CPU" ProjectConfiguration="Release" ProjectPlatform="Any CPU" />
</BuildMappings>
</Project>
<Project Path="../src/CommunityToolkit.Maui.Analyzers/CommunityToolkit.Maui.Analyzers.csproj">
<BuildMappings>
<BuildMapping Configuration="Debug" Platform="Any CPU" ProjectConfiguration="Debug" ProjectPlatform="Any CPU" />
<BuildMapping Configuration="Release" Platform="Any CPU" ProjectConfiguration="Release" ProjectPlatform="Any CPU" />
</BuildMappings>
</Project>
<Project Path="../src/CommunityToolkit.Maui.Camera.Analyzers.CodeFixes/CommunityToolkit.Maui.Camera.Analyzers.CodeFixes.csproj">
<BuildMappings>
<BuildMapping Configuration="Debug" Platform="Any CPU" ProjectConfiguration="Debug" ProjectPlatform="Any CPU" />
<BuildMapping Configuration="Release" Platform="Any CPU" ProjectConfiguration="Release" ProjectPlatform="Any CPU" />
</BuildMappings>
</Project>
<Project Path="../src/CommunityToolkit.Maui.Camera.Analyzers/CommunityToolkit.Maui.Camera.Analyzers.csproj">
<BuildMappings>
<BuildMapping Configuration="Debug" Platform="Any CPU" ProjectConfiguration="Debug" ProjectPlatform="Any CPU" />
<BuildMapping Configuration="Release" Platform="Any CPU" ProjectConfiguration="Release" ProjectPlatform="Any CPU" />
</BuildMappings>
</Project>
<Project Path="../src/CommunityToolkit.Maui.MediaElement.Analyzers.CodeFixes/CommunityToolkit.Maui.MediaElement.Analyzers.CodeFixes.csproj">
<BuildMappings>
<BuildMapping Configuration="Debug" Platform="Any CPU" ProjectConfiguration="Debug" ProjectPlatform="Any CPU" />
<BuildMapping Configuration="Release" Platform="Any CPU" ProjectConfiguration="Release" ProjectPlatform="Any CPU" />
</BuildMappings>
</Project>
<Project Path="../src/CommunityToolkit.Maui.MediaElement.Analyzers/CommunityToolkit.Maui.MediaElement.Analyzers.csproj">
<BuildMappings>
<BuildMapping Configuration="Debug" Platform="Any CPU" ProjectConfiguration="Debug" ProjectPlatform="Any CPU" />
<BuildMapping Configuration="Release" Platform="Any CPU" ProjectConfiguration="Release" ProjectPlatform="Any CPU" />
</BuildMappings>
</Project>
<Project Path="../src/CommunityToolkit.Maui.MediaElement.SourceGenerators/CommunityToolkit.Maui.MediaElement.SourceGenerators.csproj">
<BuildMappings>
<BuildMapping Configuration="Debug" Platform="Any CPU" ProjectConfiguration="Debug" ProjectPlatform="Any CPU" />
<BuildMapping Configuration="Release" Platform="Any CPU" ProjectConfiguration="Release" ProjectPlatform="Any CPU" />
</BuildMappings>
</Project>
<Project Path="../src/CommunityToolkit.Maui.SourceGenerators/CommunityToolkit.Maui.SourceGenerators.csproj">
<BuildMappings>
<BuildMapping Configuration="Debug" Platform="Any CPU" ProjectConfiguration="Debug" ProjectPlatform="Any CPU" />
<BuildMapping Configuration="Release" Platform="Any CPU" ProjectConfiguration="Release" ProjectPlatform="Any CPU" />
</BuildMappings>
</Project>
</Folder>
<Folder Name="/Benchmarks/">
<Project Path="../src/CommunityToolkit.Maui.Analyzers.Benchmarks/CommunityToolkit.Maui.Analyzers.Benchmarks.csproj" />
<Project Path="../src/CommunityToolkit.Maui.SourceGenerators.Benchmarks/CommunityToolkit.Maui.SourceGenerators.Benchmarks.csproj" />
<Project Path="../src/CommunityToolkit.Maui.Analyzers.Benchmarks/CommunityToolkit.Maui.Analyzers.Benchmarks.csproj">
<BuildMappings>
<BuildMapping Configuration="Debug" Platform="Any CPU" ProjectConfiguration="Debug" ProjectPlatform="Any CPU" />
<BuildMapping Configuration="Release" Platform="Any CPU" ProjectConfiguration="Release" ProjectPlatform="Any CPU" />
</BuildMappings>
</Project>
<Project Path="../src/CommunityToolkit.Maui.SourceGenerators.Benchmarks/CommunityToolkit.Maui.SourceGenerators.Benchmarks.csproj">
<BuildMappings>
<BuildMapping Configuration="Debug" Platform="Any CPU" ProjectConfiguration="Debug" ProjectPlatform="Any CPU" />
<BuildMapping Configuration="Release" Platform="Any CPU" ProjectConfiguration="Release" ProjectPlatform="Any CPU" />
</BuildMappings>
</Project>
</Folder>
<Folder Name="/Samples/">
<Project Path="CommunityToolkit.Maui.Sample/CommunityToolkit.Maui.Sample.csproj">
<BuildMappings>
<BuildMapping Configuration="Debug" Platform="Any CPU" ProjectConfiguration="Debug" ProjectPlatform="Any CPU" />
<BuildMapping Configuration="Release" Platform="Any CPU" ProjectConfiguration="Release" ProjectPlatform="Any CPU" />
</BuildMappings>
<Deploy />
</Project>
</Folder>
Expand All @@ -27,16 +81,67 @@
<File Path="../global.json" />
</Folder>
<Folder Name="/Tests/">
<Project Path="../src/CommunityToolkit.Maui.Analyzers.UnitTests/CommunityToolkit.Maui.Analyzers.UnitTests.csproj" />
<Project Path="../src/CommunityToolkit.Maui.MediaElement.SourceGenerators.UnitTests/CommunityToolkit.Maui.MediaElement.SourceGenerators.UnitTests.csproj" />
<Project Path="../src/CommunityToolkit.Maui.SourceGenerators.UnitTests/CommunityToolkit.Maui.SourceGenerators.UnitTests.csproj" />
<Project Path="../src/CommunityToolkit.Maui.Analyzers.UnitTests/CommunityToolkit.Maui.Analyzers.UnitTests.csproj">
<BuildMappings>
<BuildMapping Configuration="Debug" Platform="Any CPU" ProjectConfiguration="Debug" ProjectPlatform="Any CPU" />
<BuildMapping Configuration="Release" Platform="Any CPU" ProjectConfiguration="Release" ProjectPlatform="Any CPU" />
</BuildMappings>
</Project>
<Project Path="../src/CommunityToolkit.Maui.DeviceTests/CommunityToolkit.Maui.DeviceTests.csproj">
<BuildMappings>
<BuildMapping Configuration="Debug" Platform="Any CPU" ProjectConfiguration="Debug" ProjectPlatform="Any CPU" />
<BuildMapping Configuration="Release" Platform="Any CPU" ProjectConfiguration="Release" ProjectPlatform="Any CPU" />
</BuildMappings>
<Deploy />
</Project>
<Project Path="../src/CommunityToolkit.Maui.MediaElement.SourceGenerators.UnitTests/CommunityToolkit.Maui.MediaElement.SourceGenerators.UnitTests.csproj">
<BuildMappings>
<BuildMapping Configuration="Debug" Platform="Any CPU" ProjectConfiguration="Debug" ProjectPlatform="Any CPU" />
<BuildMapping Configuration="Release" Platform="Any CPU" ProjectConfiguration="Release" ProjectPlatform="Any CPU" />
</BuildMappings>
</Project>
<Project Path="../src/CommunityToolkit.Maui.SourceGenerators.UnitTests/CommunityToolkit.Maui.SourceGenerators.UnitTests.csproj">
<BuildMappings>
<BuildMapping Configuration="Debug" Platform="Any CPU" ProjectConfiguration="Debug" ProjectPlatform="Any CPU" />
<BuildMapping Configuration="Release" Platform="Any CPU" ProjectConfiguration="Release" ProjectPlatform="Any CPU" />
</BuildMappings>
</Project>
<Project Path="../src/CommunityToolkit.Maui.UnitTests/CommunityToolkit.Maui.UnitTests.csproj">
<BuildMappings>
<BuildMapping Configuration="Debug" Platform="Any CPU" ProjectConfiguration="Debug" ProjectPlatform="Any CPU" />
<BuildMapping Configuration="Release" Platform="Any CPU" ProjectConfiguration="Release" ProjectPlatform="Any CPU" />
</BuildMappings>
<Deploy />
</Project>
</Folder>
<Project Path="../src/CommunityToolkit.Maui.Camera/CommunityToolkit.Maui.Camera.csproj" />
<Project Path="../src/CommunityToolkit.Maui.Core/CommunityToolkit.Maui.Core.csproj" />
<Project Path="../src/CommunityToolkit.Maui.Maps/CommunityToolkit.Maui.Maps.csproj" />
<Project Path="../src/CommunityToolkit.Maui.MediaElement/CommunityToolkit.Maui.MediaElement.csproj" />
<Project Path="../src/CommunityToolkit.Maui/CommunityToolkit.Maui.csproj" />
<Project Path="../src/CommunityToolkit.Maui.Camera/CommunityToolkit.Maui.Camera.csproj">
<BuildMappings>
<BuildMapping Configuration="Debug" Platform="Any CPU" ProjectConfiguration="Debug" ProjectPlatform="Any CPU" />
<BuildMapping Configuration="Release" Platform="Any CPU" ProjectConfiguration="Release" ProjectPlatform="Any CPU" />
</BuildMappings>
</Project>
<Project Path="../src/CommunityToolkit.Maui.Core/CommunityToolkit.Maui.Core.csproj">
<BuildMappings>
<BuildMapping Configuration="Debug" Platform="Any CPU" ProjectConfiguration="Debug" ProjectPlatform="Any CPU" />
<BuildMapping Configuration="Release" Platform="Any CPU" ProjectConfiguration="Release" ProjectPlatform="Any CPU" />
</BuildMappings>
</Project>
<Project Path="../src/CommunityToolkit.Maui.Maps/CommunityToolkit.Maui.Maps.csproj">
<BuildMappings>
<BuildMapping Configuration="Debug" Platform="Any CPU" ProjectConfiguration="Debug" ProjectPlatform="Any CPU" />
<BuildMapping Configuration="Release" Platform="Any CPU" ProjectConfiguration="Release" ProjectPlatform="Any CPU" />
</BuildMappings>
</Project>
<Project Path="../src/CommunityToolkit.Maui.MediaElement/CommunityToolkit.Maui.MediaElement.csproj">
<BuildMappings>
<BuildMapping Configuration="Debug" Platform="Any CPU" ProjectConfiguration="Debug" ProjectPlatform="Any CPU" />
<BuildMapping Configuration="Release" Platform="Any CPU" ProjectConfiguration="Release" ProjectPlatform="Any CPU" />
</BuildMappings>
</Project>
<Project Path="../src/CommunityToolkit.Maui/CommunityToolkit.Maui.csproj">
<BuildMappings>
<BuildMapping Configuration="Debug" Platform="Any CPU" ProjectConfiguration="Debug" ProjectPlatform="Any CPU" />
<BuildMapping Configuration="Release" Platform="Any CPU" ProjectConfiguration="Release" ProjectPlatform="Any CPU" />
</BuildMappings>
</Project>
</Solution>
18 changes: 18 additions & 0 deletions src/CommunityToolkit.Maui.DeviceTests/App.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using CommunityToolkit.Maui.DeviceTests.Runners;

namespace CommunityToolkit.Maui.DeviceTests;

public partial class App : Application
{
readonly VisualRunnerPage visualRunnerPage;

public App(VisualRunnerPage visualRunnerPage)
{
this.visualRunnerPage = visualRunnerPage;
}

protected override Window CreateWindow(IActivationState? activationState)
{
return new Window(visualRunnerPage);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>$(NetVersion)-android;$(NetVersion)-ios;$(NetVersion)-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);$(NetVersion)-windows10.0.19041.0</TargetFrameworks>
<OutputType>Exe</OutputType>
<UseMaui>true</UseMaui>
<SingleProject>true</SingleProject>
<IsTestProject>true</IsTestProject>
<RootNamespace>CommunityToolkit.Maui.DeviceTests</RootNamespace>

<!-- Display name -->
<ApplicationTitle>CommunityToolkit.Maui Device Tests</ApplicationTitle>

<!-- App Identifier -->
<ApplicationId>com.microsoft.CommunityToolkit.Maui.DeviceTests</ApplicationId>
<ApplicationIdGuid>A1B2C3D4-E5F6-7890-ABCD-EF1234567890</ApplicationIdGuid>

<!-- Versions -->
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
<ApplicationVersion>1</ApplicationVersion>

<!-- Windows unpackaged for easier local debugging -->
<WindowsPackageType>None</WindowsPackageType>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>

<!-- Suppress xunit analyzer rules for pre-existing test patterns -->
<!-- IL3000: Assembly.Location is valid for MAUI device test apps (not single-file published) -->
<NoWarn>$(NoWarn);xUnit2032;xUnit1004;IL3000</NoWarn>

<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">15.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">15.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiPackageVersion)" />
<PackageReference Include="Microsoft.DotNet.XHarness.TestRunners.Xunit" Version="11.0.0-prerelease.26230.4" />

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think you should use the https://github.com/mattleibow/DeviceRunners project from @mattleibow, that is what .net maui uses and can run on CI

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I will migrate to @matt-bartholomew project design

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I will migrate to @matt-bartholomew project design

I think you meant @mattleibow

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I have refactored it as suggested

<PackageReference Include="xunit" Version="2.9.3" />
<PackageReference Include="xunit.runner.utility" Version="2.9.3" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\CommunityToolkit.Maui\CommunityToolkit.Maui.csproj" />
<ProjectReference Include="..\CommunityToolkit.Maui.Core\CommunityToolkit.Maui.Core.csproj" />
<ProjectReference Include="..\CommunityToolkit.Maui.Camera\CommunityToolkit.Maui.Camera.csproj" />
<ProjectReference Include="..\CommunityToolkit.Maui.MediaElement\CommunityToolkit.Maui.MediaElement.csproj" />
<ProjectReference Include="..\CommunityToolkit.Maui.Maps\CommunityToolkit.Maui.Maps.csproj" />
</ItemGroup>

<ItemGroup>
<MauiIcon Include="Resources\AppIcon\appicon.svg" ForegroundFile="Resources\AppIcon\appiconfg.svg" Color="#512BD4" />
<MauiSplashScreen Include="Resources\Splash\splash.svg" Color="#512BD4" BaseSize="128,128" />
</ItemGroup>

<!-- Include/exclude platform-specific files -->
<ItemGroup Condition="!$(TargetFramework.Contains('-android'))">
<Compile Remove="**\*.android.cs" />
</ItemGroup>
<ItemGroup Condition="!$(TargetFramework.Contains('-ios')) and !$(TargetFramework.Contains('-maccatalyst'))">
<Compile Remove="**\*.macios.cs" />
</ItemGroup>
<ItemGroup Condition="!$(TargetFramework.Contains('-windows'))">
<Compile Remove="**\*.windows.cs" />
</ItemGroup>

</Project>
3 changes: 3 additions & 0 deletions src/CommunityToolkit.Maui.DeviceTests/GlobalUsings.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
global using Xunit;

[assembly: CollectionBehavior(CollectionBehavior.CollectionPerAssembly, DisableTestParallelization = true, MaxParallelThreads = 1)]
Loading
Loading