This error appears whenever some file or folder path in your solution directory is very long. In your solution folder, try following command. It will increase the filepath length in Windows.
git config --global core.longpaths true