From 7ce91857927a5eca9d116c146e1c6f11610a3fb9 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 19 Jan 2026 14:17:24 -0500 Subject: VS: Add include_external_msproject GUIDs for more project types Issue: #27524 --- Source/cmVSSolution.cxx | 12 ++++++ Source/cmVSSolution.h | 6 +++ .../ProjType-check-sln.cmake | 6 +++ .../ProjType-check-slnx.cmake | 43 ++++++++++++++++++++++ .../ProjType-check.cmake | 1 + .../include_external_msproject/ProjType.cmake | 6 +++ .../include_external_msproject/RunCMakeTest.cmake | 2 + 7 files changed, 76 insertions(+) create mode 100644 Tests/RunCMake/include_external_msproject/ProjType-check-sln.cmake create mode 100644 Tests/RunCMake/include_external_msproject/ProjType-check-slnx.cmake create mode 100644 Tests/RunCMake/include_external_msproject/ProjType-check.cmake create mode 100644 Tests/RunCMake/include_external_msproject/ProjType.cmake diff --git a/Source/cmVSSolution.cxx b/Source/cmVSSolution.cxx index dc6630f..cb2b259 100644 --- a/Source/cmVSSolution.cxx +++ b/Source/cmVSSolution.cxx @@ -17,24 +17,36 @@ namespace cm { namespace VS { +cm::string_view const Solution::Project::TypeIdAspNetCore = + "8BB2217D-0F2D-49D1-97BC-3654ED321F3B"_s; cm::string_view const Solution::Project::TypeIdCSharp = "FAE04EC0-301F-11D3-BF4B-00C04F79EFBC"_s; cm::string_view const Solution::Project::TypeIdDatabase = "C8D11400-126E-41CD-887F-60BD40844F9E"_s; cm::string_view const Solution::Project::TypeIdDefault = "8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942"_s; +cm::string_view const Solution::Project::TypeIdDotNetCore = + "9A19103F-16F7-4668-BE54-9A1E7A4F7556"_s; cm::string_view const Solution::Project::TypeIdFSharp = "F2A71F9B-5D33-465A-A702-920D77279786"_s; cm::string_view const Solution::Project::TypeIdFortran = "6989167D-11E4-40FE-8C1A-2192A86A7E90"_s; +cm::string_view const Solution::Project::TypeIdJScript = + "262852C6-CD72-467D-83FE-5EEB1973A190"_s; +cm::string_view const Solution::Project::TypeIdMisc = + "66A2671D-8FB5-11D2-AA7E-00C04F688DDE"_s; cm::string_view const Solution::Project::TypeIdNodeJS = "9092AA53-FB77-4645-B42D-1CCCA6BD08BD"_s; cm::string_view const Solution::Project::TypeIdPython = "888888A0-9F3D-457C-B088-3A5042F75D52"_s; +cm::string_view const Solution::Project::TypeIdSqlSrv = + "00D1A9C2-B5F0-4AF3-8072-F6C62B433612"_s; cm::string_view const Solution::Project::TypeIdVDProj = "54435603-DBB4-11D2-8724-00A0C9A8B90C"_s; cm::string_view const Solution::Project::TypeIdVisualBasic = "F184B08F-C81C-45F6-A57F-5ABD9991F28F"_s; +cm::string_view const Solution::Project::TypeIdWebSite = + "E24C65DC-7377-472B-9ABA-BC803B73C61A"_s; cm::string_view const Solution::Project::TypeIdWinAppPkg = "C7167F0D-BC9F-4E6E-AFE1-012C56B48DB5"_s; cm::string_view const Solution::Project::TypeIdWiX = diff --git a/Source/cmVSSolution.h b/Source/cmVSSolution.h index 4117ecc..49385da 100644 --- a/Source/cmVSSolution.h +++ b/Source/cmVSSolution.h @@ -70,15 +70,21 @@ struct Solution final std::vector BuildDependencies; // Project type GUIDs used during creation. + static cm::string_view const TypeIdAspNetCore; static cm::string_view const TypeIdCSharp; static cm::string_view const TypeIdDatabase; static cm::string_view const TypeIdDefault; + static cm::string_view const TypeIdDotNetCore; static cm::string_view const TypeIdFSharp; static cm::string_view const TypeIdFortran; + static cm::string_view const TypeIdJScript; + static cm::string_view const TypeIdMisc; static cm::string_view const TypeIdNodeJS; static cm::string_view const TypeIdPython; + static cm::string_view const TypeIdSqlSrv; static cm::string_view const TypeIdVDProj; static cm::string_view const TypeIdVisualBasic; + static cm::string_view const TypeIdWebSite; static cm::string_view const TypeIdWinAppPkg; static cm::string_view const TypeIdWiX; }; diff --git a/Tests/RunCMake/include_external_msproject/ProjType-check-sln.cmake b/Tests/RunCMake/include_external_msproject/ProjType-check-sln.cmake new file mode 100644 index 0000000..b1f8ddb --- /dev/null +++ b/Tests/RunCMake/include_external_msproject/ProjType-check-sln.cmake @@ -0,0 +1,6 @@ +check_project(ProjType AspNetCore "" "8BB2217D-0F2D-49D1-97BC-3654ED321F3B" "" "") +check_project(ProjType DotNetCore "" "9A19103F-16F7-4668-BE54-9A1E7A4F7556" "" "") +check_project(ProjType Misc "" "66A2671D-8FB5-11D2-AA7E-00C04F688DDE" "" "") +check_project(ProjType SqlSrv "" "00D1A9C2-B5F0-4AF3-8072-F6C62B433612" "" "") +check_project(ProjType JScript "" "262852C6-CD72-467D-83FE-5EEB1973A190" "" "") +check_project(ProjType WebSite "" "E24C65DC-7377-472B-9ABA-BC803B73C61A" "" "") diff --git a/Tests/RunCMake/include_external_msproject/ProjType-check-slnx.cmake b/Tests/RunCMake/include_external_msproject/ProjType-check-slnx.cmake new file mode 100644 index 0000000..f1fd0fc --- /dev/null +++ b/Tests/RunCMake/include_external_msproject/ProjType-check-slnx.cmake @@ -0,0 +1,43 @@ +RunCMake_check_slnx("${RunCMake_TEST_BINARY_DIR}/ProjType.slnx" [[ +^<\?xml version="1\.0" encoding="UTF-8"\?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +$]]) diff --git a/Tests/RunCMake/include_external_msproject/ProjType-check.cmake b/Tests/RunCMake/include_external_msproject/ProjType-check.cmake new file mode 100644 index 0000000..5b37ec0 --- /dev/null +++ b/Tests/RunCMake/include_external_msproject/ProjType-check.cmake @@ -0,0 +1 @@ +include(${CMAKE_CURRENT_LIST_DIR}/ProjType-check-${sln_ext}.cmake) diff --git a/Tests/RunCMake/include_external_msproject/ProjType.cmake b/Tests/RunCMake/include_external_msproject/ProjType.cmake new file mode 100644 index 0000000..3e5c687 --- /dev/null +++ b/Tests/RunCMake/include_external_msproject/ProjType.cmake @@ -0,0 +1,6 @@ +include_external_msproject(AspNetCore AspNetCore.project TYPE 8BB2217D-0F2D-49D1-97BC-3654ED321F3B) +include_external_msproject(DotNetCore DotNetCore.project TYPE 9A19103F-16F7-4668-BE54-9A1E7A4F7556) +include_external_msproject(Misc Misc.project TYPE 66A2671D-8FB5-11D2-AA7E-00C04F688DDE) +include_external_msproject(SqlSrv SqlSrv.project TYPE 00D1A9C2-B5F0-4AF3-8072-F6C62B433612) +include_external_msproject(JScript JScript.project TYPE 262852C6-CD72-467D-83FE-5EEB1973A190) +include_external_msproject(WebSite WebSite.project TYPE E24C65DC-7377-472B-9ABA-BC803B73C61A) diff --git a/Tests/RunCMake/include_external_msproject/RunCMakeTest.cmake b/Tests/RunCMake/include_external_msproject/RunCMakeTest.cmake index 1a869be..25a83cb 100644 --- a/Tests/RunCMake/include_external_msproject/RunCMakeTest.cmake +++ b/Tests/RunCMake/include_external_msproject/RunCMakeTest.cmake @@ -9,6 +9,8 @@ else() endif() run_cmake(AutoType) +run_cmake(ProjType) + run_cmake(CustomGuid) run_cmake(CustomTypePlatform) run_cmake(CustomGuidTypePlatform) -- cgit v0.12