Tag Archives: resharper

Enabling a project to have multiple StyleCop targets.

As the RC is now out for StyleCop 4.5 I wanted to give it a go mainly to see if the ReSharper integration included works with Resharper 6 (unfortunately it doesn’t :(). Unfortunately it includes a breaking-change if you import the StyleCop.targets file (so that violations are shown as either errors or warnings when building the project) as the path has changed.

To enable me to continue to use the 4.5RC version and my workmates to carry on using 4.4 I had to make some changes to the csproj file to cater for both:

<Import Condition="!exists($(StyleCop4_5Path))" Project="$(StyleCop4_4Path)" />
<Import Condition="exists($(StyleCop4_5Path))" Project="$(StyleCop4_5Path)" />

This disables the 4.4 target if 4.5 is installed, however if neither are installed it will fail the build trying to find 4.4. If you need to disable both if they are not installed you can replace the first import with the following:

  <Import Condition="exists($(StyleCop4_4Path))" Project="$(StyleCop4_4Path)" />

Solved: Resharper test runner and Gallio not playing nice.

Recently I have been giving the Gallio test suite a go. I have been looking at it for several reasons. Primarily the RollbackAttribute for some integration tests (although also looking at Moq so not sure which route I’ll take yet!).

At first I was a bit stumped trying to get the Gallio Resharper plugin working, it installed fine and was listed in the Resharper plugin dialog but was coming with an “Unsupported” Message:

Gallio/Resharper integration issue

It took me a while to find out why but it was due me referencing an old version of the MbUnit dll that wasn’t compatible with the Resharper plugin. Once updated with the latest version the plugin works fine :D:

Gallio/Resharper issue resolved!

As always there is a moral to this story, ALWAYS use the right dll’s!! 🙂