Conditional to detect Resharper

I have a problem running mspec tests in that we need to read XML files and resharper runs the tests in a temp folder. The files we need to read are relative to the runtime folder and that folder doesn't get copied. No biggie, but to work round it, we have to include a few additional lines of code to work out where the data files are.Problem is, when we submit the code to Team City we need to remove this additional code or the tests won't run. What I'd like to be able to do is surround the additional code with an #if statement so it only gets included if we're in Visual Studio with Resharper installed. Anyone know if that's possible? Sadly, not everyone on the team has access to Researper (something were trying to fix!) so I need to go down this #if route so as not to mess up the non-resharper users.I'm using v7.1.3 in VS 2012.ThanksSteve

Please sign in to leave a comment.