Deploying .net 4 apps on .net 2 machines

寵の児 提交于 2019-12-11 20:37:28

问题


Our organisation only runs .net 2.0 on desktops. It would be nice to upgrade all machines to .net 4.0, but that is not going to happen. I wish to use .net 4.0 features.

Is there a way to statically link .net 4.0 runtime libraries into my .net 4.0 executables so they will run on a .net 2.0 environment?


回答1:


Just in case Marc's comment wasn't explicit enough: no way in hell. The assembly metadata format was changed in .NET 4.0, the 2.0 CLR doesn't know how to read it. You got the 2.0 version of the CLR running in any .NET version between 2.0 RTM and 3.5 SP1.

It is trivial to fix with a Setup project, but it certainly does get in the way of staff that takes the "I like what I know" attitude. Breaking through that egg shell is a political problem, not a programming problem. Good luck doing the damage.



来源:https://stackoverflow.com/questions/4128871/deploying-net-4-apps-on-net-2-machines

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