Appcenter-sdk-dotnet: WPF version not reported correctly when using ClickOnce

Created on 16 Aug 2019  Â·  13Comments  Â·  Source: microsoft/appcenter-sdk-dotnet

Description

It looks like the WPF analytics module is using the Assembly file version for "version" when viewing data in App Center. I would like it to use the ClickOnce publish version, or better yet, let me set the version myself.

Repro Steps

Please list the steps used to reproduce your issue.

  1. Publish any WPF app with ClickOnce
  2. The version number displayed on the charts does not reflect the ClickOnce publish version number.

Copied from
https://github.com/microsoft/appcenter/issues/907

bug

All 13 comments

Hi @moshegutman! It looks like the feature request. Could you please clarify why change the version in the file which we use don't suitable for you?

The version that is used for display in App Center does not match the ClickOnce publish version highlighted below. I think this is a bug, not a feature request. Every time a new version of my app is published, the ClickOnce version is incremented, but App Center always displays the same version number. This is because App Center uses the Assembly File Version instead.

clickonce

Maybe this could have a relation to the appcenter distribute issue I experienced.
I posted it to the dev-community https://developercommunity.visualstudio.com/idea/702256/error-deploying-msi-to-appcenter.html

Hi there. We use the version from Package.appxmanifest. I am not familiar with ClickOnce technology but it looks like a custom thing. I will mark this as feature request and file a ticket.
Thank you.

ClickOnce is not “custom” https://docs.microsoft.com/en-us/visualstudio/deployment/clickonce-security-and-deployment?view=vs-2019

It is a feature of Visual Studio. This is a bug, not a feature request.

@moshegutman we will look into this in any case and fix. Thanks for bringing it into attention!

Rather than manually setting version, it should be better to try to use something like:

if (ApplicationDeployment.IsNetworkDeployed)
        return ApplicationDeployment.CurrentDeployment.CurrentVersion;

Oh I agree, but I don’t know how or where App center pulls version information from.

Currently it uses Application.ProductVersion (which maps to AssemblyFileVersion at least on .net core) which is not good indeed for ClickOnce. But we could fix the SDK to look for deployment version first and fall back to the other one.

Yes that would be great!

Im closing the issue now since the fix has been merged.

(we keep issues open until release for visibility since the latest nugets still have the bug)

Included since 2.4.0-preview

Was this page helpful?
0 / 5 - 0 ratings