Thank you for reaching out to Microsoft Q&A
I tried creating custom multi-value DevTest like extension, and here are the steps I followed:
Here’s my Folder structure:
my-ado-extension/
dist > Inside dist
``> multivalue.html
``> src > my-control-bundle.js > styles.css
> img > logo.png
vss-extensions.json
My my-control-bundle.js:
/**
* Minimal DevLabs-style work item control provider in pure AMD (RequireJS).
* No build tools required. Azure DevOps will load this via require.config(baseUrl: "src").
*/
define("my-control-bundle", [], function () {
function create() {
var root = document.getElementById("root");
if (!root) {
console.error("[DevLabs] #root not found in multivalue.html");
return {
getValue: function () { return {}; },
onFieldChanged: function () {}
};
}
root.innerHTML = ''
+ '<label>Option A:'
+ ' <select id="optA">'
+ ' <option>Alpha</option>'
+ ' <option>Beta</option>'
+ ' <option>Gamma</option>'
+ ' </select>'
+ '</label>'
+ '<br/>'
+ '<label>Option B:'
+ ' <select id="optB">'
+ ' <option>Red</option>'
+ ' <option>Green</option>'
+ ' <option>Blue</option>'
+ ' </select>'
+ '</label>';
console.info("[DevLabs-style] provider.create invoked");
// Minimal control contract expected by ADO Work Item form
return {
getValue: function () {
var a = document.getElementById("optA");
var b = document.getElementById("optB");
return {
optA: a && a.value,
optB: b && b.value
};
},
onFieldChanged: function (_field, _value) {
// No-op for minimal sample
}
};
}
// Provider object returned to VSS.register(...)
return {
create: create
};
});
My styles.css:
#root {
font-family: Segoe UI, Arial, sans-serif;
font-size: 13px;
padding: 6px;
}
label {
display: inline-block;
margin: 6px 0;
}
select {
margin-left: 8px;
min-width: 140px;
}
My multivalue.html:
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<title>Multi Value Control</title>
<!-- Correct CSS include -->
src/styles.css
<!-- RequireJS (needed locally) -->
https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js</script>
<!-- Azure DevOps SDK -->
https://unpkg.com/vss-web-extension-sdk/lib/VSS.SDK.min.js</script>
<!-- Correct SDK include -->
https://unpkg.com/vss-web-extension-sdk/lib/VSS.SDK.min.js</script>
<script>
// Configure RequireJS BEFORE VSS.init()
require.config({
baseUrl: "src", // resolves to dist/src/
paths: {
"my-control-bundle": "my-control-bundle" // omit .js
}
});
VSS.init({ explicitNotifyLoaded: true });
require(["my-control-bundle"], function (providerModule) {
VSS.register("multivalue-control-provider", providerModule);
VSS.notifyLoadSucceeded();
});
// Optional: trace module loads
if (typeof requirejs !== "undefined" && requirejs.onResourceLoad) {
requirejs.onResourceLoad = function (_ctx, map) {
console.log("Loaded module:", map.name, "from", map.url);
};
}
</script>
</head>
<body>
<div id="root"></div>
</body>
My vss-extension.json:
{
"manifestVersion": 1,
"id": "my-custom-multivalue-control",
"version": "0.0.1",
"name": "My Custom Multi-Value Control (DevLabs-style)",
"publisher": "siddhesh-publisher",
"public": false,
"targets": [{ "id": "Microsoft.VisualStudio.Services" }],
"categories": ["Azure Boards"],
"icons": { "default": "img/logo.png" },
"files": [
{ "path": "dist", "addressable": true },
{ "path": "img", "addressable": true }
],
"contributions": [
{
"id": "multivalue-control",
"type": "ms.vss-work-web.work-item-form-control",
"targets": ["ms.vss-work-web.work-item-form"],
"properties": {
"name": "Multi Value Control",
"uri": "dist/multivalue.html",
"supportsReadOnly": true,
"order": 10,
"height": 160
}
}
]
}
Now, Install the tsix package and create vsix file with the command below:
# Install tfx-cli if not installed
npm i -g tfx-cli
# Create VSIX
tfx extension create --manifest-globs vss-extension.json
Publish the created vsix file as the Extension in Visual studio marketplace:
https://marketplace.visualstudio.com/
Click on Publish extensions on Top Right > Create Publisher > Make sure the name of the Publisher and ID matched what you have added in the vss-extension.json.
Upload your vsix file and share the extension with your organization:
Visit your organization settings > Boards > Process > Select one Process > Select one Work Item, I have selected Task > Now > Select one Field > Add custom control > Select your custom extension and save
Now, create a new Task in your work item the new custom field will be visible.