[Mono-bugs] [Bug 77236][Nor] New - ConfigurationManager:GetSection can't load external dlls

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Thu Jan 12 23:46:00 EST 2006


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by bmaurer at users.sf.net.

http://bugzilla.ximian.com/show_bug.cgi?id=77236

--- shadow/77236	2006-01-12 23:46:00.000000000 -0500
+++ shadow/77236.tmp.19599	2006-01-12 23:46:00.000000000 -0500
@@ -0,0 +1,91 @@
+Bug#: 77236
+Product: Mono: Class Libraries
+Version: 1.0
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: System
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: bmaurer at users.sf.net               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: ConfigurationManager:GetSection can't load external dlls
+
+In the following test case, we get the exception,
+
+Unhandled Exception: System.Configuration.ConfigurationErrorsException:
+Type 'FrontDesk.Testing.Configuration.TestCenterSection, Frontdesk.Testing'
+not found. () 
+
+It works correctly on msft's .net 2.0.
+
+Makefile:
+
+all : prog.exe
+        mono prog.exe
+
+FrontDesk.Testing.dll : lib.cs
+        gmcs /out:$@ $^ -r:System.Configuration.dll /target:library
+
+prog.exe : prog.cs FrontDesk.Testing.dll
+        gmcs /out:$@ prog.cs -r:System.Configuration.dll
+-r:FrontDesk.Testing.dll
+
+lib.cs:
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Configuration;
+using System.IO;
+
+namespace FrontDesk.Testing.Configuration {
+        public class TestCenterSection : ConfigurationSection {
+
+                [ConfigurationProperty ("sources")]
+                public string Sources {
+                        get { return (string) base ["sources"]; }
+                        set { base ["sources"] = value; }
+                }
+        }
+}
+
+prog.cs:
+
+using System;
+using System.Configuration;
+using FrontDesk.Testing.Configuration;
+
+class X {
+        static void Main () {
+                TestCenterSection tcs = (TestCenterSection)
+                        ConfigurationManager.GetSection
+("frontdesk/testing/testCenter");
+                Console.WriteLine (tcs.Sources);
+        }
+}
+
+prog.exe.config:
+
+<?xml version="1.0" encoding="utf-8" ?>
+<configuration>
+        <configSections>
+                <sectionGroup name="frontdesk">
+                        <sectionGroup name="testing">
+                                <section name="testCenter"
+type="FrontDesk.Testing.Configuration.TestCenterSection, Frontdesk.Testing"/>
+
+                        </sectionGroup>
+                </sectionGroup>
+        </configSections>
+
+        <frontdesk>
+                <testing>
+                        <testCenter sources="XXXXX" />
+                </testing>
+        </frontdesk>
+</configuration>


More information about the mono-bugs mailing list