Skip to content

Commit 501ae1f

Browse files
Simplified TFMs in Maui.Device.TestApp
1 parent 09c6df9 commit 501ae1f

File tree

3 files changed

+11
-12
lines changed

3 files changed

+11
-12
lines changed

Directory.Build.props

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,4 +106,9 @@
106106
<InternalsVisibleTo Include="DynamicProxyGenAssembly2" PublicKey="0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7" />
107107
</ItemGroup>
108108

109+
<!-- Helpful properties used elsewhere -->
110+
<PropertyGroup>
111+
<TargetFrameworkVersion>$([MSBuild]::GetTargetFrameworkVersion($(TargetFramework)))</TargetFrameworkVersion>
112+
<TargetFrameworkIsNet9OrGreater Condition="$([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), 9.0))">true</TargetFrameworkIsNet9OrGreater>
113+
</PropertyGroup>
109114
</Project>

test/Directory.Build.props

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@
1212
<!-- Ignore "Naming rule violation: Missing suffix: 'Async'" -->
1313
<NoWarn>$(NoWarn);IDE1006</NoWarn>
1414

15-
<!-- Set this to true to enable the visual test runner in MAUI. This is flaky in CI and needs net9.0 or later -->
16-
<EnableMauiDeviceTestVisualRunner>true</EnableMauiDeviceTestVisualRunner>
15+
<!-- Visual tests need net9.0+ mobile and are flaky when using the headless runner on CI -->
16+
<EnableMauiDeviceTestVisualRunner>false</EnableMauiDeviceTestVisualRunner>
17+
<EnableMauiDeviceTestVisualRunner Condition="'$(TargetFrameworkIsNet9OrGreater)' == 'true' AND '$(PlatformIsMobile)' == 'true' AND '$(ContinuousIntegrationBuild)' != 'true'">true</EnableMauiDeviceTestVisualRunner>
1718
</PropertyGroup>
19+
1820
<!--
1921
Workaround for Verify issue with scrubbing when running in Rider on Windows.
2022
Ensures that the volume label is upper cased ("C:" instead of "c:"), which is read

test/Sentry.Maui.Device.TestApp/Sentry.Maui.Device.TestApp.csproj

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,9 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

3-
<PropertyGroup Condition="'$(EnableMauiDeviceTestVisualRunner)' == 'true'">
4-
<TargetFrameworks>net9.0-ios;net9.0-android</TargetFrameworks>
5-
<DefineConstants>$(DefineConstants);VISUAL_RUNNER</DefineConstants>
6-
</PropertyGroup>
7-
8-
<PropertyGroup Condition="'$(EnableMauiDeviceTestVisualRunner)' != 'true'">
3+
<PropertyGroup>
94
<TargetFrameworks>$(TargetFrameworks);net8.0-android;net9.0-android</TargetFrameworks>
105
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('OSX'))">$(TargetFrameworks);net8.0-ios;net9.0-ios</TargetFrameworks>
11-
<!-- Currently broken on .NET 7, see
12-
- https://github.com/dotnet/maui/issues/18573
13-
- https://developercommunity.visualstudio.com/t/MAUI0000:-SystemMissingMethodException:/10505327?sort=newest&ftype=problem
14-
<TargetFrameworks Condition="'$(NO_MACCATALYST)' == '' And $([MSBuild]::IsOSPlatform('OSX'))">$(TargetFrameworks);net7.0-maccatalyst</TargetFrameworks> -->
6+
<DefineConstants Condition="'$(EnableMauiDeviceTestVisualRunner)' == 'true'">$(DefineConstants);VISUAL_RUNNER</DefineConstants>
157
</PropertyGroup>
168

179
<PropertyGroup>

0 commit comments

Comments
 (0)