Does .net 4.5 work side by side with .net 4.0?

后端 未结 3 917
时光说笑
时光说笑 2021-02-05 01:43

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

3条回答
  •  夕颜
    夕颜 (楼主)
    2021-02-05 02:05

    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.

提交回复
热议问题