Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

937
Vistas
dotnet test is unable to find a datacollector with friendly name 'Code Coverage'

A few months ago, when our projects were still in .NET 4.7.2, we used to run unit tests on our Azure DevOps Server using the Visual Studio Test task. We used parameter Test files to specify which test assemblies need to run and Code Coverage worked just fine there.

Since we migrated our projects to .NET 5.0, we use dotnet test to run unit tests and now Code Coverage doesn't work anymore.

Here's an example:

D:\test-2-1\_tool\dotnet\dotnet.exe test A.Test.dll B.Test.dll C.Test.dll --logger trx --results-directory D:\test-2-1\_temp --settings D:\test-2-1\5\s\.runsettings
Microsoft (R) Test Execution Command Line Tool Version 16.9.4
Copyright (c) Microsoft Corporation.  All rights reserved.

Starting test execution, please wait...
A total of 22 test files matched the specified pattern.
Data collection : Unable to find a datacollector with friendly name 'Code Coverage'.
Data collection : Could not find data collector 'Code Coverage'

Content of .runsettings

<DataCollectionRunSettings>
    <DataCollectors>
        <DataCollector friendlyName="Code Coverage" uri="datacollector://Microsoft/CodeCoverage/2.0" assemblyQualifiedName="Microsoft.VisualStudio.Coverage.DynamicCoverageDataCollector, Microsoft.VisualStudio.TraceCollector, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
            <Configuration>
                <CodeCoverage>
                    <ModulePaths>
                        <Include>
                            <ModulePath>{someRegexToLimitCodeCoverageToSpecificTestAssemblies}</ModulePath>
                        </Include>
                    </ModulePaths>
                </CodeCoverage>
            </Configuration>
        </DataCollector>
    </DataCollectors>
</DataCollectionRunSettings>

In another smaller project, Code Coverage still works, but here we specify which project files should be tested, rather than which compiled test assemblies.

Is this the way to go now and if yes, is it possible to get it back to work with specifying test assemblies too?

Thanks in advance!

over 4 years ago · Santiago Trujillo
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda