问题详情
一个新实现的基于 TUnit 的单元测试项目,用 dotnet test 命令运行测试,出现下面的错误:
Testing with VSTest target is no longer supported by Microsoft.Testing.Platform on .NET 10 SDK and later. If you use dotnet test, you should opt-in to the new dotnet test experience
请问如何解决?
回答
在项目根目录中创建 global.json 文件并添加下面的内容即可解决
{
"test": {
"runner": "Microsoft.Testing.Platform"
}
}
版权:言论仅代表个人观点,不代表官方立场。转载请注明出处:https://www.stntk.com/question/2708.html
还没有评论呢,快来抢沙发~