Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set application version properties for Maui projects #848

Merged
merged 1 commit into from
Oct 22, 2022
Merged

Conversation

AArnott
Copy link
Collaborator

@AArnott AArnott commented Oct 22, 2022

Closes #828

@AArnott AArnott added this to the v3.6 milestone Oct 22, 2022
@AArnott
Copy link
Collaborator Author

AArnott commented Oct 22, 2022

@espenrl Can you confirm that this works for you? If you can't confirm from this PR directly, you should be able to consume from our CI feed once this PR is merged as per the readme instructions.

@espenrl
Copy link

espenrl commented Oct 22, 2022

It's great you're including MAUI support into the library. I guess one must take into account MacOS and Tizen also to cover the full range of MAUI. I've added a comment about MacOS. I will investigate Tizen.

@espenrl
Copy link

espenrl commented Oct 22, 2022

It seems like MAUI Tizen doesn't use ApplicationVersion / ApplicationDisplayVersion at all. It simply reads what's in the manifest file Platforms/Tizen/tizen-manifest.xml

So while the following code will alter the version in the output package filename (TizenPackageVersion), I'll have to guess the manifest is embedded with another version. Major issue. This is is stark contrast to Windows, iOS, MacOS and Android where the manifest file is updated according to ApplicationVersion / ApplicationDisplayVersion.

Let's skip Tizen support for now.

<Target Name="NBGV_SetVersionfForMauiTizen"
          Condition="'$(TargetPlatformIdentifier)' == 'tizen'"
          BeforeTargets="_TizenResolveTpkPackageName"
          DependsOnTargets="GetBuildVersion">
    <PropertyGroup>
      <ApplicationVersion>$(BuildVersionSimple)</ApplicationVersion>
      <ApplicationDisplayVersion>$(BuildVersionSimple)</ApplicationDisplayVersion>
      <TizenPackageVersion>$(BuildVersionSimple)</TizenPackageVersion>
    </PropertyGroup>
</Target>

Please see _TizenGetTpkInfoFromManifest

https://github.com/Samsung/Tizen.NET/blob/4e822dbbe2f9d483badc608257a9e3ca9118010d/workload/src/Samsung.Tizen.Sdk/targets/Samsung.Tizen.Sdk.Packaging.targets#L137-L153

@espenrl
Copy link

espenrl commented Oct 22, 2022

Maybe the target names could be something along the lines of NBGV_SetVersionForMauiAndroid.

I'll test the functionality once there's a NuGet package on the CI feed.

@AArnott
Copy link
Collaborator Author

AArnott commented Oct 22, 2022

Sounds good. Let me know when/if you have something to work for Tizen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Versioning issue with MAUI
2 participants