VS: Fix project reference inspection in VS IDE

The braces around project reference GUIDs for vcxproj projects were
apparently optional in the past, but Visual Studio 2017 is more strict,
displaying a warning, and not displaying project reference properties
unless the braces are present.

Fixes: #16820
This commit is contained in:
Richard Walters 2017-04-19 14:55:56 -07:00 committed by Brad King
parent a6a0cfb24d
commit fd7e8f339a

View File

@ -3194,13 +3194,8 @@ void cmVisualStudio10TargetGenerator::WriteProjectReferences()
this->ConvertToWindowsSlash(path);
(*this->BuildFileStream) << cmVS10EscapeXML(path) << "\">\n";
this->WriteString("<Project>", 3);
if (csproj == this->ProjectType) {
(*this->BuildFileStream) << "{";
}
(*this->BuildFileStream) << this->GlobalGenerator->GetGUID(name.c_str());
if (csproj == this->ProjectType) {
(*this->BuildFileStream) << "}";
}
(*this->BuildFileStream)
<< "{" << this->GlobalGenerator->GetGUID(name.c_str()) << "}";
(*this->BuildFileStream) << "</Project>\n";
this->WriteString("<Name>", 3);
(*this->BuildFileStream) << name << "</Name>\n";