[Mono-dev] Problem with Mono 3.4.0 and config appSettings on ARM target
Alex J Lennon
ajlennon at dynamicdevices.co.uk
Mon Apr 21 08:01:52 UTC 2014
Hi all,
I've encountered a problem with an application I was running on an ARM
VFP (i.MX6) target
under 3.2.8, which now fails under 3.4.0.
The error reported is related to a problem with the configuration file
and in particular the
<appSettings> element,
I have reduced it down to a simple test case as follows,
Program.cs (compiled to Program.exe)
namespace DynamicDevices
{
public class ConfigTest
{
static void Main()
{
// NB. Both old deprecated method and new method of obtaining
configuration values fail
var v =
System.Configuration.ConfigurationManager.AppSettings["testkey"];
// var v =
System.Configuration.ConfigurationSettings.AppSettings["testkey"];
Console.WriteLine("Config key: " + v);
}
}
}
Program.exe.config
<configuration>
<appSettings>
<add key="testkey" value="testval" />
</appSettings>
</configuration>
The above runs under 3.2.8 on an x86 target or an ARM VFP target
It also runs under 3.4.0 on an x86 target but when I run on an ARM VFP
target I get the following
Unhandled Exception:
System.Configuration.ConfigurationErrorsException: Error Initializing
the configuration system. --->
System.Configuration.ConfigurationErrorsException: Unrecognized
configuration section <appSettings> (/home/root/Program.exe.config line
<snip/> See: http://pastebin.com/GDKTftr4 for the rest
...
Could anybody advise where I'm going wrong / what I need to look at here?
Many thanks,
Alex Lennon
More information about the Mono-devel-list
mailing list