Skip to content

Sentry.Maui package causes Unhandled Exception in .NET MAUI WinUI application #3706

@ghost

Description

Package

Sentry.Maui

.NET Flavor

.NET

.NET Version

8.0

OS

Windows

SDK Version

4.12.1

Self-Hosted Sentry Version

No response

Steps to Reproduce

We have created a reduced test case that demonstrates the problem. See https://github.com/luminixinc/NetMauiWinUI_SentryMaui

Expected Result

I expected to be able to run the simple application and see the MainPage with waving dotnet bot and the extra button that calls SentrySdk.CaptureMessage

Actual Result

Unhandled exception {"Could not load file or assembly 'WinRT.Runtime, Version=2.1.0.0, Culture=neutral, PublicKeyToken=99ea127f02d97709'. The system cannot find the file specified.":"WinRT.Runtime, Version=2.1.0.0, Culture=neutral, PublicKeyToken=99ea127f02d97709"}

See reduced test case that demonstrates the issue at https://github.com/luminixinc/NetMauiWinUI_SentryMaui

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    Done

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions