Skip to content

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

Description

@ta264

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?

Metadata

Metadata

Labels

as-designedExpected behaviourneeds reproNeeds repro to be investigated, cannot repro in local

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions