简体   繁体   English

fxcop自定义规则不起作用

[英]fxcop custom rule is not working

I have created the custom rule using Microsoft FxCop 1.36 in visual studio 2010 and I pasted the custom rule dll in the C:\\Program Files\\Microsoft FxCop 1.36\\Rules folder. 我已在Visual Studio 2010中使用Microsoft FxCop 1.36创建了自定义规则,并将自定义规则dll粘贴到了C:\\Program Files\\Microsoft FxCop 1.36\\Rules文件夹中。

Then I opened Microsoft Fxcop. 然后,我打开了Microsoft Fxcop。 I am getting error as the following.. 我收到以下错误。

Unable to load rule assembly 'C:\\Users\\user\\Documents\\Visual Studio 2010\\Projects\\MyCustomRule\\MyCustomRule\\bin\\Debug\\MyCustomRule.dll': Could not load file or assembly 'file:///C:\\Users\\user\\Documents\\Visual Studio 2010\\Projects\\MyCustomRule\\MyCustomRule\\bin\\Debug\\MyCustomRule.dll' or one of its dependencies. 无法加载规则程序集'C:\\ Users \\ user \\ Documents \\ Visual Studio 2010 \\ Projects \\ MyCustomRule \\ MyCustomRule \\ bin \\ Debug \\ MyCustomRule.dll':无法加载文件或程序集'file:/// C:\\ Users \\ user \\ Documents \\ Visual Studio 2010 \\ Projects \\ MyCustomRule \\ MyCustomRule \\ bin \\ Debug \\ MyCustomRule.dll”或其依赖项之一。 This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded. 该程序集是由比当前加载的运行时新的运行时构建的,无法加载。

If any one knows about it please tell me... 如果有人知道,请告诉我...

Thanks in advance 提前致谢

The runtime (.net version) you are using to compile the fxcop rule does not match the runtime you are running fxcop on. 您用于编译fxcop规则的运行时(.net版本)与运行fxcop的运行时不匹配。 Your compiling runtime is most certainly higher than your runtime for execution. 您的编译运行时肯定要比执行时要高。 Adjust the .net version of your rule solution to match the solution which is checked against the rule. 调整规则解决方案的.net版本以匹配根据规则检查的解决方案。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM