I have VS2017 Enterprise, I develop .NET Core apps and use xUnit for testing. But I don't see CodeLens enabled for any of my tests. I checked CodeLens settings, everything is turned on. Is this an known issue or am I missing something?
Asked
Active
Viewed 497 times
2 Answers
1
This seems to be a bug:
If you create a new file and write some tests, CodeLens will show up for the methods used in those tests. If you close Visual Studio and reopen it, CodeLens stops working.
I couldn't find a workaround.

Tim Pohlmann
- 4,140
- 3
- 32
- 61
0
This is a known bug as you can see on the GitHub issue list for xunit.net.
It has been fixed in the 2.3 release which is currently in beta. What I did was to check the "include prerelease" checkbox in the Visual Studio 2017 nuget package manager gui. Then I went to the updates tab within that dialog and installed the newest version (currently 2.3.0-beta4-build3742). After that the CodeLens support started to work again

Andre Kraemer
- 2,633
- 1
- 17
- 28