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
I have a library that is multi-targeting .NET 4.7 and .NET Standard 2.0. It uses the newer project SDK format. I also have a unit test project associated with it that is targeting only .NET 4.7.
When using VSTS's VSTest task to run tests against this solution it reports the framework incorrectly and fails to run some tests.
Steps to reproduce
Create a solution containing a class library multi-targeting .NET 4.7 and .NET Standard 2.0.
Create a unit test project that targets .NET 4.7 and optionally .NET Core 2.1.
Run VSTest (in a VSTS build) against the solution.
The reported framework it sees is incorrect and therefore it skips test assemblies it shouldn't.
Actual behavior
When it sees netcoreapp2.0\unittest.dll it reports it as Framework 2.1 so it'll get skipped when running .NET 4.7. The test runer properly says it is looking for 4.7 framework.
The more interesting scenario is when the unit test supports both. In this case it still sees the .NET Core 2.1 app as Framework 2.1. But it also causes the test runner to say it is targeting Framework 4.0 and platform x86 which causes it to skip all tests because the unit test project is .NET 4.7.
@CoolDadTx
Currently we don't have .NET core test support using Visual Studio Test task. It supports only .NET desktop/full tests only.
Please refer this issue for more details - microsoft/azure-pipelines-tasks#5066
We are actively working on this to enable full support for .NET core tests however we don't have exact timelines to share at this moment.
Description
I have a library that is multi-targeting .NET 4.7 and .NET Standard 2.0. It uses the newer project SDK format. I also have a unit test project associated with it that is targeting only .NET 4.7.
When using VSTS's VSTest task to run tests against this solution it reports the framework incorrectly and fails to run some tests.
Steps to reproduce
Create a solution containing a class library multi-targeting .NET 4.7 and .NET Standard 2.0.
Create a unit test project that targets .NET 4.7 and optionally .NET Core 2.1.
Run VSTest (in a VSTS build) against the solution.
This results in an output structure of:
net47\lib.dll
netstandard2.0\lib.dll
net47\unittest.dll
netcoreapp2.0\unittest.dll
Expected behavior
The reported framework it sees is incorrect and therefore it skips test assemblies it shouldn't.
Actual behavior
When it sees netcoreapp2.0\unittest.dll it reports it as Framework 2.1 so it'll get skipped when running .NET 4.7. The test runer properly says it is looking for 4.7 framework.
The more interesting scenario is when the unit test supports both. In this case it still sees the .NET Core 2.1 app as Framework 2.1. But it also causes the test runner to say it is targeting Framework 4.0 and platform x86 which causes it to skip all tests because the unit test project is .NET 4.7.
Diagnostic logs
Attached
Environment
VSTest 2.*
MS Test 1.3.2
log_7_634.zip
The text was updated successfully, but these errors were encountered: