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.

VSTest task fails to execute tests in .NET Core 2.0 test project

See original GitHub issue

If I provide a .NET Core 2.0 test project DLL as input to the VSTest task (version 2.0.70), I encounter the following error: 2017-08-21T07:42:45.2798678Z Warning: Unable to load types from the test source 'C:\Agent1\_work\34\s\Tests.NetCore\bin\Release\netcoreapp2.0\Tests.NetCore.dll'. Some or all of the tests in this source may not be discovered.

Indeed, no tests from this assembly are actually executed. The same tests are executed without issues via VS 2017 test explorer.

VS 2017 update 3 and .NET Core SDK 2.0.0 are installed.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:53 (11 by maintainers)

github_iconTop GitHub Comments

13reactions
IvanAlekseevcommented, Sep 15, 2017

Today I’ve found that coverage is now displayed correctly for .net core project

ivan 2017-09-15 11-30-34

This is what I had to do to make it work ivan 2017-09-15 11-32-45

7reactions
eriawancommented, Mar 12, 2018

any plan to support .NETCore 2.0 unit tests?

Because if I run vstest.console /? I get these info below:

--Framework|/Framework:<Framework Version> Target .Net Framework version to be used for test execution. Valid values are ".NETFramework,Version=v4.5.1", ".NETCoreApp,Version=v1.0" etc. Other supported values are Framework35, Framework40, Framework45 and FrameworkCore10.

And it says it only supports FrameworkCore10. Will there be FrameworkCore20 or related TFM support for .NET Core 2.0 unit tests available build-in the vstest.console.exe?

cc @PBoraMSFT

Read more comments on GitHub >

github_iconTop Results From Across the Web

Tests do run and are all OK, but test section fails
I have a DLL (.NET Standard 2.0) which is tested with unit tests contained in a test project (.NET Core 2.1) These tests...
Read more >
VSTest@2 - Visual Studio Test v2 task - Microsoft Learn
Use this task to run unit and functional tests (Selenium, Appium, Coded UI test, etc.) using the Visual Studio Test (VSTest) runner.
Read more >
VSTest-Task not running .NET Core 2.1 xUnit-Tests from Test ...
What I'm using: Azure DevOps (formerly VSTS); Visual Studio Test task (v2.*); Test project targeting .NET Core 2.1; xunit 2.4 with xunit.runner.
Read more >
Problems with .NET unit testing - Rider Support | JetBrains
JetBrains Rider automatically detects unit tests and provides a unit test runner to run and debug them. We are continuously improving...
Read more >
Getting started: .NET Core with command line > xUnit.net
NET 5 ), showing you how to write and run your first set of unit tests. Download the .NET SDK; Create the unit...
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