VS: Add SLNX default startup project

At the time of commit e6aa7742b0 (VS: Generate .slnx files for VS 2026,
2025-09-17, v4.2.0-rc1~151^2), the VS 18 Insiders edition did not offer
support for specifying a default startup project in `.slnx` files.
This has since been added, so use it.

Fixes: #27387
This commit is contained in:
Brad King
2025-11-14 10:56:16 -05:00
parent 64a9839c25
commit 70ed720232
24 changed files with 27 additions and 24 deletions
+3
View File
@@ -312,6 +312,9 @@ void WriteSlnxProject(cmXMLElement& xmlParent, Solution const& solution,
cmXMLElement xmlProject(xmlParent, "Project");
xmlProject.Attribute("Path", project.Path);
xmlProject.Attribute("Id", cmSystemTools::LowerCase(project.Id));
if (project.Name == solution.StartupProject) {
xmlProject.Attribute("DefaultStartup", "true");
}
for (Solution::Project const* d : project.BuildDependencies) {
cmXMLElement(xmlProject, "BuildDependency").Attribute("Project", d->Path);
}