Skip to content

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 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.

2 participants