Introduction to .NET agent install

New Relic APM can monitor both .NET Framework and .NET Core applications. This document gets you started with installing a 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 install:

Install instructions

Choose your application type to see install instructions:

Note: for ASP.NET Core applications targeting .NET Framework, see .NET Framework install.

Install overview

This is optional reading if you want greater context about the install instructions.

The install instructions will vary depending on your setup, but all .NET agent installations have the same underlying things that must happen in order for the agent to report data to your account. For installs on common frameworks, some of these steps will happen automatically. But understanding these underlying processes can help you troubleshoot or customize your install.

For a .NET agent to report data from an application, these things must happen:

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

  2. Environment variables are set. These allow the agent to attach to your application via the Microsoft Profiling API.

  3. The user your application runs under is assigned read/write permissions for the directory where the .NET agent is installed.

  4. .NET Framework agent only: applications you want to monitor must also be "targeted." For IIS-hosted applications (except ASP.NET Core apps targeting .NET Framework), this will happen automatically.

  5. If the .NET agent doesn't auto-instrument your application (see framework support links below), you must custom instrument your app.

As mentioned, some of these steps will happen automatically for installs on common frameworks (like ASP.NET), but understanding these step can help you troubleshoot or customize an install.

Related docs:

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

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

  • Separate directories: The .NET Core agent and .NET Framework agent must be installed in different directories.
  • Environment variables: The required environment variables are different for the .NET agents. Most install procedures will result in the environment variables being set for you but, depending on your set-up, you may need to set them manually.

For more help

Recommendations for learning more: