Suppose you have an application that developed on the .Net Framework 1.1 and it’s deployed in the shared environment where .Net Framework 1.1 and 2.o both are installed and you need to run your application on .Net framework 1.1.
Solution
Microsoft gives a very simple solution of this problem. You only need to write the following setting in the app.config file.
|
<configuration>
<startup>
<!--set the appropriate .net version-->
<supportRuntime version="1.1.4322"/>
</startup>
</configuration>
|
What is your application CLR version?
Programmatically finding the CLR version for your application on which its run is very easy.
|
Console.WriteLine(Assembly.GetExecutingAssembly().ImageRuntimeVersion);
|
Here I found a good code snippet that find the assembly CLR version.