VS2017 project references need braces around GUIDs
I recently switched from using VS2015 to VS2017, and noticed that project references were being flagged by VS2017 with yellow exclamation point icons, and the properties tab would not show properties for project references:
This was not a problem with VS2015:
Also, the projects build just fine in either VS2015 or VS2017; the only problem is the problem icons in the GUI and the inability to inspect project reference properties.
I debugged this and discovered that if I put braces around the GUIDs in the project references, the problem would go away:
I'm not sure if VS2015 was being lenient about accepting the GUIDs without braces, or whether VS2017 is being more strict in requiring them, or if the project file syntax was changed slightly from VS2015 to VS2017.
Before:
<ItemGroup> <ProjectReference Include="E:\Workspaces\Lighthouse\build\ZERO_CHECK.vcxproj"> <Project>B031E67B-55D5-31BB-843F-9BB9846A5909</Project> <Name>ZERO_CHECK</Name> </ProjectReference> <ProjectReference Include="E:\Workspaces\Lighthouse\build\ALL_BUILD.vcxproj"> <Project>6C38039E-8969-3EEC-9A17-5EDC7766B4BA</Project> <Name>ALL_BUILD</Name> </ProjectReference> </ItemGroup>
After:
<ItemGroup> <ProjectReference Include="E:\Workspaces\Lighthouse\build\ZERO_CHECK.vcxproj"> <Project>{B031E67B-55D5-31BB-843F-9BB9846A5909}</Project> <Name>ZERO_CHECK</Name> </ProjectReference> <ProjectReference Include="E:\Workspaces\Lighthouse\build\ALL_BUILD.vcxproj"> <Project>{6C38039E-8969-3EEC-9A17-5EDC7766B4BA}</Project> <Name>ALL_BUILD</Name> </ProjectReference> </ItemGroup>