Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ


Choose your language

InfoQ Homepage News .NET 4.5 Compatibility And Multi-Targeting

.NET 4.5 Compatibility And Multi-Targeting

This item in japanese

The upcoming .NET Framework 4.5 being an in-place upgrade to .NET 4.0 has given rise to concerns on how this can introduce breaking changes as well as make multi-targeting difficult. In his article “.NET Versioning and Multi-Targeting..Scott Hanselman addresses these concerns.

First of all, what is the difference between an in-place upgrade and a side-by-side install?

Side-by-side means that different versions of .NET can live together on the same machine.

In-place upgrade means that the CLR is the same but new libraries are added as well as bug fixes and performance improvements

.NET Framework 4.5 is an in-place upgrade and it also updates the assemblies carried from .NET 4.0 – this has been cause of much worry, especially expressed by Rick Strahl in his article .NET 4.5 is an in-place replacement for .NET 4.0.

Scott clarifies -

.NET 4.5 is not a radically different side-by-side CLR. A new CLR would be a theoretical .NET 5 In my opinion.

It's possible something could break but unlikely according the .NET Blog. Here are the known .NET 4.5 breaking changes - most are pretty obscure. The kinds of breaking changes I've seen myself in the wild have been primarily when folks are relying on reflection or internal data structures. These internals aren't public contracts so they may have changed.

Another cause of concern is multi-targeting - if .NET Framework 4.5 upgrades the .NET 4.0 assemblies as-well, how will you use a development machine with .NET 4.5 installed to target .NET 4.0? Scott demystifies this - the old .NET 4.0 assemblies are in C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0 folder.

.NET Framework 4.5 is currently in public beta and will be released alongside Windows 8 and Visual Studio 11. There are several new features and we have explored quite a bit of these earlier on InfoQ. You can also refer to MSDN for more details

Rate this Article