Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I get the latest version number in my vscode extension?

when my vscode extension is updated, Show an information message to users。 ps:How can I get the latest version number in my vscode extension?

like image 708
Godon Avatar asked Oct 15 '25 22:10

Godon


1 Answers

To get the extension version and other info, see

Extension property on ExtensionContext menu

Extension authors can now use the new extension property on ExtensionContext, which is passed into the extension's activate function. This returns the same Extension instance that vscode.extensions.getExtension(<extension-id>) returns, which contains properties such as, the extension's id, version, as well as a serialized packageJSON property where you can access data directly from your extension's package.json file.

from v1.55 release notes

like image 130
Mark Avatar answered Oct 17 '25 20:10

Mark