From 61fe9acd4d1c5ef66dc0f7913fd6fe480e74333b Mon Sep 17 00:00:00 2001 From: James Crosswell Date: Thu, 5 Jun 2025 16:17:37 +1200 Subject: [PATCH 1/8] chore: Added IsNet8OrGreater build prop for readablility Resolves #4203: - https://github.com/getsentry/sentry-dotnet/issues/4203 #skip-changelog --- Directory.Build.props | 3 ++- .../Platforms/Native/buildTransitive/Sentry.Native.targets | 2 +- test/Directory.Build.props | 2 +- .../Sentry.Maui.Device.TestApp.csproj | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 4b834bfbb5..5a6cfaf8e0 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -109,6 +109,7 @@ $([MSBuild]::GetTargetFrameworkVersion($(TargetFramework))) - true + true + true diff --git a/src/Sentry/Platforms/Native/buildTransitive/Sentry.Native.targets b/src/Sentry/Platforms/Native/buildTransitive/Sentry.Native.targets index ea1fd7584e..297da93d99 100644 --- a/src/Sentry/Platforms/Native/buildTransitive/Sentry.Native.targets +++ b/src/Sentry/Platforms/Native/buildTransitive/Sentry.Native.targets @@ -20,7 +20,7 @@ - true + true false diff --git a/test/Directory.Build.props b/test/Directory.Build.props index c42f5271ab..7d4ab27a08 100644 --- a/test/Directory.Build.props +++ b/test/Directory.Build.props @@ -14,7 +14,7 @@ false - true + true From 31b6dcba8437c2396465327801d730d3e1d091b7 Mon Sep 17 00:00:00 2001 From: James Crosswell Date: Mon, 16 Jun 2025 11:05:05 +1200 Subject: [PATCH 3/8] Update Directory.Build.props --- Directory.Build.props | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Directory.Build.props b/Directory.Build.props index eec11f3859..68f955f8be 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -114,7 +114,9 @@ $([MSBuild]::GetTargetFrameworkVersion($(TargetFramework))) + false true + false true From 1965be3733918f3f7e32ff72875133803952cd7f Mon Sep 17 00:00:00 2001 From: James Crosswell Date: Mon, 16 Jun 2025 11:05:20 +1200 Subject: [PATCH 4/8] Update Sentry.Native.targets --- src/Sentry/Platforms/Native/Sentry.Native.targets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Sentry/Platforms/Native/Sentry.Native.targets b/src/Sentry/Platforms/Native/Sentry.Native.targets index 90f21f6275..e0a88538b1 100644 --- a/src/Sentry/Platforms/Native/Sentry.Native.targets +++ b/src/Sentry/Platforms/Native/Sentry.Native.targets @@ -76,7 +76,7 @@ - + From 6d82a1d199ef27db94304c9c296e6dea6010072c Mon Sep 17 00:00:00 2001 From: James Crosswell Date: Tue, 17 Jun 2025 15:56:00 +1200 Subject: [PATCH 5/8] Ensure common build props are available when building transitively --- src/Sentry/Sentry.csproj | 2 ++ src/Sentry/buildTransitive/Sentry.props | 9 +++++++++ 2 files changed, 11 insertions(+) create mode 100644 src/Sentry/buildTransitive/Sentry.props diff --git a/src/Sentry/Sentry.csproj b/src/Sentry/Sentry.csproj index f5d358f8bc..b987d1042e 100644 --- a/src/Sentry/Sentry.csproj +++ b/src/Sentry/Sentry.csproj @@ -194,6 +194,8 @@ + + diff --git a/src/Sentry/buildTransitive/Sentry.props b/src/Sentry/buildTransitive/Sentry.props new file mode 100644 index 0000000000..ca56a68783 --- /dev/null +++ b/src/Sentry/buildTransitive/Sentry.props @@ -0,0 +1,9 @@ + + + + + $([MSBuild]::GetTargetFrameworkVersion($(TargetFramework))) + $([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), 8.0)) + $([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), 9.0)) + + From a965edc2acf2cb6cc53aceb7e46e6591d25aea8d Mon Sep 17 00:00:00 2001 From: James Crosswell Date: Tue, 17 Jun 2025 15:56:10 +1200 Subject: [PATCH 6/8] Update Directory.Build.props --- Directory.Build.props | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 68f955f8be..c6b5e40b03 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -41,14 +41,12 @@ - + $([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) 12.2 15.0 @@ -111,12 +109,6 @@ - - - $([MSBuild]::GetTargetFrameworkVersion($(TargetFramework))) - false - true - false - true - + + From 96905699c0db94b45fb2f582002037202f10bb2f Mon Sep 17 00:00:00 2001 From: James Crosswell Date: Wed, 18 Jun 2025 15:06:39 +1200 Subject: [PATCH 7/8] Renamed TargetFrameworkVersion to avoid conflicts --- src/Sentry/buildTransitive/Sentry.props | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Sentry/buildTransitive/Sentry.props b/src/Sentry/buildTransitive/Sentry.props index ca56a68783..1a1d208f69 100644 --- a/src/Sentry/buildTransitive/Sentry.props +++ b/src/Sentry/buildTransitive/Sentry.props @@ -2,8 +2,8 @@ - $([MSBuild]::GetTargetFrameworkVersion($(TargetFramework))) - $([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), 8.0)) - $([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), 9.0)) + <_SentryTargetFrameworkVersion>$([MSBuild]::GetTargetFrameworkVersion($(TargetFramework))) + $([MSBuild]::VersionGreaterThanOrEquals($(_SentryTargetFrameworkVersion), 8.0)) + $([MSBuild]::VersionGreaterThanOrEquals($(_SentryTargetFrameworkVersion), 9.0)) - + From 10a9aeb4aa0058dc2043b62ddadeac96e9ce5365 Mon Sep 17 00:00:00 2001 From: James Crosswell Date: Wed, 18 Jun 2025 15:10:57 +1200 Subject: [PATCH 8/8] Renamed IsNetXOrGreater build props to avoid potential conflicts --- src/Sentry/Platforms/Native/Sentry.Native.targets | 4 ++-- .../Platforms/Native/buildTransitive/Sentry.Native.targets | 2 +- src/Sentry/buildTransitive/Sentry.props | 4 ++-- test/Directory.Build.props | 2 +- .../Sentry.Maui.Device.TestApp.csproj | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Sentry/Platforms/Native/Sentry.Native.targets b/src/Sentry/Platforms/Native/Sentry.Native.targets index 1c6520e751..befa26d123 100644 --- a/src/Sentry/Platforms/Native/Sentry.Native.targets +++ b/src/Sentry/Platforms/Native/Sentry.Native.targets @@ -76,7 +76,7 @@ - + @@ -86,7 +86,7 @@ built already on each native platform and fetched for the final .net build. --> diff --git a/src/Sentry/Platforms/Native/buildTransitive/Sentry.Native.targets b/src/Sentry/Platforms/Native/buildTransitive/Sentry.Native.targets index e35f0ca1b2..8dd9ec60ae 100644 --- a/src/Sentry/Platforms/Native/buildTransitive/Sentry.Native.targets +++ b/src/Sentry/Platforms/Native/buildTransitive/Sentry.Native.targets @@ -20,7 +20,7 @@ - true + true false diff --git a/src/Sentry/buildTransitive/Sentry.props b/src/Sentry/buildTransitive/Sentry.props index 1a1d208f69..c837e9af9e 100644 --- a/src/Sentry/buildTransitive/Sentry.props +++ b/src/Sentry/buildTransitive/Sentry.props @@ -3,7 +3,7 @@ <_SentryTargetFrameworkVersion>$([MSBuild]::GetTargetFrameworkVersion($(TargetFramework))) - $([MSBuild]::VersionGreaterThanOrEquals($(_SentryTargetFrameworkVersion), 8.0)) - $([MSBuild]::VersionGreaterThanOrEquals($(_SentryTargetFrameworkVersion), 9.0)) + <_SentryIsNet8OrGreater>$([MSBuild]::VersionGreaterThanOrEquals($(_SentryTargetFrameworkVersion), 8.0)) + <_SentryIsNet9OrGreater>$([MSBuild]::VersionGreaterThanOrEquals($(_SentryTargetFrameworkVersion), 9.0)) diff --git a/test/Directory.Build.props b/test/Directory.Build.props index 2ff678e47f..11475f416c 100644 --- a/test/Directory.Build.props +++ b/test/Directory.Build.props @@ -14,7 +14,7 @@ false - true + true