We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

At runtime- how do I log the version of the ASPOSE components

The first thing my web application does at startup is to log the versions of various things (.NET version, OS version, components version, etc).

For ASPOSE.Cells, there is a call Aspose.Cells.CellsHelper.GetVersion() that returns the version. How can I do this for Pdf, Pdf.Kit, Slides, Words, etc?

Thanks!

Hello Jay,

Thanks for using our products.

I am a representative from Aspose.Pdf team. I am afraid currently Aspose.Pdf does not support any method which can return the version number information of the component. But, for the sake of correction, I have logged this requirement as PDFNET-15744 under New Features list. We will look into the details of this requirement and will keep you updated on the status implementation.

We apologize for your inconvenience.

That's too bad, but thanks for the response. How about with Slides, Words, Network, and Tasks? Do they have methods to return the version (similar to Cells)? Could these be added?

Thanks!

Hello Jay,

As a workaround for getting the version number information of Aspose.Pdf for .NET .dll, you may try using the following code snippet. You can even use the same code to get the version information of other products as well. In case you face any problem or you have any further query, please feel free to contact.

[C#]

using System.Diagnostics;

FileVersionInfo myFileVersionInfo = FileVersionInfo.GetVersionInfo(@"E:\Aspose.Pdf\\Aspose.Pdf.dll");
MessageBox.Show("Version number: " + myFileVersionInfo.FileVersion);

Hi Jay,

You can get the version numbers of the Aspose.Flash for .NET and Aspose.Pdf.Kit for .NET using following members:


MessageBox.Show(Aspose.Pdf.Kit.PdfFileInfo.KitVersion);

MessageBox.Show(Aspose.Flash.BuildVersionInfo.AssemblyVersion);

I hope this helps. If you have any further questions, please do let us know.
Regards,

Hi Jay,

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your request. Actually, in .NET you can easily read this information from any of .NET libraries using exactly the same code. You should use Reflection to achieve this. Here is an example:

// Read assembly

Assembly asm = Assembly.LoadFile(@"C:\Temp\Aspose.Words.dll");

// Read name and version of the assembly.

Console.WriteLine("Assembly name: {0}", asm.GetName().Name);

Console.WriteLine("Assembly version: {0}", asm.GetName().Version);

Almost the same technique also works for Java. In Java, you can use java.util.jar.JarFile to read manifest info of jar file. For example see the following code:

// Read jar file

java.util.jar.JarFile jar = new java.util.jar.JarFile("C:\\Temp\\Aspose.Words.jdk15.jar");

// Get manifest attributes

Map manifestAttributes = jar.getManifest().getMainAttributes();

// Get keys and values of manifest attributes

for(Object key : manifestAttributes.keySet() )

System.out.printf("%s\t\t%s\n", key, manifestAttributes.get(key));

This code returns the following:

Specification-Title Aspose.Words for Java

Implementation-Title Aspose.Words for Java

Specification-Vendor Aspose Pty Ltd

Specification-Version 3.1.1

Manifest-Version 1.0

Implementation-Version 3.1.1

Implementation-Vendor Aspose Pty Ltd

Copyright Copyright 2003-2009 Aspose Pty Ltd

Hope this helps.

Best regards.

Thanks for all the replies. I am hoping that the components that do not yet have a simple metod to get the version will add them in a future release. The Reflection does work, but it seems like a lot of overhead just to return a version.

Hi Jay,

For Aspose.Network and Aspose.BarCode for .NET, you can get the version information from the following static fields:

Aspose.Network.BuildVersionInfo.AssemblyVersion
Aspose.BarCode.BuildVersionInfo.AssemblyVersion

The issues you have found earlier (filed as 15744) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.

That is great, thanks!

If this could be added to Slides, Words, and Network that would be even better!

Jay

Hi Jay,

For Aspose.Network and Aspose.BarCode for .NET, you can
get the version information from the following static fields:

Aspose.Network.BuildVersionInfo.AssemblyVersion
Aspose.BarCode.BuildVersionInfo.AssemblyVersion