Is there a way to access the version of the Add-In (e.g. what is listed in the Config.daml) using the SDK?
For example, with the ArcObjects SDK, you could access the Add-In verison with My.ThisAddIn.Version
Is there a similar way I can access the version using the Pro SDK? I can access the assembly/dll version with the reflection namespace, but this is not linked in any way to the Add-In version from what I can tell.
Thanks
Hi Luke,
In the config.daml's <AddInInfo> tag, you can get the desktopVersion attribute and use it within your code as a string property.
To create something similar to what ArcObjects provided, you can do following -
internal class Module1 : Module
{
public static class MyAddin
{
public static string Version => "1.2.5023";
public static string Name => "ProAppModule1";
......
}
....
protected async override void OnClick()
{
string myVersion = Module1.MyAddin.Version; //do something with the version
......
Thanks!
Uma Harano
ArcGIS Desktop SDK Team
Hi Uma,
Are you saying I have to hardcode my Add-In version in my module class? Isn't there any way the SDK can tell me the version of my Add-In without me having to manually store it and update it?
Thanks,
Luke
Hi Luke,
The version is hard coded already into the config.daml. It never changes for the lifetime of that add-in. Once you make your variable, you would not have to update it.
Thanks
Uma Harano
ArcGIS Desktop SDK Team.
I am also looking a way to read the Add-In "Version" Configuration. (Not the desktopVersion) from SDK.
Thanks
Sree
Hi Sree,
You can take a look at this sample and see if it has what you need:
It displays version information about add-ins - the 'Version' string is probably what you are looking for:
Hi Kaiser,
I think this will work. Probably I need to find all the add-ins and filter the version# based on my add-in guid.
- My intention is to read the current version of my add-in directly from Config.daml.
<AddInInfo id="{my add-in guid}" version="1.0" desktopVersion="2.2.12813">
Thanks for the help!
Regards,
Sree