1
votes

VSTS/TFS(2017) version id: 15.117.26714.0

I has uninstalled my custom extension, and it was removed this extensions list.Then I reinstalled itsef, alert 'The extension already exists'.Amazing, query the url http://{domain}/tfs/_apis/gallery/publishers/{publishers}/extensions/{extensionId}, I can get uninstall extension info.

I found two way to resolve it, but they don't work well.Way as below.

  • clean the client caches :

    1. TFS: C:\Users{your account}\AppData\Local\Microsoft\TeamFoundation{version}\Cache

    2. Browser, IE for example (based on your settings) : C:\Users{your account}\AppData\Local\Microsoft\Windows\INetCache Emmmm, there is no INetCache dir.I skip it.

  • query the TFS REST API

    curl "http://{domain}/tfs/_apis/gallery/publishers/{publisher}/extensions/{extensionId}" -X DELETE -H "Pragma: no-cache" -H ...... However,it throw some error:

    { "message":"TF400813: Resource not available for anonymous access.Client authentication required.", "type":"Microsoft.TeamFoundation.Framework.Server.UnauthorizedRequestException", "isRemoteException":false, "errorCode":0, "eventId":3000 } While I change other extension publisher and extensionId , it success.

1
Try to use tfx build tasks delete --task-id xxxxxx to delete the task. And check the ID of your extension in vss-extension.json file, and change the ID to have another try. - Cece Dong - MSFT
I had resolved it. Using curl to get code in postman,and run it in chrome's console.To my surprise, I get this response that its code is 404.Even if this request may be some question, I get nothing my extension info when I query the api again.I can't change task id or extension id, then I will lose my important history data. - soulxy
You mentioned "I had resolved it", do you mean you can re-install the extension now? - Cece Dong - MSFT

1 Answers

0
votes

I had same problem and I can solved it with REST API

DELETE https://{domain}/tfs/_apis/gallery/publishers/{publisher}/extensions/{extension-name}?api-version=3.2-preview.2

Change is not use extensionsID but I use extension name as resource identification

I execute request via Fiddler with basic auth and using PAT instead of username/password