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

v3 packages cause VSCode 'codelens' debugging to become unavailable (tests are otherwise discovered okay) #433

Closed
kieranbenton opened this issue Dec 28, 2024 · 11 comments

Comments

@kieranbenton
Copy link

Reproduction at: https://github.com/kieranbenton/MyFirstUnitTests

Steps:

image
  • Follow the v2 -> v3 migration steps (leaving the old package references commented out in csproj)
image
  • dotnet clean, dotnet build - test is still discoverable in 'Testing' panel but the code lens actions AREN'T available
image
  • Swap the package references back, dotnet clean + dotnet build - and its trivial to get the codelens support back

Nothing particularly smoking-gun esque in logs that I can find:

Tests removed: /Users/kieranbenton/Source/kaizenticketing/MyFirstUnitTests/bin/Debug/net9.0/MyFirstUnitTests.dll
Tests are available, running test discovery: /Users/kieranbenton/Source/kaizenticketing/MyFirstUnitTests/bin/Debug/net9.0/MyFirstUnitTests.dll
Scheduling discovery: /Users/kieranbenton/Source/kaizenticketing/MyFirstUnitTests/bin/Debug/net9.0/MyFirstUnitTests.dll [1735404920350]
========== Starting test discovery ==========
[xUnit.net 00:00:00.00] xUnit.net VSTest Adapter v3.0.0+e341b939fe (64-bit .NET 9.0.0)
[xUnit.net 00:00:00.26]   Discovering: MyFirstUnitTests
[xUnit.net 00:00:00.37]   Discovered:  MyFirstUnitTests
========== Test discovery finished: 1 Tests found in 590 ms ==========
1 tests discovered from /Users/kieranbenton/Source/kaizenticketing/MyFirstUnitTests/bin/Debug/net9.0/MyFirstUnitTests.dll in 590.0289 ms
@bradwilson
Copy link
Member

I believe this is a VS Code issue and should be opened there.

@kieranbenton
Copy link
Author

kieranbenton commented Dec 31, 2024 via email

@bradwilson
Copy link
Member

Sorry, I have no insight into how the test explorer functionality in VS Code works, but the fact that the tests are detected and runnable and it's only the Code Lens functionality that disappears, should be enough of a starting place for them, I hope.

@kieranbenton
Copy link
Author

Hi @bradwilson, the vscode guys have closed the bug I opened I'm afraid - they seem to have given some insight as to where the issue is in the extension though?

microsoft/vscode#237197 (comment)

@bradwilson
Copy link
Member

I'll see what I can do.

@bradwilson
Copy link
Member

I just responded on your other issue, but I can't reopen it. You'll have to do that.

@bradwilson
Copy link
Member

Can you please try to reproduce the issue with 3.0.1-pre.7? https://xunit.net/docs/using-ci-builds

@bradwilson
Copy link
Member

Because I'm not sure whether I've fixed it and just misunderstood what the issue is, or what. 😂

@bradwilson
Copy link
Member

I will also try on macOS, see if it's OS environmental.

@bradwilson
Copy link
Member

I do actually think this is fixed now. And I feel pretty dumb asking why they thought the fixed thing was broken. 😂

@kieranbenton
Copy link
Author

Tested with the pre-release - sorted! Thanks @bradwilson !

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

No branches or pull requests

2 participants