.NET Core

System Requirements

  • ASP.NET Core 1.x or 2.x running on Windows
  • Support for ASP.NET Core 3.x and Linux coming soon


Download the Raygun Agent on the server you would like to monitor


Open the agent installer you downloaded and follow the on-screen prompts to install the agent


Launch the Raygun Profiler Configuration tool. You'll need an API key to register the agent. Create a new application in Raygun if you have not already, and navigate to the APM set up screen to find your API key.

Under the Agent tab of the configuration tool, set the Default API key and then Register the Agent.


Open the .NET Core tab in the Raygun Profiler Configuration tool.

If your .NET Core application is running then you can select it from the process list.

If your process is not listed then find the path to your process dll or exe and enter it into the assembly name field.

With your .NET Core process selected, click the Register button, then enter your Raygun application API Key into the dialog and click Save.


There are many ways in which a .NET Core application can be started, so we've listed some common methods along with the required environment variables needed to configure the Raygun APM profiler correctly. To view these options, click the Show Config button from the configuration screen:

Select the appropriate option from that list, and set your environment variables. Now everything is configured. Make a few requests to your application and traces should appear within Raygun after a couple of minutes. If they don't appear, try running status checks and running a profiler test below.


By adding Raygun4Net.AspNetCore to your application Raygun APM unlocks advanced features and intelligence that helps to reduce the CPU overhead of the profiler.

If you're already using Raygun4Net.AspNetCore in your web application then we recommend you update the Raygun4Net.AspNetCore NuGet package to the latest release in order to correlate data between Crash Reporting and APM.

For the full instructions on installing and configuring Raygun4Net.AspNetCore, please refer to the Installation instructions for Crash Reporting.


Another method for registering and profiling a .NET Core application is to use the Raygun CLI tool

1. Register your .NET Core process with the Raygun application API Key using the following command.

# Configure HelloWorldApp.dll with an API Key
rgc.exe -enable HelloWorldApp.dll -type dotnetcore -apikey xxx -startup 30 -norecycle

2. To start the process and automatically configure the correct environment variables you can bootstrap the execution of your .NET Core process using the following command.

# Start HelloWorldApp.dll process with profiler environment configured
rgc.exe -profile "%ProgramFiles%\dotnet\dotnet.exe" -arguments HelloWorldApp.dll -coreclr -apikey <APP-API-KEY> -startup 60

1. To stop profiling a .NET Core application you'll first need to remove the environment variables that were configured when your application starts. Once these have been removed, restart your application to stop profiling.

2. The final step is to remove the API Key configuration by going to the .NET Core tab in the Raygun Profiler Configuration tool. Select the configured process and click the Deregister button.


Having trouble receiving traces? Please look at our troubleshooting guides.