Skip to content

Fixed incorrect dotnet build configuration#14247

Open
szelpe wants to merge 2 commits intoMicrosoftDocs:mainfrom
szelpe:patch-2
Open

Fixed incorrect dotnet build configuration#14247
szelpe wants to merge 2 commits intoMicrosoftDocs:mainfrom
szelpe:patch-2

Conversation

@szelpe
Copy link
Copy Markdown

@szelpe szelpe commented Feb 22, 2025

The documentation incorrectly used the configuration input parameter as the built command does not use that parameter.

The documentation incorrectly used the configuration input parameter as the built command does not use that parameter.
@prmerger-automator
Copy link
Copy Markdown
Contributor

@szelpe : Thanks for your contribution! The author(s) have been notified to review your proposed change.

@ttorble
Copy link
Copy Markdown
Contributor

ttorble commented Feb 24, 2025

@juliakm

Can you review the proposed changes?

IMPORTANT: When the changes are ready for publication, adding a #sign-off comment is the best way to signal that the PR is ready for the review team to merge.

#label:"aq-pr-triaged"
@MicrosoftDocs/public-repo-pr-review-team

@juliakm
Copy link
Copy Markdown
Collaborator

juliakm commented Apr 21, 2026

#assign-reviewer:ramiMSFT

@prmerger-automator prmerger-automator Bot requested a review from ramiMSFT April 21, 2026 14:53
@juliakm
Copy link
Copy Markdown
Collaborator

juliakm commented Apr 21, 2026

#reassign:ramiMSFT

@prmerger-automator prmerger-automator Bot assigned ramiMSFT and juliakm and unassigned juliakm Apr 21, 2026
@prmerger-automator
Copy link
Copy Markdown
Contributor

@szelpe : Thanks for your contribution! The author(s) and reviewer(s) have been notified to review your proposed change.

@v-dirichards
Copy link
Copy Markdown
Contributor

@ramiMSFT Can you review this old PR and determine whether it needs to be closed or merged?

IMPORTANT: When the changes are ready for publication, add a #sign-off comment to signal that the PR is ready for the review team to merge. If the changes no longer apply, add an explanation and a #please-close comment to close the PR.

@MicrosoftDocs/public-repo-pr-review-team

Copy link
Copy Markdown
Contributor

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

Updates the .NET pipeline documentation example for running tests and publishing Coverlet code coverage, aiming to correct how build configuration is specified in the YAML snippet.

Changes:

  • Adds a UseDotNet@2 step to install the .NET SDK before running Coverlet-based tests.
  • Adds a DotNetCoreCLI@2 dotnet build step with --configuration $(buildConfiguration) before dotnet test.

Comment on lines +677 to +687
- task: UseDotNet@2
inputs:
version: '8.x'
includePreviewVersions: true # Required for preview versions

- task: DotNetCoreCLI@2
displayName: 'dotnet build'
inputs:
command: 'build'
arguments: '--configuration $(buildConfiguration)'

Copy link

Copilot AI Apr 21, 2026

Choose a reason for hiding this comment

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

The YAML snippet starts directly with task entries, so if a reader pastes it into a new azure-pipelines.yml file as instructed, the pipeline will be invalid because tasks must be nested under steps: (and typically a pool:/trigger: are also shown or elided with # ...). Consider adding a steps: line (and optional # ...) to make the snippet self-contained and copy/pasteable.

Copilot uses AI. Check for mistakes.
- task: UseDotNet@2
inputs:
version: '8.x'
includePreviewVersions: true # Required for preview versions
Copy link

Copilot AI Apr 21, 2026

Choose a reason for hiding this comment

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

includePreviewVersions: true will allow preview SDKs to be installed, which can make builds non-reproducible and isn’t needed when version: '8.x' targets the stable .NET 8 SDK. Either remove includePreviewVersions (or set it to false) for this general-purpose example, or change the example to explicitly show a preview version and align with the earlier guidance in this article that pairs preview installs with performMultiLevelLookup: true.

Suggested change
includePreviewVersions: true # Required for preview versions

Copilot uses AI. Check for mistakes.
Comment thread docs/pipelines/ecosystems/dotnet-core.md
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.

6 participants