When I run the dotnet test task, the tests run correctly but when generating the report file in xml format I get the following error:
/home/adminuser/.nuget/packages/coverlet.msbuild/2.3.1/build/netstandard2.0/coverlet.msbuild.targets(17,5): error : Method not found: 'Void System.IO.FileStream..ctor(System.String, System.IO.FileMode, System.IO.FileAccess, System.IO.FileShare)'.
The project configuration file (.csproj) is as follows:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="coverlet.msbuild" Version="2.3.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.6.1" />
<PackageReference Include="MSTest.TestAdapter" Version="2.1.2" />
<PackageReference Include="MSTest.TestFramework" Version="2.1.2" />
<PackageReference Include="NSubstitute" Version="4.2.2" />
</ItemGroup>
</Project>
Note: The pipeline was running fine but from one moment to the next it started generating the following error