How do I make ReSharper 7.1.3 recognize NAnt files in VS 2012

I'm using Visual Studio 2012 and ReSharper 7.1.3. I have a NAnt build file with extension ".build". Based on other discussions I've found I made sure to right-click on the file, open with, and change the default opener to XML.

ReSharper does not recognize my NAnt file. There is no inspection, and there is no intention. It's like it's a text file as far as ReSharper is concerned. But it's very clearly not a text file, because Visual Studio is code highlighting it as an XML file.

Here's my (very) simple build file.

<?xml version="1.0" encoding="utf-8"?> <project default="build" xmlns="http://nant.sf.net/release/0.92/nant.xsd">      <property name="nant.settings.currentframework" value="net-4.5" />   <property name="directory.current" value="${directory::get-current-directory()}" />   <property name="directory.build" value="${bad}" />    </project>

3 comments
Comment actions Permalink
ReSharper should recognise .build files as NAnt, but it will only analyse files that are part of a project. Make sure your file exists in a project, or is added as a solution item.
0
Comment actions Permalink

Thanks. The file is named UL.Domains.build, so that shouldn't be a problem. It is also part of the solution as a solution item, so that is also not a problem.

I noticed something the next day after having closed and re-opened Visual Studio. Now ReSharper validates the file properly (tells you if a task or attribute doesn't exist or is used improperly), but it still doesn't give code suggestions / intentions while you're typing. Weird that it is doing one (which seems to suggest it recognizes it as a NAnt file) but not the other.

Sounds like a bug?

0
Comment actions Permalink
I'm glad it's recognising the file, but it should also be offering inspections. Perhaps it is a bug. Can you report it at http://youtrack.jetbrains.com, please?
0

Please sign in to leave a comment.