更改.NET Framework编译可执行文件的目标 [英] Change .NET Framework Target of Compiled Executable

查看:119
本文介绍了更改.NET Framework编译可执行文件的目标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于Windows 8默认不包含.NET 2 / 3.5,因此我想将一些.NET 2.0编译的可执行文件转换为.NET 4.5,而无需使用VS 2012对其进行重新编译。

As Windows 8 doesn't contain .NET 2/3.5 by default, I would like to convert some .NET 2.0 compiled executables to .NET 4.5 without re-compiling them with VS 2012. Is there an utility for this task?

推荐答案

您可以创建或修改app.config文件,并设置 supportedRuntime 元素设为4.5。这将导致4.0 CLR(将使用4.5框架)加载程序集,并且不需要对可执行文件本身进行任何更改。

You could just create or modify the app.config file, and set the supportedRuntime element to 4.5. This will cause the 4.0 CLR (which will use the 4.5 framework) to load the assembly, and does not require any change to the executable itself.

这篇关于更改.NET Framework编译可执行文件的目标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆