Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
- Changed default value for `SentryOptions.EnableAppHangTrackingV2` to `false` ([#4042](https://github.com/getsentry/sentry-dotnet/pull/4042))
- Missing MAUI `Shell` navigation breadcrumbs on iOS ([#4006](https://github.com/getsentry/sentry-dotnet/pull/4006))
- Prevent application crashes when capturing screenshots on iOS ([#4069](https://github.com/getsentry/sentry-dotnet/pull/4069))
- Prevent users from disabling AndroidEnableAssemblyCompression which leads to untrappable crash ([#4089](https://github.com/getsentry/sentry-dotnet/pull/4089))

### Dependencies

Expand Down
3 changes: 3 additions & 0 deletions samples/Sentry.Samples.Android/Sentry.Samples.Android.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
<!-- XA0119: Using fast deployment and a code shrinker at the same time is not recommended. Use fast deployment for Debug configurations and a code shrinker for Release configurations.-->
<NoWarn>$(NoWarn);XA0119</NoWarn>

<!--uncomment to test targets that block this flag-->
<!--<AndroidEnableAssemblyCompression>false</AndroidEnableAssemblyCompression>-->
</PropertyGroup>

<ItemGroup>
Expand Down
6 changes: 6 additions & 0 deletions src/Sentry/buildTransitive/Sentry.targets
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@
<SentryAttributesFile>Sentry.Attributes$(MSBuildProjectExtension.Replace('proj', ''))</SentryAttributesFile>
</PropertyGroup>

<Target Name="_SentryEnsureAndroidEnableAssemblyCompressionDisabled"
Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android' AND '$(AndroidEnableAssemblyCompression)' == 'false'"
BeforeTargets="ResolveAssemblyReferences;Build;Rebuild">
<Error Text="Android projects using Sentry cannot build using AndroidEnableAssemblyCompression = false due to a Microsoft issue. Please follow https://github.com/dotnet/android/issues/9752" />
</Target>

<Target Name="WriteSentryAttributes"
Condition="$(Language) == 'VB' or $(Language) == 'C#' or $(Language) == 'F#'"
BeforeTargets="BeforeCompile;CoreCompile"
Expand Down
Loading