Skip to content

Commit f33123c

Browse files
jamescrosswellCopilotFlash0verdingsdax
authored
Removed docs for ASP.NET 3.x and added caveat for ASP.NET 2.3 support (#16534)
## DESCRIBE YOUR PR Resolves getsentry/sentry-dotnet#4904 - getsentry/sentry-dotnet#4904 ## IS YOUR CHANGE URGENT? - [ ] None: Not urgent, can wait up to 1 week+ ## SLA - Teamwork makes the dream work, so please add a reviewer to your PRs. cc: @Flash0ver ## 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: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Stefan Pölz <38893694+Flash0ver@users.noreply.github.com> Co-authored-by: Johannes Daxböck <johannes.daxboeck@sentry.io>
1 parent db9ca2b commit f33123c

2 files changed

Lines changed: 6 additions & 55 deletions

File tree

platform-includes/configuration/config-intro/dotnet.aspnetcore.mdx

Lines changed: 3 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Options can be set by passing a callback to the `UseSentry()` method which will
22
pass the option object along for modifications:
33

4-
ASP.NET Core 6.0+:
4+
### ASP.NET Core 6.0+:
55

66
```csharp
77
var builder = WebApplication.CreateBuilder(args);
@@ -25,39 +25,9 @@ builder.WebHost.UseSentry(fun o ->
2525
) |> ignore
2626
```
2727

28-
ASP.NET Core 3.0:
28+
### ASP.NET Core 2.3 on .NET Framework:
2929

30-
```csharp
31-
public static IHostBuilder CreateHostBuilder(string[] args) =>
32-
Host.CreateDefaultBuilder(args)
33-
.ConfigureWebHostDefaults(webBuilder =>
34-
{
35-
// Add the following line:
36-
webBuilder.UseSentry(o =>
37-
{
38-
o.Dsn = "___PUBLIC_DSN___";
39-
o.MaxBreadcrumbs = 50;
40-
o.Debug = true;
41-
o.SendDefaultPii = true;
42-
});
43-
});
44-
```
45-
46-
```fsharp
47-
let CreateHostBuilder args =
48-
Host.CreateDefaultBuilder(args)
49-
.ConfigureWebHostDefaults(fun webBuilder ->
50-
// Add the following line:
51-
webBuilder.UseSentry(fun o ->
52-
o.Dsn <- "___PUBLIC_DSN___"
53-
o.MaxBreadcrumbs <- 50
54-
o.Debug <- true
55-
o.SendDefaultPii <- true
56-
) |> ignore
57-
)
58-
```
59-
60-
ASP.NET Core 2.x:
30+
Although ASP.NET Core 2 is no longer supported for .NET Core, Microsoft maintain ASP.NET Core 2.3 to make it easier for people using .NET Framework to transition to ASP.NET Core. If you are using [ASP.NET Core 2.3 on .NET Framework](https://dotnet.microsoft.com/platform/support/policy/aspnet#dotnet-core) then you can configure Sentry using the `WebHostBuilder`:
6131

6232
```csharp
6333
public static IWebHost BuildWebHost(string[] args) =>

platform-includes/getting-started-config/dotnet.aspnetcore.mdx

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Add Sentry to `Program.cs` through the `WebApplicationBuilder`:
22

3-
ASP.NET Core 6.0+:
3+
### ASP.NET Core 6.0+:
44

55
```csharp
66
var builder = WebApplication.CreateBuilder(args);
@@ -14,28 +14,9 @@ let builder = WebApplication.CreateBuilder(args)
1414
builder.WebHost.UseSentry("___PUBLIC_DSN___") |> ignore
1515
```
1616

17-
ASP.NET Core 3.0:
17+
### ASP.NET Core 2.3 on .NET Framework:
1818

19-
```csharp
20-
public static IHostBuilder CreateHostBuilder(string[] args) =>
21-
Host.CreateDefaultBuilder(args)
22-
.ConfigureWebHostDefaults(webBuilder =>
23-
{
24-
// Add the following line:
25-
webBuilder.UseSentry("___PUBLIC_DSN___");
26-
});
27-
```
28-
29-
```fsharp
30-
let CreateHostBuilder args =
31-
Host.CreateDefaultBuilder(args)
32-
.ConfigureWebHostDefaults(fun webBuilder ->
33-
// Add the following line:
34-
webBuilder.UseSentry("___PUBLIC_DSN___") |> ignore
35-
)
36-
```
37-
38-
ASP.NET Core 2.x:
19+
Although ASP.NET Core 2 is no longer supported for .NET Core, Microsoft maintain ASP.NET Core 2.3 to make it easier for people using .NET Framework to transition to ASP.NET Core. If you are using [ASP.NET Core 2.3 on .NET Framework](https://dotnet.microsoft.com/platform/support/policy/aspnet#dotnet-core) then you can configure Sentry using the `WebHostBuilder`:
3920

4021
```csharp
4122
public static IWebHost BuildWebHost(string[] args) =>

0 commit comments

Comments
 (0)