I just had a mistake that made me go around in circles. In my solution I have some csproj projects in version 2017 and projects in old format.

When compiling I have a compilation error telling me:

DV0001: The C1 class of the P1 project cannot reference the C2 class of the P2 project because the P1 project does not reference P2.

However the P2 pojet (csproj2017) is well referenced in P1 (old csproj).

This is the Microsoft.DependencyValidation.Analyzers package that generates this message. It does not seem able to handle the interaction between P1 and P2.

For the moment I have removed this package of projects to finish the migration of projects to the csproj2017 format.