Games for Windows and the DirectX SDK blog

Technical tips, tricks, and news about game development for Microsoft platforms including desktop, Xbox, and UWP


Project maintained by walbourn Hosted on GitHub Pages — Theme by mattgraham
Home | Posts by Tag | Posts by Month

Visual Studio 2017

visualc

Originally posted to Chuck Walbourn's Blog on MSDN,

Visual Studio 2017 RTM is now available for download, including the updated Community edition. The VS 2017 RTM Redistribution packages are also available (x86, x64), as well as the Remote Debugging Tools (x86, x64). For more information see the Visual C++ Team Blog and Visual Studio Team Blog.

All versions of Visual Studio 2017 are out of their “mainstream” support lifecycle as of April 2022. Platform toolset v141 from 15.9 support is still available in Visual Studio 2019 and Visual Studio 2022 as optional components..

This version of Visual Studio includes a new lightweight installer. Be sure to read this post for an overview. Note that most C++ workloads include the Windows 10 SDK (originally this was 14393, but as of the 15.1 update it’s now 15063) by default, but older versions including Windows 8.1 SDK are available as optional components.

The latest docs are located here rather than their traditional location on MSDN.  In particular, see Install Visual Studio 2017 and the Visual C++ Porting and Upgrading Guide.

UWP C++ Developers:  When you select the Universal Windows Platform (UWP) workload, be sure to add the optional component C++ Universal Windows Platform tools.

Automated Installs: See this page for details on installing VS 2017 from the command-line. For example, this installs C++ toolsets for game development for Win32 classic desktop and UWP apps:

vs_community.exe --lang en-us
--add Microsoft.VisualStudio.Workload.NativeGame
--add Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Win81
--add Microsoft.VisualStudio.Workload.Universal
--add Microsoft.VisualStudio.ComponentGroup.UWP.VC
--add Microsoft.VisualStudio.Workload.NativeDesktop
--includeRecommended

Compiler and CRT

VS 2017 includes a new version of C/C++ compiler (19.10.25017). See this blog post and this post for details on the new compiler and standards conformance (including more work on Expression SFINAE and additional C++14 conformance). See this post for details on /analyze updates, and this post for details on the C++ Core Guidelines Checker.

Update: The VS 2017 (15.1) and VS 2017 (15.2) minor updates include a couple of hotfix for the compiler. The compiler version as of VS 2017 (15.2) was 19.10.25019. There’s a newer revision of the compiler in VS 2017 (15.3).

The C/C++ Runtime (14.10.25008) is binary compatible with VS 2015, which means you can safely link code built with VS 2015 with VS 2017 applications. See this post and this post for details. For details on library fixes in the latest version, see this postNote that when you install the VS 2017 REDIST package, it replaces the VS 2015 REDIST package as it’s just newer versions of the same DLLs.

The VS 2015 C/C++ Runtime DLLs included vcruntime140.dll, msvcp140.dll, concrt140.dll, and vccorlib140.dll. VS 2017 adds msvcp140_1.dll. Use of OpenMP also requires vcomp140.dll.

VS 2017 can target Windows 10, Windows 8.1, Windows 7 Service Pack 1, Windows Vista Service Pack 2, and optionally Windows XP Service Pack 3. Note that the Visual C++ 2017 REDIST does not support Windows 8.0, Windows 7 RTM, Windows Vista RTM, Windows Vista Service Pack 1, Windows XP RTM, Windows XP Service Pack 1, or Windows XP Service Pack 2 as these platforms are all outside their support lifecycle. See Visual Studio 2017 Product Family System Requirements.

Visual ++ Build Tools 2017: There’s an edition of Visual Studio available without the IDE for those looking for just the compiler toolset or setting up a build server.

Known issues

  • Note that there are errors generated when using the new VS 2017 conformance switch with the platform headers in Windows 10 SDK (14393) or earlier. These are addressed in the Windows 10 Creators Update SDK (15603).
  • When you upgrade a project to the v141 toolset, you are given a UI prompt to select which version of the Windows SDK to use based on all the side-by-side installed SDKs.  This is ignored for Win32 desktop projects. To use a newer Windows SDK, you should edit the project properties after the upgrade--otherwise it's likely the 8.1 SDK will be required, which is not installed by default.

Windows XP: When building using the “v141_xp” Platform Toolset for Windows XP Service Pack 3 target support, remember this uses the Windows 7.1A SDK. The older SDK will generate some warnings in system headers with the new toolset that have to be externally suppressed. See VS 2012 Update 1 for some additional implications for DirectX development.

DirectX SDK: If you need to continue to make use of legacy DirectX SDK components such as D3DX9, D3DX10, D3DX11, or XAudio 2.7 with Visual Studio 2017, see Microsoft Docs for details on mixing the paths correctly. See also DirectX SDKs of a certain age, The Zombie DirectX SDK, Living without D3DX, DirectX SDK Tools Catalog, DirectX SDK Samples Catalog, and Where’s DXERR.LIB?

GitHub: There are VS 2017 projects in the latest releases of DirectX Tool Kit for DirectX 11, DirectX Tool Kit for DirectX 12, DirectXTex, DirectXMesh, UVAtlas, DXUT, and Effects 11. These are set up to use the Windows 10 SDK (15063) because that’s the default version for VS 2017. Because of the fact that VS 2015 and VS 2017 are binary compatible w.r.t. to the C/C++ runtime, you can use the 2015 version of the NuGet packages with VS 2017. The Direct3D Game templates have been updated to support VS 2017 as well, and the Direct3DUWPGame.vsix now supports both VS 2015 aad VS 2017.