Skip to content

Commit d93f96b

Browse files
authored
fix: Release Builds with Trimming enabled crashing on launch with NLog Integration (#3743)
1 parent 1928a48 commit d93f96b

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626

2727
### Fixes
2828

29-
- Fixed ArgumentNullException in FormRequestPayloadExtractor when handling invalid form data on ASP.NET ([#3734](https://github.com/getsentry/sentry-dotnet/pull/3734))
29+
- ArgumentNullException in FormRequestPayloadExtractor when handling invalid form data on ASP.NET ([#3734](https://github.com/getsentry/sentry-dotnet/pull/3734))
30+
- Crash when using NLog with FailedRequestStatusCodes options in a Maui app with Trimming enabled ([#3743](https://github.com/getsentry/sentry-dotnet/pull/3743))
3031

3132
### Dependencies
3233

src/Sentry.NLog/ConfigurationExtensions.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,11 @@ public static LoggingConfiguration AddSentry(
8383

8484
optionsConfig?.Invoke(options);
8585

86-
LogManager.Setup().SetupExtensions(e => e.RegisterTarget<SentryTarget>("Sentry"));
86+
LogManager.Setup().SetupExtensions(e =>
87+
{
88+
e.RegisterTarget<SentryTarget>("Sentry");
89+
e.RegisterType<SentryNLogOptions>();
90+
});
8791

8892
var target = new SentryTarget(options)
8993
{

src/Sentry.NLog/Sentry.NLog.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
</PropertyGroup>
1313

1414
<ItemGroup>
15-
<PackageReference Include="NLog" Version="5.0.5" />
15+
<PackageReference Include="NLog" Version="5.2.4" />
1616
</ItemGroup>
1717

1818
<ItemGroup>

0 commit comments

Comments
 (0)