[Mono-bugs] [Bug 560060] New: Embedded "app.config" is not read when used inside a bundle

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Dec 2 14:46:24 EST 2009



           Summary: Embedded "app.config" is not read when used inside a
    Classification: Mono
           Product: Mono: Runtime
           Version: 2.4.x
          Platform: i386
        OS/Version: Mac OS X 10.5
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: misc
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: laurent.etiemble at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---

Created an attachment (id=330581)
 --> (http://bugzilla.novell.com/attachment.cgi?id=330581)
Test-case for embedded application configuration access

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.0; fr; rv:
Gecko/2009101601 Firefox/3.0.15 (.NET CLR 4.0.20506)

An embedded "app.config" (application configuration) is not read when used
inside a bundle, which is useless. A bundle should be able to access the
embedded application configuration.

Reproducible: Always

Steps to Reproduce:
1. Create an application configuration Program.exe.config:
<?xml version="1.0" encoding="utf-8" ?>
    <add key="Setting1" value="Very" />
    <add key="Setting2" value="Easy" />
2. Compile the test-case:
gmcs Program.cs -r:System.Configuration
3. Bundle the assembly and the configuration with mkbundle:
mkbundle2 -o Program Program.exe
4. Rename the configuration file so it is not picked up
5. Launch the bundle
6. No configuration key are displayed.

Actual Results:  
The bundle output is:

Configuration >>>

Expected Results:  
The bundle should print:

Configuration >>>
Key: Setting1, Value: Very
Key: Setting2, Value: Easy

The problem has been traced to the metadata part of the Mono runtime. There are
actually two problems:
- When lookup for an asssembly configuration, the scrambled names are used
instead of the real names. As during the bootstrap phase only real names are
used for configuration registering, the lookup fails.
- When accessing the System.Configuration.ConfigurationManager.AppSettings
property, the embedding application configuration is not probed. Only a
filesystem lookup is performed.

Configure bugmail: http://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