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

查看:42
本文介绍了更改已编译可执行文件的 .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天全站免登陆