Submodule project nested in submodule gives "Unable to locate repository ..."
See original GitHub issueSo I have a docker build with all the required files, including
RUN echo "gitdir: ../.git/modules/Project" > Project/.git
Yet I’m getting the following warning
/root/.nuget/packages/microsoft.build.tasks.git/1.0.0-beta2-18618-05/build/Microsoft.Build.Tasks.Git.targets(20,5): warning : Unable to locate repository containing directory 'Project/Project.csproj [Project/Project.csproj]'
Which finally ends in this error
/usr/share/dotnet/sdk/2.2.203/Roslyn/Microsoft.Managed.Core.targets(90,5): error : SourceRoot items must include at least one top-level (not nested) item when DeterministicSourcePaths is true [Project/Project.csproj]
Has this support not been released yet?
P.S.
I don’t quite get why this docker container build behaves so different from a local publish, they both have the full .git
dir available.
EDIT:
After doing some more digging libgit2sharp (which then bubbles up) seems to return null on the Repository.Discover
call in our docker container, while outside it does work.
This is all with latest beta2, couldn’t get older version to work better at all
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (3 by maintainers)
Top GitHub Comments
Sorry for the delay, I wasn’t on the affected project for a while.
I changed my repro from https://github.com/dotnet/sourcelink/issues/276#issuecomment-489463618 to affect the new situation. By changing version “1.0.0-beta2-18618-05” to “1.0.0” this warning doesn’t appear anymore!
Thanks so much!
@NinoFloris Is this still an issue?