Using comment based exclusions with resharper inspections

When we use Resharper in Visual studio we make use of the "Suppress Inspection ****** with Comment".

Which adds something like this to our source:

// ReSharper disable UnusedMember.Global

public string Property { get; set; }

// ReSharper restore UnusedMember.Global

When we build these solutions in Team City we have Resharper inspections turned on.  But Team City doesn't seem to respect these comment based exclusions.  This is very frustrating and makes it really hard for us to use the Inspection based failure conditions.

Is there any way to make this work?

2 comments
Comment actions Permalink

Hi,

Is there any solution that is available for this issue? We also face the same issue.

we have disabled the resharper warnings using Resharper comments
    //ReSharper disable UnusedMember.Global
        public bool EnableDaylightSaving { get; set; }
        //ReSharper restore UnusedMember.Global

This works fine in Visual Studio 2012 IDE. But when the code gets executed in Team City Server (v 8.0.6),  these warnings are replaced with warnings "Potential Code quality issues : Use ////-comment" at the lines
//ReSharper disable UnusedMember.Global and
//ReSharper restore UnusedMember.Global.

Is there any solution available to address this issue?

Our environment :-
Visual Studio 2012
Resharper 7.1
Team City 8.0.6

Cheers



Attachment(s):
TeamCityError.png
0

Please sign in to leave a comment.