[Mono-bugs] [Bug 432423] New: mcs does not set assembly Flags to PublicKey by default, like csc does

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sun Oct 5 16:13:20 EDT 2008


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


           Summary: mcs does not set assembly Flags to PublicKey by default,
                    like csc does
           Product: Mono: Compilers
           Version: SVN
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: C#
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: dean at brettle.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


A strong-named assembly built with mcs does not have it's Flags set to
PublicKey, while one built with csc does.  If the assembly contains a custom
web control, that web control will not be usable from a VB.NET Web Application
project.  The page compiler will show an error like:

Compiler Error Message: BC30652: Reference required to assembly
'MyWebControlProject, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=c95290d92c5893c8' containing the type
'MyWebControlProject.MyWebControl'. Add one to your project.

The project does, in fact, have the reference.  The problem is that the
assembly does not have the Flags set correctly.  Running monodis --assembly on
versions built from the same source with Visual C# Express 2008 and Mono SVN
give different results:

[mono20] ~/tmp/mywebcontrol @ monodis --assembly MyWebControlProject.Mono.dll |
grep Flags
Flags:         0x00000000
[mono20] ~/tmp/mywebcontrol @ monodis --assembly MyWebControlProject.Net.dll |
grep Flags
Flags:         0x00000001

Adding the following to AssemblyInfo.cs did change Flags to 0x00000001, and DID
allow the custom control to be used in a VB.NET Web Application project.

[assembly: AssemblyFlags(AssemblyNameFlags.PublicKey)]


-- 
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