Extending the Manager
Step-by-step guides for adding new profiles, portable dependencies, editor editions, or settings schema entries.
1. Adding a New Optional Profile (profiles\*.ini)
No PowerShell changes are required. Create a new .ini file inside profiles\:
[Profile]
Name = Extensions: Go Development
Description = Official Go extension and portable Go toolchain.
[Settings]
go.toolsManagement.autoUpdate = true
[Extensions]
golang.go
[Dependencies]
go
Because Get-SettingsPresets scans profiles\*.ini dynamically:
- It immediately appears in
configure.ps1Option 2. - It can be referenced via
OptionalProfiles = ext-goinconfig.inior-Preset ext-goon the CLI. - Update the profile list comments in
config.ini,README.txt, anddocs/user/profiles.mdif contributing it as a built-in profile.
2. Adding a New Portable Software Dependency
Edit src/core/dependencies.ps1:
- Add the tool specification to
Get-DependencyCatalog:- Use an official upstream Windows x64 portable archive (GitHub Release
.zipor official JSON API). - Set
StripSingleTopDir = $trueif the archive wraps all files inside a versioned top-level directory. - Set
SoftwareRegKeyto the tool’s official Windows registry key underSoftware\<VendorOrProgram>(never invent a manager-specific namespace).
- Use an official upstream Windows x64 portable archive (GitHub Release
- Map extension IDs in
Get-ExtensionDependencyMap:"publisher.extension-id" = @("my-tool") - Add resolver logic in
Resolve-ToolDownloadInfo(if not using standard"GitHubZip"). - Add official registry writes in
Register-PortableToolEnvironmentAndRegistryunderswitch ($Tool.Id):"my-tool" { $null = Set-ProgramSoftwareRegistryKey -SubKey "Software\Vendor\MyTool" -Values @{ InstallDir = $CleanDir Version = $Version } } - (Optional) Auto-wire the executable path into
settings.json:- If the extension has an explicit binary-path setting (verify its exact
package.jsonkey!), add it to$ToolSettingKeyMapin bothGet-DependencyExecutableSettingsPatchandInvoke-DependencyCheckAndInstall.
- If the extension has an explicit binary-path setting (verify its exact
- Document it in
README.txtanddocs/user/dependencies.md.
3. Adding a New Setting to the Interactive Wizard
Edit Get-SettingsSchema in src/core/settings.ps1:
@{
Key = "editor.rulers"
Category = "Editor"
Type = "string"
Default = "[80, 120]"
ValidValues = @()
Description = "Vertical ruler column positions"
}
4. Adding a New Editor Edition
Edit src/core/edition.ps1:
- Add the edition metadata hashtable to
Get-EditorProfileandGet-AllEditorProfiles(Product,Channel,DisplayName,ProgramName,ExeName,CliCmd,ProcessName,RegistryKey,MenuLabel,SourceType, endpoint info). - Add executable detection in
Get-InstalledEditorProfile(place more specific names like*- Insiders.exebefore base names). - Update the executable regex in
Find-EditorPathsInRegistry(src\utility\registry.ps1) and process lists inFind-VSCodeInstalls(src\core\discovery.ps1) andStop-EditorProcessesInDir(src\utility\filesystem.ps1).