Microsoft's Team Foundation Server (TFS) -...
Transcript of Microsoft's Team Foundation Server (TFS) -...
![Page 1: Microsoft's Team Foundation Server (TFS) - SCGMISscgmis.org/Resources/Documents/MicrosoftTFSPresentation012314.pdf · 2 • Why Richland County IT - Business Systems Division uses](https://reader031.fdocuments.net/reader031/viewer/2022030409/5a8f109e7f8b9a085a8d8e85/html5/thumbnails/1.jpg)
Microsoft’s
Team Foundation Server (TFS)
Canute Magalhaes
Richland County (IT)
SYSTEMS ANALYST / PROJECT LEAD 1
![Page 2: Microsoft's Team Foundation Server (TFS) - SCGMISscgmis.org/Resources/Documents/MicrosoftTFSPresentation012314.pdf · 2 • Why Richland County IT - Business Systems Division uses](https://reader031.fdocuments.net/reader031/viewer/2022030409/5a8f109e7f8b9a085a8d8e85/html5/thumbnails/2.jpg)
2
• Why Richland County IT - Business Systems Division uses Team Foundation Server (TFS)
• What is Team Foundation Server
• Version Control with TFS
• Automating Builds with TFS
• Demo a triggered build
Topics for this Presentation
• Questions
• Programmatically Interfacing with TFS
![Page 3: Microsoft's Team Foundation Server (TFS) - SCGMISscgmis.org/Resources/Documents/MicrosoftTFSPresentation012314.pdf · 2 • Why Richland County IT - Business Systems Division uses](https://reader031.fdocuments.net/reader031/viewer/2022030409/5a8f109e7f8b9a085a8d8e85/html5/thumbnails/3.jpg)
Why Richland County IT - Business Systems Division uses TFS
- Challenges
3
• Possibility of more than one user working on a file simultaneously.
• Need file / code synchronization, repository, history, authorization, etc.
• Need developers working as a group, doing building, code trails, System Integration and Functionality testing.
• Need designated teams managing their respective builds without developer involvement.
• Did not have consolidated environment for version control, repository, build process etc.
• Need to run builds under an authorized account
• Nice to have an Early Notification of bad checked-In code.
• Cannot have a Single Point Of Failure, with work-in-process files sitting on local machine.
![Page 4: Microsoft's Team Foundation Server (TFS) - SCGMISscgmis.org/Resources/Documents/MicrosoftTFSPresentation012314.pdf · 2 • Why Richland County IT - Business Systems Division uses](https://reader031.fdocuments.net/reader031/viewer/2022030409/5a8f109e7f8b9a085a8d8e85/html5/thumbnails/4.jpg)
Multiple solutions under one Umbrella TFS
4
• We are a Microsoft shop.
• We have TFS in our MSDN subscription.
• Developers can doing development builds for System integration and functionality testing with version control.
• Analysts now determine and manage QA builds without developer involvement.
• Builds are kicked off and pushed to Staging and Production under an authorized account by the concerned groups.
• One consolidated environment for version control, repository, build process etc. Run under an authorized account.
• Multi-User Check-outs
• File / code synchronization, repository, history, authorization, etc.
• ShelveSet lets you save work-in-process files on to the TFS server.
![Page 5: Microsoft's Team Foundation Server (TFS) - SCGMISscgmis.org/Resources/Documents/MicrosoftTFSPresentation012314.pdf · 2 • Why Richland County IT - Business Systems Division uses](https://reader031.fdocuments.net/reader031/viewer/2022030409/5a8f109e7f8b9a085a8d8e85/html5/thumbnails/5.jpg)
What is Team Foundation Server (TFS)
5
Team Foundation Server is the collaboration platform at the core of
Microsoft's Application Lifecycle Management (ALM) solution.
Source http://msdn.microsoft.com/en-us/vstudio/ff637362.aspx
![Page 6: Microsoft's Team Foundation Server (TFS) - SCGMISscgmis.org/Resources/Documents/MicrosoftTFSPresentation012314.pdf · 2 • Why Richland County IT - Business Systems Division uses](https://reader031.fdocuments.net/reader031/viewer/2022030409/5a8f109e7f8b9a085a8d8e85/html5/thumbnails/6.jpg)
Team Foundation Server Releases
6
Pre - 2013 release 2013 and forward
Team Foundation Server Team Foundation Server / Service
On Premises
The Hosted Service is called Visual Studio Online.
Microsoft Hosted Service.
(http://tfs.visualstudio.com)
& as a
![Page 7: Microsoft's Team Foundation Server (TFS) - SCGMISscgmis.org/Resources/Documents/MicrosoftTFSPresentation012314.pdf · 2 • Why Richland County IT - Business Systems Division uses](https://reader031.fdocuments.net/reader031/viewer/2022030409/5a8f109e7f8b9a085a8d8e85/html5/thumbnails/7.jpg)
Team Foundation Server Architecture
7
Team Foundation Server has three logical tiers
• Application tier
• Data tier
• Client tier
![Page 8: Microsoft's Team Foundation Server (TFS) - SCGMISscgmis.org/Resources/Documents/MicrosoftTFSPresentation012314.pdf · 2 • Why Richland County IT - Business Systems Division uses](https://reader031.fdocuments.net/reader031/viewer/2022030409/5a8f109e7f8b9a085a8d8e85/html5/thumbnails/8.jpg)
Client Tier
8
The client tier consists of Visual Studio Industry Partners (VSIP) components, Microsoft Office integration, command-line interfaces, etc. VSIPs: Applied Materials, App Dev, github, etc.
![Page 9: Microsoft's Team Foundation Server (TFS) - SCGMISscgmis.org/Resources/Documents/MicrosoftTFSPresentation012314.pdf · 2 • Why Richland County IT - Business Systems Division uses](https://reader031.fdocuments.net/reader031/viewer/2022030409/5a8f109e7f8b9a085a8d8e85/html5/thumbnails/9.jpg)
Application Tier
9
Server-level services (also known as application-level services) provide the functionality for operations for Team Foundation Server as a software application. The client tier communicates with the application tier through the server object model, and uses the same Web services that are listed for that tier. This is true whether you deploy TFS locally, or if you use Visual Studio Online.
![Page 10: Microsoft's Team Foundation Server (TFS) - SCGMISscgmis.org/Resources/Documents/MicrosoftTFSPresentation012314.pdf · 2 • Why Richland County IT - Business Systems Division uses](https://reader031.fdocuments.net/reader031/viewer/2022030409/5a8f109e7f8b9a085a8d8e85/html5/thumbnails/10.jpg)
Data Tier
10
Source: http://msdn.microsoft.com/en-us/library/ms252473.aspx
The data tier includes data, stored procedures, and other associated logic. When you use Visual Studio Online, the data tier is hosted for you using SQL Server Azure. In a local deployment of TFS, the logical data tier consists of the operational stores within SQL Server.
• Configuration database (TFS_Configuration) • Application warehouse (TFS_Warehouse) • Analysis Services database (TFS_Analysis) • Databases for team project collections (TFS_CollectionName)
These stores might be located on one physical server or distributed across many servers.
![Page 11: Microsoft's Team Foundation Server (TFS) - SCGMISscgmis.org/Resources/Documents/MicrosoftTFSPresentation012314.pdf · 2 • Why Richland County IT - Business Systems Division uses](https://reader031.fdocuments.net/reader031/viewer/2022030409/5a8f109e7f8b9a085a8d8e85/html5/thumbnails/11.jpg)
Major Features Included In Team Foundation Server
11
Version Control
Builds (Automated / Manual )
Reporting.
Requirements Management
Project Management
Lab management
Testing
Release Management Capabilities
Work Item
![Page 12: Microsoft's Team Foundation Server (TFS) - SCGMISscgmis.org/Resources/Documents/MicrosoftTFSPresentation012314.pdf · 2 • Why Richland County IT - Business Systems Division uses](https://reader031.fdocuments.net/reader031/viewer/2022030409/5a8f109e7f8b9a085a8d8e85/html5/thumbnails/12.jpg)
Connecting to Team Foundation Server
12
Team Foundation Server Administration Console
Visual Studio IDE
Team Web Access
Team Explorer Everywhere
![Page 13: Microsoft's Team Foundation Server (TFS) - SCGMISscgmis.org/Resources/Documents/MicrosoftTFSPresentation012314.pdf · 2 • Why Richland County IT - Business Systems Division uses](https://reader031.fdocuments.net/reader031/viewer/2022030409/5a8f109e7f8b9a085a8d8e85/html5/thumbnails/13.jpg)
Team Foundation Server Administration Console
13
![Page 14: Microsoft's Team Foundation Server (TFS) - SCGMISscgmis.org/Resources/Documents/MicrosoftTFSPresentation012314.pdf · 2 • Why Richland County IT - Business Systems Division uses](https://reader031.fdocuments.net/reader031/viewer/2022030409/5a8f109e7f8b9a085a8d8e85/html5/thumbnails/14.jpg)
Via Visual Studio
14
![Page 15: Microsoft's Team Foundation Server (TFS) - SCGMISscgmis.org/Resources/Documents/MicrosoftTFSPresentation012314.pdf · 2 • Why Richland County IT - Business Systems Division uses](https://reader031.fdocuments.net/reader031/viewer/2022030409/5a8f109e7f8b9a085a8d8e85/html5/thumbnails/15.jpg)
15
Team Explorer packaged with Visual Studio
![Page 16: Microsoft's Team Foundation Server (TFS) - SCGMISscgmis.org/Resources/Documents/MicrosoftTFSPresentation012314.pdf · 2 • Why Richland County IT - Business Systems Division uses](https://reader031.fdocuments.net/reader031/viewer/2022030409/5a8f109e7f8b9a085a8d8e85/html5/thumbnails/16.jpg)
Team Web Access
16
![Page 17: Microsoft's Team Foundation Server (TFS) - SCGMISscgmis.org/Resources/Documents/MicrosoftTFSPresentation012314.pdf · 2 • Why Richland County IT - Business Systems Division uses](https://reader031.fdocuments.net/reader031/viewer/2022030409/5a8f109e7f8b9a085a8d8e85/html5/thumbnails/17.jpg)
Check-In, Check-Out from Team Foundation Server
without an IDE ?
17
Team Explorer Everywhere
http://www.visualstudio.com/en-us/downloads#d-team-explorer-everywhere
Download Available:
![Page 18: Microsoft's Team Foundation Server (TFS) - SCGMISscgmis.org/Resources/Documents/MicrosoftTFSPresentation012314.pdf · 2 • Why Richland County IT - Business Systems Division uses](https://reader031.fdocuments.net/reader031/viewer/2022030409/5a8f109e7f8b9a085a8d8e85/html5/thumbnails/18.jpg)
18
How to get started with Team Explorer Everywhere: http://msdn.microsoft.com/en-us/library/gg413285.aspx
According to Microsoft: Your team can collaborate across platforms and improve the predictability of your development processes by using Team Explorer Everywhere.
![Page 19: Microsoft's Team Foundation Server (TFS) - SCGMISscgmis.org/Resources/Documents/MicrosoftTFSPresentation012314.pdf · 2 • Why Richland County IT - Business Systems Division uses](https://reader031.fdocuments.net/reader031/viewer/2022030409/5a8f109e7f8b9a085a8d8e85/html5/thumbnails/19.jpg)
Team Foundation Server Administration Console - Details
19
![Page 20: Microsoft's Team Foundation Server (TFS) - SCGMISscgmis.org/Resources/Documents/MicrosoftTFSPresentation012314.pdf · 2 • Why Richland County IT - Business Systems Division uses](https://reader031.fdocuments.net/reader031/viewer/2022030409/5a8f109e7f8b9a085a8d8e85/html5/thumbnails/20.jpg)
Team Projects In Collection
20
![Page 21: Microsoft's Team Foundation Server (TFS) - SCGMISscgmis.org/Resources/Documents/MicrosoftTFSPresentation012314.pdf · 2 • Why Richland County IT - Business Systems Division uses](https://reader031.fdocuments.net/reader031/viewer/2022030409/5a8f109e7f8b9a085a8d8e85/html5/thumbnails/21.jpg)
Team Project Collection Security Groups
21
![Page 22: Microsoft's Team Foundation Server (TFS) - SCGMISscgmis.org/Resources/Documents/MicrosoftTFSPresentation012314.pdf · 2 • Why Richland County IT - Business Systems Division uses](https://reader031.fdocuments.net/reader031/viewer/2022030409/5a8f109e7f8b9a085a8d8e85/html5/thumbnails/22.jpg)
Team Project Collection Administration Security (Global)
22
![Page 23: Microsoft's Team Foundation Server (TFS) - SCGMISscgmis.org/Resources/Documents/MicrosoftTFSPresentation012314.pdf · 2 • Why Richland County IT - Business Systems Division uses](https://reader031.fdocuments.net/reader031/viewer/2022030409/5a8f109e7f8b9a085a8d8e85/html5/thumbnails/23.jpg)
Team Project Collection Database Repository
23
![Page 24: Microsoft's Team Foundation Server (TFS) - SCGMISscgmis.org/Resources/Documents/MicrosoftTFSPresentation012314.pdf · 2 • Why Richland County IT - Business Systems Division uses](https://reader031.fdocuments.net/reader031/viewer/2022030409/5a8f109e7f8b9a085a8d8e85/html5/thumbnails/24.jpg)
TFS thru Visual Studio using Team Explorer
24
Connect to Team Project
![Page 25: Microsoft's Team Foundation Server (TFS) - SCGMISscgmis.org/Resources/Documents/MicrosoftTFSPresentation012314.pdf · 2 • Why Richland County IT - Business Systems Division uses](https://reader031.fdocuments.net/reader031/viewer/2022030409/5a8f109e7f8b9a085a8d8e85/html5/thumbnails/25.jpg)
25
Collections and Projects on TFS
![Page 26: Microsoft's Team Foundation Server (TFS) - SCGMISscgmis.org/Resources/Documents/MicrosoftTFSPresentation012314.pdf · 2 • Why Richland County IT - Business Systems Division uses](https://reader031.fdocuments.net/reader031/viewer/2022030409/5a8f109e7f8b9a085a8d8e85/html5/thumbnails/26.jpg)
Adding Team Project To Collection
26
Using Visual Studio. Team Explorer
Using the command line (TFPT.exe)
TFPT CreatTeamproject /collection:uri /teamproject:"project name" /processtemplate:"template name" [/sourcecontrol:New | None | Branch:branchpath] [/log:"logfolder"] [/validate] [/verbose]
![Page 27: Microsoft's Team Foundation Server (TFS) - SCGMISscgmis.org/Resources/Documents/MicrosoftTFSPresentation012314.pdf · 2 • Why Richland County IT - Business Systems Division uses](https://reader031.fdocuments.net/reader031/viewer/2022030409/5a8f109e7f8b9a085a8d8e85/html5/thumbnails/27.jpg)
Version Control with TFS via (Visual Studio IDE)
27
![Page 28: Microsoft's Team Foundation Server (TFS) - SCGMISscgmis.org/Resources/Documents/MicrosoftTFSPresentation012314.pdf · 2 • Why Richland County IT - Business Systems Division uses](https://reader031.fdocuments.net/reader031/viewer/2022030409/5a8f109e7f8b9a085a8d8e85/html5/thumbnails/28.jpg)
Source Control Explorer
28
![Page 29: Microsoft's Team Foundation Server (TFS) - SCGMISscgmis.org/Resources/Documents/MicrosoftTFSPresentation012314.pdf · 2 • Why Richland County IT - Business Systems Division uses](https://reader031.fdocuments.net/reader031/viewer/2022030409/5a8f109e7f8b9a085a8d8e85/html5/thumbnails/29.jpg)
Workspace
29
![Page 30: Microsoft's Team Foundation Server (TFS) - SCGMISscgmis.org/Resources/Documents/MicrosoftTFSPresentation012314.pdf · 2 • Why Richland County IT - Business Systems Division uses](https://reader031.fdocuments.net/reader031/viewer/2022030409/5a8f109e7f8b9a085a8d8e85/html5/thumbnails/30.jpg)
Configuring workspace
30
![Page 31: Microsoft's Team Foundation Server (TFS) - SCGMISscgmis.org/Resources/Documents/MicrosoftTFSPresentation012314.pdf · 2 • Why Richland County IT - Business Systems Division uses](https://reader031.fdocuments.net/reader031/viewer/2022030409/5a8f109e7f8b9a085a8d8e85/html5/thumbnails/31.jpg)
31
New Folder
Add Items to Folder
Get Latest Version (Recursive)
Check Out
Check In
Compare Folders
History
Buttons on Source Control Explorer
![Page 32: Microsoft's Team Foundation Server (TFS) - SCGMISscgmis.org/Resources/Documents/MicrosoftTFSPresentation012314.pdf · 2 • Why Richland County IT - Business Systems Division uses](https://reader031.fdocuments.net/reader031/viewer/2022030409/5a8f109e7f8b9a085a8d8e85/html5/thumbnails/32.jpg)
Hierarchy & Relationship In Version Control
32
document
documents
Whenever
a
or
are checked-In
TFS generates a
Changeset number
Which uniquely identifies the file/s and its/their contents.
A
Label
is a collection of Changesets
More precisely, when a Label is created. The changeset number of the latest version, of each file in the TFS Project, at the time the label is being created, is taken and that collection of changesets, becomes the metadata of that Label.
![Page 33: Microsoft's Team Foundation Server (TFS) - SCGMISscgmis.org/Resources/Documents/MicrosoftTFSPresentation012314.pdf · 2 • Why Richland County IT - Business Systems Division uses](https://reader031.fdocuments.net/reader031/viewer/2022030409/5a8f109e7f8b9a085a8d8e85/html5/thumbnails/33.jpg)
Changesets (versions) of a file
33
![Page 34: Microsoft's Team Foundation Server (TFS) - SCGMISscgmis.org/Resources/Documents/MicrosoftTFSPresentation012314.pdf · 2 • Why Richland County IT - Business Systems Division uses](https://reader031.fdocuments.net/reader031/viewer/2022030409/5a8f109e7f8b9a085a8d8e85/html5/thumbnails/34.jpg)
Files in a Changeset
34
![Page 35: Microsoft's Team Foundation Server (TFS) - SCGMISscgmis.org/Resources/Documents/MicrosoftTFSPresentation012314.pdf · 2 • Why Richland County IT - Business Systems Division uses](https://reader031.fdocuments.net/reader031/viewer/2022030409/5a8f109e7f8b9a085a8d8e85/html5/thumbnails/35.jpg)
Merge
35
Doc 1
User 1 changes Doc 1 and
Check-In
When user 2 changes Doc 1 and tries to
Check-In
Checks Out Checks Out User 1 User 2
![Page 36: Microsoft's Team Foundation Server (TFS) - SCGMISscgmis.org/Resources/Documents/MicrosoftTFSPresentation012314.pdf · 2 • Why Richland County IT - Business Systems Division uses](https://reader031.fdocuments.net/reader031/viewer/2022030409/5a8f109e7f8b9a085a8d8e85/html5/thumbnails/36.jpg)
Pending Changes conflicts
36
![Page 37: Microsoft's Team Foundation Server (TFS) - SCGMISscgmis.org/Resources/Documents/MicrosoftTFSPresentation012314.pdf · 2 • Why Richland County IT - Business Systems Division uses](https://reader031.fdocuments.net/reader031/viewer/2022030409/5a8f109e7f8b9a085a8d8e85/html5/thumbnails/37.jpg)
TFS Merge Tool
37
Server Version Trying to check-In
Merged File
![Page 38: Microsoft's Team Foundation Server (TFS) - SCGMISscgmis.org/Resources/Documents/MicrosoftTFSPresentation012314.pdf · 2 • Why Richland County IT - Business Systems Division uses](https://reader031.fdocuments.net/reader031/viewer/2022030409/5a8f109e7f8b9a085a8d8e85/html5/thumbnails/38.jpg)
Where do project files reside in TFS
38
![Page 39: Microsoft's Team Foundation Server (TFS) - SCGMISscgmis.org/Resources/Documents/MicrosoftTFSPresentation012314.pdf · 2 • Why Richland County IT - Business Systems Division uses](https://reader031.fdocuments.net/reader031/viewer/2022030409/5a8f109e7f8b9a085a8d8e85/html5/thumbnails/39.jpg)
39
![Page 40: Microsoft's Team Foundation Server (TFS) - SCGMISscgmis.org/Resources/Documents/MicrosoftTFSPresentation012314.pdf · 2 • Why Richland County IT - Business Systems Division uses](https://reader031.fdocuments.net/reader031/viewer/2022030409/5a8f109e7f8b9a085a8d8e85/html5/thumbnails/40.jpg)
Automating Builds with TFS
40
Build Controller
Build Agent
Workspace
Build Definition
XAML file (Build process template)
![Page 41: Microsoft's Team Foundation Server (TFS) - SCGMISscgmis.org/Resources/Documents/MicrosoftTFSPresentation012314.pdf · 2 • Why Richland County IT - Business Systems Division uses](https://reader031.fdocuments.net/reader031/viewer/2022030409/5a8f109e7f8b9a085a8d8e85/html5/thumbnails/41.jpg)
Build Controller
41
Each Build Controller is dedicated to a single Team Project Collection.
The Build Controller performs lightweight tasks, such as determining the name of the build, creating the label in version control, logging notes, and reporting status from the build.
The Build Controller distribute the processor-intensive work of your build process to its pool of build agents.
The Build Controller does not typically require significant processor time, in some cases you can host it on the same computer as your Team Foundation Server.
![Page 42: Microsoft's Team Foundation Server (TFS) - SCGMISscgmis.org/Resources/Documents/MicrosoftTFSPresentation012314.pdf · 2 • Why Richland County IT - Business Systems Division uses](https://reader031.fdocuments.net/reader031/viewer/2022030409/5a8f109e7f8b9a085a8d8e85/html5/thumbnails/42.jpg)
Build Agent
42
Each build agent is dedicated to and controlled by a single build controller.
Build agents can be hosted on the same build server that hosts their build controller
The build agent executes the steps of your build process that are contained in the AgentScope activity. Typically, these steps include getting files from version control, provisioning the workspace, compiling the code, running tests, and merging files back into version control.
AgentScope activity: In the XAML file there is an Activity called "Run on Agent". You can add custom created activities to the "Run on Agent" activity. All activities in the "Run on Agent" are in the AgentScope.
![Page 43: Microsoft's Team Foundation Server (TFS) - SCGMISscgmis.org/Resources/Documents/MicrosoftTFSPresentation012314.pdf · 2 • Why Richland County IT - Business Systems Division uses](https://reader031.fdocuments.net/reader031/viewer/2022030409/5a8f109e7f8b9a085a8d8e85/html5/thumbnails/43.jpg)
Configuring Build Controller and Agents
43
![Page 44: Microsoft's Team Foundation Server (TFS) - SCGMISscgmis.org/Resources/Documents/MicrosoftTFSPresentation012314.pdf · 2 • Why Richland County IT - Business Systems Division uses](https://reader031.fdocuments.net/reader031/viewer/2022030409/5a8f109e7f8b9a085a8d8e85/html5/thumbnails/44.jpg)
Properties of Build Controller
44
![Page 45: Microsoft's Team Foundation Server (TFS) - SCGMISscgmis.org/Resources/Documents/MicrosoftTFSPresentation012314.pdf · 2 • Why Richland County IT - Business Systems Division uses](https://reader031.fdocuments.net/reader031/viewer/2022030409/5a8f109e7f8b9a085a8d8e85/html5/thumbnails/45.jpg)
Properties of Build Agent
45
![Page 46: Microsoft's Team Foundation Server (TFS) - SCGMISscgmis.org/Resources/Documents/MicrosoftTFSPresentation012314.pdf · 2 • Why Richland County IT - Business Systems Division uses](https://reader031.fdocuments.net/reader031/viewer/2022030409/5a8f109e7f8b9a085a8d8e85/html5/thumbnails/46.jpg)
Recommendation By Microsoft On Setting Up Build Agents
46
If you installed Team Foundation Build Service on the same server as Team Foundation Server or are using the hosted service, the default setting for Number of build agents to run on this build machine is 1 (recommended).
Choose Scale out build services to run concurrent builds across multiple machines. If you choose this option, you have to specify the number of build agents for this machine and then add them to a new or existing build controller.
If you installed Team Foundation Build Service on its own server, the default setting for Number of build agents to run on this build machine is equal to the number of processor cores on this server.
Source: http://msdn.microsoft.com/en-us/library/vstudio/ee259683(v=vs.110).aspx
![Page 47: Microsoft's Team Foundation Server (TFS) - SCGMISscgmis.org/Resources/Documents/MicrosoftTFSPresentation012314.pdf · 2 • Why Richland County IT - Business Systems Division uses](https://reader031.fdocuments.net/reader031/viewer/2022030409/5a8f109e7f8b9a085a8d8e85/html5/thumbnails/47.jpg)
47
Build Server Configuration
![Page 48: Microsoft's Team Foundation Server (TFS) - SCGMISscgmis.org/Resources/Documents/MicrosoftTFSPresentation012314.pdf · 2 • Why Richland County IT - Business Systems Division uses](https://reader031.fdocuments.net/reader031/viewer/2022030409/5a8f109e7f8b9a085a8d8e85/html5/thumbnails/48.jpg)
Build Definition
48
![Page 49: Microsoft's Team Foundation Server (TFS) - SCGMISscgmis.org/Resources/Documents/MicrosoftTFSPresentation012314.pdf · 2 • Why Richland County IT - Business Systems Division uses](https://reader031.fdocuments.net/reader031/viewer/2022030409/5a8f109e7f8b9a085a8d8e85/html5/thumbnails/49.jpg)
Creating a new Build Definition
49
![Page 50: Microsoft's Team Foundation Server (TFS) - SCGMISscgmis.org/Resources/Documents/MicrosoftTFSPresentation012314.pdf · 2 • Why Richland County IT - Business Systems Division uses](https://reader031.fdocuments.net/reader031/viewer/2022030409/5a8f109e7f8b9a085a8d8e85/html5/thumbnails/50.jpg)
Build Definition Trigger
50
Typically, for development builds
![Page 51: Microsoft's Team Foundation Server (TFS) - SCGMISscgmis.org/Resources/Documents/MicrosoftTFSPresentation012314.pdf · 2 • Why Richland County IT - Business Systems Division uses](https://reader031.fdocuments.net/reader031/viewer/2022030409/5a8f109e7f8b9a085a8d8e85/html5/thumbnails/51.jpg)
Build Definition Workspace
51
![Page 52: Microsoft's Team Foundation Server (TFS) - SCGMISscgmis.org/Resources/Documents/MicrosoftTFSPresentation012314.pdf · 2 • Why Richland County IT - Business Systems Division uses](https://reader031.fdocuments.net/reader031/viewer/2022030409/5a8f109e7f8b9a085a8d8e85/html5/thumbnails/52.jpg)
Build Definition Defaults
52
![Page 53: Microsoft's Team Foundation Server (TFS) - SCGMISscgmis.org/Resources/Documents/MicrosoftTFSPresentation012314.pdf · 2 • Why Richland County IT - Business Systems Division uses](https://reader031.fdocuments.net/reader031/viewer/2022030409/5a8f109e7f8b9a085a8d8e85/html5/thumbnails/53.jpg)
Build Definition Process
53
![Page 54: Microsoft's Team Foundation Server (TFS) - SCGMISscgmis.org/Resources/Documents/MicrosoftTFSPresentation012314.pdf · 2 • Why Richland County IT - Business Systems Division uses](https://reader031.fdocuments.net/reader031/viewer/2022030409/5a8f109e7f8b9a085a8d8e85/html5/thumbnails/54.jpg)
Build Definition Process (Specify Build Agent)
54
![Page 55: Microsoft's Team Foundation Server (TFS) - SCGMISscgmis.org/Resources/Documents/MicrosoftTFSPresentation012314.pdf · 2 • Why Richland County IT - Business Systems Division uses](https://reader031.fdocuments.net/reader031/viewer/2022030409/5a8f109e7f8b9a085a8d8e85/html5/thumbnails/55.jpg)
Build Definition Process (Specify MSBuild Info)
55
![Page 56: Microsoft's Team Foundation Server (TFS) - SCGMISscgmis.org/Resources/Documents/MicrosoftTFSPresentation012314.pdf · 2 • Why Richland County IT - Business Systems Division uses](https://reader031.fdocuments.net/reader031/viewer/2022030409/5a8f109e7f8b9a085a8d8e85/html5/thumbnails/56.jpg)
Build Definition Retention Policy
56
![Page 57: Microsoft's Team Foundation Server (TFS) - SCGMISscgmis.org/Resources/Documents/MicrosoftTFSPresentation012314.pdf · 2 • Why Richland County IT - Business Systems Division uses](https://reader031.fdocuments.net/reader031/viewer/2022030409/5a8f109e7f8b9a085a8d8e85/html5/thumbnails/57.jpg)
Build Definition Retention Policy (Delete policy)
57
![Page 58: Microsoft's Team Foundation Server (TFS) - SCGMISscgmis.org/Resources/Documents/MicrosoftTFSPresentation012314.pdf · 2 • Why Richland County IT - Business Systems Division uses](https://reader031.fdocuments.net/reader031/viewer/2022030409/5a8f109e7f8b9a085a8d8e85/html5/thumbnails/58.jpg)
Build Definition Retention Policy (Delete policy - Options)
58
![Page 59: Microsoft's Team Foundation Server (TFS) - SCGMISscgmis.org/Resources/Documents/MicrosoftTFSPresentation012314.pdf · 2 • Why Richland County IT - Business Systems Division uses](https://reader031.fdocuments.net/reader031/viewer/2022030409/5a8f109e7f8b9a085a8d8e85/html5/thumbnails/59.jpg)
Manual Build Kick-Off
59
![Page 60: Microsoft's Team Foundation Server (TFS) - SCGMISscgmis.org/Resources/Documents/MicrosoftTFSPresentation012314.pdf · 2 • Why Richland County IT - Business Systems Division uses](https://reader031.fdocuments.net/reader031/viewer/2022030409/5a8f109e7f8b9a085a8d8e85/html5/thumbnails/60.jpg)
60
Kick-Off Build
![Page 61: Microsoft's Team Foundation Server (TFS) - SCGMISscgmis.org/Resources/Documents/MicrosoftTFSPresentation012314.pdf · 2 • Why Richland County IT - Business Systems Division uses](https://reader031.fdocuments.net/reader031/viewer/2022030409/5a8f109e7f8b9a085a8d8e85/html5/thumbnails/61.jpg)
61
![Page 62: Microsoft's Team Foundation Server (TFS) - SCGMISscgmis.org/Resources/Documents/MicrosoftTFSPresentation012314.pdf · 2 • Why Richland County IT - Business Systems Division uses](https://reader031.fdocuments.net/reader031/viewer/2022030409/5a8f109e7f8b9a085a8d8e85/html5/thumbnails/62.jpg)
The XAML (Workflow) file Templates
62
![Page 63: Microsoft's Team Foundation Server (TFS) - SCGMISscgmis.org/Resources/Documents/MicrosoftTFSPresentation012314.pdf · 2 • Why Richland County IT - Business Systems Division uses](https://reader031.fdocuments.net/reader031/viewer/2022030409/5a8f109e7f8b9a085a8d8e85/html5/thumbnails/63.jpg)
Build Process XAML (Workflow)
63
Activities AgentScope activity
![Page 64: Microsoft's Team Foundation Server (TFS) - SCGMISscgmis.org/Resources/Documents/MicrosoftTFSPresentation012314.pdf · 2 • Why Richland County IT - Business Systems Division uses](https://reader031.fdocuments.net/reader031/viewer/2022030409/5a8f109e7f8b9a085a8d8e85/html5/thumbnails/64.jpg)
XAML (Workflow) Activity Toolbox
64
![Page 65: Microsoft's Team Foundation Server (TFS) - SCGMISscgmis.org/Resources/Documents/MicrosoftTFSPresentation012314.pdf · 2 • Why Richland County IT - Business Systems Division uses](https://reader031.fdocuments.net/reader031/viewer/2022030409/5a8f109e7f8b9a085a8d8e85/html5/thumbnails/65.jpg)
Create Custom Activity
65
![Page 66: Microsoft's Team Foundation Server (TFS) - SCGMISscgmis.org/Resources/Documents/MicrosoftTFSPresentation012314.pdf · 2 • Why Richland County IT - Business Systems Division uses](https://reader031.fdocuments.net/reader031/viewer/2022030409/5a8f109e7f8b9a085a8d8e85/html5/thumbnails/66.jpg)
Adding Custom Activities to the XAML Toolbox
66
The DLL containing the custom activities needs to be registered in the GAC, using gacutil.exe, on the machine that the XAML will be executed.
Right click on the Toolbox and click on “Choose Items…”
Add the custom activities DLL
![Page 67: Microsoft's Team Foundation Server (TFS) - SCGMISscgmis.org/Resources/Documents/MicrosoftTFSPresentation012314.pdf · 2 • Why Richland County IT - Business Systems Division uses](https://reader031.fdocuments.net/reader031/viewer/2022030409/5a8f109e7f8b9a085a8d8e85/html5/thumbnails/67.jpg)
Programmatically Interfacing with TFS
67
![Page 68: Microsoft's Team Foundation Server (TFS) - SCGMISscgmis.org/Resources/Documents/MicrosoftTFSPresentation012314.pdf · 2 • Why Richland County IT - Business Systems Division uses](https://reader031.fdocuments.net/reader031/viewer/2022030409/5a8f109e7f8b9a085a8d8e85/html5/thumbnails/68.jpg)
Web Page used by Analyst to Kick-Off QA Build
68
![Page 69: Microsoft's Team Foundation Server (TFS) - SCGMISscgmis.org/Resources/Documents/MicrosoftTFSPresentation012314.pdf · 2 • Why Richland County IT - Business Systems Division uses](https://reader031.fdocuments.net/reader031/viewer/2022030409/5a8f109e7f8b9a085a8d8e85/html5/thumbnails/69.jpg)
TFS Objects to programmatically connect to TFS and do builds, etc.
69
TfsTeamProjectCollection
IBuildServer VersionControlServer
Build definition
IBuildRequest
teamProjects
Names of the Build Definitions
BuildDetails
IQueuedBuild
You need the name of the Build Definition to get the Build Definition object
Use the IQueue object to kick-off the build.
![Page 70: Microsoft's Team Foundation Server (TFS) - SCGMISscgmis.org/Resources/Documents/MicrosoftTFSPresentation012314.pdf · 2 • Why Richland County IT - Business Systems Division uses](https://reader031.fdocuments.net/reader031/viewer/2022030409/5a8f109e7f8b9a085a8d8e85/html5/thumbnails/70.jpg)
Required Team Foundation references
70
Imports Microsoft.TeamFoundation.Build Imports Microsoft.TeamFoundation.Build.Client Imports Microsoft.TeamFoundation.Client Imports Microsoft.TeamFoundation.VersionControl.Client Imports Microsoft.TeamFoundation.Framework.Client
![Page 71: Microsoft's Team Foundation Server (TFS) - SCGMISscgmis.org/Resources/Documents/MicrosoftTFSPresentation012314.pdf · 2 • Why Richland County IT - Business Systems Division uses](https://reader031.fdocuments.net/reader031/viewer/2022030409/5a8f109e7f8b9a085a8d8e85/html5/thumbnails/71.jpg)
Dim tfsProjCollection = TfsTeamProjectCollectionFactory.GetTeamProjectCollection(New Uri("http://Devittfs1:8080/tfs/cama"), New UICredentialsProvider())
Dim tfsBuildServer = tfsProjCollection.GetService(Of IBuildServer)()
Dim tfsVersionControlServer = tfsProjCollection.GetService(Of VersionControlServer)()
Dim teamProjects = tfsVersionControlServer.GetAllTeamProjects(True)
Dim buildDetails = tfsBuildServer.QueryBuilds(Project Name)
Dim defNames = (From a In buildDetails Select a.BuildDefinition.Name).Distinct
Dim buildDef As IBuildDefinition = tfsBuildServer.GetBuildDefinition(projectName,definitionName)
Dim buildRequest As IBuildRequest = buildDef.CreateBuildRequest
buildRequest.GetOption = GetOption.Custom
'L’ indicates to TFS that the text passed is a label.
buildRequest.CustomGetVersion = "L" & label
buildRequest.RequestedFor = Request.LogonUserIdentity.Name
Dim queue As IQueuedBuild = TFSBuildServer.QueueBuild(buildRequest, QueueOptions.None)
queue.WaitForBuildStart()
Code sample
71
![Page 72: Microsoft's Team Foundation Server (TFS) - SCGMISscgmis.org/Resources/Documents/MicrosoftTFSPresentation012314.pdf · 2 • Why Richland County IT - Business Systems Division uses](https://reader031.fdocuments.net/reader031/viewer/2022030409/5a8f109e7f8b9a085a8d8e85/html5/thumbnails/72.jpg)
Demo a triggered build
72
![Page 73: Microsoft's Team Foundation Server (TFS) - SCGMISscgmis.org/Resources/Documents/MicrosoftTFSPresentation012314.pdf · 2 • Why Richland County IT - Business Systems Division uses](https://reader031.fdocuments.net/reader031/viewer/2022030409/5a8f109e7f8b9a085a8d8e85/html5/thumbnails/73.jpg)
Questions ???
73