-
-
Notifications
You must be signed in to change notification settings - Fork 226
move to mobile platform targets to net7 #2624
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -220,7 +220,9 @@ private static void AndroidEnvironment_UnhandledExceptionRaiser(object? _, Raise | |
| return null; | ||
| } | ||
|
|
||
| #pragma warning disable CS0618 // Type or member is obsolete | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What will be the trigger for when we remove these? When the offending members actually get removed from the dotnet framework?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it's binding to an native API that's deprecated |
||
| var packageInfo = AppContext.PackageManager?.GetPackageInfo(packageName, PackageInfoFlags.Permissions); | ||
| #pragma warning restore CS0618 // Type or member is obsolete | ||
| return packageInfo == null ? null : $"{packageName}@{packageInfo.VersionName}+{packageInfo.GetVersionCode()}"; | ||
| } | ||
|
|
||
|
|
@@ -234,7 +236,9 @@ private static void AndroidEnvironment_UnhandledExceptionRaiser(object? _, Raise | |
| return null; | ||
| } | ||
|
|
||
| #pragma warning disable CS0618 // Type or member is obsolete | ||
| var packageInfo = AppContext.PackageManager?.GetPackageInfo(packageName, PackageInfoFlags.Permissions); | ||
| #pragma warning restore CS0618 // Type or member is obsolete | ||
| return packageInfo?.GetVersionCode(); | ||
| } | ||
|
|
||
|
|
@@ -251,7 +255,10 @@ private static void AndroidEnvironment_UnhandledExceptionRaiser(object? _, Raise | |
|
|
||
| #pragma warning disable CS0618 | ||
| // obsolete on Android >= P (28) | ||
| #pragma warning disable CA1422 | ||
| // 'PackageInfo.VersionCode' is obsoleted on: 'Android' 28.0 and later. | ||
| return packageInfo.VersionCode; | ||
| #pragma warning restore CA1422 | ||
| #pragma warning restore CS0618 | ||
| } | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.
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.
Technically not needed yet, will be needed when adding .NET 8: https://github.com/getsentry/sentry-dotnet/pull/2617/files#diff-ebf7bc6beaaf9dacfb725d68b7126baccbe823abd28dda757213831c04639774 and as I copied this over from the other PR, here it is.