Visual Studio On-Line
Total Page:16
File Type:pdf, Size:1020Kb
Setting up Collaboration
In this session we will explore two tools allowing you to collaborate more effectively as a team.
The first tool will be your I drive which is a shared drive on the local area network allowing your team to work simultaneously on for example Enterprise Architect. This facility is not available off campus and may only be used at the DMU labs.
The second tool is Visual Studio On-Line which allows you to share your Visual Studio solutions/projects with team members both on campus and off campus.
Setting up your I Drive
The I drive is an additional drive letter in Windows allowing you as a team to share files with each other on campus.
To create the drive letter visit the following URL http://www.tech.dmu.ac.uk/~mjdean/i/
You will see a file there called Map I.bat
You will need to right click the file and save it to a location where you can find it again.
Open the location where you saved the file and double click it. This will create the mapping to drive I.
You will need to manually map the drive by running this file whenever you need access to the I drive.
In the I drive you will see a list of folders.
You will need to meet with your tutor as a team to be allocated a folder for your team.
Once your tutor has done this you should all have access to the shared area.
As part of the first deliverable you will need to create documents in Enterprise Architect that are shared between your team members. Place such files in the I drive rather than your own personal H drive.
Visual Studio On-Line
Another important tool that is required in team based development projects is some sort of version control software. Imagine the following scenario...
Bob and Jane are working together on a project.
Jane opens clsDataConnection in Visual Studio Bob adds a new method to clsDataConnection Bob saves his work on the class (saving the two classes) Jane completes her work modifying the code for clsAddressBook In the process Jane also saves clsDataConnection This reverts clsDataConnection back to its original version overwriting the new code created by Bob
In order to avoid problems like this we need some sort of system in place to control the versions of software around the system.
In this module we will use Visual Studio Online which is a free on-line version of Team Development Server.
To use this you will need to sign up for an account at http://www.visualstudio.com/en-us
Depending on the role you take in your SCRUM team you will have slightly different tasks to perform in the following work.
All members of the team will need to sign up for an account and configure individual local copies of Visual Studio.
The SCRUM master in your team will be responsible for setting up the project for the team and adding team members to the project on-line.
Sign up and sign in
The first step in using VS Online is to sign up for an account.
All team members will need to complete this initial step.
Navigate to the URL above.
On the main page press the button to sign up... If you have a Microsoft Account you may sign in using that. If you don’t have such an account you will need to create one. You may use an existing e-mail address to do this.
Once you have created your account you will need to navigate back to http://www.visualstudio.com/en-us
And sign up (again) to create your Visual Studio on-line account.
You will need to create an account URL as part of the process. All team members will need to complete this task but it is the SCRUM master who will have the main URL for the work.
The SCRUM master will need to make a note of this URL as this will be used by all team members to access the shared project files.
The format will be something like https://P12345678.visualstudio.com
Assuming you use your P number email to create the account.
Once the SCRUM master has the team URL make sure that all team members know what it is.
The SCRUM master should now be in a position to create the first project. Create the main project with the following setting...
Press create project and the project will be set up for you.
You should see the following screen. Adding Members
Now that the SCRUM master has set up the project they need to add the team members to that project.
Find and add team members.
Team members need to accept the invitation via the email sent to their in box.
Each team member should be able to browse to the shared project from the main Visual Studio Online page... Leading to... Once all members have been added to the team via the web interface the SCRUM master will need to set up their local copy of Visual Studio.
Configuring Visual Studio – SCRUM Master
Open Visual Studio.
On the right of the interface there should be a tab for team explorer.
Click this and then at the top select Connect to Team Foundation Server. This will give you the option of stating which server VS should communicate with...
To add the server click Servers to access the following screen...
Press Add. In the following screen enter your URL of the VS Online account.
Something like https://P12345678.visualstudio.com
(Whatever the SCRUM master used to set it up!)
Press OK followed by Close.
If everything has gone to plan you should be able to select the on-line project... Press connect
Creating a Local Folder
The next step is to tell Visual Studio where the files need to be stored on the local machine.
Click the link for source control explorer... This will allow you to specify the local path for the files when downloaded from the server.
Press the link “Not mapped”.
Specify a local directory within your personal storage. e.g.
Then press Map.
You will see the following message... Press yes.
Creating the Initial Project
You now need to create the first project for sharing with the members of your team.
You could do this within Visual Studio however it would make more sense to copy a project into the local folder we set up above.
Open the folder in file explorer.
And copy a VS project into the folder
(In my case the address book application)
Visual Studio should now detect that there are files to upload to the server.
Select Pending Changes... Your project should be listed under included changes. To send these files to the server you will need to check them in.
Press the button Check In If you now log in to the on-line account and select code...
You should see that the project has now been uploaded to the server... All of the other team members now need to set up Visual Studio locally.
The procedure is exactly the same however when you select yes on the following screen... You should see the files from the web downloaded to the local machine of each team member.
Configuring Visual Studio – Other Team Members
Open Visual Studio.
On the right of the interface there should be a tab for team explorer. Click this and then at the top select Connect to Team Foundation Server. This will give you the option of stating which server VS should communicate with...
To add the server click Servers to access the following screen...
Press Add. In the following screen enter your URL of the VS Online account.
Something like https://P12345678.visualstudio.com
(Whatever the SCRUM master used to set it up!)
Press OK followed by Close.
If everything has gone to plan you should be able to select the on-line project... Press connect
Creating a Local Folder
The next step is to tell Visual Studio where the files need to be stored on the local machine.
Click the link for source control explorer... This will allow you to specify the local path for the files when downloaded from the server.
Press the link “Not mapped”.
Specify a local directory within your personal storage. e.g.
Then press Map.
You will see the following message... Press yes.
If all is going to plan this will download the code from the server to the local machine.
Establishing Work Flow
It is now important to appreciate that the changes you make to the local copy of the system needs to be communicated to the central server and ultimately all team members.
Within Visual Studio the management of files in source control is handled via the Source Control Explorer...
(If you can’t see this make sure you press the home button at the top)
This will display the following screen... It is important let Visual Studio handle as much file management as possible.
If you need to delete files do it through here.
Starting Your Work
OK – so now you want to start a programming task.
The first step is always to check that you have the latest version of all of the code for the system.
Right click on the top level folder for the solution and select get latest version...
This will download the most up to date copy of the system code.
Now you would do some work on the system. Create tests, build classes etc..
Once you have completed your work it is important that you send your changes to the central server otherwise your team members won’t have access to your changes. From the source control explorer right click on the top level folder and select check in pending changes...
Visual Studio will now scan the project to find changes you have made to the system.
You should see the following screen on the right of Visual Studio... Under included changes it should list the changes you made during this session.
Press the button Check In at the top to send your changes to the server.
Now when another team member starts work they will download the up to date code from the server that you have created in this session.