c# - 单步执行代码时未找到 ExecutionTimer.cs

标签 c# xunit.net

我正在使用 XUnit 框架编写一些测试,并且必须使用一些通过 dll 引用的外部代码。

当我尝试进入方法调用 helper.GetEntity() 时,出现以下窗口并退出执行。

[Fact]
public void PassingTest()
{
    var datapointJson = File.ReadAllText(@"sample.json");
    dynamic datapointObject = JsonConvert.DeserializeObject(datapointJson);

    // This is referenced from a different project in the same solution.
    var helper = new Helper.Actions();
    var studentEntity = helper.GetEntity("tom");
}

Execution.cs not found

有人知道为什么会这样吗?

最佳答案

(发布@camilo-terevinto 的评论作为回答)

在 Visual Studio 中启用“仅启用我的代码”|工具 |调试 |一般。

enter image description here

关于c# - 单步执行代码时未找到 ExecutionTimer.cs,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48110573/

相关文章:

c# - 这样的php系统要转成C#怎么办?

c# - LINQ 如何向这条语句添加一个 order by?

C# 设置问题。

unit-testing - NUnit、MbUnit、MSTest、xUnit.net

exception - F# 单元测试错误 : xUnit.net/TestDriven.Net

c# - .NET:考虑夏令时

c# - C++ 中 cv::Rectangle 的问题

asp.net-core - Xunit 无法使用 Visual Studio Team Services Build VNext 工作

amazon-web-services - .Net Core DynamodDB 使用 XUnit 进行单元测试

c# - 无法使用 Xunit 在异步方法中断言异常