display Add-in version or build information

display Add-in version or build information

Curtis_Waguespack
Consultant Consultant
394 Views
2 Replies
Message 1 of 3

display Add-in version or build information

Curtis_Waguespack
Consultant
Consultant

I would like to provide an "about" button for an addin. Is there a good way to gather the build version, or something similar so that I can provide a button to display this information?

 

Use case: The user's version of the add-in is not behaving as expected. Maybe they aren't using the latest version? or maybe I forgot to provide the latest version, etc. It would be handy if they could push an "about" button that would display the build version, etc.

 

Thanks in advance.

EESignature

0 Likes
Accepted solutions (2)
395 Views
2 Replies
Replies (2)
Message 2 of 3

matt_jlt
Collaborator
Collaborator
Accepted solution

you can use reflection to get the build version

Imports System.Reflection

Public Sub Main()
    Dim assembly As Assembly = Assembly.GetExecutingAssembly()
    Dim version As Version = assembly.GetName().Version
    Dim buildVersion As String = version.ToString()

    MessageBox.Show("Build Version: " & buildVersion)
End Sub

 

Message 3 of 3

JelteDeJong
Mentor
Mentor
Accepted solution

I use Git as a version control system. Each time I release a new version of my addin I create a Tag on the commit I released. In my build process, I use a few commands to get that tag and write it to a file. I read that file from my code when I need the version of my addin.

The main advantage is that it's a semi-automated process that I cannot forget in a version control system that I was already using.

Jelte de Jong
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Blog: hjalte.nl - github.com