ExecutionTimer.cs not found when stepping into code

半腔热情 提交于 2020-06-25 07:40:32

问题


I am writing some tests using XUnit framework and have to use some external code referenced through a dll.

When I try to step into the method call, helper.GetEntity(), I get the following window and the execution exists.

[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");
}

Does anyone know why this is happening?

Regards.


回答1:


(posting @camilo-terevinto's comment as answer)

Turn on 'Enable Just My Code' in Visual Studio | Tools | Debugging | General.




回答2:


So I have been also struggling for 2 days with this one and nothing what I have found online helped me, but the answer of @pauldendulk guided me to the solution. Under Options -> Debbuging -> Just-in-Time I noticed that the "Managed" check box was unmarked and there was an warning label saying something like "multiple debuggers manes code ... please repair Visual Studio to restore ..." (sorry I didn't capture a screen shot and don't remember the right wording, but it was with that context).

After running repai of Visual Studio 2017 (Community Edition) via the "Visual Studio Installer" the test debugging worked like expected.



来源:https://stackoverflow.com/questions/48110573/executiontimer-cs-not-found-when-stepping-into-code

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!