在调试模式下观察变量时出现FileNotFoundException

时间:2016-04-19 13:39:23

标签: 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

1 个答案:

答案 0 :(得分:2)

必须激活

Use managed compatibility mode enter image description here