Determining Which Version of the .NET Framework is Installed
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
The easiest way to determine which version of the .NET Framework is installed on a computer is to determine which version of the runtime is loaded. There are two ways to do this. In code, you can query the runtime by using the System.Environment class.
You can also use the Fuslogvw.exe (Assembly Binding Log Viewer), which ships with the Windows Software Development Kit (SDK), to 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.
By default, the Assembly Binding Log Viewer logs only failed assembly binds. To log all assembly binds, you must create an entry in the registry.
To log all assembly binds in the Assembly Binding Log Viewer:
- Set the HKLM\Software\Microsoft\Fusion\ForceLog registry value to 1 (the value is a DWORD).
When your application starts, you should see either mscorlib, Version 1.0.3300 for .NET Framework version 1.0 or mscorlib, Version 1.1.4322 for .NET Framework version 1.1, or mscorlib version 2.0.xxxx for .NET Framework version 2.0. You can also look at the path where fusion.dll is loaded from to determine what version of the runtime is loaded.
Isolated Storage Security Changes
Version 1.0 of the .NET Framework has had two Service Pack (SP) updates. The second update, SP2, contains an important change to the security structure of isolated storage.
In SP2, isolated storage stores data in a different location than version 1.0 or version 1.0 with SP1. If an application uses isolated storage with version 1.0, but without SP2, and the application shares data with a version 1.1 application, the two applications might not use the same data.
To avoid isolated storage problems, the SP2 update must be applied to version 1.0 before installing and using .NET Framework version 1.1 or version 2.0.
See Also
Tasks
How to: Use an Application Configuration File to Target a .NET Framework Version