Skip to content

Commit

Permalink
fix: add DynamicDependency definition for Windows and Android (#560)
Browse files Browse the repository at this point in the history
  • Loading branch information
miquelbeltran authored Feb 18, 2025
1 parent 5527a1b commit 82d2431
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Reflection;

namespace Mindscape.Raygun4Net.Platforms
Expand All @@ -8,6 +9,9 @@ internal static class AndroidPlatform
{
private static Assembly AndroidAssembly;

#if NET6_0_OR_GREATER
[DynamicDependency("UnhandledExceptionRaiser", "Android.Runtime.AndroidEnvironment", "Mono.Android")]
#endif
public static bool TryAttachExceptionHandlers()
{
try
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Reflection;

namespace Mindscape.Raygun4Net.Platforms
Expand All @@ -10,6 +11,9 @@ internal static class WindowsPlatform

private static Exception _lastFirstChanceException;

#if NET6_0_OR_GREATER
[DynamicDependency("UnhandledException", "Microsoft.UI.Xaml.Application", "Microsoft.WinUI")]
#endif
public static bool TryAttachExceptionHandlers()
{
try
Expand Down

0 comments on commit 82d2431

Please sign in to comment.