Announcing support for .NET Standard 2.0 and ASP.NET Core 2

| 2 min. (310 words)

We are excited to announce our recent support of .NET Standard 2.0 and ASP.NET Core 2 applications for Raygun Crash Reporting.

The update is for developers needing to target the .NET Standard 2 APIs. Our new provider targets both .NET Standard 1.6 and .NET Standard 2.0, so it can be used with both .NET Core 1 and .NET Core 2 applications.

At the time of writing, it is just the .NET Core provider and ASP.NET Core provider that are .NET Core 2 compatible.

Getting started with ASP.NET Core

The easiest way to get started with Raygun and ASP.Net is to use NuGet to install. Alternatively, you can edit the csproj file.

  1. Use NuGet to add the Mindscape.Raygun4Net.AspNetCore version 6.0.0
  2. Add the following code to your appsettings.json:
"RaygunSettings": {
  "ApiKey": "PUT_YOUR_OWN_API_KEY_HERE"
}

Next, in Startup.cs:

  1. Add using Mindscape.Raygun4Net.AspNetCore; to your using statements.
  2. Add app.UseRaygun(); to the Configure method after any other ExceptionHandling methods.
  3. Add services.AddRaygun(Configuration);to the ConfigureServices method.

Following these steps adds the RaygunAspNetCoreMiddleware into the middleware pipeline and allows the Raygun client to report the exception before any other error handlers take over, for example, app.UseExceptionHandler() and app.UseDeveloperExceptionPage().

Looking to the future for Raygun and .NET Core

Raygun’s latest .NET Core provider allows the sending of exceptions to Raygun. We will continue to add features (for example, Breadcrumbs) to the new .NET Core provider to bring it up to feature parity with Raygun’s other providers.

The importance of .NET Core is that it is cross-platform compatible and is the future of .NET development. Raygun are ourselves moving our infrastructure over to .NET Core, so watch this space for more updates. Also, if you haven’t looked into .NET Core, it’s pretty amazing, 2.1 recently shipped and is impressive.

Further reading