My custom StyleCop rule is not picked up in Settings.StyleCop

Mar 4, 2011 at 11:56 AM


I am running version 4.4 and followed all the steps in creating a custom rule which gets hold of all the hardcoded urls in the code.

I have even created an xml with exactly the same name as the class and set the build action to "Embedded Resource".

I build the code and put the hardcoded.dll into the folder where the rest of the dlls are located: C:\Program Files\Microsoft StyleCop

However, the settings.stylecop does not pick up the rule.


Could you please help on this issue.




Mar 7, 2011 at 6:49 PM

Make sure that target framework for your rules assembly is ".NET Framework 3.5"

May 24, 2011 at 8:02 AM
Edited May 24, 2011 at 8:03 AM

I'm with and had the same issue.

By default my new project uses "Target framework: .Net Framework 4" and "Platform target: x86". It took me quite some time to find that I simply had to change to "3.5" and "Any CPU".

May 30, 2011 at 4:20 AM

Andy, could we migrate the entire StyleCop to .NET 4? Is there a specific reason why me might need to stay with 3.5?