Can application built with .NET 4.5 run on .NET 4.0?

回眸只為那壹抹淺笑 提交于 2019-12-05 07:31:01

In general, this will not work. It does work in some cases since 4.5 is an in place replacement for 4.0, but it's not going to work in general. I've, personally, seen problems with types that have moved into different assemblies, and the bindings aren't setup correctly, just like you're seeing. The reflection types aren't the only types that were moved in 4.5.

My project is targeting to .NET 4.5. It doesn't use any new 4.5 methods, so it actually works fine on the machine with only .NET 4.0 installed.

If this is the case, you could just change your application to target .NET 4.0. This should allow it to run safely on a machine with only .NET 4 installed.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!