Allow xml configuration sections to reference System.dll (bug#39669)
[mono.git] / mcs / class / System.Configuration / System.Configuration / InternalConfigurationHost.cs
index e4d59f1466c2c3ba5604f17d5af8443d41d7afe9..0cf6136ae38ca111de4ffb463a475245dd7cf4b0 100644 (file)
@@ -69,6 +69,11 @@ namespace System.Configuration
                public virtual Type GetConfigType (string typeName, bool throwOnError)
                {
                        Type type = Type.GetType (typeName);
+
+                       // This code is in System.Configuration.dll, but some of the classes we might want to load here are in System.dll.
+                       if (type == null)
+                               type = Type.GetType (typeName + ",System");
+
                        if (type == null && throwOnError)
                                throw new ConfigurationErrorsException ("Type '" + typeName + "' not found.");
                        return type;