Blame SOURCES/msbuild-no-systemconfiguration.patch

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