diff --git a/modules/vstudio/tests/vc2010/test_globals.lua b/modules/vstudio/tests/vc2010/test_globals.lua
index b72b7c5b3d..564edff01b 100644
--- a/modules/vstudio/tests/vc2010/test_globals.lua
+++ b/modules/vstudio/tests/vc2010/test_globals.lua
@@ -290,6 +290,42 @@ end
end
+ function suite.canSetXPDeprecationWarningToFalse_withV141XP()
+ toolset "v141_xp"
+ prepare()
+ test.capture [[
+
+ {42B5DBC6-AE1F-903D-F75D-41E363076E92}
+ Win32Proj
+ MyProject
+
+
+ false
+
+
+ false
+
+ ]]
+ end
+
+
+ function suite.canSetXPDeprecationWarningToFalse_perConfig_withV141XP()
+ filter "Release"
+ toolset "v141_xp"
+ prepare()
+ test.capture [[
+
+ {42B5DBC6-AE1F-903D-F75D-41E363076E92}
+ Win32Proj
+ MyProject
+
+
+ false
+
+ ]]
+ end
+
+
function suite.windowsTargetPlatformVersion_latest_on2019()
p.action.set("vs2019")
systemversion "latest"
diff --git a/modules/vstudio/vs2010_vcxproj.lua b/modules/vstudio/vs2010_vcxproj.lua
index acdfe4c0ca..52143eb0ae 100644
--- a/modules/vstudio/vs2010_vcxproj.lua
+++ b/modules/vstudio/vs2010_vcxproj.lua
@@ -139,6 +139,7 @@
m.elements.globalsCondition = function(prj, cfg)
return {
m.windowsTargetPlatformVersion,
+ m.xpDeprecationWarning,
}
end
@@ -2411,6 +2412,7 @@
end
end
+
function m.projectGuid(prj)
m.element("ProjectGuid", nil, "{%s}", prj.uuid)
end
@@ -2622,6 +2624,13 @@
end
+ function m.xpDeprecationWarning(prj, cfg)
+ if cfg.toolset == "msc-v141_xp" then
+ m.element("XPDeprecationWarning", nil, "false")
+ end
+ end
+
+
function m.preferredToolArchitecture(prj)
if _ACTION >= "vs2013" then
if prj.preferredtoolarchitecture == p.X86_64 then