Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get Office Addin Publish Version

I have an Outlook Addin and I need to get the Publish Version. I dont mean the Assembly Version, File Version or Office Version. (Which is all I found).

Some C# Code would be pretty nice!

enter image description here

The black XML is from the Project File.

like image 703
JDeuker Avatar asked Oct 21 '25 16:10

JDeuker


1 Answers

Very late but may help someone else :)

Works with my deployed Vsto Outlook AddIn (Will not work in debug mode).

use System.Deployment.Application namespace from System.Deployment assembly

if (ApplicationDeployment.IsNetworkDeployed)
{
    ApplicationDeployment applicationDeployment = ApplicationDeployment.CurrentDeployment;

    Version version = applicationDeployment.CurrentVersion;

    return  String.Format("{0}.{1}.{2}.{3}", version.Major, version.Minor, version.Build, version.Revision);
}
like image 50
Jows Avatar answered Oct 24 '25 05:10

Jows



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!