Reputation: 9939
Consider I am having two versions of .Net(.Net 1.1,2.0) in my developement machines. If I am deploying my application X against .Net 1.1 and deploying another applicatin Y agaings .Net 2.0 framework.
Now I need to know in which CLR(1.1 or 2.0) my both applications will run?
Also state me the reason?
Upvotes: 3
Views: 277
Reputation: 1503459
This MSDN article explains it all fairly clearly:
The version of the .NET Framework that an application runs on is determined as follows:
If the version of the .NET Framework that the application was built against is present on the computer, the application runs on that version.
If the version of the .NET Framework that the application was built against is not present and a configuration file does not specify a version in a
<supportedRuntime>
Element, the application runs on the latest version of the .NET Framework that is present on the computer.If the version of the .NET Framework that the application was built against is not present and the configuration file specifies a version in a
<supportedRuntime>
Element, the application runs on the latest version that is specified in the application configuration file and is present on the computer.
As Sam mentions in the comments, one exception to this is ASP.NET, where the version used is specified in the IIS management console.
Upvotes: 12
Reputation: 12397
Just to add to the replies above: if you're talking asp.net apps it changes all play rules. Besides the framework config option in iis manager, the framework is loaded per app pool so you must ensure that all apps sharing an app pool uses the same framework version.
Upvotes: 2
Reputation:
From Visual Studio 2008 onwards, you can target a specific version of the .Net Framework - 2.0, 3.0 or 3.5
Before VS2008, its fixed -
VS2005 targets .Net Framework v2.0
VS2003 targets .Net Framework v1.1
VS2002 targets .Net Framework v1.0
If you specify the target, it will require THAT perticular version of the .Net Framework.
CORRECTION: It will run on THAT version or a higher, compatible one.
Upvotes: 1