0

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.

Then I opened 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. 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

Charlie
  • 11,380
  • 19
  • 83
  • 138
Kavya Reddy
  • 5
  • 1
  • 4

1 Answers1

0

The runtime (.net version) you are using to compile the fxcop rule does not match the runtime you are running fxcop on. 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.

caldis
  • 226
  • 1
  • 9
  • Please supply more information. Which runtime are you using? Which runtime is configured in your .csproj file? – caldis Jun 16 '13 at 20:49