The path is empty. (Parameter 'path')
See original GitHub issueHaving an issue generating the report. The project is SDK format but references older projects. When I run’
(actual paths omitted)
dotnet test "....csproj" --configuration Release --filter Category!=IntegrationTest --logger:trx --results-directory "...\TestResults" --settings "....runsettings" /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura /p:CoverletOutput="....Tests.cobertura.xml"
I get the following error
Calculating coverage result… Generating report ‘…Tests.cobertura.xml’ ….nuget\packages\coverlet.msbuild\2.8.0\build\coverlet.msbuild.targets(36,5): error : The path is empty. (Parameter ‘path’) […Tests.csproj] …nuget\packages\coverlet.msbuild\2.8.0\build\coverlet.msbuild.targets(36,5): error : at System.IO.Path.GetFullPath(String path) […Tests.csproj] ….nuget\packages\coverlet.msbuild\2.8.0\build\coverlet.msbuild.targets(36,5): error : at System.IO.Directory.GetDirectoryRoot(String path) […Tests.csproj] …nuget\packages\coverlet.msbuild\2.8.0\build\coverlet.msbuild.targets(36,5): error : at System.Linq.Lookup
2.Create(IEnumerable
1 source, Func2 keySelector, IEqualityComparer
1 comparer) […Tests.csproj] ….nuget\packages\coverlet.msbuild\2.8.0\build\coverlet.msbuild.targets(36,5): error : at System.Linq.GroupedEnumerable2.GetEnumerator() [...Tests.csproj] ...\.nuget\packages\coverlet.msbuild\2.8.0\build\coverlet.msbuild.targets(36,5): error : at System.Linq.Enumerable.SelectEnumerableIterator
2.ToList() […Tests.csproj] ….nuget\packages\coverlet.msbuild\2.8.0\build\coverlet.msbuild.targets(36,5): error : at Coverlet.Core.Reporters.CoberturaReporter.Report(CoverageResult result) in D:\git\coverletToRelease\src\coverlet.core\Reporters\CoberturaReporter.cs:line 34 […Tests.csproj] C:\Users\aharris.nuget\packages\coverlet.msbuild\2.8.0\build\coverlet.msbuild.targets(36,5): error : at Coverlet.MSbuild.Tasks.ReportWriter.WriteReport() in D:\git\coverletToRelease\src\coverlet.msbuild.tasks\ReportWriter.cs:line 50 […Tests.csproj] ….nuget\packages\coverlet.msbuild\2.8.0\build\coverlet.msbuild.targets(36,5): error : at Coverlet.MSbuild.Tasks.CoverageResultTask.Execute() in D:\git\coverletToRelease\src\coverlet.msbuild.tasks\CoverageResultTask.cs:line 145 […Tests.csproj]
This works for several other projects in the solution that don’t have a reference to older projects.
I also noticed I get these warnings when building:
….nuget\packages\coverlet.msbuild\2.8.0\build\coverlet.msbuild.targets(7,5): warning : [coverlet] Unable to instrument module: …Tests\bin\Debug\net472\Microsoft.ReportViewer.Common.dll because : No symbol found for file: …Tests\bin\Debug\net472\Microsoft.ReportViewer.Common.dll […Tests.csproj] …\aharris.nuget\packages\coverlet.msbuild\2.8.0\build\coverlet.msbuild.targets(7,5): warning : [coverlet] Unable to instrument module: …Tests\bin\Debug\net472\Microsoft.ReportViewer.WebForms.dll because : No symbol found for file: …Tests\bin\Debug\net472\Microsoft.ReportViewer.WebForms.dll […Tests.csproj]
Issue Analytics
- State:
- Created 3 years ago
- Comments:22
Top GitHub Comments
Yes seems the
CoverageResult
has aDocument
with a empty path. I could add a check for this but I’m not sure if theCoberturaReporter
is the right place for this. I guess the other reporters could also have a problem with such aCoverageResult
. So @Adam-RapidRTC a repro would help a lot to tackle this issue.Hi @daveMueller, I got the “The path is empty. (Parameter ‘path’)” when I use coverlet.console 3.2.0 in my test projects. I tried replace the files using your package and the error is gone!. When this fix will be officially released?