Skip to content
Merged
Prev Previous commit
Renamed IsNetXOrGreater build props to avoid potential conflicts
  • Loading branch information
jamescrosswell committed Jun 18, 2025
commit 10a9aeb4aa0058dc2043b62ddadeac96e9ce5365
4 changes: 2 additions & 2 deletions src/Sentry/Platforms/Native/Sentry.Native.targets
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
</None>
</ItemGroup>

<Target Name="CleanNativeSDK" BeforeTargets="CoreClean" Condition="'$(IsNet8OrGreater)' == 'true'">
<Target Name="CleanNativeSDK" BeforeTargets="CoreClean" Condition="'$(_SentryIsNet8OrGreater)' == 'true'">
<Message Text="Inside Custom Clean" Importance="high"/>
<RemoveDir Directories="$(SentryNativeOutputDirectory)" />
<RemoveDir Directories="$(SentryNativeSourceDirectory)build" />
Expand All @@ -86,7 +86,7 @@
built already on each native platform and fetched for the final .net build. -->
<Target Name="_BuildSentryNativeSDK"
BeforeTargets="DispatchToInnerBuilds;BeforeBuild"
Condition="'$(IsNet8OrGreater)' == 'true' and '$(CI)' != 'true'"
Condition="'$(_SentryIsNet8OrGreater)' == 'true' and '$(CI)' != 'true'"
Inputs="$(SentryNativeBuildInputs)"
Outputs="$(SentryNativeBuildOutputs)">
<!-- We want a "-Clean" because if the build script changes, previous cmake cache may contain invalid defines. -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

<PropertyGroup>
<!-- net8.0 or greater -->
<FrameworkSupportsNative Condition="'$(IsNet8OrGreater)' == 'true' and ('$(OutputType)' == 'Exe' or '$(OutputType)' == 'WinExe')">true</FrameworkSupportsNative>
<FrameworkSupportsNative Condition="'$(_SentryIsNet8OrGreater)' == 'true' and ('$(OutputType)' == 'Exe' or '$(OutputType)' == 'WinExe')">true</FrameworkSupportsNative>
<!-- Make it opt-out -->
<FrameworkSupportsNative Condition="'$(SentryNative)' == 'false' or '$(SentryNative)' == 'disable'">false</FrameworkSupportsNative>
</PropertyGroup>
Expand Down
4 changes: 2 additions & 2 deletions src/Sentry/buildTransitive/Sentry.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<!-- Helpful properties used elsewhere -->
<PropertyGroup Condition="'$(TargetFramework)' != ''">
<_SentryTargetFrameworkVersion>$([MSBuild]::GetTargetFrameworkVersion($(TargetFramework)))</_SentryTargetFrameworkVersion>
<IsNet8OrGreater>$([MSBuild]::VersionGreaterThanOrEquals($(_SentryTargetFrameworkVersion), 8.0))</IsNet8OrGreater>
<IsNet9OrGreater>$([MSBuild]::VersionGreaterThanOrEquals($(_SentryTargetFrameworkVersion), 9.0))</IsNet9OrGreater>
<_SentryIsNet8OrGreater>$([MSBuild]::VersionGreaterThanOrEquals($(_SentryTargetFrameworkVersion), 8.0))</_SentryIsNet8OrGreater>
<_SentryIsNet9OrGreater>$([MSBuild]::VersionGreaterThanOrEquals($(_SentryTargetFrameworkVersion), 9.0))</_SentryIsNet9OrGreater>
</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion test/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

<!-- Visual tests need net9.0+ mobile and are flaky when using the headless runner on CI -->
<EnableMauiDeviceTestVisualRunner>false</EnableMauiDeviceTestVisualRunner>
<EnableMauiDeviceTestVisualRunner Condition="'$(IsNet9OrGreater)' == 'true' AND '$(PlatformIsMobile)' == 'true' AND '$(ContinuousIntegrationBuild)' != 'true'">true</EnableMauiDeviceTestVisualRunner>
<EnableMauiDeviceTestVisualRunner Condition="'$(_SentryIsNet9OrGreater)' == 'true' AND '$(PlatformIsMobile)' == 'true' AND '$(ContinuousIntegrationBuild)' != 'true'">true</EnableMauiDeviceTestVisualRunner>
</PropertyGroup>
<!--
Workaround for Verify issue with scrubbing when running in Rider on Windows.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
<ProjectReference Include="..\Sentry.Tests\Sentry.Tests.csproj"/>
<ProjectReference Include="..\Sentry.Extensions.Logging.Tests\Sentry.Extensions.Logging.Tests.csproj"/>
<ProjectReference Include="..\Sentry.Maui.Tests\Sentry.Maui.Tests.csproj"/>
<ProjectReference Include="..\Sentry.Maui.CommunityToolkit.Mvvm.Tests\Sentry.Maui.CommunityToolkit.Mvvm.Tests.csproj" Condition="'$(IsNet9OrGreater)' == 'true'"/>
<ProjectReference Include="..\Sentry.Maui.CommunityToolkit.Mvvm.Tests\Sentry.Maui.CommunityToolkit.Mvvm.Tests.csproj" Condition="'$(_SentryIsNet9OrGreater)' == 'true'"/>
</ItemGroup>

</Project>
Loading