[Mono-bugs] [Bug 463404] New: Runtime detection if configuration file exists fails

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sat Jan 3 13:43:27 EST 2009


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


           Summary: Runtime detection if configuration file exists fails
           Product: Mono: Class Libraries
           Version: 1.9
          Platform: x86-64
        OS/Version: UNIX Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: System
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: phpfreaked9 at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


Description of Problem:
System.Configuration.Configuration.HasFile always returns true under centos 5,
mono 1.9.1.

Steps to reproduce the problem:
1. Create a instance of System.Configuration.Configuration using
ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
2. Detect if the configuration file exists e.g. configuration.HasFile
3. Compile under .net 2.0
4. Transfer files to centos
5. run 'mono myapp.exe'

Actual Results:
HasFile return true

Expected Results:
return false or true depending if a configuration-file exists. This
configuration file should be located in the same folder the application runs.
e.g. myapp.exe, myapp.config

How often does this happen? 
Always

Additional Information:
I compiled my application under .net 2.0 in windows vista. Then i transfered
the files to centos. 

Code snippet:
class Test
{
    void Main()
    {
         System.Configuration.Configuration configPart =
ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
         Console.WriteLine(configPart.HasFile);
         Console.ReadKey();
    }
}


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