Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

StyleCop For Resharper - Where's It Gone

Im a great fan of resharper, and used to use the stylecop for resharper plugin a while back. I wanted to use it again today but the stylecop for resharper codeplex site says that stylecop for resharper is now integrated into stylecop.

So I installed stylecop (4.6), but my resharper (5.1) appears to be unchanged. I particularly liked using the code formatting settings that were included in the stylecop for resharper package (I think the file was 'StyleCopCodeStyle.xml', which could be used in the resharper options to set the code formatting and cleanup behaviour) - this xml file is now gone.

Am I missing something. Theres zero doumentation about this stylecop/resharper marriage, and I clueless as to what I am actually getting

Can anyone shed some light on this ?

like image 228
Dean Chalk Avatar asked Jan 19 '23 02:01

Dean Chalk


2 Answers

Just an update for ReSharper 9:

To install ReSharper & StyleCop together follow these steps:

  1. Close all Visual Studio Applications (Important!!).
  2. Install ReSharper by double clicking the executable and following the installation process. This step will require administration rights (most likely). The precise steps to follow are unknown as they are likely to be different in the trial versus full version.
  3. Download the stylecop msi file from here: https://stylecop.codeplex.com/releases/view/79972
  4. Install it by double clicking and following a standard install process. NOTE: It might be required to move the install files into a different directory from C: because otherwise if the user does not have administration rights they will not be able to supress rules.
  5. Open Visual studio and there should be a new menu item in the top menu bar called ReSharper. Select Extension Manager… enter image description here
  6. A new window should open with a list of all of the possible extensions for resharper. Search (top right of the window) for “ReSharper.StyleCop” and press the install button.
  7. Follow the basic installation instructions for this add-on.
  8. Restart visual studio.
  9. All done!!
like image 53
Adrian773 Avatar answered Jan 22 '23 09:01

Adrian773


On the StyleCop project home page, it is quite clearly states that StyleCop 4.5 is the version that is compatible with Resharper 5.1.

like image 24
Nicole Calinoiu Avatar answered Jan 22 '23 10:01

Nicole Calinoiu