How to Fix MSBuild Error MSB4006

You may encounter an error which looks like this:
MSB4006: There is a circular dependency in the target dependency graph involving target "ResolveProjectReferences" [MyProjectName\MyProjectName.csproj]
…when running MSBuild from the command line.
This error happens when:

You run MSBuild on a machine with .NET 4.5 installed and
You build a project referencing a solution where the SLN file contains dependencies in [...]

Also tagged ,