[Mono-dev] Configuration.HasFile returning wrong value in Mono

Eberhard Beilharz eb1 at sil.org
Fri Jun 10 16:40:12 UTC 2016


If you check the Mono status page 
(http://go-mono.com/status/status.aspx?reference=4.5&profile=4.5&assembly=System.Configuration) 
you'll see that the implementation for SectionInformation in Mono isn't 
complete.

     Eberhard

Marlone <InfoSeeker002 at gmail.com> wrote on 2016-06-10 at 16:58 +0200:
> I am wondering how well tested is the System.Configuration namespace is in
> Mono. I am targetting .Net 2.0 and the construct I am using are available as
> far back as .Net 2 (or even 1.1)
>
> I was comparing results between CLR and MONO for ConfigurationSection and
> the results surprised me.
> Configuration.GetSection returns an object of type
> System.Configuration.DefaultSection
> <https://msdn.microsoft.com/en-us/library/system.configuration.defaultsection%28v=vs.110%29.aspx>
> . But inspecting this object, particularly its property  SectionInformation
> <https://msdn.microsoft.com/en-us/library/system.configuration.sectioninformation%28v=vs.110%29.aspx>
> at runtime reveals this:
> 1) DefaultSection.SectionInformation.IsDeclarationRequired throws an
> NotImplemented exception in Mono while in CLR it is set to true.
> 2) In Mono, DefaultSection.SectionInformation.IsDeclared is set to false
> while in CLR it is set to true.
> 3) In Mono, DefaultSection.SectionInformation.Name is null while in CLR it
> contains the correct section name.
> 4) In Mono, OverrideMode, OverrideModeDefault, OverrideModeEffective
> properties of SectionInformation are not implemented.
> 5) In Mono DefaultSection.SectionInformation.RequiredPermission is false
> while in CLR it is true.
> 6) The most alarming ones in Mono
> DefaultSection.SectionInformation.SectionName and
> DefaultSection.SectionInformation.Type are null while in CLR they contains
> the correct information.
>
> This is a worry and does not seem to instill much faith in porting code to
> Mono. Is Xamarin being part of Microsoft going to provide consistency in the
> framework across platforms?
>
> MarLOne
>
>
>
> --
> View this message in context: http://mono.1490590.n4.nabble.com/Configuration-HasFile-returning-wrong-value-in-Mono-tp4667959p4667963.html
> Sent from the Mono - Dev mailing list archive at Nabble.com.
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list



More information about the Mono-devel-list mailing list