I read this post on the contents of a solution file, but still have no clue about the actual purpose of dependencies provided within a solution-file rather than within the project-file itself.
It seems there are two ways of having project 2 depending on project 1:
- add a project-reference from p2 to p1. This will alter the csproj-file for p2 by introducing a
ProjectReference
to p1.csproj, but won´t change the solution, as far as I understand. - add an assembly-reference from p2 to p1. Thill will also alter the csproj-file by using a
Reference
to a compiled assembly (dll). However, it also adds aProectDependency
into the solution-file, which I do not understand. Why is this second entry within the solution needed in this case? Isn´t the assembly-reference provided within the csproj-file for p2 sufficient?