c# - 在 Debug模式下观察变量时出现 FileNotFoundException

标签 c# .net exception filenotfoundexception

我有这段代码(我到处都有问题)

当我调试它时,中断函数,尝试观察一些变量。我不断收到 FileNotFoundException

    public void PayrollActivityCodeTest()
    {
        using(var pr = new ActivityCodeProcess())
        {
            pr.Add();
            pr.WorkingEntity.PayrollConfiguration.Provinces = PayrollProvincesType.QC | PayrollProvincesType.ON;

            pr.WorkingEntity.ActivityCodeId = "01";
            //pr.WorkingEntity.Rates.CodeByProvinceCollection.First().CodeValueCollection.FirstOrDefault().Value
            Assert.AreEqual(2, pr.WorkingEntity.Rates.CodeByProvinceCollection.Count);
        }
    }

enter image description here

但是“丢失的”DLL 位于文件夹中,它不是只读的或 Windows 具有的任何其他标志。

enter image description here

最佳答案

Use managed compatibility mode 必须激活 enter image description here

关于c# - 在 Debug模式下观察变量时出现 FileNotFoundException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36720180/

相关文章:

c# - ASP.NET - CSS 到 ImageButton 下的中心标签?

.NET 可执行流程演练

python (2.7): Error Handling in __init__ with Sensitive Information

java - 你能弄清楚为什么这个程序会触发 IllegalStateException 吗?

c# - 我需要为 ASP.NET MVC 编写 Ajax 的技巧

c# - Azure函数: configure blob trigger only for new events

c# - 在运行时测试传入的 ByRef 参数是否与给定的 "other"变量共享存储位置

c# - 多对多 EF Core 关系 - 为什么它尝试将实体插入到不同的表中?

c# - 无法处理指定情况时在 switch 语句中抛出异常

c# - 如何将通用对象作为方法参数传递