Comments (4)
I've compared the two files generated by the .NET 8 runtime and .NET 7 Runtime. For some reason the filename in the .NET 8 generated one is a url to devops not an actual file path.
.NET 7
<class name="MyProject.CopyRequest" filename="C:\agent\my-agent\_work\1\s\src\MyProject\CopyRequest.cs" line-rate="1" branch-rate="1" complexity="1">
.NET 8
<class name="MyProject.CopyRequest" filename="https://dev.azure.com/MyOrg/MyProject/_apis/git/repositories/my-repo/items?api-version=1.0&versionType=commit&version=CommitHash&path=/src/MyProject/CopyRequest.cs" line-rate="1" branch-rate="1" complexity="1">
from azure-pipelines-tasks.
The link being output appears to be a result of using the SourceLink
flag. However unsetting this flag does not seem to fix the issue it changes the filename to be a relative path MyProject\CopyRequest.cs
in .NET 8 where as it is a fully qualified path in .NET 7. In either case it seems like this was changed in .NET 8 and this task does not account for the change. I'm not sure if this should be addressed by the publish task, the .NET sdk or coverlet?
<?xml version="1.0" encoding="utf-8" ?>
<RunSettings>
<DataCollectionRunSettings>
<DataCollectors>
<DataCollector friendlyName="XPlat Code Coverage">
<Configuration>
<Format>cobertura,opencover</Format>
<UseSourceLink>true</UseSourceLink>
<SkipAutoProps>true</SkipAutoProps>
</Configuration>
</DataCollector>
</DataCollectors>
</DataCollectionRunSettings>
</RunSettings>
from azure-pipelines-tasks.
It looks like setting DeterministicReport
true will revert the functionality to use a fully qualified path in .NET 8. However this flag is only supported by cobertura and not open cover. My particular configuration requires both as Sonar Cloud does not support cobetura. It really seems like this task needs to be updated to handle the path format change introduced via .NET 8 SDK.
from azure-pipelines-tasks.
I was able to to resolve this by just using the opencover format which is supported by PublishCodeCoverageResults@2 but not documented. The documentation page for this task https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/reference/publish-code-coverage-results-v2?view=azure-pipelines does not appear to list what formats are supported.
from azure-pipelines-tasks.
Related Issues (20)
- [enhancement]: Allow configure Kubernetes@x task output as secret
- [BUG]: Invoke-Sqlcmd : Could not load file or assembly 'Azure.Core, Version=1.6.0.0, Culture=neutral HOT 1
- [Question]: AzureRmWebAppDeployment@4 and XmlTransform - should it work when using stages?
- [BUG]:Nothing will be added to build artifact file HOT 1
- [BUG]: Azure IoT Edge v2 - Failed to fetch container registry authentication token HOT 7
- [enhancement]: jdk source add microsoft option
- [BUG]: The system cannot find the file specified
- [REGRESSION]: Azure file copy fails on one Agent in Pool HOT 3
- [enhancement]: Run Maven@4 task in detached mode
- [BUG]: DockerCompose task compatibility mode issue HOT 9
- [BUG]: AzurePowerShell@5 does not set environment variables on Windows HOT 1
- [REGRESSION]: DockerCompose@0 no longer supports default projectName for GitHub Repostitories HOT 9
- [REGRESSION]: Secrets cannot contain multiple lines npmAuthenticate HOT 7
- [BUG]: Object parameter between pipeline and template converts "3.10" to "3.1" HOT 4
- [BUG]: Passing tests using "DynamicData" not recognized as passed in test run
- [BUG]: Gradle task Code analysis failed if test task has failures HOT 1
- [Question]: Why is mvn clean enforced for code coverage?
- [REGRESSION]: AzurePowerShell@5 - Failed to Initialize Existing Az modules HOT 2
- [BUG]: UseDotNet@2 with global.json installs incorrect SDK version HOT 2
- [BUG]: DTAExecutionHost.exe failed with code 1 - Error occurred while publishing the test results : OutOfMemoryException
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from azure-pipelines-tasks.