[Mono-bugs] [Bug 692779] New: CSharpCodeProvider: CompileAssemblyFromSource and CompileAssemblyFromDom wrongly produces "hides inherited member" error and warning

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue May 10 03:05:09 EDT 2011


https://bugzilla.novell.com/show_bug.cgi?id=692779

https://bugzilla.novell.com/show_bug.cgi?id=692779#c0


           Summary: CSharpCodeProvider: CompileAssemblyFromSource and
                    CompileAssemblyFromDom wrongly produces "hides
                    inherited member" error and warning
    Classification: Mono
           Product: Mono: Runtime
           Version: 2.10.x
          Platform: 64bit
        OS/Version: Ubuntu
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: misc
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: alex_syd1 at yahoo.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


Created an attachment (id=428769)
 --> (http://bugzilla.novell.com/attachment.cgi?id=428769)
code to reproduce the bug and two generated files

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.16)
Gecko/20110319 Firefox/3.6.16 ( .NET CLR 3.5.30729; .NET4.0E)

When dynamically generating C# code with
CSharpCodeProvider.CompileAssemblyFromSource() and
CSharpCodeProvider.CompileAssemblyFromDom(), the return value (CompiledResults)
contains a warning and an error, whereas MS C# gives no warnings/errors, given
the same input data.

Reproducible: Always

Steps to Reproduce:
1. In VS2008 build a solution containing Program.cs from the attached file.
2. Run the executable in Windows 7.
3. Run the executable in Ubuntu with Mono 2.10, e.g. mono ca1.exe. Don't
recompile in Mono, just use the binary produced by VS compiler.

Actual Results:  
In case of Mono,
the CompiledResults instance returned by
CSharpCodeProvider.CompileAssemblyFromSource() or
CSharpCodeProvider.CompileAssemblyFromDom() contains one warning and one error.

Expected Results:  
In case of VS2008,
the CompiledResults instance returned by
CSharpCodeProvider.CompileAssemblyFromSource() or
CSharpCodeProvider.CompileAssemblyFromDom() contains no warnings and no errors.

The .cs files generated by Mono and VS2008 are logically identical, it's just
the warnings and errors produced are different. However this obviously confuses
the client program. We had to introduce an ugly hack to handle the situation.

The .cs files generated by Mono and VS2008 are also attached.

I'm going to raise another bug report shortly for another bug in the same area.

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


More information about the mono-bugs mailing list