-
-
Notifications
You must be signed in to change notification settings - Fork 206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add net48 without system.reflection.metadata #3236
base: main
Are you sure you want to change the base?
Conversation
Instructions and example for changelogPlease add an entry to Example: ## Unreleased
- add net48 without system.reflection.metadata ([#3236](https://github.com/getsentry/sentry-dotnet/pull/3236)) If none of the above apply, you can opt out of this check by adding |
@@ -8,7 +8,7 @@ | |||
</PropertyGroup> | |||
|
|||
<PropertyGroup Condition="'$(SolutionName)' != 'Sentry.Unity'"> | |||
<TargetFrameworks>net8.0;net6.0;netstandard2.1;netstandard2.0;net462</TargetFrameworks> | |||
<TargetFrameworks>net8.0;net6.0;netstandard2.1;netstandard2.0;net462;net48</TargetFrameworks> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this supposed to be a new target or to replace the net462 target?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, we need to keep supporting the older one, but we can at least improve for apps running on the latest version
I'm not sure I get it. Sentry has a dependency on System.Reflection.Metadata for .NETFramework 4.6.2, .NETStandard 2.0 and .NETStandard 2.1. Surely one of those is being resolved when compiling for net48. What does having Sentry target net48 specifically do for us? |
If using .NET 4.8, it should pick the net462 of our SDK which does have the dependency. BUT this is breaking, because.. .NET Framework and these problems with dependency resolution (is my assumption). With 2 customers I debugged this with, I suggested they try adding the dependency directly to their app (S.R.M that is) and it resolved the issue. I didn't have access (nor I have a WIndows machine) to debug the issue myself |
OK, with this commit, we're basically dropping the following dependencies for people using .net48 : <PackageReference Include="System.Reflection.Metadata" Version="5.0.0" />
</ItemGroup>
<PackageReference Include="System.Runtime.InteropServices.RuntimeInformation" Version="4.3.0" /> Is that because these packages are included as part of .net48 and later? I couldn't find this documented anywhere but maybe I'm just not looking in the right places... |
I think this is part of the problem. It "should" work. But we don't know. I'd like to hold off on this for now. |
We had a few customers sharing challenges when building for net48 because of dependencies.
This is an attempt to reduce dependencies when building specifically for newer .NET Framework.
I also believe we should bump the min version to 6.0.0 (as opposed to 5.0.0 which we have now and is deprecated):
https://www.nuget.org/packages/System.Reflection.Metadata/6.0.0#dependencies-body-tab