Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.
Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.
Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.
Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.
Created attachment 6686 [details] example project and binaries Steps to reproduce: * Create empty application referencing log4net * add log4net section to app.config * deploy log4net.dll to a subdirectory and add that directory to the privatePath in the app.config Expected outcome: log4net is found in configured privatePath in all cases Actual outcome: probing for log4net causes a System.IO.FileNotFoundException: Could not load file or assembly 'log4net, ...' if the log4net section is before the runtime section in the app.config file. I've added a example project demoing the effect. running the test exe in the ProbingPathTest/bin/Works directory finds the log4net dll, with the config in the ProbingPathTest/bin/Fails the exception is thrown. I'm testing on $ mono --version Mono JIT compiler version 3.2.8 (Debian 3.2.8+dfsg-4) Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com TLS: __thread SIGSEGV: altstack Notifications: epoll Architecture: amd64 Disabled: none Misc: softdebug LLVM: supported, not enabled. GC: sgen
Hi, Thank you very much for the reproduction case, I can reproduce with 5.15.0.45 (master/df33c092de3). Observed behavior: - download and unzip https://bugzilla.xamarin.com/attachment.cgi?id=6686 - $> cd ProbingPathTest/bin/Fails - $> mono ProbingPathTest.exe # Fails Expected behavior: - download and unzip https://bugzilla.xamarin.com/attachment.cgi?id=6686 - $> cd ProbingPathTest/bin/Works - $> mono ProbingPathTest.exe # Succeed The difference between both `Works` and `Fails` is in `ProbingPathTest.exe.config`: - in `Fails`: the `<log4net>` XML element is *before* the `<runtime>` XML element - in `Works`: the `<log4net>` XML element is *after* the `<runtime>` XML element.
The mono native C XML parser doesn't like this element: "<appender-ref .../>" The hyphen is a problem. (It also doesn't like underscores and periods in element names).
https://github.com/mono/mono/pull/8176
Fixed on mono master https://github.com/mono/mono/commit/5a61970597eb5a44b6b995d6643190b4411b69eb Fixed on mono 2018-04 https://github.com/mono/mono/commit/13aa6b7199279888b41da60390d4579b8c06f4f4 Fixed on mono 2018-02 https://github.com/mono/mono/commit/61da4c7a5f1f6ceaf28e07dee48bfdd4a5e77b5e