CSharp project adds "add_dependency" as ProjectReference and not just build dependency
Hi, I'm porting large .net/CSarp library from multiple Visual Studio solutions to one big Cmake project. And I want to distinguish between targets that should be added as reference, and targets that just need to be put forward in build order, like plugins. For that I tried using the same approach as I did with C++ targets: libraries I want to add as reference I add using
target_link_libraries
but libraries I want to add as just build dependency (eg. plugins), so they are build before the the main target, but not reference, I add using
add_dependencies
However libraries added through add_dependencies are not only affecting the ProjectSection(ProjectDependencies) = postProject in generated sln, but are also exported as <ProjectReference> in the output .csproj file. So I was wondering if this is a bug or desired behaviour, and if so, if there any known workaround? thank you