First step is to allow triggering a release in the Release Template. This can be done in release template properties.
![001 001](http://lh3.ggpht.com/-rmgpLD0KOOc/VHIK5TcnNGI/AAAAAAAADQg/4vLI5S1rYi0/001_thumb%25255B1%25255D.png?imgmax=800)
Select “Can Trigger a Release from a Build?” option.
![002 002](http://lh4.ggpht.com/-ENd8L1KBnC8/VHIK7MBd7mI/AAAAAAAADQw/lHrY-MO3S7Q/002_thumb%25255B1%25255D.png?imgmax=800)
Next step is to change the TFS build template to Special Template capable of triggering a release. If there is customized build template being used currently, it is possible to change it to support triggering a release. How to do that explained in below link.
http://blogs.msdn.com/b/visualstudioalm/archive/2013/12/09/how-to-modify-the-build-process-template-to-use-the-option-trigger-release-from-build.aspx
![003 003](http://lh5.ggpht.com/-fOH8sQMQQ2g/VHIK88ljdBI/AAAAAAAADRA/bA2-NhOBiiE/003_thumb%25255B1%25255D.png?imgmax=800)
![004 004](http://lh5.ggpht.com/-uHQ7Njoi1f4/VHIK-zPHhOI/AAAAAAAADRQ/WP-itB-Krao/004_thumb%25255B1%25255D.png?imgmax=800)
If default build template is used as shown above, change it to template available with Release Management Client. This can be found at below shown location of a Release management Client installed machine.
![005 005](http://lh3.ggpht.com/-69pys-ST89c/VHILAyK9BJI/AAAAAAAADRg/M2xxTOSwCSk/005_thumb%25255B1%25255D.png?imgmax=800)
Add ReleaseTfvcTemplate.12 to build process templates and select it as the build template in the build definition. If TFS 2012 ReleaseDefaultTemplate.11.1 should be used. If Git is used as source control repository ReleaseGitTemplate is available.
![006 006](http://lh3.ggpht.com/-u6jsyVknnes/VHILCs_CRhI/AAAAAAAADRw/lXCRBgEaTjE/006_thumb%25255B1%25255D.png?imgmax=800)
![007 007](http://lh3.ggpht.com/-D0fvUCNW4Y0/VHILET5zBwI/AAAAAAAADSA/N9yYhNKrVNA/007_thumb%25255B1%25255D.png?imgmax=800)
![008 008](http://lh6.ggpht.com/-V8Kb-SDm0QA/VHILGFUzgNI/AAAAAAAADSQ/jzxJq2hzKSQ/008_thumb%25255B1%25255D.png?imgmax=800)
This template has a category for Release.
![009 009](http://lh6.ggpht.com/-vT5Wwdbul1M/VHILIZjm1kI/AAAAAAAADSg/MD1me22OQks/009_thumb%25255B1%25255D.png?imgmax=800)
Set Release Build to true.
![010 010](http://lh6.ggpht.com/-p6Hm9J6ctl8/VHILKYgGDlI/AAAAAAAADSw/_I51_eaaOGI/010_thumb%25255B1%25255D.png?imgmax=800)
To demonstrate the release with TFS build, below simple ASP.Net web application is altered with a simple change and tested in Development environment.
![012 012](http://lh5.ggpht.com/-R5SA73Unyyw/VHILMcwldHI/AAAAAAAADTA/jbi5MVeYUok/012_thumb%25255B1%25255D.png?imgmax=800)
![013 013](http://lh4.ggpht.com/-Z3X8cb2kLak/VHILOt4rBmI/AAAAAAAADTQ/a0t8lvfyU18/013_thumb%25255B1%25255D.png?imgmax=800)
The depsvr which is configured to deployed using VS Release Management still has old version and development (localhost) shows the change,
![014 014](http://lh6.ggpht.com/-4gQfG2fgi2c/VHILQiVtjII/AAAAAAAADTg/uq7-iwdQweE/014_thumb%25255B1%25255D.png?imgmax=800)
Check in the change.
![015 015](http://lh3.ggpht.com/-ex_YU1dVHTU/VHILTBCE2CI/AAAAAAAADTw/EBu-S0ec_O4/015_thumb%25255B1%25255D.png?imgmax=800)
CI build (Build each check in) is successful.
![016 016](http://lh3.ggpht.com/-Us1Cyw-NeUo/VHILVV2LzVI/AAAAAAAADUA/LQEHWm62Iq0/016_thumb%25255B2%25255D.png?imgmax=800)
Next step is to trigger a build with output and initiate a release via that build.
![017 017](http://lh4.ggpht.com/-AFC1HEAT-cg/VHILXtDThEI/AAAAAAAADUQ/DtypCcHz6eI/017_thumb%25255B1%25255D.png?imgmax=800)
![018 018](http://lh6.ggpht.com/-BuMkgiSbzSk/VHILZ7wQgKI/AAAAAAAADUg/kq40s1nc0mM/018_thumb%25255B1%25255D.png?imgmax=800)
Wait for release to be triggered with the TFS build.
![019 019](http://lh6.ggpht.com/-3ShY6rrYor0/VHILbwQk2oI/AAAAAAAADUw/NQ2sIkvkkb0/019_thumb%25255B1%25255D.png?imgmax=800)
New release is not triggered and Build failed with “Build service account needs to be a system user in Release Management Server”.
![020 020](http://lh6.ggpht.com/-7Oa5moo-NVY/VHILffHGRcI/AAAAAAAADVA/AgHlHEQjk3M/020_thumb%25255B2%25255D.png?imgmax=800)
![021 021](http://lh4.ggpht.com/-p2lvSggOS3I/VHILjsxH6hI/AAAAAAAADVQ/zbwYm-_ioGc/021_thumb%25255B2%25255D.png?imgmax=800)
Add the TFS Build Service account as a service account in Release Management.
![022 022](http://lh3.ggpht.com/-eYUu8OBh4gg/VHILlt2yB8I/AAAAAAAADVg/tI1Kly5sqAQ/022_thumb%25255B1%25255D.png?imgmax=800)
![023 023](http://lh4.ggpht.com/-cIlRUjozUHk/VHILnUIIgqI/AAAAAAAADVw/lrdS4uX3nEg/023_thumb%25255B1%25255D.png?imgmax=800)
![024 024](http://lh3.ggpht.com/-2_WWRV3t0qk/VHILo6wZ9BI/AAAAAAAADWA/sJInumfLfLc/024_thumb%25255B3%25255D.png?imgmax=800)
Retry Build.
![025 025](http://lh3.ggpht.com/-KsUN6rZVGoc/VHILrdBzPQI/AAAAAAAADWQ/ry_xGmWthPQ/025_thumb%25255B1%25255D.png?imgmax=800)
Second attempt failed with same error.
![027 027](http://lh4.ggpht.com/-JUtK6kdmbfs/VHILt6Wqj4I/AAAAAAAADWg/1gH7-wjN7xY/027_thumb%25255B1%25255D.png?imgmax=800)
![028 028](http://lh4.ggpht.com/-mP9Qui164HQ/VHILwd70cKI/AAAAAAAADWw/SqdotnnzzjQ/028_thumb%25255B2%25255D.png?imgmax=800)
The Q&A in below link gives a hint.
http://stackoverflow.com/questions/20901507/error-the-account-running-the-tfs-build-service-tfsbuildservices-needs-to
Hint is the build server needs to be installed with Release Management Client and configured to access Release Management Server.
![030 030](http://lh3.ggpht.com/-XfGHoiGu_uc/VHILyNZIjAI/AAAAAAAADXA/qlqKpU8GOZU/030_thumb%25255B1%25255D.png?imgmax=800)
![031 031](http://lh3.ggpht.com/-w7Knq9_4x2M/VHILz4xFz7I/AAAAAAAADXQ/H-i1GLpne-k/031_thumb%25255B1%25255D.png?imgmax=800)
![032 032](http://lh3.ggpht.com/-QUtogN4oMEc/VHIL1soq5iI/AAAAAAAADXg/TscoA0BK19U/032_thumb%25255B3%25255D.png?imgmax=800)
![033 033](http://lh3.ggpht.com/-sqZccazLXzU/VHIL3ipujNI/AAAAAAAADXw/fXvEsZKJbU8/033_thumb%25255B3%25255D.png?imgmax=800)
Next attempt of the build successfully triggers the release in Release Management Server.
![034 034](http://lh5.ggpht.com/-pzR2Sf5sbHo/VHIL5kBQK5I/AAAAAAAADYA/OFi1fOktcXg/034_thumb%25255B1%25255D.png?imgmax=800)
![035 035](http://lh3.ggpht.com/-ivR-FgKpEW8/VHIL7c2jXkI/AAAAAAAADYQ/rHqtZKhusfs/035_thumb%25255B1%25255D.png?imgmax=800)
Acceptance Deployment step should be set to automated in release path of Release triggered by a TFS Build.
![036 036](http://lh4.ggpht.com/-Rh03Z5Pe8I4/VHIL8x86WdI/AAAAAAAADYg/xR3sfYOS_lg/036_thumb%25255B1%25255D.png?imgmax=800)
Build succeeds and Release succeeds.
![037 037](http://lh3.ggpht.com/-bT-_twOTGu8/VHIL-pZe_BI/AAAAAAAADYw/efoj06_Iu8M/037_thumb%25255B1%25255D.png?imgmax=800)
![038 038](http://lh4.ggpht.com/-LWwGmAdsAdA/VHIMAQ-UmGI/AAAAAAAADZA/CkfHS_FjoE8/038_thumb%25255B1%25255D.png?imgmax=800)
DepSvr is updated with the change in the Demo web application.
![039 039](http://lh3.ggpht.com/-p4ANassFnc0/VHIMB_tJc0I/AAAAAAAADZQ/vHDbs_lagC0/039_thumb%25255B1%25255D.png?imgmax=800)