My directory structure:
Directory.Build.props
Common
Common.csproj
Project1
Project1.csproj
Project2
Project2.csproj
Project3
Project3.csproj
I want the Common project referenced by all other projects, so I added this to Directory.Build.props:
<ItemGroup>
<ProjectReference Include="../Common/Common.csproj" />
</ItemGroup>
But that means the Common project references itself, so I get this error:
error MSB4006: There is a circular dependency in the target dependency graph involving target "_GenerateRestoreProjectPathWalk".
I want to rewrite it to exclude the Common project, maybe using the project name somehow. Something like:
<ProjectReference Include="../Common/Common.csproj" Condition="WHAT GOES HERE"/>
What do I put in "WHAT GOES HERE"?