在调试模式下观察变量时出现FileNotFoundException(FileNotFoundException while watching variables in debug mode)
我有这段代码(我到处都有问题)
当我调试这个时,打破函数,尝试观察一些变量。 而且我一直收到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); } }
但是“丢失的”DLL在文件夹中,它不是只读或Windows具有的任何其他标志。
I have this piece of code (well I have the issue everywhere)
When I debug this, break in the funcion, try to watch some variables. And I keep getting a 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); } }But the "missing" DLL is in the folder, it's not readonly or any other flags Windows has.
最满意答案
必须激活Use managed compatibility mode
Use managed compatibility mode has to be activated
更多推荐
发布评论