[Mono-bugs] [Bug 566087] New: NoWarn ignored when TreatWarningsAsErrors is true

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Dec 18 13:40:07 EST 2009


http://bugzilla.novell.com/show_bug.cgi?id=566087

http://bugzilla.novell.com/show_bug.cgi?id=566087#c0


           Summary: NoWarn ignored when TreatWarningsAsErrors is true
    Classification: Mono
           Product: Mono: Tools
           Version: 2.6.x
          Platform: x86
        OS/Version: Windows 7
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: xbuild
        AssignedTo: jankit at novell.com
        ReportedBy: tomas.matousek at microsoft.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


User-Agent:       Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1;
Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729;
Media Center PC 6.0; InfoPath.3; MS-RTC LM 8; MALC)

Attached C# project builds fine with msbuild but fails with xbuild.

The problem seems to be that NoWarn element is ignored when
TreatWarningsAsErrors is true.

    <NoWarn>162</NoWarn>
    <TreatWarningsAsErrors>true</TreatWarningsAsErrors>

Running gmcs directly from command line works as expected:
gmcs Program.cs /target:exe /warnaserror+ /nowarn:162


Reproducible: Always

Steps to Reproduce:
1. Unzip attachment and run xbuild ConsoleApplication2.csproj
Actual Results:  
        Program.cs(10,13): error CS0162:  Unreachable code detected

         0 Warning(s)
         1 Error(s)

Expected Results:  
Build succeeded.
         0 Warning(s)
         0 Error(s)

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list