First of all, I'm aware of this question and it's pretty similar, but it's outdated since I use the new .Net-Core 2.0
csporj format
Setup
I have recursive submodules. If I pull in a csproj via a submodule, this csproj does have a ProjectReference
to another csproj in a nested submodule.
Error
When I only add the top level dependencies to the solution (.sln
), NuGet package restore fails with NU1105: The project file exists but no restore information was provided for it
. This is caused by the ProjectReference
with a path to a csproj which is not added to the current solution.
Restore and build succeeds when I add all csproj files to the solution.
Question
Usually when I pull in a submodule, I only care about the root csproj and not all of it's dependencies. So I don't want to add all nested csproj files to the solution. Is there still a way to get NuGet working and build all csproj files that are referenced (and are not added to the solution) with msbuild?