Add optional exclusion reason property name to exclusion att

Add optional exclusion reason property name to exclusion att

It would be great if we could have used beside this switcher

ncover.console ... //ea "Acadre.Infrastructure.Interface.NCoverExcludeAttribute"

switcher like that:

ncover.console ... //ea "Acadre.Infrastructure.Interface.NCoverExcludeAttribute+Reason"

and if attribute have string Reason property to have it in report.

NCoverExludeAttribute would be implemented like this

    [global::System.AttributeUsage(AttributeTargets.Class |AttributeTargets.Method, Inherited = false, AllowMultiple = false)]
    public sealed class NCoverExcludeAttribute : Attribute
    {
        // See the attribute guidelines at
        //  http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/cpconusingattributeclasses.asp
        readonly string m_reason;

        // This is a positional argument.
        public NCoverExcludeAttribute(string reason)
        {
            this.m_reason = reason;
        }

        public string Reason
        {
            get
            {
                return this.m_reason;
            }
        }

    }


Re: Empty coverage file

for /a parameter ncover accepts only assembly names without path and extension...


Re: NCoverExplorer.Console.exe and config files

Hi Jon,

Sorry to hear you are having so much trouble. I have just pushed a new beta build onto my site (1.4.0.7) - perhaps you would be so kind as to give that a go and see if you are still experiencing the problem?

http://www.kiwidude.com/dotnet/DownloadPage.html

One other thing you can try - did you generate your config file using the new /cs argument or base it on the ConsoleExample.config? I made a config file looking exactly like yours and it worked fine, but perhaps there is something subtle in there I am missing. Try specifying your arguments on the ncoverexplorer.console command line (minus exclusions of course) with the /cs:xxx.config argument. Then edit that file with your exclusions etc to see if that works.

In the final few days before hoping to officially release 1.4 so if there is still a bug in there would love to get it sorted.


Re: NCoverExplorer.Console.exe and config files


Hello Grant,

The suggestion to use the "/cs" switch was useful, so thanks for pointing that out--I used that to create an empty .config file, and then modified that to include the exclusions I needed. When I ran NCoverExplorer.Console.exe (both version 1.4.04 and 1.4.0.7) and passed that .config file it, the report was produced correctly.

So, I think you can be reassured that this isn't a bug, but what you could call "user error"...

Thanks for your time--much appreciated.

   Jon