Finding out the .NET Framework version that an assembly uses


Post to Twitter Post to Facebook Post to StumbleUpon

There will be cases where you would need to find out the .NET Framework version of an application or assembly running on a machine and you just don’t have the right tools. This is especially true when you need to promote your code from test to production environment. If there is only one version of the .NET Framework on the machine, it would be easy. But if you have servers with multiple versions of the .NET Framework installed and the assembly is not configured to bind to the correct framework version, you might end up having an application that might break due to incompatibility issues. This is true for .NET Framework versions 2.0 and below although I haven’t really tried out the newer ones but it would be basically the same since .NET Framework 3.0 and 3.5 are just stacks on top of 2.0

If you don’t have the tools on the server to check, you can simply copy the assembly on your local machine and use either ILDASM.exe or simply download RedGate’s Reflector. Reflector does not need installation as long as you have the appropriate .NET Framework versions in your machine. Just extract the EXE and CONFIG files and you’re good to go. A video demonstrating how to use RedGate’s Reflector can be found here