1

I have .NET 5 WEB API project that is consuming services from the submodules. These submodules have its own repository.

I am using GitBlash and BitBucket as repository.

I have added submodule reference by:

 git submodule add http://bitbucket.org/myprojectA

then I went in Visual Studio, opened the project and created folder 'Submodule', followed by I add project references of submodule within the project folder. I commit and push changes.

Then I cloned the same project from BitBucket using SourceTree to test, I opened API project in visual studio and I got the warning message

 one or more projects in the solution were not loaded correctly

Not sure what I am missing. Do I need to run some git bash command to update reference??

3
  • Does this answer your question? Pull git submodules after cloning project from GitHub Commented Aug 17, 2021 at 9:09
  • not it did not solve the problem.. I have tried both Git command to update submodule Commented Aug 17, 2021 at 9:23
  • I do receive submodule folder only but not code Commented Aug 17, 2021 at 9:38

1 Answer 1

0

There are two possible solutions:

1. Explicit get submodules

git submodule update --init --recursive

2. Clone with submodules

git clone --recursive <repo URL>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.