none
How to obtain the version number created by "Create App Packages" for a Windows Store-based app developed with C# WPF

    Pertanyaan

  • Visual Studio applies (and will automatically increment) a version number when using "Create App Packages" to prepare an application for submission to the Windows Store.  I'd like to show that version number in a help screen when my app is downloaded / installed / running on a user's PC.

    Before we opted to distribute the app via the Windows Store, it was originally a ClickOnce app, and the following logic worked:

    if (ApplicationDeployment.IsNetworkDeployed)

    VersionNumber.Content = ApplicationDeployment.CurrentDeployment.CurrentVersion.ToString();

    But now that we are using the Windows Store to distribute the app, this no longer works.

    Assembly.GetExecutingAssembly().GetName().Version.ToString()

    does not work either.

    Does anyone know if there is an API for obtaining the version number that is updated and stamped on by "Create App Packages"?

    Thanks!

     
    Selasa, 30 Oktober 2018 17.27

Semua Balasan

  • Hi,

    thanks for posting here.

    Since your case is a ClickOnce app, I will move it to ClickOnce forum for better support. Or you could also try on c# forum.

    Your understanding and cooperation will be grateful.

    Best Regards,

    Baron Bi


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Rabu, 31 Oktober 2018 01.44
  • Hi Baron, thank you for your help!  I'm new to the MSDN Community Support forums, and appreciate your guidance.

    Can you please advise as to whether there is a forum for Windows Store issues (especially for folks like me developing with C# and WPF)?  My problem is actually with getting the version number now that we're distributing the app via the Windows Store.  Prior to that, when the app was distributed via our site as a ClickOnce app, the technique showed in the first code block worked great.  But it does not work now that we're distributing form the Windows Store.

    Rabu, 31 Oktober 2018 02.07
  • Hi,

    Here is a list of suitable forums, you could choose one.

    Windows Store forum

    c# forum

    WPF forum

    ClickOnce app

    Hope this could be help of you.

    Best Regards,

    Baron Bi


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Rabu, 31 Oktober 2018 02.22