I am interested in installing the .NET 4.5.
But I have heard that it is an In-Place upgrade.
Since the users at my company uses Windows XP. I can\'t release any
Yes, there are risks of the sort you describe. The .NET 4.0 interface is unchanged, so if you target .NET 4.0, your program will compile and run on XP with .NET 4.0, but the .NET 4.5 implementation of .NET 4.0 contains bugfixes as well. If you rely on .NET Framework not being buggy, and the only available .NET Framework for XP is buggy, your program is going to experience those bugs. I've had this happen with Entity Framework, but there could be other bug fixes as well.
I asked this question on the WPF Forum and was given basiclly the same answer that @hvd gave.
http://social.msdn.microsoft.com/Forums/en/wpf/thread/c05a8c02-de67-47a9-b4ed-fd8b622a7e4a
The accepted answer is very relevant, but let me add an example of a situation where the 4.0 target compiled on a 4.5+ machine is something less useful than a 4.0 with fixed bugs.
If you have any ComReference
in your projects, they will invoke tlbimp.exe
from .NET 4.5 on the build machine. This may result in your software containing wrappers that reference, for example, a System.Reflection.MethodInfo.CreateDelegate(System.Type)
method that only exists in .NET 4.5. You'll get a MissingMethodException
on the WinXP machine.
This happened to me when working with the ComAdmin
namespace, which are COM objects for access to the COM+ catalog, but I suspect that the problem may be wider.