Upgrade legacy .NET agents

This describes New Relic .NET agent versions with major changes that can affect your app installation. For a full list of all changes, see the .NET release notes. If you are upgrading from these older versions, follow these procedures before upgrading .

To check your version number, use Windows Programs and Features.

If your version is earlier than... Do this...

Versions 6.12 or higher do not support Windows Server 2003. If you require Windows Server 2003, use versions 6.11 or lower. For more information, get support at support.newrelic.com or download the agent at http://download.newrelic.com/


Previously, Database and External calls that occurred outside of a transaction generated metrics that could be viewed in their respective UI tabs. Now such metrics will not be displayed. In a non-web application these calls can be "wrapped" in a custom transaction to make their metrics viewable.


To get async support if your .NET agent version is earlier than 6.0, do the following as applicable:

  1. Remove the following application setting in newrelic.config if it exists:

      <add key="AsyncMode" value="false" />
  2. Ensure your app's host has .NET 4.5 or higher installed.
  3. Tell .NET to use the new ASP request processing pipeline by adding the following lines to your web.config:

        <add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" />


    Specify the .NET Framework version to be 4.5.2 or higher by adding the following lines to the web.config:

        <httpRuntime targetFramework="YOUR_TARGET_NET_VERSION" /> 

For more information about async support in custom instrumentation, see .NET custom transactions.

5.0 (for Web API)

To see Web API transactions, you must opt in to a .NET framework bug fix if the following conditions apply:

  • You use ASP.NET Web API v1.
  • Your app targets .NET Framework 4.0. (This issue does not affect v4.5 or higher.)
  • You are upgrading from agent 5.0 or lower to version 5.0 or higher.

To apply the fix:

  1. Ensure your app's host has .NET 4.5 installed.
  2. Add this appSetting to your web.config:

        <add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" />

For more information about this .NET framework bug, see Why is HttpContext.Current null after await? and All about <httpRuntime targetFramework>.

5.0 (for metrics)

Metrics that are not part of a transaction will not be displayed in the UI. An exception to this are Database and External metrics which can be viewed in their respective tabs. Other such metrics (such as instrumented methods) can be made viewable by "wrapping" them in a custom transaction.

Your custom instrumentation may need to be updated to use custom transactions. For an example of what you will see in the UI, see Change in Non-web transaction reporting with version 5.x.


New Relic improved transaction naming. However, these changes can affect the transaction names of existing metrics, including key transactions, "alert on anything" metrics, and Insights queries based on transaction names. You must recreate these settings using the new transaction name after the upgrade.


New Relic dropped the "outer" HTTP transaction (".svc" transactions) for WCF applications hosted with asp.net compatibility mode disabled. Now only the WCF transaction is reported.

This change results in more accurate throughput data. It also prevents HTTP status code errors from being reported for failed WCF transactions.


New Relic implemented datastore metrics for SQL traces. Metric names for database activity were updated to report under datastore.


MVC2 applications no longer generate MVC-specific segments or have MVC route-based transaction names.


New Relic's .NET agent became dependent on .NET 3.5. Your application can still target .NET 2.0, but you must have .NET 3.5 installed on the computer on which the agent executes.


Version was the last agent version that required both the GetBrowserTimingFooter() and the GetBrowserTimingHeader() API calls for browser monitoring. In agent version or higher, you only need to call GetBrowserTimingHeader(). GetBrowserTimingFooter() has no effect. New Relic suggests removing references to from your code.


The configuration file changed from newrelic.xml to newrelic.config. Installers for newer agents attempt to convert newrelic.xml (if present) to newrelic.config.


(established release)

This version is designated as the established release. For more information, see the .NET agent release notes.

2.2 or earlier

To upgrade from a .NET agent version earlier than 2.2, you must uninstall the old agent before installing the new version. Follow the standard procedures for your Windows version to uninstall the agent. Your operating system may require a restart.

You may experience cocreateinstance errors with services.exe when you upgrade an old installer ( or earlier) or make other changes to environment variables. To resolve this problem, refer to Microsoft's documentation.

For more help

Join the discussion about .NET monitoring in the New Relic Online Technical Community! The Technical Community is a public platform to discuss and troubleshoot your New Relic toolset.

If you need additional help, get support at support.newrelic.com.