Author |
Topic: Querying API version (7 messages, Page 1 of 1) |
||||
---|---|---|---|---|---|
Moderators: VPfau | |||||
jlanawalt Posts: 88 Joined: Feb 12, 2009 |
Hi,
Is there a method for asking the API what it's version is? I looked through the documentation but may have overlooked it. Thank you, -- Jacob Anawalt |
||||
VictorV Posts: 746 Joined: May 08, 2007 |
Hi. You can get version from .NET assembly info
Victor Vins Lead Software Developer |
||||
jlanawalt Posts: 88 Joined: Feb 12, 2009 |
Like this?
System.Version v = System.Reflection.Assembly -- Jacob Anawalt |
||||
VictorV Posts: 746 Joined: May 08, 2007 |
Yes, this is correct. We increment this version every time when publish it to NuGet
Victor Vins Lead Software Developer |
||||
jlanawalt Posts: 88 Joined: Feb 12, 2009 |
Is it the Assembly File Version that is updated, or also the Assembly Version?
That code returns v = {3.5.0.0} I checked out the OEC API Example from GitHub and added that call in InitializeComponent of MainForm.Designer.cs, just after oecClient1 is created. I copied API.dll, CommLib.dll, and ProtoSharp.Core.dll from Trader Demo 3.5 (3.5.12.2). Using this code:
I get: v = {3.5.0.0} fvi.FileVersion = "3.5.13.0" The FileVersion matches API.dll Windows Explorer Properties for the File version and Product version. The docs said I could copy the assemblies from OEC Trader or use NuGet. I can use NuGet if that would have a different result. -- Jacob Anawalt |
||||
VictorV Posts: 746 Joined: May 08, 2007 |
Oops, sorry for this mess with my previous response. As you correctly noted, we increment "file version", not "assembly version".
Victor Vins Lead Software Developer |
||||
jlanawalt Posts: 88 Joined: Feb 12, 2009 |
The Assembly tags at the top of the pages in the API documentation make more sense now:
Assembly: API (in API.dll) Version: 3.5.0.0 (3.5.12.0) Thank you for putting that and the version history in there. I noticed that starting in September of 2013 you began incrementing the API.dll and CommLib.dll assembly file versions and noting those versions in the change logs. It is also appreciated. -- Jacob Anawalt |
||||