- The
activationEventsproperty must be present inpackage.jsonfor any extension with amainentry point (i.e., one that runs code, not just UI contributions). - Even though VS Code can infer activation events for UI-only extensions, the VSCE packaging tool requires this property for main-activated extensions.
- If you remove
activationEvents, packaging will fail with:ERROR Manifest needs the 'activationEvents' property, given it has a 'main' property. - Always keep the following in
package.json:
"activationEvents": [
"onCommand:code2md.generateMarkdown",
"onCommand:code2md.generateMarkdownFromFolder",
"onCommand:code2md.generateMarkdownContext"
]- If you add new commands, update both the
commandsandactivationEventsarrays. - This ensures compatibility with VSCE and consistent extension activation.
Last updated: 2025-06-30