Professional Documents
Culture Documents
Practical Team Foundation Server
Practical Team Foundation Server
Server
Marcel de Vries
IT Architect
Microsoft MVP Team System
http://blogs.infosupport.com/marcelv
marcelv@infosupport.com
Marcel de Vries
Microsoft MVP Team System
http://blogs.infosupport.com/marcelv
marcelv@infosupport.com
• Version Control
– Workspaces and Change Sets
– Solution size and inter solution dependencies
– Branching and base lining strategies
• Build
– Stamp build numbers in your assembly for traceability
– Generating Documentation
– Building Setup projects
Team Projects
• TFS can hold 250-500 projects on a server
depending on WI schema
– Limitation mostly causes first time users to
have to wait very long when hitting a server
that exceeds this limit
• Due to a design issue that causes a large download
to the client (>32Mb)
• Team project is the bucket that contains all
artifacts
– Work items, Users rights, Build, etc
– Scope for reporting and building up metrics
from your teams
Choosing Team Project
granularity
• Per Application
– The most common strategy for creating team projects is to create one
for each application under development.
– This strategy can support both large and small applications, as well as
multiple releases of applications being developed in parallel.
• Per Release
– In the “Team Project Per Release” strategy, every major application
release starts a new team project.
– This strategy works well for very large teams who are often working on
long-term projects.
• Per Team
– For a few customers, the best way to structure team projects is to align
them with the team boundaries in their organization.
– This strategy closely aligns a team with the workflows defined in TFS
work item types and provides a unit of reporting that spans the entire
team.
Team Project substructure
Use Areas & iterations
• Areas can be used to break down your product complexities
– Are very useful for reporting purposes
• Can use it to measure what is adding the most costs to your project
– Define your areas of interest so you can measure them
• In software factories called viewpoints
– E.g. Break down a product into a feature tree
– Break down the project into architectural layers and from there into features
• Version Control
– Workspaces and Change Sets
– Solution size and inter solution dependencies
– Branching and base lining strategies
• Build
– Stamp build numbers in your assembly for traceability
– Generating Documentation
– Building Setup projects
Version Control
• What is a workspace
– Mapping between Version control folders and
local file system
– Administered on the server!
• Local changes without notifying TFS are not
administered!
• Get latest will not do a Get in this case!
• What is a Change Set
– One complete atomic check-in of sources
– Includes metadata like associated work items
Version Control
• Practical tips
– Always create one workspace for one TFS project
• Will only show pending changes for your current project
– Have only one mapping in your workspace
• Map team project root to local folder
– Makes searching very easy
– Cloak folders if get latest gets to big
– Install Power tools
• Easy rollback
• Tree diff
• Annotate
• Enables testing without Test Lists in build!
• … and much more
Demo power tools
• Annotate
• Tree Diff
• Rollback
Branching and baselining
strategies
• Branching defined:
– Taking a snapshot of source code to create isolation
• At a certain point in time
• At a stable or known state of source code
– Most of the time from a baseline
– Baseline == Label || Latest || hand picked set of change sets
– The resulting copy is the child branch, and the
source from which it was created is called the parent
branch.
– Bi-directional synchronization of changes with the
parent branch
• – usually referred to as integrating or merging
Common used models
Code-Promotion Branches
Branch per Component
What branching model to
choose?
• Depends largely on size of the team and process to get to a
released product
– Also depends if you do single or multi release development
– ISV’s often do multi release development
• Recommend to use code promotion model
– In house development (not core business) often do single
release development (one version in production)
• Promotion model often overkill
• Large teams need more isolation
– Teams MS targets in whitepaper are large
– Sample includes 130 developers on 10 products!
– Use model published on codeplex
• http://www.codeplex.com/BranchingGuidance/Wiki/View.aspx?title=html
&referringTitle=Home
What branching model to
choose?
• Common size teams require less isolation
– Team size 2-25 developers
• Recommendation, use a branch by purpose model
– Create one development branch to start
– Create a branch only when you are stabilizing
towards a internal/external release
– Keep a branch for maintenance if you develop for
multiple releases
• Add your documents to version control
– Let’s you create a baseline across code and
requirements
– Impossible when documents only on share point
Branch by purpose model
Multi release
CHILD OF MAIN
Bug Fix in R2
Prod. Branch V2
1
Optional baseless merge
Bug Fix in R1 CHILD OF MAIN
Prod. Branch V1
1
Main branch(dev)
Legenda
# Build / week
Merge
Baseline
Branch
Branch by purpose model
Single release
Main branch(dev)
Legenda
# Build / week
Merge
Baseline
Branch
Solution structures
• Visual Studio solutions with >10 project become
impractical
– Slow startup times
– More potential locking on shared resources
• Team Test files (e.g. vsmdi, runconfig, etc)
• Split your product across multiple solution
– But what about my dependencies?
• Use File dependencies via a substituted drive
– Model will scale to really large software products
– Solution == Configuration item
– Configuration item is unit of design, development and
versioning
• Often compared to a subsystem
Solution structures
• Facilitate the file references in version control
– Create a folder that contains referenced
assemblies from other solutions
• With TFS very efficient storage
• E.g
– Extref folder containing some subfolders:
• For every deliverable (output from other solution)
• For every 3th party product you use
– If using com interop, generate interop assembly by hand
and reference interop assembly!
• Location to keep the Strong Name file
DEMO
• Solution Structures for large scale
applications
• Signing with only one snk file at one
location
• Branching of a version 1.0 of the product
for bug fixing
Agenda
• Team Projects, Reporting and Work items
– When to choose for a new Team Project
– Areas and Iterations
– Ad hock reporting from TFS Data warehouse
• Version Control
– Workspaces and Change Sets
– Solution size and inter solution dependencies
– Branching and base lining strategies
• Build
– Stamp build numbers in your assembly for traceability
– Generating Documentation
– Building Setup projects
Stamp build numbers in your
assembly
• How can you determine what assembly in
production is related to a build?
– You need to stamp the build number into your
assembly to create effective problem solving
• Same as MS does with it’s assemblies
– No out of the box solution from Microsoft
• Can be done extending Team Build
– Team build is based on MS build
• Wizard generates script based on provided scenario
details
– Extensibility of team build is based on MS build
extensibility
Stamp build numbers in your
assembly
• Difference between Assembly version
number and file version numbers
– Assembly version is used by fusion loader if
assembly is strong named
– File version number is the one shown by the file
system and used by e.g. installers
• To prevent assembly binding hell
– Set a fixed assembly version number
– Make the file version number reflect assembly
version and the current build
Create an effective build numbering scheme
1.5 dddyy
“Major”
Version
“Minor” version build Revision (# build on a day)
• Version Control
– Workspaces and Change Sets
– Solution size and inter solution dependencies
– Branching and base lining strategies
• Build
– Stamp build numbers in your assembly for traceability
– Generating Documentation
– Building Setup projects
Team System Poster
at info support booth
Q&A
• Where to find more information
– http://Blogs.infosupport.com/marcelv
– Downloads:
• http://accentient.com/widgets.aspx
Evaluation form
Vul je evaluatieformulier in en maak kans
op een van de prachtige prijzen!!
Session Code:CV.29