Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions docs/pipelines/ecosystems/dotnet-core.md
Original file line number Diff line number Diff line change
Expand Up @@ -674,6 +674,17 @@ To run tests and publish code coverage with Coverlet:
1. Add the following snippet to your *azure-pipelines.yml* file. Don't add extra `DataCollectionRunSettings` arguments because the `XPlat Code Coverage` collector already produces a Cobertura report.

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

- task: DotNetCoreCLI@2
displayName: 'dotnet build'
inputs:
command: 'build'
arguments: '--configuration $(buildConfiguration)'
Comment thread
v-dirichards marked this conversation as resolved.

Comment on lines +677 to +687
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: DotNetCoreCLI@2
displayName: 'dotnet test'
inputs:
Expand Down