【问题标题】:Visual Studio 2017 Enterprise xUnit not showing CodeLens for testsVisual Studio 2017 Enterprise xUnit 未显示用于测试的 CodeLens
【发布时间】:2017-08-26 16:37:50
【问题描述】:

我有 VS2017 Enterprise,我开发 .NET Core 应用程序并使用 xUnit 进行测试。但我没有看到为我的任何测试启用 CodeLens。我检查了 CodeLens 设置,一切都打开了。这是一个已知问题还是我遗漏了什么?

【问题讨论】:

    标签: visual-studio xunit codelens


    【解决方案1】:

    这似乎是一个错误:

    如果您创建一个新文件并编写一些测试,CodeLens 将显示这些测试中使用的方法。如果您关闭 Visual Studio 并重新打开它,CodeLens 将停止工作。

    我找不到解决方法。

    【讨论】:

      【解决方案2】:

      这是一个已知错误,您可以在 GitHub issue list for xunit.net 上看到。

      它已在当前处于测试阶段的 2.3 版本中得到修复。我所做的是检查 Visual Studio 2017 nuget 包管理器 gui 中的“include prerelease”复选框。然后我转到该对话框中的更新选项卡并安装了最新版本(当前 2.3.0-beta4-build3742)。之后 CodeLens 支持再次开始工作

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2017-04-11
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多