To enable triggering a release in Visual Studio Release Management from TFS build requires few configuration steps to be performed.
First step is to allow triggering a release in the Release Template. This can be done in release template properties.
Select “Can Trigger a Release from a Build?” option.
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.
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.
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.
This template has a category for Release.
Set Release Build to true.
To demonstrate the release with TFS build, below simple ASP.Net web application is altered with a simple change and tested in Development environment.
The depsvr which is configured to deployed using VS Release Management still has old version and development (localhost) shows the change,
Check in the change.
CI build (Build each check in) is successful.
Next step is to trigger a build with output and initiate a release via that build.
Wait for release to be triggered with the TFS build.
New release is not triggered and Build failed with “Build service account needs to be a system user in Release Management Server”.
Add the TFS Build Service account as a service account in Release Management.
Second attempt failed with same error.
The Q&A in below link gives a hint.
Hint is the build server needs to be installed with Release Management Client and configured to access Release Management Server.
Next attempt of the build successfully triggers the release in Release Management Server.
Acceptance Deployment step should be set to automated in release path of Release triggered by a TFS Build.
Build succeeds and Release succeeds.
DepSvr is updated with the change in the Demo web application.
It is great if the latest updates to TFS can be applied as and when they are released. But for a large organization it might not be sometime...
Resolve MSB4019: The imported project "C:\Program Files\dotnet\sdk\1.0.0-rc4-004771\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Props" was not found or Unable to start the process. No executable found matching command "dotnet-projectmodel-server"You might encounter compilation error in Visual Studio 2015 when a new .NET Core 1 web app is created, if you have installed Visual Studio 2...
TFS 2018 RC1 is now available and you can download it from https://www.visualstudio.com/downloads/ . Release note here explains the new fea...
You needed to setup dedicated machines for testing when using Run Functional Tests and you had to execute, Deploy Test Agent step and Copy...
This extension “ Chamindac.vsts.release.task.download-artifacts ” for VSTS and TFS 2015.2.1 upwards, can be used to filter for build artifac...