Skip to content
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

[BUG]: PublishCodeCoverageResults complains "Can't find loc string for key: InstallDotNetCoreForPublishing" #19225

Closed
1 of 4 tasks
Porges opened this issue Nov 6, 2023 · 6 comments

Comments

@Porges
Copy link
Member

Porges commented Nov 6, 2023

Task name

PublishCodeCoverageResults

Task version

2.229.0

Environment type (Please select at least one enviroment where you face this issue)

  • Self-Hosted
  • Microsoft Hosted
  • VMSS Pool
  • Container

Azure DevOps Server type

dev.azure.com (formerly visualstudio.com)

Azure DevOps Server Version (if applicable)

No response

Operation system

Ubuntu 20.04 ARM64

Task log

2023-11-06T05:55:18.9342371Z ##[section]Starting: PublishCodeCoverageResults
2023-11-06T05:55:18.9348362Z ==============================================================================
2023-11-06T05:55:18.9348716Z Task         : Publish code coverage results v2
2023-11-06T05:55:18.9348961Z Description  : Publish any of the code coverage results from a build
2023-11-06T05:55:18.9349332Z Version      : 2.229.0
2023-11-06T05:55:18.9349449Z Author       : Microsoft Corporation
2023-11-06T05:55:18.9349654Z Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/test/publish-code-coverage-results
2023-11-06T05:55:18.9350243Z ==============================================================================
2023-11-06T05:55:19.8281402Z Found 1 result(s) matching pattern: /mnt/vss/_work/1/a/lcov.info
2023-11-06T05:55:19.8285296Z /mnt/vss/_work/1/a/lcov.info
2023-11-06T05:55:19.8340445Z ##[warning]Can't find loc string for key: InstallDotNetCoreForPublishing
2023-11-06T05:55:19.8349455Z ##[warning]InstallDotNetCoreForPublishing
2023-11-06T05:55:19.8354881Z ##[section]Finishing: PublishCodeCoverageResults

Relevant log output

2023-11-06T05:55:19.8340445Z ##[warning]Can't find loc string for key: InstallDotNetCoreForPublishing
2023-11-06T05:55:19.8349455Z ##[warning]InstallDotNetCoreForPublishing

Aditional info

We're seeing this only on the Linux (Ubuntu 20.04) ARM64 variant of our build. Windows/AMD64 and Linux/AMD64 are unaffected.
@xernaj
Copy link

xernaj commented Nov 15, 2023

Ran into the same issue on a linux vmss pool. I missed the bit in the doco that says you need to "use .net core". Did you happen to include that task before running publish code coverage results? https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/reference/publish-code-coverage-results-v2?view=azure-pipelines#prerequisites

@Porges
Copy link
Member Author

Porges commented Nov 20, 2023

Tasks should really be self-contained and not rely on the user installing things on the machine. Again, this isn't happening on our Windows or AMD64 Linux builds, only ARM64.

Copy link

This issue is stale because it has been open for 180 days with no activity. Remove the stale label or comment on the issue otherwise this will be closed in 5 days

@Clemens-E
Copy link

This is not resolved.
I agree that the tasks should be self-contained, but at the very least the documentation should be more clear and the message should be translated. As of right now, it lists no demands or prerequisites.

Work around: PublishCodeCoverageResults@1 seems to do its job just fine without dot net

@rw-SebastianSzemer
Copy link

rw-SebastianSzemer commented Mar 25, 2025

PublishCodeCoverageResults@1 does not merge the results.
I did add
- task: UseDotNet@2
just before
- task: PublishCodeCoverageResults@2
and i'm still getting the warning

Edit:
the issue was only on self hosted machine

@gurrajatwal
Copy link

I added the following task to resolve this error in my pipeline.

- task: UseDotNet@2
    displayName: 'Use .Net 8.0'
    inputs:
      packageType: 'sdk'
      version: '8.0.x'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants