public bool UninstallSampleExtension()
        {
            // Identifiers of the extension to uninstall
            string publisherName = "ms-samples";
            string extensionName = "samples-contributions-guide";

            // Get the client
            VssConnection connection = Context.Connection;
            ExtensionManagementHttpClient extensionManagementClient = connection.GetClient <ExtensionManagementHttpClient>();

            // Try to uninstall the extension
            try
            {
                extensionManagementClient.UninstallExtensionByNameAsync(publisherName, extensionName, "Just testing").SyncResult();
                Context.Log("Successfully uninstalled the extension.");
                return(true);
            }
            catch (Exception ex)
            {
                Context.Log("Unable to uninstall the extension: {0}", ex.Message);
                return(false);
            }
        }