Skip to content
mattlaver edited this page Aug 26, 2012 · 11 revisions

This is a fork of the StyleCop-MonoDevelop-Addin project with the following code changes:

  • Updated for MonoDevelop 3.0.3.5
  • Changed the code violations from Errors to Warnings
  • Added a few more notes about installing

As with the master project installing requires the following:

  1. Build the project and copy the dlls into the MonoDevelop Addin Directory, on my Mac this is located here:

Users<username>\Library\Application Support\MonoDevelop-3.0\LocalInstall\Addins\MonoDevelop.StyleCop\

*You'll need to create the above MonoDevelop.StyleCop directory.

  1. Tweak the registry permissions

StyleCop uses the registry when run under Mono and needs to read and write a file called last-btime. On my Mac this was located:

/Library/Frameworks/Mono.framework/Versions/2.10.9/etc/mono/4.0/../registry/

The permissions were changed by using chmod on the file:

sudo chmod 777 last-btime

Known Issues

Issue 1: I've still got an ongoing issue with StyleCop creating the StyleCopViolations.xml file so the following error message appears in the Build Output every time StyleCop is run:

"1 violations encountered. Could not save the violations file. An exception occurred: Access to the path "//StyleCopViolations.xml" is denied."

It's annoying but not a showstopper for me.

Issue 2: The latest version of StyleCop is 4.7 and I'd like to use it but have had some issues with it so for the time being I'm sticking with this older version of the StyleCop dll.

I'll continue to tinker with this but it'll be a back burner project.

Clone this wiki locally