Answered by:
WindowsTargetPlatformVersion in a Common Property Sheet

-
We have a product with a large number of project files, so we have some vsprops property sheets that define a bunch of the settings that need to be common to all projects. We now need to start using the latest Windows 10 SDK, so I am trying to add the correct target version to one of the common property sheets and am running into a problem.
I have added the following line into a property group:<WindowsTargetPlatformVersion>10.0.14393.0</WindowsTargetPlatformVersion>
If I now right-click on the project and select Properties, I see that the Target Platform Version is set to 10.0.14393.0 as expected. However, if I do a build on the project, the various WindowsSDK macros appear to be resolving to the default 8.1 SDK version. The only way I am able to make the macros resolve correctly is if I manually change the Target Platform Version to 10.0.14393.0 or use the 'Retarget SDK Version' command to change it to 10.0.14393.0. Both of these actions actually modify the vcxproj file itself to add the WindowsTargetPlatform setting.
Am I doing something wrong, or why does it appear to be inheriting the correct setting visually when it's really not?Thanks,
Greg
- Moved by Baron BiMicrosoft contingent staff Thursday, August 18, 2016 2:12 AM not about c++
Question
Answers
-
Hi gluckett,
Could you please share me which type project you created, and based on which platform?
According to the following link about Adam Welch’s bolg from VC++ Team, there serval method for retargeting the Windows SDK. If some solutions contain many projects, we could right-click the solution name and choose Retarget solution, then all projects will be listed and desired Target Platform Version and Target Platform Minimum Version can be selected for those projects.
https://blogs.msdn.microsoft.com/vcblog/2015/07/29/developing-for-windows-10-with-visual-c-2015/
If your project was based on Win 8.x, and you want to it run at Win 10 platform. Please refer to the following link about Move from Windows Runtime 8.x to UWP:
https://msdn.microsoft.com/en-us/windows/uwp/porting/w8x-to-uwp-root
Sincerely,
Oscar
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. Click HERE to participate the survey.
- Proposed as answer by qing__Moderator Monday, August 22, 2016 1:36 AM
- Marked as answer by qing__Moderator Thursday, August 25, 2016 10:56 AM
All replies
-
Hi gluckett,
thanks for posting here.
This forum is about c++ development. For your case, I will move it to vs general forum for better help.
Your understanding and cooperation will be grateful.
Best Regards,
Sera Yu
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
-
Hi gluckett,
Could you please share me which type project you created, and based on which platform?
According to the following link about Adam Welch’s bolg from VC++ Team, there serval method for retargeting the Windows SDK. If some solutions contain many projects, we could right-click the solution name and choose Retarget solution, then all projects will be listed and desired Target Platform Version and Target Platform Minimum Version can be selected for those projects.
https://blogs.msdn.microsoft.com/vcblog/2015/07/29/developing-for-windows-10-with-visual-c-2015/
If your project was based on Win 8.x, and you want to it run at Win 10 platform. Please refer to the following link about Move from Windows Runtime 8.x to UWP:
https://msdn.microsoft.com/en-us/windows/uwp/porting/w8x-to-uwp-root
Sincerely,
Oscar
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. Click HERE to participate the survey.
- Proposed as answer by qing__Moderator Monday, August 22, 2016 1:36 AM
- Marked as answer by qing__Moderator Thursday, August 25, 2016 10:56 AM
-