在调试模式下观察变量时出现FileNotFoundException(FileNotFoundException while watching variables in debug mode)

编程入门 行业动态 更新时间:2024-10-27 14:20:39
在调试模式下观察变量时出现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 enter image description here

更多推荐

本文发布于:2023-07-16 03:59:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1123451.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:变量   模式下   FileNotFoundException   watching   debug

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!