Closed
Description
#56417 showed that it's possible to accidentally add a ProjectReference from a ref project to a source one. It should be possible to guarantee that this doesn't happen again via a Target that checks if a reference project is available when a source project is referenced from a reference project and throws in such cases. Performance should be considered as an IO operation per ProjectReference might slow down the build. As an optimization, the IO check could only be triggered if a ProjectReference's parent folder is "src".
Alternatively by merging reference and source projects we would avoid this problem entirely: #37961.