0

I need your help with Visual Studio and Git. I and a friend of mine are working on a simple project written in c#. We share the project with git (the code is on GitHub) but there's something wrong: when I pull his new files (or he pulls mine) the files result excluded from the project. I can see them in the project folder, but not in the Visual Studio Solution Explorer. To see them I have to click on the "Show All Files" at the top of the solution explorer and then they appear, but, as I said, they result excluded (with the dotted border). See the image here below:

enter image description here

This is strange. We have always worked with Git on other platforms (Android Studio, Eclipse, xCode) and this is the first time we encounter this problem. How can we solve it? Thank you in advance,

superpuccio
  • 11,674
  • 8
  • 65
  • 93
  • Are you also pulling the updates from the actual project file as well? Otherwise you'll pull it down but as far as your project is concerned, it might as well not be there. Other IDE's, other project structures. – Yannick Meeus Jul 23 '15 at 12:44

2 Answers2

0

Sometime you have to add the files manually. Click on the folder in VS and "Add existing item" if your missing files are on the disk.

  • Yes, this is right, but I'd like VS to have an automatic system to add new files pulled from GIT. Is this possible? – superpuccio Jul 23 '15 at 13:02
0

Equivalently, if some of the source files do not show in the Solution Explorer but do in fact exist in the project folder you can simply drag those files into the Solution Explorer. Following worked for me with VS 2015.

  1. Right click on the project and click on "Open Folder in File Explorer"
  2. Drag the missing file from the File Explorer to the Solution Explorer and drop in the place you want it to be and save solution.

Now it should appear in the project Solution Explorer.

kovac
  • 4,945
  • 9
  • 47
  • 90