You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think there might be a problem with how/when we enable the Native SDK. According to the docsIsTargetFrameworkCompatible returns true if the "Candidate" (second argument) is compatible with the "Target" (first argument).
<FrameworkSupportsNativeCondition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0')) and ('$(OutputType)' == 'Exe' or '$(OutputType)' == 'WinExe')">true</FrameworkSupportsNative>
If they're not reversed, that IsTargetFrameworkCompatible function is just plain confusing (and thus error prone) and I think we should just avoid using it.
I had some issues with this elsewhere and added a more reliable (and understandable) way of doing minimum version checks:
I think there might be a problem with how/when we enable the Native SDK. According to the docs
IsTargetFrameworkCompatible
returns true if the "Candidate" (second argument) is compatible with the "Target" (first argument).These seem to be reversed here:
sentry-dotnet/src/Sentry/Platforms/Native/buildTransitive/Sentry.Native.targets
Line 23 in 084e3b4
If they're not reversed, that
IsTargetFrameworkCompatible
function is just plain confusing (and thus error prone) and I think we should just avoid using it.I had some issues with this elsewhere and added a more reliable (and understandable) way of doing minimum version checks:
sentry-dotnet/Directory.Build.props
Line 112 in 845de33
We could potentially add
TargetFrameworkIsNet8OrGreater
as well and use that to conditionally enable Native support instead.The text was updated successfully, but these errors were encountered: