开发者

Showing a build number or version on Silverlight app?

I have a Silverlight app that I hand off to the IT people you are supposed to publish it. This does not always happen correctly, they might forget, put in the wrong loc, or get the wrong version.

So I want to add something to the app itself to easily tell the latest version. This is for SL 3 and 4 so context menu probably not an option. I don't think the users would want a splash screen so that also probably not a choice.

Has anyone done this? Is there a clean, unobtrusive way of doing this?

If you have done this do you just use the assembly version o开发者_如何学Pythonr do use some custom value?

thanks


Here is code to check the assembly version of a running application:

string GetAssemblyVersion()
{
    var assemblyName = new AssemblyName(Application.Current.GetType().Assembly.FullName);

    if (assemblyName == null)
    {
         return string.Empty;
    }

    Version v = assemblyName.Version;

    if (v == null)
    {
        return string.Empty;
    }

    return v.ToString();
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜