Blame SOURCES/msbuild-no-systemconfiguration.patch

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