[Mono-dev] Problem with Configuration Manager
Atsushi Eno
atsushi at ximian.com
Tue Oct 30 16:15:42 EDT 2007
Hello,
Yes, 2.0 Configuration support did not support bundled application
(guessing you mean mkbundle). It is implemented recently (I hope
it works) and it is not in 1.2.5.*.
So, either try daily builds or trunk, or wait for the next release.
Atsushi Eno
Torello Querci wrote:
> Hi to all.
>
> I need to get a boundled application with mono on the 2.0 environment.
> Making some test with this environment I noted that the
> ConfigurationManager seems not work in the boundled application.
>
> I make some test using
>
> mkbuild2 --deps --static -o app.exe MyApp.exe
>
> and
>
> mkbuild2 --deps --static -o app.exe MyApp.exe -f MyApp.exe.config
> With both the command my application not read the configuration parameter.
>
> Down I put the sample code that I use.
>
> It's a bug or not? For me is not a problem using a xml reader but I
> need do know to not make the same work two times ....
>
>
> P.S. Sorry for my english.
>
>
> Best Regard, Torello Querci
>
> ---------------------------------------------------------------------------
> using System;
> using System.Configuration;
>
> namespace ConfigurationBug
> {
> class MainClass
> {
> public static void Main(string[] args)
> {
> System.Collections.Specialized.NameValueCollection
> apps=System.Configuration.ConfigurationManager.AppSettings;
>
> if (apps != null) {
> Console.WriteLine("The configuration file is found.");
> object obj=apps["application_key"];
> if (obj!=null) {
> Console.WriteLine("The configuration key \"application_key\" has
> the value: "+obj.ToString());
> } else {
> Console.WriteLine("The configuration key \"application_key\" is
> missing :(.");
> }
> } else {
> Console.WriteLine("There is not configuration file :(.");
> }
> }
> }
> }
> _______________________________________________
> 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