tags:

views:

293

answers:

4

Resharper includes various analysis rules which can be run on your solution from inside Visual Studio but is it possible to run these from say the commandline or as part of your autobuild? Resharper seems to be focused on running in Visual Studio but can it be invoked on solution or project files from outside the IDE?

+2  A: 

I think you want the functionality provided by fxCop. I am not aware of Resharper functioning outside of Visual Studio.

Matthew Vines
I was looking to not have my "rules" (such as naming conventions) be represented both in Resharper and in FxCop/StyleCop and I already like Resharper, thus the question on running it outside of the IDE
soren.enemaerke
Yeah, I definitely get that. I was just presenting you with an option, since I was pretty sure you were going to get a lot of "no" answers.
Matthew Vines
A: 

No, it can not be run from commandline. I still hope that they add this feature since I requested it last october :)

tanascius
+6  A: 

No, this feature is not currently offered by ReSharper. There is a thread on the JetBrains website related to this question and it can be found here.

Here's a quote:

Currently ReSharper has no interface from running in a standalone batch application. However, it is possible to write such an application that provides the functionality you're looking for using ReSharper OpenAPI.

So apparently you could use the ReSharper OpenAPI to create the functionality you want; unfortunately, I haven't had any experience in using it so I'm not much help there.

Some links of interest...

ReSharper OpenAPI Developer Community
ReSharper public API and sample source code (aka. ReSharper PowerToys)

Steve Dignan
A: 

If you're looking for compliance of code to standards, take a look at StyleCop. You can tie it into msbuild and run the rules outside of the IDE.

Troy Hunt

related questions