What are the project GUIDs in a Visual Studio solution file used for?

Marc picture Marc · Feb 24, 2010 · Viewed 55.2k times · Source

I have multiple projects in a single Visual Studio (2008) solution.
I just discovered that each of these projects uses a same GUID, so in the solution file it looks like this:

Project("{FAE04EC0-F103-D311-BF4B-00C04FCBFE97}") = "Pro1", "Pro1\Pro1.csproj", "{...}"
Project("{FAE04EC0-F103-D311-BF4B-00C04FCBFE97}") = "Pro2", "Pro2\Pro2.csproj", "{...}"

Do I have to change these GUIDs so they're unique and what are they used for?

Answer

Oleg Tkachenko picture Oleg Tkachenko · Feb 24, 2010

Project persistence block in a solution file has the following format:

Project("{project type GUID}") = "<Project name>", "<project file location>", 
    "{<Unique project GUID>}"
EndProject

So it's expected that first GUID is non-unique, it uniquely identifies Visual Studio package that handles this type of projects.

The GUID you posted is interesting - it looks like mangled C# project GUID, which is FAE04EC0-301F-11D3-BF4B-00C04F79EFBC. Did you change it yourself or is it a posting issue (e.g. you are using right-to-left locale such as Hebrew or Arabic).