我正在获得异常“错误:CA0054:加载规则'RuleName'时出错:调用目标已抛出异常。”在FxCop中 [英] i am getting exception "error : CA0054 : Error loading rule 'RuleName': Exception has been thrown by the target of an invocation." in FxCop

查看:74
本文介绍了我正在获得异常“错误:CA0054:加载规则'RuleName'时出错:调用目标已抛出异常。”在FxCop中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一些自定义FxCop规则。当我运行该规则时,它给出以下异常。

有人可以指导我吗?





praj

i have created some custom FxCop rules. when i am running that rules its giving following exception.
can anyone guide me regarding this?


praj

推荐答案

错误加载规则主要是由于规则定义文件中的某些错误而发生的。请确保以下内容



1.检查XML标记的正确性是否区分大小写

2.确保填写必要的属性/ xml标记例如缺少元文件中规则定义中的解析将始终抛出此异常。

3.规则类的构造函数中将相同的规则名称传递给BaseIntrospectionRule类。
Error loading rule is mostly occurs due to some error in rule definition file. Please make sure the following

1. Check correctness of XML tags for case sensitiveness
2. Ensure necessary attributes/xml tags are filled in for e.g. missing Resolution in rule definition in meta file will always throw this exception.
3. Same rule name is passed in constructor of rule class to "BaseIntrospectionRule" class.


这篇关于我正在获得异常“错误:CA0054:加载规则'RuleName'时出错:调用目标已抛出异常。”在FxCop中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆