Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/amazon-s3/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
.net fxcop自定义规则不起作用_.net_Code Analysis_Fxcop - Fatal编程技术网

.net fxcop自定义规则不起作用

.net fxcop自定义规则不起作用,.net,code-analysis,fxcop,.net,Code Analysis,Fxcop,我在visual studio 2010中使用Microsoft FxCop 1.36创建了自定义规则,并将自定义规则dll粘贴到C:\Program Files\Microsoft FxCop 1.36\Rules文件夹中 然后我打开了微软Fxcop。我得到如下错误 无法加载规则程序集“C:\Users\user\Documents\Visual Studio 2010\Projects\MyCustomRule\MyCustomRule\bin\Debug\MyCustomRule.dll”

我在visual studio 2010中使用Microsoft FxCop 1.36创建了自定义规则,并将自定义规则dll粘贴到
C:\Program Files\Microsoft FxCop 1.36\Rules
文件夹中

然后我打开了微软Fxcop。我得到如下错误

无法加载规则程序集“C:\Users\user\Documents\Visual Studio 2010\Projects\MyCustomRule\MyCustomRule\bin\Debug\MyCustomRule.dll”:无法加载文件或程序集file:///C:\用户\user\Documents\Visual Studio 2010\Projects\MyCustomRule\MyCustomRule\bin\Debug\MyCustomRule.dll'或其依赖项之一。此程序集由比当前加载的运行时更新的运行时生成,因此无法加载

如果有人知道,请告诉我

提前感谢

您用来编译fxcop规则的运行时(.net版本)与您运行fxcop的运行时不匹配。您的编译运行时肯定高于您的执行运行时。
调整规则解决方案的.net版本,以匹配根据规则检查的解决方案

请提供更多信息。您正在使用哪个运行时?在.csproj文件中配置了哪个运行时?