How to pull new files from github to Visual Studio? - windows

I'm new to developing on Windows and getting frustrated with how non-intuitive Visual Studio feels compared to Eclipse. Here's where I'm at:
I created a local VS project, and wrote some code.
I pushed the code to github via the built-in source control options. No problems, source is all there.
My collaborator made new files, and commited them to github. Those are up and live.
I pulled from github, but I don't see the files anywhere in my solution. Where are they? How can I get them to automatically add to my VS project?
How do I pull ALL files on github into VS without having to manual download them and add them to my solution? Visual Studio version is 2019 Community edition.
--EDIT--
I finally found them by switching my solution explorer to the project's folder view using the "Switch Views" button at the top of the solution explorer pane. How do I add these to the solution view?
The concept of having a "solution" completely abstracted from the actual file contents is... strange. I think I'm just going to back to Eclipse. I want to like VS because of vast amount of content in it, but the user experience has been a much more hostile learning environment.

This is not a problem with Windows nor Visual Studio; this is a Git issue.
here are some steps to follow:
make sure that you are pushing to the same branch. checkout this link
if you are pushing into different branch make sure that you do rebasing. checkout this link

Related

Visual Studio Team Services opens an empty/unupdated solution?

We're trying to work together on our project, using VS Team Services. The problem is when we're opening the project from within its' VSTS website - what we see is the project empty and not updated with any recent changes.
The project's repo is on my PC, so I'm able to open it not from its' website.
'Sync' was being used.
edit: It seems that whenever I commit changes the VSTS saves our project to its' VS-site. why is that necessary?
You should add the source files to source control first. Then you could use Push with Git (or Check-in for TFVC) effectively. In your case, you should use the "Add to Source Control" option on the Solution itself to add all the appropriate files to source control.
Note that VSTS host two different source control technologies: Git and TFVC.
I would advice you to understand which technology you are currently using by reading this detailed article, then you will be able to add the source and work with team on the same repository.

How to work on an external developer's project using Team Foundation Server

Me - Front End web developer with an ok working knowledge of writing VB.NET code but I have never built a .NET project from scratch using Visual Studio.
External developer - Experienced VB.NET developer but completely new to version control and TFS. Also extremely cheap and prone to infuriatingly poor programming practices. He does things that make you bang your head on the table.
Background
Our external developer has coded our site but over the last few years I have been tweaking aspects of pages and have managed to learn quite a bit of VB.NET along the way. He has never used source control and I don't think he's ever had to work with another developer before.
Up until now he has maintained a local copy of the website. He makes changes to this local copy and when he wants us to test it he uploads the relevant files to our dev server. I have no experience of Visual Studio projects/solutions so if I have made tweaks to things I have edited the aspx/asxh/config files in my preferred editor and then uploaded them to the dev server. If everything works correctly I ask him to download them from the server so he can update his local copy.
I have been maintaining a local git repository of the website for the last 2 years. If he makes a change I check it in.
Obviously this is a nightmare to work with so we have now insisted that he starts using version control. I recommended GIT but he has decided to use TFS.
He has now put his solution and all the files into TFS. I have installed Visual Studio 2015 and successfully connected to TFS. I have mapped the files from source control to my own workspace but I am now at a loss as to what to do next.
Questions
As soon as I open the .sln file he has uploaded it says I have checked out the file and made changes. When I check the diff it seems to be because I am using a newer version of Visual Studio than he is. Does the .sln file need to be in version control? Or are we suppose to maintain our own versions of the .sln file and simply check in everything else?
If I try and build the project it fails because the web.config is set up for his machine and not mine. How can we maintain 3 versions of the web.config file? One for my local, one for his, and one for our dev/live environments?
I am not convinced he will have added the project to TFS correctly because he's never used it before. This is basically the blind leading the blind.
Question 1:
You need to put the .sln file in version control. Before check out the .sln file, please do a "get latest" step, which will make sure both of you are working on the latest version. When you try to check your local version in the server, and he had uploaded his local version in the server. You may have to solve conflicts before the check in.
Question 2:
You should build your project and published the website on the server. The build agent will only maintain one version of the web.config file. If he has built the project with his web.config. And you want to build the project again with your web.config, the build agent will delete the previous web.config and pull down your version. Then build the project with your's web.config.
Moreover, if both of you are not similar with TFS. Suggest you taking a look at below MSDN link which related to source control and build.
Use Team Foundation Version Control
TFS Vnext Build

TFS will not accept changes I've made to a Java project

I am using TFS's Team Explorer to manage Visual Studio projects.
Recently, I've created a new Java project (not in Visual Studio) which I manually added to TFS using the Source Control Control explorer in Visual Studio.
After I added the Java project to TFS, I made some changes and bug fixes. Then, I went into Visual Studio and opened the Source Control Explorer to check in my changes, but TFS thinks that no changes were made.
It seems that I needed to check out the project before making changes. I guess I erroneously expected TFS to track that automatically, but okay.
So, using the Source Control Explorer in TFS, I checked out the project, and then I tried to check in pending changes. When I tried to check in, I got the following message:
All of the changes were either unmodified files or locks.
The changes have been undone by the server.
Is there a way to convince the server that indeed my project has changed? How can I check in the changes that I have made?
Thank you for any help.

TFS SCC: How can I get new files listed in the Pending Changes Panel in Visual Studio

We are experimenting to use Microsoft Team Foundation Server Source Code Control as a replacement for SVN.
Therefore, it would be great if the friction for this transition would be minimal.
For example, in SVN, whenever I create new files in the folder, and then use "Tortoise SVN Check for Modifications", I get a master list of Added Files, Deleted Files, and Edited Files.
I know that in TFS SCC in Visual Studio, the equivalent is the Pending Changes Panel. However, this panel only lists Edited Files. How can I get new files listed in that panel, too, just like SVN does?
The workflow really depends on whether you are using Local Workspaces or the traditional Server Workspaces. As you are coming from SVN, Local Workspaces would probably be a good fit.
Local Workspaces (New to TFS 2012)
Local Workspaces are TFS's attempt at DVCS and actually gives you a much more SVN-Like experience. The pending changes window with local workspaces is divided up into the following areas:
Included Changes - This is effectively files that are already in Source Control that have been changed.
Excluded Changes - These are all files within the workspace that are not in source control. This is like your Added files in SVN.
Server Workspaces
Server Workspaces are the traditional TFS workspace approach. An item is not in Source Control until it is explicitly added.
There is a much more detailed article on the differences here: http://msdn.microsoft.com/en-gb/library/bb892960.aspx
Drag and drop your new files into the right folders in the Source Control Explorer in Visual studio and then there will be asked if there are also files that need to be excluded from the source control. If that is done they are in the Pending changes window. The implementation like SVN is starting from Visual studio 2012 but then still it can give issues and not be in that panel.
I see this is an old question but I believe the answer is in Visual Studio's "Pending Changes Panel" itself. Notice the "Excluded Changes (nnn)" section. Just below that heading you should find "Detected: nnn add(s)". You can see your 'new files' listed there.
For what it's worth, I find the "Pending Changes" an unwieldy feature in that it seems it's never context aware. I find that I often have to "weed through" many, many files that are simply not relevant to the solution/project(s) at hand.

Visual Studio/Sourcesafe checkout problem

After a branch was created of a project I was working on, I don't seem to be able to checkout resource files anymore. I checked the sourcesafe with the administration tool, and I have sufficient rights on the project. I can checkout the files straight from sourcesafe, but I can't checkout the files from visual studio. anyone know why?
Start with File/Source control/Change Source Control and make sure you have things bound correctly for your project.

Resources