Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xUnit Test-Discovery seems not be working with Preview 2 in VS 2017 Preview (1 and 2) #871

Closed
livarcocc opened this issue Jun 16, 2017 · 3 comments

Comments

@livarcocc
Copy link

From @WernerMairl on June 16, 2017 17:21

Not sure where i should post this issue (xUnit, VisualStudio, Cli) => please move on the right place
please advice if i can provide more/other informations/traces

Steps to reproduce

"Visual Studio Enterprise 2017 Preview (2) Version 15.3.0 Preview 2.0"
plus
https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/2.0.0-preview2/dotnet-sdk-latest-win-x64.exe

Expected behavior

Test Explorer should list some tests

Actual behavior

0 tests
no exception/additional messages in "Show Output from Tests"

Additional findings:

uninstalling dotnet cli Preview2
re-installing Preview 1 (2.0.0-preview1-005977)
solves the problem i can see all my tests- it looks like the problem correlates with preview 2
Not able to solve the problem by

  • updateing nuget packages ,
  • clear some VS-TestExtension Caches
    etc..

The same problem with two different projects => Preview1 working, Preview2 not working....
Attention: i'm using the newest VS 2017 Update "Preview 2" ....
But i had the same problem with the VS 2017 Preview 1!

My test.csproj is simple:
https://gist.github.com/WernerMairl/e8f2728d7717869c8ab3816c68fbe0a0

Pure cli "dotnet test" is working, the issue is about VS-Test Discovery!

Environment data

dotnet --info output:
dotnet --info
.NET Command Line Tools (2.0.0-preview2-006470)

Product Information:
Version: 2.0.0-preview2-006470
Commit SHA-1 hash: 4ea3671bbd

Runtime Environment:
OS Name: Windows
OS Version: 10.0.14393
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\2.0.0-preview2-006470\

Microsoft .NET Core Shared Framework Host

Version : 2.0.0-preview2-25407-01
Build : 40c565230930ead58a50719c0ec799df77bddee9

Copied from original issue: dotnet/cli#6910

@codito
Copy link
Contributor

codito commented Jun 22, 2017

Looks like same issue as #847.

@WernerMairl we've fixed it for next update of VS 2017 15.3. Please try the following steps if you're blocked on the issue:

  • Rename attached file to vsix and try. TestPlatform.vsix.zip
  • Please take a backup of C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise\Common7\IDE\Extensions\TestPlatform just in case.

@WernerMairl
Copy link

It works!
Thank you!!

Retested with CLI/SDK

2.0.0-preview2-006470
2.0.0-preview2-006502

regards
Werner

@darewreck54
Copy link

@codito I can't seem to get it to work with the official release of asp.net core from command line. "dotnet test" cannot find the xunit test.

using Microsoft.AspNetCore 2.0.0
Microsoft.NET.Test.sdk 15.3.0

I posted the bug here #1034

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants