Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to get a version number from the XAP file

Tags:

silverlight

Is it possible for the silverlight client to get any of the assembly version information from the xap file it's downloaded.

Essentially, I need a way for the client to confirm that's in fact running the latest bits, if there's a better way I'm open to suggestions.

like image 800
Ralph Shillington Avatar asked Jan 26 '11 16:01

Ralph Shillington


1 Answers

If you are trying to check while the application is running you could bring in System.Reflection and do something like this:

Assembly assembly = Assembly.GetExecutingAssembly();
if (assembly.FullName != null)
{
    string versionPart = assembly.FullName.Split(',')[1];
    string version = versionPart.Split('=')[1];

    // check version against something
}
like image 195
Dan Auclair Avatar answered Nov 15 '22 08:11

Dan Auclair