question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Improve AppVersion single project manifest support

See original GitHub issue

We need to update the targets/logic to this spec:

Application Version

  • <ApplicationVersion>1</ApplicationVersion>
  • iOS: CFBundleVersion
  • Android: android:versionCode
  • WinUI: //Package/Identity[@Version] Only if ApplicationDisplayVersion not set
  • Must be validated as an integer (iOS supports x.y.z but we are forcing a lowest common denominator here)

Application Display Version

  • <ApplicationDisplayVersion>1.0.0</ApplicationDisplayVersion>
  • iOS: CFBundleShortVersionString
  • Android: android:versionName
  • WinUI: //Package/Identity[@Version] (supercedes ApplicationVersion)
  • Must be validated as a x.y.z version string

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:22 (21 by maintainers)

github_iconTop GitHub Comments

1reaction
jonathanpepperscommented, Aug 11, 2021

Ok, makes sense, maybe the final defaults are:

<PropertyGroup>
  <ApplicationVersion Condition=" '$(ApplicationVersion)' == '' ">1</ApplicationVersion>
  <Version Condition=" '$(ApplicationDisplayVersion)' != '' ">$(ApplicationDisplayVersion)</Version>
  <ApplicationDisplayVersion Condition=" '$(ApplicationDisplayVersion)' == '' ">$(Version)</ApplicationDisplayVersion>
</PropertyGroup>
1reaction
vhugogarciacommented, Jul 24, 2021

@vhugogarcia you can use Condition to do whatever you need on different TFMs. For example:


<ApplicationVersion Condition="$(TargetFramework.Contains('android'))">1</ApplicationVersion>

<ApplicationVersion Condition="$(TargetFramework.Contains('ios'))">1.0.0</ApplicationVersion>

That is sooo cool!! Perfect then 💪🏻. Thanks for sharing it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Provide a means of setting .Chart.AppVersion during install ...
In our project/chart (cert-manager) we want to make it as clear to end users as possible which version they are installing, so allowing...
Read more >
App manifest overview
Quickly bring your app to life with less code, using a modern declarative approach to UI, and the simplicity of Kotlin. ... Start...
Read more >
App version management
Learn about different version types and how to manage them remotely or locally. Android and iOS each expose two values that identify the...
Read more >
android - How can you get the Manifest Version number ...
Easiest solution is to use BuildConfig . I use BuildConfig. VERSION_NAME in my application. You can also use BuildConfig.
Read more >
An assembly specified in the application dependencies ...
I was able to resolve the issue by downgrading Microsoft.AspNetCore.All from 2.0.5 to 2.0.3, but would like to find a better solution to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found