Why is this happening
X.csproj was called, and since it has a link to the Y.csproj project, it calls Y.csproj - it "goes back." Z.csproj has not yet built, so build breaks.
How to fix
Follow this principle : Do not use the dependencies expressed in the solution file at all.
Instead, you can specify a link to the project in the project. It will look like this: pay attention to the metadata element, and all this is inside the <ItemGroup> , of course:
<ProjectReference Include="โฆ foo.csproj"> <ReferenceOutputAssembly>false</ReferenceOutputAssembly> </ProjectReference>
Although it is tedious to edit your projects so that the error disappears, it is best to use the links to the projects and view the solution file simply as a "view".
In the end, you get projects that, if you want, can be created without a solution file.
For more information on how to fix the problem, you can refer to this blog .
source share