TargetCLR

 

For the latest documentation on Visual Studio 2017, see Visual Studio 2017 Documentation.

For the latest documentation on Visual Studio 2017, see TargetCLR on docs.microsoft.com. 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.

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

Parameters

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

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.

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  

Show: