You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Test run fails on netcoreapp1.0 targeted tests #466
When running tests on linux (in Azure Pipelines at least) with code coverage turned on...
dotnet test src --no-build -c Release --filter "TestCategory!=FailsInCloudTest" -v n -l trx /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura
The build log shows this failure when the tests run on .NET Core 1.0:
[xUnit.net 00:00:01.64] System.IO.FileNotFoundException : Could not load file or assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file specified.
[xUnit.net 00:00:01.64] Stack Trace:
[xUnit.net 00:00:01.64] at Coverlet.Core.Instrumentation.Tracker.Nerdbank.Streams_42ec0704-f64b-48c0-a903-a8b9be93bc98.RecordHit(Int32 )
[xUnit.net 00:00:01.64] D:\a\1\s\src\Nerdbank.Streams\Sequence`1.cs(43,0): at Nerdbank.Streams.Sequence`1..ctor()
[xUnit.net 00:00:01.64] D:\a\1\s\src\Nerdbank.Streams.Tests\BufferWriterStreamTests.cs(25,0): at BufferWriterStreamTests..ctor(ITestOutputHelper logger)
Yes I did some check and the issue seem mainly 2 packages Mono.Cecil 0.10.1 Microsoft.Extensions.FileSystemGlobbing 2.0.1
that are supported only on netstandard2.0 and collector tfm is netcoreapp2.0
@vagisha-nidhi is there are reason to not build collector lib for netstandard2.0?
If so we could update guide to report that minimal support is netstandard2.0 runtimes.
@MarcoRossignoli Although the coverlet integration for now will be working for only .NET Core projects, that might be the reason of not making this netstandard targeted.
@AArnott maybe with some updates we could support on netstandard1.3 with downgrade to FileSystemGlobbing and removing ExcludeFromCodeCoverageAttribute usage on tracker template and skip "by hand".
C:\git\coverlet (master -> origin)
λ dotnet build
Microsoft (R) Build Engine version 16.1.76+g14b0a930a7 for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.
Restore completed in 57,49 ms for C:\git\coverlet\src\coverlet.console\coverlet.console.csproj.
Restore completed in 58,5 ms for C:\git\coverlet\test\coverlet.collector.tests\coverlet.collector.tests.csproj.
Restore completed in 57,73 ms for C:\git\coverlet\src\coverlet.collector\coverlet.collector.csproj.
Restore completed in 54,64 ms for C:\git\coverlet\test\coverlet.testsubject\coverlet.testsubject.csproj.
Restore completed in 60,71 ms for C:\git\coverlet\src\coverlet.msbuild.tasks\coverlet.msbuild.tasks.csproj.
Restore completed in 60,67 ms for C:\git\coverlet\src\coverlet.core\coverlet.core.csproj.
Restore completed in 60,36 ms for C:\git\coverlet\test\coverlet.core.performancetest\coverlet.core.performancetest.csproj.
Restore completed in 60,41 ms for C:\git\coverlet\test\coverlet.core.tests\coverlet.core.tests.csproj.
Restore completed in 25,52 ms for C:\git\coverlet\test\coverlet.core.tests\coverlet.core.tests.csproj.
Instrumentation\ModuleTrackerTemplate.cs(16,6): error CS0122: 'ExcludeFromCodeCoverageAttribute' is inaccessible due to its protection level [C:\git\coverlet\src\coverlet.core\coverlet.core.csproj]
coverlet.testsubject -> C:\git\coverlet\test\coverlet.testsubject\bin\Debug\netcoreapp2.0\coverlet.testsubject.dll
Build FAILED.
Instrumentation\ModuleTrackerTemplate.cs(16,6): error CS0122: 'ExcludeFromCodeCoverageAttribute' is inaccessible due to its protection level [C:\git\coverlet\src\coverlet.core\coverlet.core.csproj]
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:03.60
@AArnott following up https://twitter.com/aarnott/status/1147714360757719041 I wonder if make sense for coverlet support framework out of LTS.
It's true that coverage is a "cross" activity and support old code could be a plus, maybe multitargeting.
Activity
[-]Build fails [/-][+]Test run fails on netcoreapp1.0 targeted tests[/+]MarcoRossignoli commentedon Jun 12, 2019
Yes I did some check and the issue seem mainly 2 packages
Mono.Cecil 0.10.1Microsoft.Extensions.FileSystemGlobbing 2.0.1that are supported only on
netstandard2.0and collector tfm isnetcoreapp2.0@vagisha-nidhi is there are reason to not build collector lib for
netstandard2.0?If so we could update guide to report that minimal support is
netstandard2.0runtimes.vagisha-nidhi commentedon Jun 12, 2019
@MarcoRossignoli Although the coverlet integration for now will be working for only .NET Core projects, that might be the reason of not making this
netstandardtargeted.MarcoRossignoli commentedon Jun 12, 2019
Fair I agree, is there a plan to support netfx?
vagisha-nidhi commentedon Jun 12, 2019
cc: @cltshivash @PBoraMSFT
AArnott commentedon Jun 12, 2019
I just checked, and Mono.Cecil actually targets netstandard1.3. Why do you say it requires netstandard2.0?
Also, an older version of Microsoft.Extensions.FileSystemGlobbing supports netstandard1.3 as well.
So maybe .NET Core 1.0 could be supported?
MarcoRossignoli commentedon Jun 12, 2019
We use version https://github.com/tonerdo/coverlet/blob/master/src/coverlet.core/coverlet.core.csproj#L19 https://www.nuget.org/packages/Microsoft.Extensions.FileSystemGlobbing/2.0.1 for FileSystemGlobbing
For Cecil you're right...I misread...btw I retry because I get error on build moving to 1.0
EDIT: I had tested with netstandard1.0
Package Mono.Cecil 0.10.1 is not compatible with netstandard1.0with 1.3 it's ok.MarcoRossignoli commentedon Jun 12, 2019
@AArnott maybe with some updates we could support on
netstandard1.3with downgrade to FileSystemGlobbing and removingExcludeFromCodeCoverageAttributeusage on tracker template and skip "by hand".MarcoRossignoli commentedon Jul 8, 2019
@AArnott following up https://twitter.com/aarnott/status/1147714360757719041 I wonder if make sense for coverlet support framework out of LTS.
It's true that coverage is a "cross" activity and support old code could be a plus, maybe multitargeting.
cc: @tonerdo
AArnott commentedon Jul 8, 2019
I'm planning to cut support for it from my libraries at this point.
tonerdo commentedon Jul 11, 2019
I'm on board with cutting out support for < netstandard2.0
MarcoRossignoli commentedon Jul 11, 2019
So I think that we can close this for the moment.
Removed Coverlet flags from netcoreapp1.1 tests