Visual Studio 2015将目标平台更改为Windows 7 [英] Visual Studio 2015 Change target platform to windows 7

查看:129
本文介绍了Visual Studio 2015将目标平台更改为Windows 7的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将目标平台更改为Windows 7?我只能选择Windows 8.1,因此我的项目无法在Windows 7上运行.该项目是我以前在装有Visual Studio 2013的旧Windows 7 PC上编译的项目.

我已经尝试安装Windows 7 SDK,但遗憾的是,这无法正常工作,因为它退出了我无法安装的Net Framework 4.0.(Windows 10包括4.6吗?)- https://msdn.microsoft.com/zh-我们/zh-CN/library/ff770576.aspx

谢谢.

解决方案

来自 MSDN:

目标平台版本

[...]

要定位到Windows 7或Windows Vista,请使用值8.1,因为Windows SDK 8.1向后兼容这些平台.另外,您应该在targetver.h中为_WIN32_WINNT定义适当的值.对于Windows 7,该值为0x0601.请参见修改WINVER和_WIN32_WINNT .

How can I change the target platform to Windows 7? All I can chose is Windows 8.1 and therefore my project does not run on Windows 7. The same project I used to compile on my old Windows 7 PC with Visual Studio 2013. And of course it worked there.

I already tried to install Windows 7 SDK but sadly this does not work since it requites Net Framework 4.0 which I can not install anymore. (Windows 10 includes 4.6?) - https://msdn.microsoft.com/en-us/en-en/library/ff770576.aspx

Thanks.

解决方案

From MSDN:

Target Platform Version

[...]

To target Windows 7 or Windows Vista, use the value 8.1, since Windows SDK 8.1 is backward compatible to those platforms. In addition, you should define the appropriate value for _WIN32_WINNT in targetver.h. For Windows 7, that's 0x0601. See Modifying WINVER and _WIN32_WINNT.

这篇关于Visual Studio 2015将目标平台更改为Windows 7的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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