Skip to content

Commit c9a019a

Browse files
docs(dotnet): fix Blazor WebAssembly example (#15731)
## DESCRIBE YOUR PR Reported through User Feedback: - method `UseSentry` on `WebAssemblyHostBuilder` not found - method `AddSentry` on `ILoggingBuilder` not found The user's `.csproj` either does not include `<ImplicitUsings>enable</ImplicitUsings>` (from newer .NET SDK templates), or has explicitly disabled the implicit usings from the `Microsoft.NET.Sdk.BlazorWebAssembly` Project-SDK (`<ImplicitUsings>disable</ImplicitUsings>`). In cases where project code has global using declarations for these namespaces already (implicitly or explicitly), in worst case, these using declarations are redundant. ## IS YOUR CHANGE URGENT? Help us prioritize incoming PRs by letting us know when the change needs to go live. - [ ] Urgent deadline (GA date, etc.): <!-- ENTER DATE HERE --> - [ ] Other deadline: <!-- ENTER DATE HERE --> - [x] None: Not urgent, can wait up to 1 week+ ## SLA - [x] Teamwork makes the dream work, so please add a reviewer to your PRs. - [ ] Please give the docs team up to 1 week to review your PR unless you've added an urgent due date to it. Thanks in advance for your help! ## PRE-MERGE CHECKLIST *Make sure you've checked the following before merging your changes:* - [ ] Checked Vercel preview for correctness, including links - [ ] PR was reviewed and approved by any necessary SMEs (subject matter experts) - [ ] PR was reviewed and approved by a member of the [Sentry docs team](https://github.com/orgs/getsentry/teams/docs) Co-authored-by: James Crosswell <[email protected]>
1 parent e9dc064 commit c9a019a

File tree

1 file changed

+3
-0
lines changed
  • docs/platforms/dotnet/guides/blazor-webassembly

1 file changed

+3
-0
lines changed

docs/platforms/dotnet/guides/blazor-webassembly/index.mdx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ Sentry integration with Blazor WebAssembly is done by calling `.UseSentry()` and
2929

3030

3131
```csharp
32+
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
33+
using Microsoft.Extensions.Logging;
34+
3235
var builder = WebAssemblyHostBuilder.CreateDefault(args);
3336
builder.UseSentry(options =>
3437
{

0 commit comments

Comments
 (0)