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

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

Essentially, I need a way for the client to confirm that the last bits are actually working, if there is a better way to open sentences.

+5
source share
2 answers

If you are trying to check while the application is running, you can enter 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
}
+9
source

For the client, this is normal with the following code

    public static string getAsmVersionInfo()
    {
        return "v " + ParseVersionNumber(Assembly.GetExecutingAssembly()).ToString();
    }

    public static Version ParseVersionNumber(Assembly assembly)
    {
        AssemblyName assemblyName = new AssemblyName(assembly.FullName);
        return assemblyName.Version;
    }

But how can we find out from the Internet? I would like to show how index.aspx Title. There is xap in the ClientBin / directory. We need to find the DLL inside it on the server side.

aspx page Title http://blogs.msdn.com/b/zainala/archive/2008/11/23/changing-html-page-title-from-silverlight.aspx

0

All Articles