简体   繁体   中英

Visual Studio not showing committed files in Solution Explorer

I have committed files in Visual Studio and pushed them to a repo on Github. Now i pulled the repo but the committed files do not show up in Solution Explorer but i can see the history of the commits in the Team Explorer window. I can browse the files but i have no idea why they are not part of the solution在此处输入图片说明 . I can open the file from history but it opens from some temporary location. I tried to revert to the last commit but still nothing shows up.

If you have the files on the branch (remote, local), go on that branch (if is local the files should be visible in solution explorer), if is remote branch, pull to the latest, re include those files in projects via solution explorer (click show all files, add one by one right click -> add in project).

Edit gitignore file, recommended visual studio Git ignore https://github.com/github/gitignore/blob/master/VisualStudio.gitignore , you can search for windwos forms recommend git ignore.

Close the solution, Reopen solution, Commit (push) .csproj, .sln files on the remote branch.

I got the same issue then I found that in my .csproj file, my compile link is missing. For example, you can find <Compile Include="Folder\\YourCommittedFileLink.cs"/> . If it doesn't exist, that's the reason why your Solution Explorer doesn't find it. Add it manually in your .csproj file and then Reload your Solution Explorer. Finally, commit this .csproj file also.

... Try the New Git user experience. In the “Tools” top level menu, select “Options…”. Under “Environment”, choose the “Preview Features” page. Check or uncheck the checkbox that says “New Git user experience”. This will add a new tool window, as well as functionality build around Git....

original post on

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM