An app can control the version of the .NET Framework on which it runs, but a component cannot. Components and class libraries are loaded in the context of a particular app, and therefore automatically run on the version of the .NET Framework that the app runs on.

In CLR 4

  • If a project contains reference of higher CLR (.NET 3.5(console app) referencing .NET 4.0(assembly)), then project won’t compile.
  • If a project contains the reference of lower CLR (.NET 4.0(console app) referencing .NET 3.5(assembly)), then the project will compile.
  • The Same concept is applied for .NET versions. The Higher version can always reference, assemblies of lower version but not vice versa.

But is it different In CLR 2

  • If a project contains a reference of higher CLR (.NET 2.0(console app) referencing .NET 3.5(assembly)), then the project will compile.
  • If a project contains a reference of lower CLR (.NET 3.5(console app) referencing .NET 2.0(assembly)), then the project will compile.
  • The Same concept is applied for .NET versions. The Higher version can always reference, assemblies of lower version and vice versa.

 

Share Button