question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

The path is empty. (Parameter 'path')

See original GitHub issue

Having 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.Lookup2.Create(IEnumerable1 source, Func2 keySelector, IEqualityComparer1 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.SelectEnumerableIterator2.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:closed
  • Created 3 years ago
  • Comments:22

github_iconTop GitHub Comments

1reaction
daveMuellercommented, Apr 1, 2020

@daveMueller seem an issue here https://github.com/tonerdo/coverlet/blob/master/src/coverlet.core/Reporters/CoberturaReporter.cs#L166 do you have any idea?

Yes seems the CoverageResult has a Document with a empty path. I could add a check for this but I’m not sure if the CoberturaReporter is the right place for this. I guess the other reporters could also have a problem with such a CoverageResult. So @Adam-RapidRTC a repro would help a lot to tackle this issue.

0reactions
TerryChan2commented, Mar 22, 2023

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?

Read more comments on GitHub >

github_iconTop Results From Across the Web

asp.net core - aspnet-codegenerator error: "path is empty"
The path is empty. (Parameter 'path') [Trace]: at System.IO.Path.GetFullPath(String path) at System.IO.Enumeration.
Read more >
Bot gets "System exception at initialization: The path is ...
I could not find other posts related to this 'path' error message. System exception at initialization: The path is empty. (Parameter 'path') at ......
Read more >
Server SDK fails when the app is published as a Self ...
Start(ServerManager, null, ServerManager);. The stacktrace is the following: ... ArgumentException: The path is empty. (Parameter 'path') at System.IO.Path.
Read more >
Path template for the path is empty
Issue ID: semantic-parameter-path-name-empty. Description. The path template for the path in question is empty and has not been defined.
Read more >
Argument 'Path' is Nothing or empty - Visual Basic
In this article. To correct this error; See also. A path name is not valid because it is initialized to Nothing or is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found