Search code examples
c#visual-studioenvdtevs-extensibility

How to get Visual studio extension version from the extension code


I would like to display the visual studio extension version in a UI, so that when a user has an issue and makes a screenshot the version will be "automatically" available. Is there any interface to query for it? I don't know if it matters, but it is better if I find examples in C#


Solution

  • This post shows how the extension version could be read from the manifest file through the extension code and also offers an alternative which is loading the manifest using the extension's GUID.

    A third option would be to get the version of the executing assembly that is part of the extension, but this will only work if the version in the manifest file matches the version of the assemblies within the extension.