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.

Could not write lines to file CoverletSourceRootsMapping - in use by another process

See original GitHub issue

Our build process with coverlet > 3.0 tends to fail with an error like this:

C:\Users\VssAdministrator\.nuget\packages\coverlet.collector\3.0.4-preview.25\build\netstandard1.0\coverlet.collector.targets(48,5): error MSB3491: Could not write lines to file "..\..\_tests\net5.0\linux-musl-arm64\CoverletSourceRootsMapping". The process cannot access the file 'D:\a\1\s\_tests\net5.0\linux-musl-arm64\CoverletSourceRootsMapping' because it is being used by another process. [D:\a\1\s\src\NzbDrone.Host.Test\Radarr.Host.Test.csproj]
  Radarr.Windows.Test -> D:\a\1\s\_tests\net5.0\linux-musl-x64\publish\

I suspect this is because we have a centralized output directory (not one per project).

  <PropertyGroup>
    <!-- Output to _output and _tests respectively -->
    <OutputPath Condition="'$(RadarrProject)'=='true'">$(RadarrRootDir)_output\</OutputPath>
    <OutputPath Condition="'$(RadarrOutputType)'=='Test'">$(RadarrRootDir)_tests\</OutputPath>
  </PropertyGroup>

Can this be worked around at all?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:8
  • Comments:33

github_iconTop GitHub Comments

5reactions
MarcoRossignolicommented, Aug 6, 2022

This fix is not yet merged…I’m having some hassle on tests and I’m a bit busy, I’ll try to work on it asap.

4reactions
MarcoRossignolicommented, May 24, 2022

Not yet, I’m having issue with this fix in CI…I need to investigate a bit more.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Could not write lines to file CoverletSourceRootsMapping
Our build process with coverlet > 3.0 tends to fail with an error like this:
Read more >
Build error: "The process cannot access the file because it ...
Win Key + R and run resmon.exe . There you'll find the EXE process that VS claims to be using the file. Right...
Read more >
MSB3491: Could not write lines to file 'filename'. - MSBuild
This error occurs when MSBuild tries to write to a file, but the operating system returns an error.
Read more >
coverlet
Coverlet is a cross platform code coverage framework for .NET, with support for line, branch and method coverage. It works with .NET Framework...
Read more >
Could not write lines to file "\.tlog\CustomBuildStep.read.1u ...
With VS2010 this worked fine. But with VS2017 I now get: error MSB3491: Could not write lines to file “<CONF><PROJ>.tlog\CustomBuildStep.read ...
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