Automatically Discovered Tests Misses .NET Core Testing Assembly

Mike-EEE's Avatar

Mike-EEE

08 Nov, 2019 08:49 PM

I am attempting to configure our CD/CI, and one of the settings I see is the Automatically Discovered feature of the Test tab in Settings.

This appears to *mostly* work. In our solution we have one test project that results in 3 platform assemblies. These get built according to the log:

```
[00:00:26] Microsoft (R) Build Engine version 16.1.76+g14b0a930a7 for .NET Core
[00:00:26] Copyright (C) Microsoft Corporation. All rights reserved.
[00:00:26]
[00:00:27] Restore completed in 39.97 ms for C:\projects\extendedxmlserializer\test\ExtendedXmlSerializer.Tests\ExtendedXmlSerializer.Tests.csproj.
[00:00:27] Restore completed in 38.49 ms for C:\projects\extendedxmlserializer\src\ExtendedXmlSerializer\ExtendedXmlSerializer.csproj.
[00:00:28] ExtendedXmlSerializer -> C:\projects\extendedxmlserializer\src\ExtendedXmlSerializer\bin\Release\net45\ExtendedXmlSerializer.dll
[00:00:28] ExtendedXmlSerializer -> C:\projects\extendedxmlserializer\src\ExtendedXmlSerializer\bin\Release\netstandard2.0\ExtendedXmlSerializer.dll
[00:00:31] ExtendedXmlSerializer.Tests -> C:\projects\extendedxmlserializer\test\ExtendedXmlSerializer.Tests\bin\Release\net45\ExtendedXmlSerializer.Tests.dll
[00:00:31] ExtendedXmlSerializer.Tests -> C:\projects\extendedxmlserializer\test\ExtendedXmlSerializer.Tests\bin\Release\netcoreapp2.1\ExtendedXmlSerializer.Tests.dll
[00:00:33] ExtendedXmlSerializer.Tests -> C:\projects\extendedxmlserializer\test\ExtendedXmlSerializer.Tests\bin\Release\net471\ExtendedXmlSerializer.Tests.dll
[00:00:33]
[00:00:33] Build succeeded.
[00:00:33] 0 Warning(s)
[00:00:33] 0 Error(s)
[00:00:33]
[00:00:33] Time Elapsed 00:00:06.47
```

Unfortunately it only appears the .NET Framework assemblies get tested, leaving the .NET Core by its lonesome:

```
[00:00:39] Discovering tests...OK
[00:00:39] %xunit20%\xunit.console.x86 "C:\projects\extendedxmlserializer\test\ExtendedXmlSerializer.Tests\bin\Release\net45\ExtendedXmlSerializer.Tests.dll" -appveyor
[00:00:39] xUnit.net Console Runner (32-bit .NET 4.0.30319.42000)
[00:00:40] Discovering: ExtendedXmlSerializer.Tests
[00:00:40] Discovered: ExtendedXmlSerializer.Tests
[00:00:40] Starting: ExtendedXmlSerializer.Tests
[00:00:52] Finished: ExtendedXmlSerializer.Tests
[00:00:52] === TEST EXECUTION SUMMARY ===
[00:00:52] ExtendedXmlSerializer.Tests Total: 354, Errors: 0, Failed: 0, Skipped: 0, Time: 11.129s
[00:00:52] %xunit20%\xunit.console.x86 "C:\projects\extendedxmlserializer\test\ExtendedXmlSerializer.Tests\bin\Release\net471\ExtendedXmlSerializer.Tests.dll" -appveyor
[00:00:52] xUnit.net Console Runner (32-bit .NET 4.0.30319.42000)
[00:00:53] Discovering: ExtendedXmlSerializer.Tests
[00:00:54] Discovered: ExtendedXmlSerializer.Tests
[00:00:54] Starting: ExtendedXmlSerializer.Tests
[00:01:20] Finished: ExtendedXmlSerializer.Tests
[00:01:20] === TEST EXECUTION SUMMARY ===
[00:01:20] ExtendedXmlSerializer.Tests Total: 355, Errors: 0, Failed: 0, Skipped: 0, Time: 11.867s
```
Any guidance on how to get .NET Core tests detected successfully would be greatly appreciated.

  1. 1 Posted by Mike-EEE on 09 Nov, 2019 09:00 AM

    Mike-EEE's Avatar

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac