/// <summary> /// The set credentials. /// </summary> /// <param name="userName"> /// The user name. /// </param> /// <param name="password"> /// The password. /// </param> private void SetCredentials(string userName, string password) { this.configurationHelper.WriteSetting(new SonarQubeProperties(Context.GlobalPropsId, OwnersId.ApplicationOwnerId, "ServerAddress", this.ServerAddress)); var cm = new Credential { Target = "VSSonarQubeExtension", PersistanceType = PersistanceType.Enterprise, Username = userName, SecurePassword = ConnectionConfiguration.ConvertToSecureString(password) }; cm.Save(); }