• /
  • Log in

Install the .NET agent using NuGet

This document explains how to install the .NET agent using NuGet.

Install agent using NuGet

The NewRelic.Agent NuGet package places the New Relic agent in your application's build output directory so that the agent gets deployed with your application.

Before installing the agent using NuGet, understand these important points:

  • In order to configure environment variables and directory permissions, you must have access to the systems where you are deploying your applications.
  • If you're using NuGet to update an existing .NET agent, this will overwrite previously made changes to newrelic.config. To preserve changes, first save the config file outside of your project, then restore it after updating.

Here's an example of using NuGet via Visual Studio to install the .NET agent:

  1. Open your Visual Studio solution, or create a new one by selecting File > New > Project. For multi-project solutions, be sure to select the correct project (for example, a specific website project).

  2. Open the Package Manager console by selecting Tools > Library Package Manager > Package Manager Console. Set your project as the default project.

  3. From the Package Manager command prompt, type Install-Package NewRelic.Agent and press Enter. When you build your project, the .NET agent folder will be copied to your build output directory.

  4. Set environment variables (below) and any other necessary configuration. How to do this will vary, depending on your environment and system.

If your application is receiving traffic, data should appear within a few minutes. If it doesn't, see No data appears.

For more help

If you need more help, check out these support and learning resources:

Create issueEdit page
Copyright © 2021 New Relic Inc.