I need to know the version of the .NET Framework my application is running on in order to load the correct libraries (don't ask...). I can easily check the CLR version (System.Environment.Version
), but the Framework version seems difficult to find. Importantly, I'm not looking for the installed version(s). That I can find. I need to know, at runtime, the version of the .NET Framework the application is calling.
Well, I know the framework is defined in the properties of your project(s). So that should also be the runtime frameork version it will be using.
I don't know if that information is compiled or where to find it but maybe you could get that information before compiling.
In IIS you can find it as well. You should be able to get there using a powershell command or create a service in the background that tells you the info.
Which version of the .NET Framework is IIS using for my AppPool?