I have some projects in a Visual Studio solution that have ended up with project references that include the wrong GUID for the referenced project. (Possibly due to the referenced project being recreated at some stage)
eg. Consider a project CoreProject.csproj with the following properties:
<ProjectGuid>{93803F9C-8C65-4949-8D44-AB7A3D0452C8}</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>CoreProject</RootNamespace>
<AssemblyName>CoreProject</AssemblyName>
Another project includes a reference to this, but at some stage the GUID has changed and is now incorrect.
<ProjectReference Include="..\CoreProject\CoreProject.csproj">
<Project>{5FD52517-79F8-41D2-B6F2-EA2D8A886549}</Project>
<Name>CoreProject</Name>
</ProjectReference>
The solution still loads and builds correctly in Visual Studio and msbuild, but I suspect having the wrong GUIDs may have some performance impact within VS.
The solution is quite large with many projects that have this issue, and I'd prefer not to have to re-add these references manually. Are there any tools or macros that can 'fix' up the project reference GUIDs?
I think a basic console app should do the trick, something like this: