Determining Which Version of the .NET Framework Is Installed

You can install and run multiple versions of the .NET Framework on a computer. You can install the versions in any order. To see which versions are installed, view the %WINDIR%\Microsoft.NET\Framework directory. (You should also view the Framework64 directory on a 64-bit computer, which can have 32 or 64-bit versions installed.) Each version of the .NET Framework has a directory, and the first two digits of the directory name identify the .NET Framework version; for example: v1.1.4322 for the .NET Framework 1.1, v2.0.50727 for the .NET Framework 2.0, v3.5 for the .NET Framework 3.5, and so on.

Note

If the .NET Framework versions 3.0 and 3.5 are installed, you will also see version 2.0 installed. This is because all these versions use version 2.0 of the common language runtime (CLR).

In code, you can query the CLR version by using the Version property of the System.Environment class. If you compile a program with the .NET Framework 3.5, this property displays 2.0.50727.3603.

You can also redistribute the .NET Framework with your application. For more information about including the .NET Framework with your application, see Deploying the .NET Framework and Applications.

The Fuslogvw.exe (Assembly Binding Log Viewer), which ships with the Windows Software Development Kit (SDK), also lets you verify which version of the runtime is loaded. You can also use this tool to verify that an assembly is loading from your application directory instead of from the global assembly cache, and to view the success or failure of all assembly binds. You must run the viewer with administrator privilege.

By default, the Assembly Binding Log Viewer logs only failed assembly binds. To log all assembly binds, click Settings, and then click Log all binds to disk. (Note that leaving this setting enabled can generate a large log.)

See Also

Tasks

How to: Use an Application Configuration File to Target a .NET Framework Version

Concepts

Configuring Assembly Binding Redirection

Assembly Binding Redirection

Other Resources

Side-by-Side Execution