Blame SOURCES/msbuild-no-systemconfiguration.patch

31d075
--- a/src/Build/Definition/ProjectCollection.cs
31d075
+++ b/src/Build/Definition/ProjectCollection.cs
31d075
@@ -1754,7 +1754,11 @@ namespace Microsoft.Build.Evaluation
31d075
 #if FEATURE_WIN32_REGISTRY
31d075
                 ToolsetRegistryReader registryReader = null,
31d075
 #endif
31d075
+#if FEATURE_SYSTEM_CONFIGURATION
31d075
                 ToolsetConfigurationReader configReader = null
31d075
+#else
31d075
+                object configReader = null
31d075
+#endif
31d075
                 )
31d075
         {
31d075
             _toolsets = new Dictionary<string, Toolset>(StringComparer.OrdinalIgnoreCase);
31d075
--- a/src/Build/Definition/ToolsetReader.cs
31d075
+++ b/src/Build/Definition/ToolsetReader.cs
31d075
@@ -101,7 +101,11 @@ namespace Microsoft.Build.Evaluation
31d075
 #if FEATURE_WIN32_REGISTRY
31d075
             ToolsetRegistryReader registryReader,
31d075
 #endif
31d075
+#if FEATURE_SYSTEM_CONFIGURATION
31d075
             ToolsetConfigurationReader configurationReader,
31d075
+#else
31d075
+            object _configurationReader,
31d075
+#endif
31d075
             PropertyDictionary<ProjectPropertyInstance> environmentProperties,
31d075
             PropertyDictionary<ProjectPropertyInstance> globalProperties,
31d075
             ToolsetDefinitionLocations locations
31d075
@@ -120,6 +124,7 @@ namespace Microsoft.Build.Evaluation
31d075
 
31d075
             if ((locations & ToolsetDefinitionLocations.ConfigurationFile) == ToolsetDefinitionLocations.ConfigurationFile)
31d075
             {
31d075
+#if FEATURE_SYSTEM_CONFIGURATION
31d075
                 if (configurationReader == null)
31d075
                 {
31d075
                     configurationReader = new ToolsetConfigurationReader(environmentProperties, globalProperties);
31d075
@@ -129,6 +134,9 @@ namespace Microsoft.Build.Evaluation
31d075
                 defaultToolsVersionFromConfiguration = configurationReader.ReadToolsets(toolsets, globalProperties,
31d075
                     initialProperties, true /* accumulate properties */, out overrideTasksPathFromConfiguration,
31d075
                     out defaultOverrideToolsVersionFromConfiguration);
31d075
+#else
31d075
+                throw new InvalidOperationException("ToolsetDefinitionLocations.ConfigurationFile not supported");
31d075
+#endif
31d075
             }
31d075
 
31d075
             string defaultToolsVersionFromRegistry = null;