-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Fixed incorrect dotnet build configuration #14247
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 | ||
|
|
||
| - task: DotNetCoreCLI@2 | ||
| displayName: 'dotnet build' | ||
| inputs: | ||
| command: 'build' | ||
| arguments: '--configuration $(buildConfiguration)' | ||
|
v-dirichards marked this conversation as resolved.
|
||
|
|
||
|
Comment on lines
+677
to
+687
|
||
| - task: DotNetCoreCLI@2 | ||
| displayName: 'dotnet test' | ||
| inputs: | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
includePreviewVersions: truewill allow preview SDKs to be installed, which can make builds non-reproducible and isn’t needed whenversion: '8.x'targets the stable .NET 8 SDK. Either removeincludePreviewVersions(or set it tofalse) 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 withperformMultiLevelLookup: true.