Displaying the build date

前端 未结 25 2306
感动是毒
感动是毒 2020-11-22 11:36

I currently have an app displaying the build number in its title window. That\'s well and good except it means nothing to most of the users, who want to know if they have t

25条回答
  •  谎友^
    谎友^ (楼主)
    2020-11-22 12:23

    A small update on the "New Way" answer from Jhon.

    You need to build the path instead of using the CodeBase string when working with ASP.NET/MVC

        var codeBase = assembly.GetName().CodeBase;
        UriBuilder uri = new UriBuilder(codeBase);
        string path = Uri.UnescapeDataString(uri.Path);
    

提交回复
热议问题