Release is failing with ‘Object reference not set to an instance of an object’

In case your release is failing with ‘Object reference not set to an instance of an object’ post upgrade of your TFS with below snapshot just after creating the release In case you have moved your TFS server from one machine to other and ran PrepareClone, ChangeServerID, RemapDb following command Workaround: – Create a…


CryptographicException while adding TFS connection to ReleaseManagement Update-4 client

One of our customer reported below error :- Issue:- While adding a TFS connection, user were getting CryptographicException Message: Bad Data.: \r\n\r\n   at System.Security.Cryptography.CryptographicException.ThrowCryptographicException(Int32 hr)   at System.Security.Cryptography.RSACryptoServiceProvider.DecryptKey(SafeKeyHandle pKeyContext, Byte[] pbEncryptedKey, Int32 cbEncryptedKey, Boolean fOAEP, ObjectHandleOnStack ohRetDecryptedKey)   at System.Security.Cryptography.RSACryptoServiceProvider.Decrypt(Byte[] rgb, Boolean fOAEP)   at Microsoft.TeamFoundation.Release.Data.Helpers.CryptoHelper.GetDecryptedValue(String str, String containerName)   at Microsoft.TeamFoundation.Release.Data.Helpers.CryptoHelper.DecryptString(String str, String cryptoContainerName, String key, Encryption encryption)  …


Writing a ReleaseManagement extension for cloning an existing release definition

Code shared :- How to make Changes:- Step1: Clone the repository using the link Step2: Open a command prompt and go till folder ‘rd-export-import-clone-TFS2015U2’ Step3: Run ‘bower install’ [ pre-requsite for running ‘bower’ can be referred] which will download 1.95.2 version of VSS.SDK.js Step4: Make your changes Step5:  Run ‘tfx extension create’…


Using Clone, Export and Import an existing release definition for TFS2015 Update2

Summary:- A ReleaseManagement extension for Cloning, Importing and Exporting an existing release definition is released in the VisualStudio marketplace at . But as it uses some improvement done post release of TFS2015U2 hence it doesn’t allow to be installed for TFS2015U2. I have tried to write another extension with slight variation of experience (explained below)….


Using ReleaseHttpClient for interacting with ReleaseManagement service

ReleaseHttpClient is public as nuget package : GitHub samples: Fetching release definitions using given credential :- Step1: Create one ‘Windows Console Application’ using Visual studio 2015 Step2: Goto Tools –>NuGet Package Manager –> Manage NuGet Packages for Solutions –> Browse (make sure Package source: Step3: Search and Install following package to your solution  Microsoft.VisualStudio.Services.Release.Client…


Using PAT token in ReleaseManagement REST API’s

Generating PAT Token:- Step1: Generate PAT token by visiting your profile and selecting the right ReleaseManagement scope as per API need ( see ‘Available scopes’ section ) Step2: Copy the token generated after clicking ‘Create Token’ as shown in image above   Code which uses the generated PAT token above :- public static async…


Using ReleaseManagement REST API’s

 Refer the documentation (below samples uses alternate credential for authentication []) 1. How to get ReleaseDefinition using ReleaseManagement REST API’s public static async void GetReleaseDefinitions() { try { var username = “<alternate credential username>”; var password = “<password>”; using (HttpClient client = new HttpClient()) { client.DefaultRequestHeaders.Accept.Add( new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue(“application/json”)); client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue(“Basic”, Convert.ToBase64String( System.Text.ASCIIEncoding.ASCII.GetBytes( string.Format(“{0}:{1}”, username, password)))); using…