a) 在VSCode的设置中添加以下代码块:
"csharp.referencesCodeLens.enabled": true, "editor.codeLens": true
b) 确认你的.vscode文件夹中是否有launch.json和tasks.json文件。如果没有,请按照以下步骤创建这些文件:
dotnet new launchsettings -o .vscode
dotnet new tasks -o .vscode
c) 重新启动VSCode。你现在应该可以在CodeLens中运行和调试C#测试用例了。
d) 如果你仍然无法运行或调试C#测试用例,请尝试在VSCode的集成终端中运行以下命令:
dotnet test
这可以帮助你确定是否有任何测试用例没有正确配置或运行。