From 7f5e8def60893b53ed41aefdd0c8a1b5b25f17a3 Mon Sep 17 00:00:00 2001 From: James Crosswell Date: Mon, 18 May 2026 02:15:51 +1200 Subject: [PATCH 1/2] ref: replace concrete TargetFramework string comparisons with TargetFrameworkIdentifier/TargetFrameworkVersion properties Replace `$(TargetFramework) == 'net8.0'` style conditions with `$(TargetFrameworkIdentifier) == '.NETCoreApp' And $(TargetFrameworkVersion) == 'v8.0'` equivalents across src, test, and samples project files, as recommended by the MSBuild best practices guidance. Also replaces `TargetFramework.Contains('-ios')` with `$(TargetPlatformIdentifier) == 'ios'`. Closes #2657 Co-Authored-By: Claude Sonnet 4.6 Signed-off-by: James Crosswell --- .../Sentry.Samples.Console.Basic.csproj | 2 +- .../Sentry.AspNetCore.Blazor.WebAssembly.csproj | 6 +++--- .../Sentry.EntityFramework.csproj | 4 ++-- src/Sentry.Extensions.AI/Sentry.Extensions.AI.csproj | 2 +- .../Sentry.Extensions.Logging.csproj | 8 ++++---- src/Sentry.Serilog/Sentry.Serilog.csproj | 4 ++-- src/Sentry/Sentry.csproj | 2 +- .../Sentry.Android.AssemblyReader.Tests.csproj | 4 ++-- .../Sentry.AspNetCore.Grpc.Tests.csproj | 2 +- .../Sentry.AspNetCore.TestUtils.csproj | 10 +++++----- .../Sentry.DiagnosticSource.IntegrationTests.csproj | 8 ++++---- .../Sentry.DiagnosticSource.Tests.csproj | 8 ++++---- .../Sentry.Extensions.Logging.Tests.csproj | 2 +- .../Sentry.Maui.Device.TestApp.csproj | 2 +- 14 files changed, 32 insertions(+), 32 deletions(-) diff --git a/samples/Sentry.Samples.Console.Basic/Sentry.Samples.Console.Basic.csproj b/samples/Sentry.Samples.Console.Basic/Sentry.Samples.Console.Basic.csproj index 44f961dfae..eb95a7245c 100644 --- a/samples/Sentry.Samples.Console.Basic/Sentry.Samples.Console.Basic.csproj +++ b/samples/Sentry.Samples.Console.Basic/Sentry.Samples.Console.Basic.csproj @@ -56,7 +56,7 @@ - + diff --git a/src/Sentry.AspNetCore.Blazor.WebAssembly/Sentry.AspNetCore.Blazor.WebAssembly.csproj b/src/Sentry.AspNetCore.Blazor.WebAssembly/Sentry.AspNetCore.Blazor.WebAssembly.csproj index c02680154d..1261388022 100644 --- a/src/Sentry.AspNetCore.Blazor.WebAssembly/Sentry.AspNetCore.Blazor.WebAssembly.csproj +++ b/src/Sentry.AspNetCore.Blazor.WebAssembly/Sentry.AspNetCore.Blazor.WebAssembly.csproj @@ -14,15 +14,15 @@ - + - + - + diff --git a/src/Sentry.EntityFramework/Sentry.EntityFramework.csproj b/src/Sentry.EntityFramework/Sentry.EntityFramework.csproj index bd9096007f..7d35126708 100644 --- a/src/Sentry.EntityFramework/Sentry.EntityFramework.csproj +++ b/src/Sentry.EntityFramework/Sentry.EntityFramework.csproj @@ -21,11 +21,11 @@ - + - + diff --git a/src/Sentry.Extensions.AI/Sentry.Extensions.AI.csproj b/src/Sentry.Extensions.AI/Sentry.Extensions.AI.csproj index ea6c6f93c7..12b361b760 100644 --- a/src/Sentry.Extensions.AI/Sentry.Extensions.AI.csproj +++ b/src/Sentry.Extensions.AI/Sentry.Extensions.AI.csproj @@ -19,7 +19,7 @@ - + diff --git a/src/Sentry.Extensions.Logging/Sentry.Extensions.Logging.csproj b/src/Sentry.Extensions.Logging/Sentry.Extensions.Logging.csproj index bfec341884..8688765cc2 100644 --- a/src/Sentry.Extensions.Logging/Sentry.Extensions.Logging.csproj +++ b/src/Sentry.Extensions.Logging/Sentry.Extensions.Logging.csproj @@ -15,24 +15,24 @@ - + - + - + - + diff --git a/src/Sentry.Serilog/Sentry.Serilog.csproj b/src/Sentry.Serilog/Sentry.Serilog.csproj index c0f1f9dd10..018b960d50 100644 --- a/src/Sentry.Serilog/Sentry.Serilog.csproj +++ b/src/Sentry.Serilog/Sentry.Serilog.csproj @@ -27,11 +27,11 @@ - + - + diff --git a/src/Sentry/Sentry.csproj b/src/Sentry/Sentry.csproj index 5d2129d7d1..67511226fa 100644 --- a/src/Sentry/Sentry.csproj +++ b/src/Sentry/Sentry.csproj @@ -2,7 +2,7 @@ Official SDK for Sentry - Open-source error tracking that helps developers monitor and fix crashes in real time. - $(NoWarn);RS0017 + $(NoWarn);RS0017 true true diff --git a/test/Sentry.Android.AssemblyReader.Tests/Sentry.Android.AssemblyReader.Tests.csproj b/test/Sentry.Android.AssemblyReader.Tests/Sentry.Android.AssemblyReader.Tests.csproj index a892724b49..e9885ae3fb 100644 --- a/test/Sentry.Android.AssemblyReader.Tests/Sentry.Android.AssemblyReader.Tests.csproj +++ b/test/Sentry.Android.AssemblyReader.Tests/Sentry.Android.AssemblyReader.Tests.csproj @@ -32,8 +32,8 @@ - - + + diff --git a/test/Sentry.AspNetCore.Grpc.Tests/Sentry.AspNetCore.Grpc.Tests.csproj b/test/Sentry.AspNetCore.Grpc.Tests/Sentry.AspNetCore.Grpc.Tests.csproj index cebd392dce..1bcf60dbbd 100644 --- a/test/Sentry.AspNetCore.Grpc.Tests/Sentry.AspNetCore.Grpc.Tests.csproj +++ b/test/Sentry.AspNetCore.Grpc.Tests/Sentry.AspNetCore.Grpc.Tests.csproj @@ -11,7 +11,7 @@ - + diff --git a/test/Sentry.AspNetCore.TestUtils/Sentry.AspNetCore.TestUtils.csproj b/test/Sentry.AspNetCore.TestUtils/Sentry.AspNetCore.TestUtils.csproj index 6c6d98ec6b..ce66be5fc2 100644 --- a/test/Sentry.AspNetCore.TestUtils/Sentry.AspNetCore.TestUtils.csproj +++ b/test/Sentry.AspNetCore.TestUtils/Sentry.AspNetCore.TestUtils.csproj @@ -11,7 +11,7 @@ - + @@ -29,7 +29,7 @@ an updated version of the ASP.NET Core runtime on their hosting server. See https://github.com/dotnet/aspnetcore/issues/15423 --> - + @@ -43,21 +43,21 @@ - + - + - + diff --git a/test/Sentry.DiagnosticSource.IntegrationTests/Sentry.DiagnosticSource.IntegrationTests.csproj b/test/Sentry.DiagnosticSource.IntegrationTests/Sentry.DiagnosticSource.IntegrationTests.csproj index 24ec0ae6ca..9249a13ab8 100644 --- a/test/Sentry.DiagnosticSource.IntegrationTests/Sentry.DiagnosticSource.IntegrationTests.csproj +++ b/test/Sentry.DiagnosticSource.IntegrationTests/Sentry.DiagnosticSource.IntegrationTests.csproj @@ -7,14 +7,14 @@ - + - + @@ -23,7 +23,7 @@ - + @@ -34,7 +34,7 @@ - + diff --git a/test/Sentry.DiagnosticSource.Tests/Sentry.DiagnosticSource.Tests.csproj b/test/Sentry.DiagnosticSource.Tests/Sentry.DiagnosticSource.Tests.csproj index ded96b1873..099fcc0e00 100644 --- a/test/Sentry.DiagnosticSource.Tests/Sentry.DiagnosticSource.Tests.csproj +++ b/test/Sentry.DiagnosticSource.Tests/Sentry.DiagnosticSource.Tests.csproj @@ -7,19 +7,19 @@ - + - + - + @@ -27,7 +27,7 @@ - + diff --git a/test/Sentry.Extensions.Logging.Tests/Sentry.Extensions.Logging.Tests.csproj b/test/Sentry.Extensions.Logging.Tests/Sentry.Extensions.Logging.Tests.csproj index 9d2516efdd..ffea8f25c4 100644 --- a/test/Sentry.Extensions.Logging.Tests/Sentry.Extensions.Logging.Tests.csproj +++ b/test/Sentry.Extensions.Logging.Tests/Sentry.Extensions.Logging.Tests.csproj @@ -15,7 +15,7 @@ - + diff --git a/test/Sentry.Maui.Device.TestApp/Sentry.Maui.Device.TestApp.csproj b/test/Sentry.Maui.Device.TestApp/Sentry.Maui.Device.TestApp.csproj index 64d296477a..2197e11830 100644 --- a/test/Sentry.Maui.Device.TestApp/Sentry.Maui.Device.TestApp.csproj +++ b/test/Sentry.Maui.Device.TestApp/Sentry.Maui.Device.TestApp.csproj @@ -51,7 +51,7 @@ - true + true - + diff --git a/test/Sentry.DiagnosticSource.IntegrationTests/Sentry.DiagnosticSource.IntegrationTests.csproj b/test/Sentry.DiagnosticSource.IntegrationTests/Sentry.DiagnosticSource.IntegrationTests.csproj index 9249a13ab8..c7ffb40e0b 100644 --- a/test/Sentry.DiagnosticSource.IntegrationTests/Sentry.DiagnosticSource.IntegrationTests.csproj +++ b/test/Sentry.DiagnosticSource.IntegrationTests/Sentry.DiagnosticSource.IntegrationTests.csproj @@ -34,7 +34,7 @@ - + diff --git a/test/Sentry.DiagnosticSource.Tests/Sentry.DiagnosticSource.Tests.csproj b/test/Sentry.DiagnosticSource.Tests/Sentry.DiagnosticSource.Tests.csproj index 099fcc0e00..ecbca3bd19 100644 --- a/test/Sentry.DiagnosticSource.Tests/Sentry.DiagnosticSource.Tests.csproj +++ b/test/Sentry.DiagnosticSource.Tests/Sentry.DiagnosticSource.Tests.csproj @@ -27,7 +27,7 @@ - + diff --git a/test/Sentry.Extensions.Logging.Tests/Sentry.Extensions.Logging.Tests.csproj b/test/Sentry.Extensions.Logging.Tests/Sentry.Extensions.Logging.Tests.csproj index ffea8f25c4..815dc0f46d 100644 --- a/test/Sentry.Extensions.Logging.Tests/Sentry.Extensions.Logging.Tests.csproj +++ b/test/Sentry.Extensions.Logging.Tests/Sentry.Extensions.Logging.Tests.csproj @@ -15,7 +15,7 @@ - +