Visual C++ Tools for Windows 10 Technical Preview

Raman Sharma

Earlier this week we announced the availability of the first preview of the Visual Studio 2015 tools for building Windows 10 applications. C++ continues to be an important language for building Windows apps and in this blog post, we want to highlight some C++ specific functionality for Windows 10 app development.

Windows universal apps

You will find some new C++ project templates which can be used to get started with creating Windows universal apps:

Image 0878 032715 1826 VisualCTool1

API Contracts

Windows 10 tools allow you to create universal apps through the usage of API contracts (described here). This enables you to start checking, at runtime, if a Windows feature is available on the device before you call a related API, as in the code example below:

Image 7725 032715 1826 VisualCTool2

Functionality for API contracts has been enabled in both the C++ compiler and the build system.

C++ Runtime Dependencies for Universal Apps

Just like existing Windows Store apps, Windows 10 universal apps written using C++ will also rely on the concept of framework packages to satisfy their runtime dependency on C++ Libraries. As of this preview release however, we have provided a makeshift mechanism through which the requisite C++ Runtime DLLs are copied directly into the app packages and are deployed along with the app. This is only a temporary workaround and we will revert to using framework packages in future.

Do note that the work that we have done for the Universal CRT, also benefits universal apps. Since these apps are built using the VC++ 2015 toolset, they will now rely on Universal CRT and will always find it in the Windows 10 operating system itself.

Windows SDK(s)

Some of you might have already installed Visual Studio 2015 CTP6 prior to the above announcement. If you haven’t yet installed the Windows 10 tools, then any Windows Desktop C++ app project (MFC, Win32, Console etc.) will build using the Windows 8.1 SDK which is a part of VS2015 CTP6 and can be found under this location:

{Program Files (x86)}\Windows Kits\8.1

However, when you additionally install the Tools for Windows 10 Technical Preview, it comes with the new Windows 10 SDK (Preview) found under:

{Program Files (x86)}\Windows Kits\10

Windows 10 SDK provides a number of new API, several of which are available even outside the context of Universal apps i.e. even Desktop apps can use them. Therefore in order to facilitate easy experimentation with Windows 10 SDK, we have changed the behavior of VS2015 CTP6 to switch to using the Windows 10 SDK for all Windows Desktop app projects (MFC, Win32, Console etc.). This switching happens only if the Windows 10 SDK is installed, otherwise it defaults to using the Windows 8.1 SDK.

This is just a brief introduction to some of the changes we are making for Universal app development experience for C++. Over the next few months we will be talking more about some C++ specific work we have done and are planning to do in this area. We hope you will try these tools out and let us know if you have any feedback or questions.

Posted in C++


Discussion is closed.

Feedback usabilla icon