unable to load xxx dll. The assembly contains no fxcop rules

I wrote some custom FxCop rules today and it was working fine for a while with FxCop 1.35. But suddenly, everything stopped working. My rules were still working within Visual Studio 2005 IDE (Code Analysis feature), but it just wouldn’t load in FxCop. It would always give me the error :- unable to load xxx dll. The assembly contains no fxcop rules.

I read quite a few posts on this. Some suggested that the namespace of my rules.xml file should match my project’s namespace etc etc. Nothing seemed to work.

 Finally, I found out that all I had to do was remove the References to FxCopSdk.dll and Microsoft.Cci.dll and add them back from this folder C:\Program Files\Microsoft FxCop 1.35. As soon as I did it, everything started working magically.

Advertisements

2 thoughts on “unable to load xxx dll. The assembly contains no fxcop rules

  1. Check out you have embedded XML rules file as a resource file or another problem could be you are not using full name(without extension) of resource file in the parameters of constructor of the class which inherits from BaseIntrospectionClass

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s