Skip to content

[build] introduce $(PackageVersionSuffix) for dotnet/android #259

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

Merged
merged 1 commit into from
Jul 23, 2025

Conversation

jonathanpeppers
Copy link
Member

This allows dotnet/android to add a -preview.$(PackVersionCommitCount) suffix for any .nupkg packages produced by this repo.

This allows dotnet/android to add a `-preview.$(PackVersionCommitCount)`
suffix for any `.nupkg` packages produced by this repo.
@jonathanpeppers jonathanpeppers requested a review from Copilot July 23, 2025 13:41
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces support for adding version suffixes to NuGet packages by implementing a $(PackageVersionSuffix) property in the build system. This change enables dotnet/android to append preview version suffixes (like -preview.$(PackVersionCommitCount)) to package versions while maintaining the base version structure.

  • Modifies the SetVersion target to concatenate $(PackageVersionSuffix) to the base version when setting PackageVersion

@jonathanpeppers jonathanpeppers merged commit 68ea438 into main Jul 23, 2025
2 checks passed
@jonathanpeppers jonathanpeppers deleted the dev/peppers/PackageVersionSuffix branch July 23, 2025 13:44
jonathanpeppers added a commit to dotnet/android that referenced this pull request Jul 23, 2025
Context: dotnet/android-tools#259

This adds the suffix:

    <PackageVersionSuffix>-preview.$(PackVersionCommitCount)</PackageVersionSuffix>

In order to allow the package to be published as a "transport" package
with a non-stable version:

    packages\microsoft.dotnet.arcade.sdk\10.0.0-beta.25367.5\tools\SdkTasks\PublishArtifactsInManifest.proj(124,5): error :
    Package 'Xamarin.Android.Tools.AndroidSdk' has stable version '1.0.104' but is targeted at a non-isolated feed 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet10/nuget/v3/index.json'
jonathanpeppers added a commit to dotnet/android that referenced this pull request Jul 23, 2025
Context: dotnet/android-tools#259

This adds the suffix:

    <PackageVersionSuffix>-preview.$(PackVersionCommitCount)</PackageVersionSuffix>

In order to allow the package to be published as a "transport" package
with a non-stable version:

    packages\microsoft.dotnet.arcade.sdk\10.0.0-beta.25367.5\tools\SdkTasks\PublishArtifactsInManifest.proj(124,5): error :
    Package 'Xamarin.Android.Tools.AndroidSdk' has stable version '1.0.104' but is targeted at a non-isolated feed 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet10/nuget/v3/index.json'

I also set this logic to only run when `$(IsPacking)` is true, as
there are build ordering problems during `make prepare` without
doing this. The bootstrap tasks `.dll`'s don't exist then.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant