Add Local Project to Visual Studio Online

2014-02-20


Visual Studio Online is actually formally called Team Foundation Server. But it is kind of cloud system, and there should be different features compared with team foundation server system.

Here we have a case: uploading a local existing project to Visual Studio Online:

1: First we create a new project in Visual Studio online, we selected GIT source control; We named the project as S900 Web System:

image 

2: Now we turn to our local Visual Studio 2013, right click existing solution, and select "Add Solution to Source Control…":

image

3: Select Git:

image

4: Now we can see there are some changes on our solution and projects, which means the local Git repository created:

(About Team Explore window, if you can see this windows, open it from Menu View)

image

5: Since we created local Git repository, we need to commit our code now, if you not do this step, you will see Git ask you must commit local repository in Step 12: "You must commit changes to your local repository before you can publish."

image

6: Now you have to Configure a user name and email due to Git rule, click Configure link below:

image

7: Input user name and Email below, these information will be used when you have a team, also Git knows who changed code, and notify whom by email if other team member committed code, so you should input your email address, otherwise you will not get code update message:

image

8: After you done your user information, now you can click Commit button to commit your code to local Git repository:

image

9: Still in Team Explore window, the click "Select Team Projects…"

image

10: Input your visual studio online URL in "Select a Team Foundation Server"

image

11: You have to input your Visual Studio online account information now:

image

12: After sign in successfully, click "Close" button:

image

13: Now Visual Studio 2013 retrieved your remote online information, you just check on one project which you want to upload to:

image

14: Now it asks you clone this repository, we will NOT clone here, otherwise we will clone an empty repository from online, because we created an empty project online, but we just click the connection button:

image

15: Then we right click our local Git Repository, and select "Publish to …." our online project:

image

16: Now we see the publishing process:

image

After you see the publishing process done, your local project is uploaded to your Visual Studio online account successfully, you can confirm it in Visual Studio Online.

(If you can not see your local solution by change to solution explorer windows, you can click back or forward arrow to access to a windows which include your local solution link, click that local solution link, then you can be turned to your local solution.)