简体   繁体   中英

Visual Studio 2015 Change target platform to windows 7

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 .

To get additional target platforms (ie older Visual C compilers), install the respective older Visual Studio version(s) in parallel.

For instance, if you want to use Visual Studio 2017 in the GUI and want to build against VC2008 (msvc90), install Visual Studio 2008 in parallel to Visual Studio 2017. In VS2017, in the build settings, you can then select the "VC 2008" build target.

Also see: https://poweruser.blog/visual-studio-2017-compile-against-older-visual-cc-runtimes-372519fe1400

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM