Freigeben über


How to: Specify the .NET Framework runtime

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

With the release of .NET Framework 4, applications can be composed of modules that were built by using different versions of the .NET Framework run-time. By default, Visual Studio Profiling Tools profile the first runtime that is loaded by the application. You can specify the run-time to profile when you start an application with the profiler and when you attach the profiler to an already running application.

To specify the .NET Framework run-time to profile when starting an application with the profiler

  1. In Performance Explorer, right-click the performance session, click Properties, and then click Advanced.

    The Target CLR Version list box displays Automatic and the versions of the .NET Framework runtime that are installed on the computer.

  2. Perform one of the following steps:

    • Click the version of the CLR that you want to profile.

    • Click Automatic to profile the first version that is loaded by the application.

To specify the .NET Framework run-time to profile when attaching the profiler to an application

  1. On the Analyze menu, point to Profiler, then click Attach/Detach.

  2. On the Attach Profiler to Process dialog box, click the process that you want to profile.

    The Target CLR Version list box s Automatic and the versions of the .NET Framework runtime that are installed on the computer.

  3. Perform one of the following steps:

    • Click the version of the CLR that you want to profile.

    • Click Automatic to profile the version that is loaded when the profiler attaches to the application.