1

I'm working on Xamarin.Forms project and I'm in the master branch and I'm trying to check out another branch but I'm getting this error in VS 2019:

enter image description here

& I'm getting this error when using commands: enter image description here

Notes:

  • This is my first time checking out this branch
  • I can check out other branches normally
  • The paths mentioned in the error don't exist.
  • I don't care about the ios application for this project, I focus on the Android one.

What should I do to fix this error and check out the branch successfully?

1 Answers1

0

In command line, try and set a sparse checkout clone first, then open the IDE for your Xamarin project:

git clone --filter=blob:none --no-checkout https://github.com/remote/project
cd project
git sparse-checkout set /* !/.vs/JM?/xs/project-cache
git sparse-checkout init
# that sets git config core.sparseCheckoutCone true
git read-tree -mu HEAD

The idea is to ignore the content of .vs/JM?/xs/project-cache (assuming .vs is right under the root folder of the repository) on checkout (of any branch).

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250