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.

What is the bare minimum requirements to run Codecov with a .NET Core 2.2.8 application?

See original GitHub issue

We have some “legacy” .NET Core 2.2.8/2.2.207 applications. We’re trying to add codecov before we can migrate up to 3.1.x or 5.x.

When we try and follow the info set out in the coverlet docs/readme, etc … we get the following error:

Starting test execution, please wait… Data collector ‘XPlat code coverage’ message: [coverlet]System.MissingMethodException: Make sure to use .NET core SDK Version >= 2.2.300 —> System.MissingMethodException: Method not found: ‘!!0 Microsoft.VisualStudio.TestPlatform.ObjectModel.DataCollection.SessionStartEventArgs.GetPropertyValue(System.String)’. at Coverlet.Collector.DataCollection.CoverletCoverageCollector.GetPropertyValueWrapper(SessionStartEventArgs sessionStartEventArgs) at Coverlet.Collector.DataCollection.CoverletCoverageCollector.GetTestModules(SessionStartEventArgs sessionStartEventArgs) in //src/coverlet.collector/DataCollection/CoverletCoverageCollector.cs:line 194 — End of inner exception stack trace — at Coverlet.Collector.DataCollection.CoverletCoverageCollector.GetTestModules(SessionStartEventArgs sessionStartEventArgs) in //src/coverlet.collector/DataCollection/CoverletCoverageCollector.cs:line 205 at Coverlet.Collector.DataCollection.CoverletCoverageCollector.OnSessionStart(Object sender, SessionStartEventArgs sessionStartEventArgs) in /_/src/coverlet.collector/DataCollection/CoverletCoverageCollector.cs:line 126.

Here’s a 100% simple repo:

docker pull mcr.microsoft.com/dotnet/core/sdk:2.2.207
docker run --rm -it mcr.microsoft.com/dotnet/core/sdk:2.2.207 /bin/bash
mkdir app
cd app
dotnet new xunit
dotnet add package coverlet.collector --version 1.3.0
dotnet add package microsoft.net.test.sdk
dotnet test --collect:"XPlat Code Coverage"

so we

  • start a docker instance of the .NET Core 2.2.207 SDK
  • create a new xunit project
  • add coverlet.collector
  • updated the Test sdk.
  • test!

so can someone please help / what are we doing wrong?

SIDE NOTE: we understand that 2.2 is not LTS and we’re just not in a position just yet to move the sdk to 2.1 or 3.1 … so we’re hoping it’s easier/quicker to just get our codecov to work (against the existing codebase) instead of doing and SDK migration (which should be an easy thing … but we’ve got processes to follow)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11

github_iconTop GitHub Comments

1reaction
MarcoRossignolicommented, Jun 23, 2021

2.2 is out of support so VSTest team won’t fix this mismatch, also this SDK is out of support https://dotnet.microsoft.com/platform/support/policy/dotnet-core. I’m going to close.

1reaction
PureKromecommented, Feb 7, 2021

Thanks so much @MarcoRossignoli for this! I totally didn’t think of trying the other releases … feels like that was so obvious.

Looking forward to seeing what VSTest team have to say.

Read more comments on GitHub >

github_iconTop Results From Across the Web

C# - Codecov
Getting Started With Codecov and C#. After writing unit tests, integration tests, or other tests with your test suite and generating coverage reports...
Read more >
Terms of Service
In order to use the Service, Customer may be required to use SDKs to send Event Data about Customer Applications to the Service....
Read more >
Download .NET Core 2.2 (Linux, macOS, and Windows)
NET Core 2.2 downloads for Linux, macOS, and Windows. .NET is a free, cross-platform, open-source developer platform for building many different types of ......
Read more >
Quick Start - Codecov
Prerequisites · Access to a repository with GitHub, Bitbucket, or GitLab. If you are a Github user you MUST install the Codecov GitHub...
Read more >
Codecov Self-Hosted Install Guide
Prerequisites to Installing Codecov Self-Hosted ; Basic Ingredients List, 1. Git-based code host (GitHub.com, Github Enterprise, Gitlab Community Edition, Gitlab ...
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