Compartilhar via


TargetCLR

Applies to: yesVisual Studio noVisual Studio for Mac

Note

This article applies to Visual Studio 2017. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

The TargetCLR option specifies the version of the common language run-time (CLR) to profile when more than one version of the CLR is loaded in an application.

By default, the Visual Studio Profiling Tools target the first version of the CLR that is loaded by the application.

Syntax

VSPerfCmd.exe {/Launch:AppName | /Attach:PID} /TargetCLR[:ClrVersion] [Options]

Parameters

ClrVersion The version number of the CLR. Use the version format vN.N.NNNNN.

Required options

The TargetCLR option can only be used with the Launch or Attach options.

Launch: AppName Starts the specified application and starts to profile.

Attach: PID Starts to profile the specified process.

Example

In this example, the TargetCLR option is used to make sure that CLR version 4.0.11003 is profiled.

VSPerfCmd.exe /Start:Sample /Output:TestApp.exe.vsp
VSPerfCmd.exe /Launch:TestApp.exe /TargetCLR:v4.0.11003