diff --git a/.github/actions/environment/action.yml b/.github/actions/environment/action.yml index ac61ac303b..b18a49d3cf 100644 --- a/.github/actions/environment/action.yml +++ b/.github/actions/environment/action.yml @@ -50,7 +50,6 @@ runs: brew link --overwrite mono - name: Install .NET SDK - if: runner.os != 'Windows' uses: actions/setup-dotnet@v3 with: dotnet-version: | diff --git a/CHANGELOG.md b/CHANGELOG.md index 1249f0ee13..cbd2b02835 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,8 @@ ### Fixes -- Fixed ArgumentNullException in FormRequestPayloadExtractor when handling invalid form data on ASP.NET ([#3734](https://github.com/getsentry/sentry-dotnet/pull/3734)) +- ArgumentNullException in FormRequestPayloadExtractor when handling invalid form data on ASP.NET ([#3734](https://github.com/getsentry/sentry-dotnet/pull/3734)) +- Crash when using NLog with FailedRequestStatusCodes options in a Maui app with Trimming enabled ([#3743](https://github.com/getsentry/sentry-dotnet/pull/3743)) ### Dependencies diff --git a/src/Sentry.NLog/ConfigurationExtensions.cs b/src/Sentry.NLog/ConfigurationExtensions.cs index c58ad24baa..596fb9bca0 100644 --- a/src/Sentry.NLog/ConfigurationExtensions.cs +++ b/src/Sentry.NLog/ConfigurationExtensions.cs @@ -83,7 +83,11 @@ public static LoggingConfiguration AddSentry( optionsConfig?.Invoke(options); - LogManager.Setup().SetupExtensions(e => e.RegisterTarget("Sentry")); + LogManager.Setup().SetupExtensions(e => + { + e.RegisterTarget("Sentry"); + e.RegisterType(); + }); var target = new SentryTarget(options) { diff --git a/src/Sentry.NLog/Sentry.NLog.csproj b/src/Sentry.NLog/Sentry.NLog.csproj index 134d0ff7b6..09ce5b7b75 100644 --- a/src/Sentry.NLog/Sentry.NLog.csproj +++ b/src/Sentry.NLog/Sentry.NLog.csproj @@ -12,7 +12,7 @@ - +