Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 14, 2025

Azure Pipeline now works but no longer adds prerelease suffix to generated NuGet packages.

Changes

Updated the DotNetCoreCLI@2 pack task to use native Azure DevOps task parameters instead of passing everything through the arguments field:

# Before
arguments: '--configuration $(BuildConfiguration) --version-suffix prerelease-$(PipelineDate) --no-build'

# After
configuration: $(BuildConfiguration)
nobuild: true
buildProperties: 'VersionSuffix=prerelease-$(PipelineDate)'

The DotNetCoreCLI@2 task requires using its native parameters for reliable configuration:

  • configuration: Uses the task's built-in configuration parameter
  • nobuild: Uses the task's built-in boolean parameter instead of --no-build flag
  • buildProperties: Uses the task's built-in parameter to pass MSBuild properties like VersionSuffix

This approach follows Azure DevOps best practices and ensures the version suffix is applied correctly.

Result: Packages now published as DigitalRuby.ExchangeSharp.1.2.1-prerelease-{timestamp}.nupkg

Original prompt

This section details on the original issue you should resolve

<issue_title>Azure Pipeline is failing and NuGet package is not being published</issue_title>
<issue_description>It looks like the Azure Pipeline is currently broken, and as a result the latest version is not being packed as NuGet.

Could someone please take a look at the pipeline and fix the issue so we can get the prerelease NuGet package.</issue_description>

<agent_instructions>The pipeline now works after the previous PRs. But now it is not longer adding the prerelease suffix to the NuGets. </agent_instructions>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: vslee <366757+vslee@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix Azure Pipeline to add prerelease suffix to NuGet package Fix prerelease suffix in NuGet package generation Dec 14, 2025
Copilot AI requested a review from vslee December 14, 2025 01:10
@vslee
Copy link
Collaborator

vslee commented Dec 14, 2025

@copilot see the error msg in the "Checks" / "Azure Pipelines" section of this PR

Co-authored-by: vslee <366757+vslee@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Dec 14, 2025

@copilot see the error msg in the "Checks" / "Azure Pipelines" section of this PR

Fixed in commit c3e4164. The issue was that we needed to use the DotNetCoreCLI@2 task's native parameters instead of passing everything through arguments. Now using:

  • configuration parameter instead of --configuration in arguments
  • nobuild: true parameter instead of --no-build in arguments
  • buildProperties: 'VersionSuffix=prerelease-$(PipelineDate)' instead of /p: syntax in arguments

This follows Azure DevOps best practices for the pack task.

@vslee vslee marked this pull request as ready for review December 14, 2025 01:19
@vslee vslee requested a review from jjxtra December 14, 2025 01:19
@vslee vslee merged commit 4743540 into main Dec 14, 2025
4 checks passed
@vslee vslee added the maintenance such as tests label Dec 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance such as tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Azure Pipeline is failing and NuGet package is not being published

3 participants