Your data. Anywhere you go.

New Relic for iOS or Android


Download on the App Store    Android App on Google play


New Relic Insights App for iOS


Download on the App Store


Learn more

Close icon

Relic Solution: .NET Agent MSI Installer Options Explained


#1

When installing the .NET agent with the Windows MSI installer, you will be presented with a “Custom Setup” screen (screenshot below) that will allow you to customize the features that will be installed. This post explains those options and what they do.

37%20PM

Environment variables that are always set

Regardless of the options selected on this screen, the MSI installer will always set the following environment variable system-wide:

NEWRELIC_INSTALL_PATH = C:\Program Files\New Relic\.NET Agent\

Instrument All .NET Framework Applications - Configures the agent to load a .NET Framework profiler into any .NET Framework application that starts up in the host environment.

This option sets the following environment variables system-wide

COR_ENABLE_PROFILING = 1
COR_PROFILER = {71DA0A04-7777-4EC6-9643-7D28B46A8A41}

Instrument IIS .NET Framework Applications - Configures the agent to load a .NET Framework profiler into IIS-hosted applications (w3wp.exe processes). If the “Instrument All .NET Framework Applications” option is selected, the “Instrument IIS .NET Framework Applications” option becomes superfluous.

This option sets an “Environment” registry entry that includes the necessary environment variables for the WAS and W3SVC services. This targets the environment variables specifically to those services, removing the need to set the variables system-wide.

The registry keys that are set are:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WAS:[Environment]
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W3SVC:[Environment]

The values set in those registry keys are:

COR_ENABLE_PROFILING = 1
COR_PROFILER = {71DA0A04-7777-4EC6-9643-7D28B46A8A41}
NEWRELIC_INSTALL_PATH = C:\Program Files\New Relic\.NET Agent\

Instrument IIS-hosted .NET Core Applications - Configures the agent to load a .NET Core profiler into IIS-hosted applications (w3wp.exe processes).

This options set the an “Environment” registry entry that includes the necessary environment variables for the WAS and W3SVC services. This targets the environment variables specifically to those services, removing the need to set the variables system-wide.

The registry keys set by this option are:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WAS:[Environment]
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W3SVC:[Environment]

The values set in those registry keys are:

CORECLR_ENABLE_PROFILING=1
CORECLR_PROFILER={36032161-FFC0-4B61-B559-F6C5D41BAE5A}
CORECLR_NEWRELIC_HOME=C:\ProgramData\New Relic\.NET Agent\
NEWRELIC_INSTALL_PATH=C:\Program Files\New Relic\.NET Agent\

This option also sets most of the environment variables needed for .NET Core profiling as system-wide environment variables.

The system-wide environment variables set by this option are

CORECLR_NEWRELIC_HOME = C:\ProgramData\New Relic\.NET Agent\
CORECLR_PROFILER = {36032161-FFC0-4B61-B559-F6C5D41BAE5A}

The only required .NET Core environment variable it does not set system-wide is

CORECLR_ENABLE_PROFILING=1

To monitor .NET Core processes running outside of IIS, set this environment for the application’s process environment.