Using BaseUri to develop your VSTS extension

When you work on your Visual Studio Team Services or Team Foundation Server extension, you need a VSTS or TFS environment to deploy your extension to. To deploy your extension, you package all your JavaScript, HTML and CSS files into a VSIX and deploy the complete package.

This means that for every small change you make, you need to completely redeploy the package and then use your browser to validate the changes. Fortunately, there is an easier way to pickup changes while developing your extension.

BaseUri property for your manifest

While working on your extension, you can add a the properrty baseUri to your JSON manifest file. If this property is not present, all your files will be loaded from VSTS or TFS. When you add this property, you override the default location of your assets. By letting this property point to your local host you can serve the files locally and your extension will load them into the context of VSTS or TFS.

Take for example the following portion of a manifest:

 "manifestVersion": 1,
 "id": "AnotherSampleExtension",
 "version": "0.0.0",
 "publisher": "",
 "name": "Another Sample Extension",

Now you can add the the following line to enable serving your extension from your local host:

baseUri: "https://localhost:5000",

Do make sure that you specify a HTTPS enabled URL. Now while working on your extension, you can run the extension in the context of VSTS or TFS while are your local file changes are picked up without republishing your extension.

When you are finished with development, just remove the baseUri from your manifest file and publish the extension to the marketplace.

Wouter de Kort works as a lead architect and consultant. He helps organizations stay on the cutting edge of software development. Wouter focuses on DevOps. He loves solving complex problems and helping other developers to grow. Wouter authored the book DevOps on the Microsoft stack and a couple of other books. Wouter is a Microsoft MVP and an ALM Ranger. You can find him on Twitter (@wouterdekort), on his blog at and at the various conferences where Wouter speaks.


3 Responses

  1. In tfs 2017 rc2 I can’t build in my html page the hosted on other port but same server. I tried http and https bu tfs can’t load and show page and shows justa error.

    • Hi Vitaly,

      can you contact me on wouter AT Can you share some more details? Then I’ll try to help you out.


Leave a Reply

Your email address will not be published. Required fields are marked *

Post comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.