Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Azure DevOps Services
Choose to host static content for your extension, like HTML, CSS, and JavaScript files, on your own service, on a third-party hosting service, like Azure or Heroku, or on Azure DevOps Services directly.
Important
If your extension needs to create a custom table in the TFS database, do not create it using the 'dbo' schema. Instead, custom tables should be created in a separate schema. For example, 'YourExtensionName'.
Tip
For the latest extension development guidance, including theming and migration from VSS.SDK, see the Azure DevOps Extension SDK developer portal.
Host on Azure DevOps Services
In this model, static content is packaged with your extension's .vsix file and is served from a public endpoint at https://publisher.gallerycdn.vsassets.io.
Your extension's static content is useful when you're enhancing or decorating data from Azure DevOps Services. The extension pub doesn't require you (the extension publisher) to set up, manage, or pay for hosting services for your extension
Steps
- In your extension manifest file, specify the files you want to include through the
filesproperty:{ "files": [ { "path": "scripts", "addressable": true }, { "path": "images/extra/icon1.png", "addressable": true } ] } - Remove the
baseUriproperty (if set) from your extension manifest. - Package your extension (steps)
- Publish (or republish) your extension (steps)
Keep in mind:
- The value specified by the
pathattribute can be a folder or individual file. If a folder, the entire folder (and any subfolders) is included. - The
addressableattribute is important and is what tells Visual Studio Codespaces to make the file(s) URL addressable. - All
addressableasset requests are case-sensitive. If the request for an asset has a different case than the actual uploaded asset, it results in an HTTP 404 (Not found) error. - Not specifying a baseUri or setting an empty value tells Visual Studio Codespaces at runtime to calculate the base URI as if your static content's hosted by Azure DevOps Services.
Host on a third-party service
In this model, static content is served from your own service and not included in your extension's .vsix file.
Steps
- Set the
baseUriproperty in your extension manifest For example, assuming a value ofhttps://myservice.net/extensionand this hub contribution:
"baseUri": "https://myservice.net/extension",
"contributions": [
{
"id": "Fabrikam.HelloWorld",
"type": "ms.vss-web.hub",
"targets": [
"ms.vss-work-web.work-hub-group"
],
"properties": {
"name": "Hello",
"uri": "hello-world.html"
}
}
]
Azure DevOps Services loads the contents of this hub when it's rendered at https://myservice.net/extension/hello-world.html.