Dela via


Clrver.exe (CLR Version Tool)

Updated: April 2011

The CLR Version tool (Clrver.exe) reports all the installed versions of the common language runtime (CLR) on the computer.

This tool is automatically installed with Visual Studio and with the Windows SDK. To run the tool, we recommend that you use the Visual Studio Command Prompt or the Windows SDK Command Prompt (CMD Shell). These utilities enable you to run the tool easily, without navigating to the installation folder. For more information, see Visual Studio and Windows SDK Command Prompts.

  • If you have Visual Studio installed on your computer: On the taskbar, click Start, click All Programs, click Visual Studio, click Visual Studio Tools, and then click Visual Studio Command Prompt.

    -or-

    If you have the Windows SDK installed on your computer: On the taskbar, click Start, click All Programs, click the folder for the Windows SDK, and then click Command Prompt (or CMD Shell).

  • At the command prompt, type the following:

clrver [option]

Options

Option

Description

-all

Displays all processes on the computer that are using the CLR.

pid

Displays the version(s) of the CLR used by the process that has the specified process ID (PID).

-?

Displays command syntax and options for the tool.

Remarks

If you call Clrver.exe with no options, it displays all installed CLR versions. If you specify a PID for another user, you must have administrative permissions to obtain the version information.

Note

In Windows Vista and later, User Account Control (UAC) determines the privileges of a user. If you are a member of the Built-in Administrators group, you are assigned two run-time access tokens: a standard user access token and an administrator access token. By default, you are in the standard user role. To execute code that requires administrative permission, you must first elevate your privileges from standard user to administrator. You can do this when you start the command prompt by right-clicking the command prompt icon and indicating that you want to run as an administrator.

Attempting to determine the CLR version for SYSTEM, LOCAL SERVICE, and NETWORK SERVICE processes results in a message indicating that the PID doesn't exist.

Examples

The following command displays all the versions of the CLR installed on the computer.

clrver

The following command displays the version of the CLR used by process 128.

clrver 128

The following command displays all the managed processes and the version of the CLR they are using.

Clrver -all

See Also

Reference

Visual Studio and Windows SDK Command Prompts

Other Resources

.NET Framework Tools

Change History

Date

History

Reason

April 2011

Added information about using the Visual Studio and Windows SDK Command Prompts.

Information enhancement.