Skip to content

Commit 84aefda

Browse files
Add first docs for .NET MAUI (#5144)
1 parent 51d3951 commit 84aefda

File tree

2 files changed

+53
-0
lines changed

2 files changed

+53
-0
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
title: Multi-platform App UI (MAUI)
2+
sdk: sentry.dotnet.maui
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
title: Multi-platform App UI (MAUI)
3+
description: "Learn about Sentry's .NET integration with .NET Multi-platform App UI (MAUI)."
4+
redirect_from:
5+
- /platforms/dotnet/maui/
6+
---
7+
8+
Sentry has an integration for the [.NET Multi-platform App UI (MAUI)](https://dotnet.microsoft.com/apps/maui) through the [Sentry.Maui NuGet package](https://www.nuget.org/packages/Sentry.Maui).
9+
10+
## Installation
11+
12+
Add the Sentry dependency:
13+
14+
```powershell {tabTitle:Package Manager}
15+
Install-Package Sentry.Maui -Version 3.18.0-preview.1
16+
```
17+
18+
```shell {tabTitle:.NET Core CLI}
19+
dotnet add package Sentry.Maui -v 3.18.0-preview.1
20+
```
21+
22+
This package extends [Sentry.Extensions.Logging](/platforms/dotnet/guides/extensions-logging/). This means that besides the MAUI related features, through this package you'll also get access to all the framework's logging integration and also the features available in the main [Sentry](/platforms/dotnet/) SDK.
23+
24+
### Configure
25+
26+
In your `MauiProgram.cs` file, call `UseSentry` on your `MauiAppBuilder`, and include any options you would like to set. The `Dsn` is the only required parameter.
27+
28+
For example:
29+
30+
```csharp
31+
public static MauiApp CreateMauiApp() =>
32+
MauiApp.CreateBuilder()
33+
.UseMauiApp<App>()
34+
.UseSentry(options =>
35+
{
36+
options.Dsn = "___PUBLIC_DSN___";
37+
})
38+
// The remainder of your configuration
39+
.Build();
40+
}
41+
```
42+
43+
## Preview Status
44+
45+
The `Sentry.Maui` SDK is currently in public preview. All APIs added by this package are subject to breaking changes. We appreciate your feedback:
46+
47+
- [Open Issues (GitHub)](https://github.com/getsentry/sentry-dotnet/issues?q=is%3Aissue+is%3Aopen+label%3AMAUI)
48+
- [New Issues or Feature Requests (GitHub)](https://github.com/getsentry/sentry-dotnet/issues/new/choose)
49+
- [Community Chat (Discord)](https://discord.com/channels/621778831602221064/621783515423440927)
50+
51+
This documentation will be updated as we get closer to general availability release.

0 commit comments

Comments
 (0)