http://bugzilla.novell.com/show_bug.cgi?id=325022
User [email protected] added comment http://bugzilla.novell.com/show_bug.cgi?id=325022#c5 --- Comment #5 from Alex Shulgin <[email protected]> 2009-09-17 06:55:35 MDT --- But did you try removing installed machine.config for the sake of testing? Remember, you are going to use mkbundle to run the app on machines w/o mono installed. I still experience the problem with both mono-2-4 and mono-2-4-2 branches (updated to the latest revisions). Well, I must admit, the issue at hand is a bit complicated. First, in order to get a config file for a bundled assembly loaded correctly another problem in mono needs to be fixed[1]. Apply patch #1: mono-2-4/mono$ patch -p0 <fix-bundled-image-name.patch Next, compile sample code: $ gmcs test.cs -r:System.Configuration $ mkbundle2 test.exe --machine-config /usr/local/etc/mono/2.0/machine.config And run it: $ ./a.out AppSettings: 'ZZZ' $ This is working only because /usr/local/etc/mono/2.0/machine.config is in place. Try removing it and you'll get: Unhandled Exception: System.Configuration.ConfigurationErrorsException: Error Initializing the configuration system. ---> System.Configuration.ConfigurationErrorsException: Unrecognized configuration section <appSettings> at System.Configuration.ConfigInfo.ThrowException (System.String text, System.Xml.XmlReader reader) [0x00000] at System.Configuration.SectionGroupInfo.ReadContent (System.Xml.XmlReader reader, System.Configuration.Configuration config, Boolean overrideAllowed, Boolean root) [0x00000] .. To fix this, apply patch #2: mono-2-4/mcs$ patch -p0 <fix-loading-bundled-machine-config.patch Then recompile System.Configuration.dll (don't forget to put machine.config back before compiling (-: ). Finally, remove machine.config again and try running the bundled sample. This time it should be OK: $ ./a.out AppSettings: 'ZZZ' -- Alex PS: I'm attaching patches and sample code in the next comments. [1] http://go-mono.com/forums/#nabble-td25438426 -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
