Custom rules not working under VS2010

May 14, 2011 at 6:08 PM
Edited May 14, 2011 at 6:08 PM

I am using StyleCop only via MSBuild. Custom rules are also working fine for VS2005 but for VS2010 Express for Phone I get:

"Operation not supported"?

May 16, 2011 at 11:10 AM

Is this a Nerdbank issue?

May 16, 2011 at 7:25 PM

Did you unblock the DLL after downloading?

May 18, 2011 at 6:58 PM
andyr wrote:

Is this a Nerdbank issue?

Not sure ... same configuration works for VS2005 via MSBuild but not for VS2010 Express (StyleCop+ works for both scenarios)

shuruev wrote:

Did you unblock the DLL after downloading?

Ähm ... unblock? What do you mean? (Info: the same DLL works for VS2005 but not for VS2010 Express - do I need to "unblock" it for VS2010?)

D'oh, wait!! I assume VS2010 using another MSBuild than VS2005 ... I'll give it a try asap (when I have access to that environment - tomorrow, I hope) - but wondering that StyleCop+ already works for both ... - I'll let you know the result (maybe I am a fool ;-) ...)


May 30, 2011 at 4:39 PM

Had to re-install my Windows Fista Ultimate installation (Fista couldn't access the system HDD after some minutes - booting in safe mode where no problems so I was able to backup my work etc.).

The new/clean installation solved lot of other problems too. Including this one ;-)

Question: Shuruev.StyleCop.CSharp.Rules.dll references log4net.dll. But I haven't the log4net assembly (e.g dotPeek says UNRESOLVED of course). But why does it work even log4net.dll is missing? I am missing some knowledge? Exists there something like "delay load" like in the native world?

May 30, 2011 at 7:24 PM
hfrmobile wrote:
Shuruev.StyleCop.CSharp.Rules.dll references log4net.dll.

No, it doesn't reference anything except StyleCop.
Why could you think that?

P.S. It also seems you're still using 4.4. Did you think about upgrading?

Best regards,
Oleg Shuruev

May 31, 2011 at 5:29 PM

Ups, sorry for the confusion. Made a mistake and lost the overview about StyleCop and custom rules ... Mea culpa!

NerdBank custom rules assembly is referencing log4net.dll: dotPeek

I'll ask Andrew Arnott (developer of NerdBank rules) how this works.

App Host Coordinator Developer
StyleCop Codeplex andyr Oleg Shuruev
StyleCop for ReSharper Codeplex andyr cnash, JamesD, ...
StyleCop+ CodePlex Oleg Shuruev
NerdBank - Andrew Arnott

I was wondering that there is no developer for StyleCop+?

--Harald-René Flasch (aka hfrmobile)

May 31, 2011 at 5:46 PM

For those interested, Nerdbank.StyleCop.Rules.dll has a soft dependency on log4net.dll (its presence is not required, but it is used when present).

Details here:

May 31, 2011 at 7:24 PM

Thanks a lot for that magic information :-) Cool idea!