Could not write lines to file CoverletSourceRootsMapping - in use by another process
See original GitHub issueOur 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:
- Created 2 years ago
- Reactions:8
- Comments:33
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.
Not yet, I’m having issue with this fix in CI…I need to investigate a bit more.