[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 398
  • Last Modified:

VB.NET - Compare current application assembly version against another

As I release updates for my application I would like it to check for an updated version in a particular directory on load. As far as I can see this needs to compare the current application assembly or file version with an updated exe in a directory.
I cannot seem to find a reasonably simple way of doing this.

I would share some code with you but I just cannot find any that seems to fit the bill.
0
fruitloopy
Asked:
fruitloopy
1 Solution
 
Luis PérezSoftware Architect in .NetCommented:
You can get the file version from any executable file. Try this:

Private Function GetFileVersionInfo(ByVal filename As String) As Version
    Return Version.Parse(FileVersionInfo.GetVersionInfo(filename).FileVersion)
End Function

Open in new window

Hope that helps.
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now