StyleCop by Resharper Plugin - How to enable only for 1 solution - resharper

We have a VS solution which has StyleCop configured.
Because I do use ReSharper I wanted my scaffolding to work alongside stylecop. Fortunately there is a plugin named "StyleCop by Resharper Plugin".
After installing "StyleCop by Resharper Plugin" every VS solution that I open will be proofchecked according to "some" stylecop rules.
For me this is confusing as only one solution has Stylecop.settings file, and the analyzers package installed.
How to make stylecop proofcheck only the configured solution.
P.S. I don't want to include ignores in all my solutions because of one project using stylecop.

If you are using Visual Studio 2015 or 2017 then you could use the StyleCop.Analyzers NuGet package that will use the Roslyn analyzers. This can then be applied per project.

Related

Using custom extension (/x) in resharper 9.0 command line inspection

So I've got a custom nuget package I build which is installed in vs2013 through the ReSharper extension manager interface. I remember back with resharper 8.2 I could specify a plugin parameter /plugin=xxx.dll to import a custom plugin but with the updated command line tools for resharper 9.0 it seems that the only way is to provide a package Id from the ReSharper Gallery.
Does this mean that my custom package with a unique id can't be imported unless I put it on the ReSharper Gallery? Are the command line inspections now dependent on Visual Studio and ReSharper being installed?
quite confused, if anyone has any docs pertaining to this or info would be super helpful, this is all I could find.
Thanks for the help!
Edit: Plugin & Extensions mean the same thing in this context
I am afraid, this functionality was lost in 9.0 release (really both ways to use plugins in CLT are broken).

Where has nuget support in Resharper 9 gone?

I recently updated Resharper to version 9.0. Now I noticed that adding references by Resharper context menu does no longer update the packages.config file, thus breaking the match between referenced DLLs and installed packages.
For older versions of Resharper, this functionality was provided by a plugin, but the plugin does not seem to support Resharper 9.0. Also, I am unable to find something similar through the Resharper Extension Manager.
What is the correct way to add Nuget packages to packages.config when adding references with Resharper 9.0?
NuGet support was shipped as a bundled plug-in in ReSharper 8. Currently this plugin is still not adopted to ReSharper 9, so you have to wait till it will become compatible, sorry.
But it will become compatible relatively soon, hopefully.
Update: According to the creator of the plugin, this functionality will be shipped with Resharper 9.1, see this issue for the announcement.
That means with Resharper 9.0 we have to keep the packages.config in sync with the references manually.

Temporarily disable StyleCop warnings on ReSharper 6

I downloaded StyleCop 4.6.3 which integrates with ReSharper 6 and the results are really fantastic!
However on a specific project I would like to disable the StyleCop warnings (temporarily) and enable again later on.
Is there any way of doing this? I can't seem to find it on the ReSharper menu (options, etc).
You can use different Settings.Stylecop settings for each project, just create one that ignores all the rules. Right click on a project and select Stylecop settings to modify them.
I think you can also disable plugins by unticking them from ReSharper->Plugins... (in version 5.1, not sure if it's the same in 6.0)

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 ?
Just an update for ReSharper 9:
To install ReSharper & StyleCop together follow these steps:
Close all Visual Studio Applications (Important!!).
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.
Download the stylecop msi file from here: https://stylecop.codeplex.com/releases/view/79972
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.
Open Visual studio and there should be a new menu item in the top menu bar called ReSharper. Select Extension Manager…
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.
Follow the basic installation instructions for this add-on.
Restart visual studio.
All done!!
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.

Get Resharper to Consume StyleCop configuration

Our project already has a StyleCop configuration. I am using ReSharper and I would like to be able to have R# use the StyleCop settings.
I know that you can use StyleCopForResharper to build the settings in Resharper and export them as a StyleCop configuration, but can you do the reverse and have Resharper consume the existing StyleCop config?
I am not sure is this post still actual. There is free StyleCop for ReSharper at CodePlex.
It uses StyleCop assembly so it will use project file settings.
I don't know of any way to do this, but it is possible for R# to layout your members/properties/methods etc. to comply with StyleCop. Check out my blog post at http://stevedunns.blogspot.com/2009/03/halt-this-is-stylecop-you-are-in.html.
HTH.
Steve

Resources