Install and enable the New Relic .NET agent

New Relic APM for .NET can monitor both .NET Framework and .NET Core applications. This document gets you started with installing the New Relic .NET agent, and provides links to install instructions.

Get started

There are two New Relic APM agents for monitoring .NET applications:

  • .NET Framework agent
  • .NET Core agent

Optional reading before installing the .NET agent:

Install instructions

Here are install instructions for common setups. If you use Docker or Azure, read those instructions first.

Hosting platform recommendations:

.NET Framework agent:

.NET Core agent:

If you want to install both agents on the same server, see Install both agents.

Other frameworks, or no framework

After installing a .NET agent, most .NET application frameworks will automatically report data to your New Relic account. (See app framework support: .NET Framework and .NET Core.)

If your .NET application uses an application framework that is not automatically instrumented, or if the app has no framework (like a console app), after the install you will need to manually set up instrumentation of your app. This process would look like:

  1. Follow the relevant install and enable instructions:

  2. Custom instrument your application to define what activity is reported to New Relic.

Install overview

The install instructions will vary depending on your setup but all .NET agent installations have the same underlying steps. Understanding these basic steps may help you troubleshoot or customize your install.

The basic steps in an install are:

  1. Ensure you have read and write permissions for the directory where the .NET agent will be placed.

  2. The New Relic .NET agent is placed on your system.

  3. Environment variables are set. These tell the .NET runtime to load the Microsoft .NET profiler in your .NET application, which in turn reports performance data to the New Relic agent.

  4. For .NET Framework (not for Core): applications you want to monitor must also be "targeted.”

For installs on fully supported application frameworks (including IIS), steps 3 and 4 will happen automatically.

Related documentation:

Install .NET Framework and .NET Core agents on same system

You can install the .NET Core and Framework agents on the same system, with the following requirements:

  • Separate directories: The .NET Core and .NET Framework agents must be installed in different directories.
  • Environment variables: The required environment variables are different for the .NET agents. If you follow the install procedures for a given agent, the proper environment variables should be set.

For more help

Recommendations for learning more: