{"id":6951,"date":"2015-07-29T12:41:00","date_gmt":"2015-07-29T12:41:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/vcblog\/2015\/07\/29\/developing-for-windows-10-with-visual-c-2015\/"},"modified":"2021-10-07T16:29:10","modified_gmt":"2021-10-07T16:29:10","slug":"developing-for-windows-10-with-visual-c-2015","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/cppblog\/developing-for-windows-10-with-visual-c-2015\/","title":{"rendered":"Developing for Windows 10 with Visual C++ 2015"},"content":{"rendered":"<p><span style=\"font-size: large\"><strong>Getting Started<\/strong><\/span><\/p>\n<p>Windows 10 introduces the new Universal Windows App platform, which allows a single codebase to be reused across multiple Windows 10 devices.&nbsp; An <a href=\"http:\/\/blogs.msdn.com\/b\/vcblog\/archive\/2015\/03\/26\/visual-c-tools-for-windows-10-technical-preview.aspx\">earlier blog post<\/a> described the pre-release process of getting setup and some of the new features available in Universal Windows Apps.&nbsp; Now that <a href=\"http:\/\/blogs.windows.com\/bloggingwindows\/2015\/07\/28\/windows-10-free-upgrade-available-in-190-countries-today\/\">Windows 10 RTM has released<\/a>, the following steps will help you get your machine set up to develop Windows 10 apps using Visual Studio 2015 RTM. &nbsp;<\/p>\n<ol>\n<li>Install the official <a href=\"https:\/\/dev.windows.com\/en-us\/downloads\">Windows 10 release<\/a>&nbsp;, <em>or<\/em> install the <a href=\"https:\/\/dev.windows.com\/en-us\/downloads\">Windows 10 SDK and Windows 10 Mobile Emulator<\/a> if developing from an earlier version of Windows.<\/li>\n<li>Install <a href=\"https:\/\/www.visualstudio.com\/en-us\/downloads\/download-visual-studio-vs.aspx\">Visual Studio 2015 RTM<\/a>. &nbsp;If you installed before today, you can run the Visual Studio installer and there will now be an option to install Windows 10 Development Tools.<\/li>\n<li>Create a Universal Windows App:<\/li>\n<\/ol>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2015\/07\/7041.1.png\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2015\/07\/7041.1.png\" alt=\"Image 7041 1\" width=\"947\" height=\"659\" class=\"aligncenter size-full wp-image-29478\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2015\/07\/7041.1.png 947w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2015\/07\/7041.1-300x209.png 300w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2015\/07\/7041.1-768x534.png 768w\" sizes=\"(max-width: 947px) 100vw, 947px\" \/><\/a><\/p>\n<p><span style=\"font-size: large\"><strong>Project Properties for Selecting the SDK Version in Store Apps<\/strong><\/span><\/p>\n<p>A couple new concepts have been introduced to the VC++ project system to allow you to select which version of Windows SDK&nbsp;you are targeting for your apps.&nbsp; There are two new project properties related to targeting the Windows 10 SDK inside VS2015:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2015\/07\/8715.2.png\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2015\/07\/8715.2.png\" alt=\"Image 8715 2\" width=\"841\" height=\"601\" class=\"aligncenter size-full wp-image-29480\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2015\/07\/8715.2.png 841w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2015\/07\/8715.2-300x214.png 300w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2015\/07\/8715.2-768x549.png 768w\" sizes=\"(max-width: 841px) 100vw, 841px\" \/><\/a><\/p>\n<p><strong><em>Target Platform Version <\/em><\/strong>is the actual SDK version that will be actually be referenced in your app. &nbsp;When a new Windows 10 SDK version becomes available and you install it, this property will allow you to move to that version.<\/p>\n<p><strong><em>Target Platform Minimum Version<\/em><\/strong> is an additional property used only for Store projects that is simply way of indicating in the project file what the lowest supported Windows SDK version that their app will run on.&nbsp; This mean that feature X that shipped in SDK 10240.1 requires 10240.1 [TPMinV] at a <em>minimum<\/em>, but can be used from a later SDK version such as 10240.2 [TPV] since that version also supports the feature).&nbsp;&nbsp;<\/p>\n<p>Note: Visual Studio will not actually enforce this value during a build.&nbsp; We have exposed it in the IDE for consistency with other languages and to allow developers to declare a guideline for the minimum allowed API surface for the devices they are targeting.<\/p>\n<p><span style=\"font-size: large\"><strong>Methods of Retargeting the SDK<\/strong><\/span><\/p>\n<p>As shown above, the project property pages allow toggling the SDK version. &nbsp;We have introduced two additional ways of retargeting the Windows SDK outside of the project property pages. An SDK retargeting dialog can be launched by either right-clicking the project and selecting &ldquo;Retarget SDK&rdquo; (retarget SDK per project), or right-clicking the solution and selecting &ldquo;Retarget solution&rdquo;. &nbsp;Since some solutions may contain many projects, the solution-level gesture allows the SDK retargeting to be performed in a single step for the entire app.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2015\/07\/3005.3.png\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2015\/07\/3005.3.png\" alt=\"Image 3005 3\" width=\"375\" height=\"430\" class=\"aligncenter size-full wp-image-29475\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2015\/07\/3005.3.png 375w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2015\/07\/3005.3-262x300.png 262w\" sizes=\"(max-width: 375px) 100vw, 375px\" \/><\/a><\/p>\n<p>When the dialog is invoked from the solution, all projects will be listed and the desired <em>Target Platform Version<\/em> and <em>Target Platform Minimum Version<\/em> can be selected for those projects:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2015\/07\/3630.4.png\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2015\/07\/3630.4.png\" alt=\"Image 3630 4\" width=\"540\" height=\"329\" class=\"aligncenter size-full wp-image-29476\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2015\/07\/3630.4.png 540w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2015\/07\/3630.4-300x183.png 300w\" sizes=\"(max-width: 540px) 100vw, 540px\" \/><\/a><\/p>\n<p><span style=\"font-size: large\"><strong>Porting Windows 8.1 Store and Window Phone 8.1 Apps to Universal Windows Apps<\/strong><\/span><\/p>\n<p>Upgrading an existing Store app to the Universal Windows App platform must be done manually inside Visual Studio. &nbsp;The following resources provide the necessary information:<\/p>\n<p><a href=\"https:\/\/msdn.microsoft.com\/en-us\/library\/windows\/apps\/dn954974.aspx\">Move from Windows Runtime 8 to UWP<\/a><\/p>\n<p><a href=\"https:\/\/msdn.microsoft.com\/en-us\/library\/windows\/apps\/mt188198.aspx\">Update your UWP Microsoft Visual Studio 2015 RC project to RTM<\/a><\/p>\n<p><span style=\"font-size: large\"><strong>SDK Targeting for Windows Desktop Development<\/strong><\/span><\/p>\n<p>For Windows Desktop apps, the default Windows SDK for VS2015 RTM is the Windows 8.1 SDK.&nbsp; Similar to Universal Windows apps, Windows Desktop apps also support the notion of <em>Target Platform Version <\/em>which can be used to change which Windows SDK is being targeted.&nbsp; Creating a new Desktop&nbsp;project will have the <em>Target Platform Version<\/em> set to 8.1.&nbsp; If later versions of the Windows SDK are installed on disk (like Windows 10 RTM: 10240.0), these will also be selectable in the <em>Target Platform Version<\/em> dropdown:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2015\/07\/6014.5.png\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2015\/07\/6014.5.png\" alt=\"Image 6014 5\" width=\"625\" height=\"138\" class=\"aligncenter size-full wp-image-29477\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2015\/07\/6014.5.png 625w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2015\/07\/6014.5-300x66.png 300w\" sizes=\"(max-width: 625px) 100vw, 625px\" \/><\/a><\/p>\n<p>Note: When targeting Windows XP, set the Platform Toolset to <em>v140_xp <\/em>as was done in previous Visual Studio releases.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2015\/07\/7711.6.png\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2015\/07\/7711.6.png\" alt=\"Image 7711 6\" width=\"629\" height=\"98\" class=\"aligncenter size-full wp-image-29479\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2015\/07\/7711.6.png 629w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2015\/07\/7711.6-300x47.png 300w\" sizes=\"(max-width: 629px) 100vw, 629px\" \/><\/a><\/p>\n<p style=\"text-align: left\">Thanks, <br \/>Adam Welch <br \/>Visual C++ Team<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Getting Started Windows 10 introduces the new Universal Windows App platform, which allows a single codebase to be reused across multiple Windows 10 devices.&nbsp; An earlier blog post described the pre-release process of getting setup and some of the new features available in Universal Windows Apps.&nbsp; Now that Windows 10 RTM has released, the following [&hellip;]<\/p>\n","protected":false},"author":295,"featured_media":35994,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-6951","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cplusplus"],"acf":[],"blog_post_summary":"<p>Getting Started Windows 10 introduces the new Universal Windows App platform, which allows a single codebase to be reused across multiple Windows 10 devices.&nbsp; An earlier blog post described the pre-release process of getting setup and some of the new features available in Universal Windows Apps.&nbsp; Now that Windows 10 RTM has released, the following [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts\/6951","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/users\/295"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/comments?post=6951"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts\/6951\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/media\/35994"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/media?parent=6951"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/categories?post=6951"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/tags?post=6951"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}