cake-contrib / Cake.Recipe

:page_with_curl: A set of convention based Cake scripts
https://cake-contrib.github.io/Cake.Recipe
MIT License
70 stars 53 forks source link

No coverage is reported for net5.0 test projects #863

Closed nils-a closed 2 years ago

nils-a commented 3 years ago

For test projects that target net5.0 and not netcoreappX.Y coverage always fails with

No results, this could be for a number of reasons. The most common reasons are:
    1) missing PDBs for the assemblies that match the filter please review the
    output file and refer to the Usage guide (Usage.rtf) about filters.
    2) the profiler may not be registered correctly, please refer to the Usage
    guide and the -register switch.

The reason being here that dotnet test is used for NET Core projects and OpenCover is used for NET Framework projects in combination with https://github.com/cake-contrib/Cake.Incubator/issues/116 which leads to net5.0 projects being treated as NET Framework projects. Hence Cake.Recipe assumes that OpenCover should be used for net5.0 projects.

So we need to wait for a fix of https://github.com/cake-contrib/Cake.Incubator/issues/116 and afterwards update the reference to Cake.Incubator.

nils-a commented 2 years ago

Closing this, since it's an exact duplicate of #797