From 84d4627b8b3441372efa0b7773ec07fbc7564e64 Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Fri, 17 Aug 2018 15:23:18 -0700 Subject: [PATCH] Upgrade build tools to use the 2.1.400 SDK (#1249) --- Directory.Build.props | 2 ++ korebuild-lock.txt | 4 ++-- .../IISDeployerBase.cs | 6 ++++-- .../WebConfigHelpers.cs | 7 +++++-- test/Common.FunctionalTests/MultiApplicationTests.cs | 4 +++- 5 files changed, 16 insertions(+), 7 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index f015ba2785..a328745f31 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -18,6 +18,8 @@ MicrosoftNuGet true true + + false diff --git a/korebuild-lock.txt b/korebuild-lock.txt index 29a57027f1..4a53936b7b 100644 --- a/korebuild-lock.txt +++ b/korebuild-lock.txt @@ -1,2 +1,2 @@ -version:2.2.0-preview1-20180807.2 -commithash:11495dbd236104434e08cb1152fcb58cf2a20923 +version:2.2.0-preview1-20180816.6 +commithash:226c8adaefd0d19db0d9d11d911ba7d95644b224 diff --git a/src/Microsoft.AspNetCore.Server.IntegrationTesting.IIS/IISDeployerBase.cs b/src/Microsoft.AspNetCore.Server.IntegrationTesting.IIS/IISDeployerBase.cs index 5e6aabdadb..be6f39edec 100644 --- a/src/Microsoft.AspNetCore.Server.IntegrationTesting.IIS/IISDeployerBase.cs +++ b/src/Microsoft.AspNetCore.Server.IntegrationTesting.IIS/IISDeployerBase.cs @@ -100,7 +100,8 @@ namespace Microsoft.AspNetCore.Server.IntegrationTesting.IIS private void AddWebConfigEnvironmentVariables(XElement element, string contentRoot) { var environmentVariables = element - .RequiredElement("system.webServer") + .Descendants("system.webServer") + .Single() .RequiredElement("aspNetCore") .GetOrAdd("environmentVariables"); @@ -114,7 +115,8 @@ namespace Microsoft.AspNetCore.Server.IntegrationTesting.IIS private void AddHandlerSettings(XElement element, string contentRoot) { var handlerSettings = element - .RequiredElement("system.webServer") + .Descendants("system.webServer") + .Single() .RequiredElement("aspNetCore") .GetOrAdd("handlerSettings"); diff --git a/src/Microsoft.AspNetCore.Server.IntegrationTesting.IIS/WebConfigHelpers.cs b/src/Microsoft.AspNetCore.Server.IntegrationTesting.IIS/WebConfigHelpers.cs index 589907657f..f920622568 100644 --- a/src/Microsoft.AspNetCore.Server.IntegrationTesting.IIS/WebConfigHelpers.cs +++ b/src/Microsoft.AspNetCore.Server.IntegrationTesting.IIS/WebConfigHelpers.cs @@ -2,6 +2,7 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; +using System.Linq; using System.Xml.Linq; namespace Microsoft.AspNetCore.Server.IntegrationTesting.IIS @@ -12,7 +13,8 @@ namespace Microsoft.AspNetCore.Server.IntegrationTesting.IIS { return (element, _) => { element - .GetOrAdd("system.webServer") + .Descendants("system.webServer") + .Single() .GetOrAdd("aspNetCore") .SetAttributeValue(key, value); }; @@ -23,7 +25,8 @@ namespace Microsoft.AspNetCore.Server.IntegrationTesting.IIS return (element, _) => { element - .GetOrAdd("system.webServer") + .Descendants("system.webServer") + .Single() .GetOrAdd("handlers") .GetOrAdd("add") .SetAttributeValue(key, value); diff --git a/test/Common.FunctionalTests/MultiApplicationTests.cs b/test/Common.FunctionalTests/MultiApplicationTests.cs index a91dfa4d76..009c61f373 100644 --- a/test/Common.FunctionalTests/MultiApplicationTests.cs +++ b/test/Common.FunctionalTests/MultiApplicationTests.cs @@ -3,6 +3,7 @@ using System; using System.IO; +using System.Linq; using System.Threading.Tasks; using System.Xml.Linq; using Microsoft.AspNetCore.Server.IIS.FunctionalTests.Utilities; @@ -78,7 +79,8 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests var webConfigLocation = GetWebConfigLocation(directory); XDocument webConfig = XDocument.Load(webConfigLocation); webConfig.Root - .GetOrAdd("system.webServer") + .Descendants("system.webServer") + .Single() .GetOrAdd("aspNetCore") .SetAttributeValue("hostingModel", model.ToString()); webConfig.Save(webConfigLocation);