⭐ If you would like to buy me a coffee, well thank you very much that is mega kind! : https://www.buymeacoffee.com/honeyvig Hire a web Developer and Designer to upgrade and boost your online presence with cutting edge Technologies

Friday, November 7, 2025

Working with Visual Studio 2010 - Part 10

 

In part 10 I use Team Build 2010 to prepare a Continuous Integration build definition for the application.
0:00

hi my name is Julio Cal and in this

0:02

video I will show you how to prepare a

0:05

continuous integration build using

0:06

visual studio 2010 team Foundation

0:09

server 2010 and team build 2010 remember

0:11

we are using beta 2 of all these

0:14

products so now that you have coded and

0:17

tested your product like this bookstore

0:19

application we prepared and you must

0:22

make sure that you do have something to

0:24

show to your customers all the time and

0:27

this can be difficult when your team is

0:30

made up of more than one developer as

0:32

any developer can potentially introduce

0:34

new bugs at any time into your product

0:38

cycle So to avoid this there's this

0:40

methodology or good practice more like

0:43

that H that we call continuous

0:46

integration where each time a developer

0:49

checks in some code h a new build is

0:52

performed in some other machine that is

0:54

not really any developer machine okay so

0:57

let's see how this works let's go to to

1:00

visual studio

1:04

2010 okay and this time let's log in as

1:07

the project

1:09

manager this is because we will need

1:12

some additional permissions that that a

1:14

developer doesn't have in order to

1:15

create and a new build definition let's

1:18

close this okay let's load the

1:22

solution the bookstore

1:25

solution

1:28

okay right now just loading and it is

1:33

here okay so now let's go to Team

1:37

Explorer open the build uh note right

1:41

click and select new build definition

1:43

this opens a new dialogue in the main

1:45

center of the screen where we need to

1:47

enter some

1:48

information so this build definition

1:51

will be called books let's call it

1:53

bookstore continuous integration and for

1:57

description this is the continuous

1:59

integration build okay now let's go to

2:03

trigger what will trigger this uh this

2:05

build will be a a developer check in so

2:09

we will select continuous integration

2:11

and as I said that means that anytime a

2:14

developer checks in some code a new

2:16

build will be performed into the server

2:18

so that means that the server will get

2:20

all the source code from all the

2:22

developers machine and it will be start

2:25

a new build building all the the the

2:28

dlll the assemblies in the application

2:30

there are some other options as you can

2:31

see you can select a schedule if you

2:34

want to prepare this uh this build to be

2:36

automatically uh executed for example

2:40

each Monday Tuesday and every day in the

2:42

week at 3:00 a.m. if you want to do this

2:44

automatically you can also select get a

2:46

checkin if you want this is a new option

2:48

in 2010 very interesting if you want to

2:52

actually um you know each developer

2:54

checks in some code but the code is not

2:57

actually placed in the main source code

3:00

but it is actually sheld into a

3:02

temporary location a build is intended

3:04

to be done and if if it can be done uh

3:08

the check-in is completed if it cannot

3:10

be done the checkin is not allowed at

3:12

all so that actually prevents more the

3:16

any developer from introducing new box

3:18

into the application for this example

3:20

we'll just use continuous integration so

3:23

that at least with alert us if any

3:26

developer breaks the the build at any

3:28

time let's go to workspace this will we

3:31

will just use um the defaults for this

3:35

let's go to build defaults here you must

3:37

select the build controller this is the

3:39

the actual uh build machine as I said

3:42

this is another machine not any

3:44

developer machine a server where the

3:46

build will be will be performed and you

3:48

can also have and configure in your team

3:50

Foundation server if you want to have

3:52

more than one machine like agents if you

3:55

want to somehow distribute the build

3:57

effort among more than one ser

4:01

here you must also specify the build up

4:03

output directory so this is just some

4:06

Network share anywhere in your network

4:08

where the team Foundation service

4:10

account has right permissions I have

4:13

already prepared um a directory for this

4:17

in uh Team Foundation server you can see

4:20

here DFS build

4:22

output and we will just use uh this

4:25

directory for building the application

4:29

okay let's copy

4:31

this and paste it

4:34

here so now that we have this let's go

4:37

to process in process you you can

4:39

specify some other options like for

4:41

example what do you actually want to

4:43

build so for example here you can

4:47

specify which would be the the platform

4:49

and configuration that you want to build

4:52

so you can select from among the

4:53

different platforms and different

4:55

possible configurations or you can just

4:57

use defaults as we will do right now you

4:59

can specify which is the project or

5:01

solution to build and you can also

5:03

specify if you want to run all the tests

5:06

into the build so this means that any

5:08

unit test and any ER other automated

5:12

test that your testing team prepared for

5:16

this solution can also be run uh into

5:19

the the build so this means that even if

5:22

a developer doesn't actually break the

5:24

build he might um he might prevent a

5:29

test to run and if if this happens this

5:32

is also not good and that can also stop

5:34

the build and alert at any person in the

5:36

team that this is happening okay which

5:38

is very useful you can also specify the

5:41

the build format this means that you can

5:44

specify how will each folder into your

5:47

uh build server be named for each of the

5:49

builds like for example the the default

5:52

one specifies that it will use the the

5:55

build definition name bookstore uh

5:58

bookstore CI H it will use the year then

6:01

the month and then the day and finally

6:06

uh build revision if you do more than

6:07

one in a single day you can also use

6:09

some macros here if you want to specify

6:12

a different total different different um

6:15

format string for the build

6:17

name okay if we go to retention policy

6:20

you here you can specify H how much time

6:23

you want to keep these builds into your

6:25

server so this means that for example

6:27

for failed builds you can say hey I want

6:29

to keep the 10 latest builds I want just

6:31

to keep to maybe five latest builds

6:34

because I don't really care about failed

6:36

builds okay so let's save this you can

6:40

see the new build definition is right

6:42

here I can right click select Q new

6:44

build and from here I can just manually

6:46

trigger a build but as this is a

6:49

continuous integration uh build I will

6:52

prefer to do this from a a a developer

6:55

trigger you know a developer changing

6:57

some source code and triggering the the

6:59

build so I will just cancel this exit

7:02

visual studio and let's go to visual

7:05

studio once

7:07

again this time logging into team

7:09

Foundation server as a

7:11

developer so let's log in as a developer

7:15

let's open the

7:17

solution and what we're going to do

7:19

right now is just a very small very

7:22

simple change to the source code and

7:24

then check it check it in just to make

7:26

sure that um the build is triggering so

7:30

let's open the business project the book

7:34

class and let's enter some comment

7:39

here this is the book type let's close

7:45

this let's build the solution make sure

7:48

that we're uh actually checking in some

7:51

buildable uh code okay it's good let's

7:54

check in for checking in we should

7:56

always select a work item associated

7:59

let's select the build the book list

8:01

screen which is the appropriate one

8:04

check

8:05

in so as soon as the check-in

8:09

finishes team build H detects this

8:13

check-in and will trigger a new build so

8:16

if we double click in bookstore. C any

8:18

developer can see the status of of a

8:20

build for sure we can go to the cute

8:23

builds and you can see that the

8:25

developer just triggered a new build at

8:27

533 which is right now now okay let's

8:31

double click

8:34

this and you can see in this screen you

8:36

can see the status of the build okay as

8:38

it is performed you can see the current

8:41

time right now the the running time you

8:43

can see what is Team build actually

8:45

doing it just got the build updated the

8:47

drop

8:48

location okay updated the build

8:52

number okay initialize it okay

8:55

initialize it the sources initialize it

8:57

the workspace

8:59

added a new label which is also very

9:01

useful a new label for this build it is

9:04

trying to compile test and Associate

9:05

change sets so first let's compile okay

9:09

it is

9:10

compiling okay then it is actually

9:13

trying to perform all the tests the unit

9:15

test we have two unit tests in this

9:17

solution and later it will try to

9:19

associate any change sets and work items

9:21

for this okay so you you can say h for

9:24

example this task and this source code

9:27

is associated to this new build okay

9:30

it's very good for

9:32

tracking

9:34

okay okay so it just finished it and the

9:37

new build is complete you see all test

9:40

pass it and everything built with not

9:42

errors and this is our new build just

9:45

completed okay thank you very much hope

9:48

you liked it see you again

 

No comments:

Post a Comment