In the past not every new version of .NET came with a new version of the CLR. I know .NET 1.0, 1.1, 2.0 and 4.0 did, but .NET 3.0 and 3.5 did not.
Will .NET 4.5 intr
Yes. The version of the CLR changes from 4.0.30319.269
to 4.0.30319.17379
. So, the CLR is new, but it is backwards-compatible with the .NET 4.0 CLR. You shouldn't need to re-compile any code written for and compiled by .NET v4.0.
From the .NET Framework Versions and Dependencies page on MSDN:
The .NET Framework 4.5 RC is an in-place update that replaces the .NET Framework 4 on your computer. After you install this update, your .NET Framework 4 apps should continue to run without requiring recompilation. However, some changes in the .NET Framework may require changes to your app code.
Additionally, from the .NET Framework blog:
.NET Framework 4.5 is an in-place update that replaces .NET Framework 4 (rather than a side-by-side installation). Our goal is for .NET 4.5 to be fully backward compatible with applications built for .NET 4
There are some changes that are not backwards compatible. See the Application Compatibility in the .NET Framework 4.5 RC page on MSDN.
Official guidance from Microsoft, and good coding practice, is not to detect specific versions of the CLR. Rather, you should detect if certain features are present. Instead of
public static bool IsDotNet45()
{
return Environment.Version.Major == 4 &&
Environment.Version.Revision > 17000;
}
do something like:
public static bool SupportsReflectionContext()
{
// Class "ReflectionContext" exists from .NET 4.5 onwards.
return Type.GetType("System.Reflection.ReflectionContext", false) != null;
}