From 847ab71209044287868d516a2b939e42ddda5577 Mon Sep 17 00:00:00 2001 From: Justin Kotalik Date: Tue, 27 Mar 2018 17:21:57 -0700 Subject: [PATCH] Revert " Add deps file RH injection (#731)" This reverts commit c217e7b690e0673edc1135198f5d90ee0c120b89. --- IISIntegration.sln | 15 ---- build/dependencies.props | 3 - build/testsite.props | 17 ----- .../NativeIISSample/NativeIISSample.csproj | 1 + test/TestTasks/InjectRequestHandler.cs | 74 ------------------- test/TestTasks/TestTasks.csproj | 13 ---- 6 files changed, 1 insertion(+), 122 deletions(-) delete mode 100644 test/TestTasks/InjectRequestHandler.cs delete mode 100644 test/TestTasks/TestTasks.csproj diff --git a/IISIntegration.sln b/IISIntegration.sln index 3508392e9d..4086f09be5 100644 --- a/IISIntegration.sln +++ b/IISIntegration.sln @@ -74,8 +74,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AspNetCoreModuleTests", "te EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ANCMStressTestApp", "test\ANCMStressTestApp\ANCMStressTestApp.csproj", "{13FD8F12-FFBE-4D01-B4AC-444F2994B04F}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestTasks", "test\TestTasks\TestTasks.csproj", "{064D860B-4D7C-4B1D-918F-E020F1B99E2A}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -244,18 +242,6 @@ Global {13FD8F12-FFBE-4D01-B4AC-444F2994B04F}.Release|x64.Build.0 = Release|Any CPU {13FD8F12-FFBE-4D01-B4AC-444F2994B04F}.Release|x86.ActiveCfg = Release|Any CPU {13FD8F12-FFBE-4D01-B4AC-444F2994B04F}.Release|x86.Build.0 = Release|Any CPU - {064D860B-4D7C-4B1D-918F-E020F1B99E2A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {064D860B-4D7C-4B1D-918F-E020F1B99E2A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {064D860B-4D7C-4B1D-918F-E020F1B99E2A}.Debug|x64.ActiveCfg = Debug|Any CPU - {064D860B-4D7C-4B1D-918F-E020F1B99E2A}.Debug|x64.Build.0 = Debug|Any CPU - {064D860B-4D7C-4B1D-918F-E020F1B99E2A}.Debug|x86.ActiveCfg = Debug|Any CPU - {064D860B-4D7C-4B1D-918F-E020F1B99E2A}.Debug|x86.Build.0 = Debug|Any CPU - {064D860B-4D7C-4B1D-918F-E020F1B99E2A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {064D860B-4D7C-4B1D-918F-E020F1B99E2A}.Release|Any CPU.Build.0 = Release|Any CPU - {064D860B-4D7C-4B1D-918F-E020F1B99E2A}.Release|x64.ActiveCfg = Release|Any CPU - {064D860B-4D7C-4B1D-918F-E020F1B99E2A}.Release|x64.Build.0 = Release|Any CPU - {064D860B-4D7C-4B1D-918F-E020F1B99E2A}.Release|x86.ActiveCfg = Release|Any CPU - {064D860B-4D7C-4B1D-918F-E020F1B99E2A}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -275,7 +261,6 @@ Global {46A8612B-418B-4D70-B3A7-A21DD0627473} = {04B1EDB6-E967-4D25-89B9-E6F8304038CD} {0692D963-DB10-4387-B3EA-460FBB9BD9A3} = {EF30B533-D715-421A-92B7-92FEF460AC9C} {13FD8F12-FFBE-4D01-B4AC-444F2994B04F} = {EF30B533-D715-421A-92B7-92FEF460AC9C} - {064D860B-4D7C-4B1D-918F-E020F1B99E2A} = {EF30B533-D715-421A-92B7-92FEF460AC9C} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {DB4F868D-E1AE-4FD7-9333-69FA15B268C5} diff --git a/build/dependencies.props b/build/dependencies.props index a4f334fe47..07933c585a 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -17,8 +17,6 @@ 2.1.0-preview2-30431 2.1.0-preview2-30431 2.1.0-preview2-30431 - 15.6.82 - 15.6.82 2.1.0-preview2-30431 2.1.0-preview2-30431 2.1.0-preview2-30431 @@ -43,7 +41,6 @@ 4.5.0-preview2-26313-01 4.5.0-preview2-26313-01 4.5.0-preview2-26313-01 - 9.0.1 2.3.1 2.4.0-beta.1.build3945 diff --git a/build/testsite.props b/build/testsite.props index fd8f01af17..549556790f 100644 --- a/build/testsite.props +++ b/build/testsite.props @@ -34,24 +34,7 @@ -h "$(IISAppHostConfig)" $(NativePlatform)\aspnetcore.dll - $(NativePlatform)\aspnetcorerh.dll $(userprofile)\.dotnet\$(NativePlatform)\dotnet.exe - - - false - - - - - - - - - - - - - diff --git a/samples/NativeIISSample/NativeIISSample.csproj b/samples/NativeIISSample/NativeIISSample.csproj index d9bf22ba16..d35016b658 100644 --- a/samples/NativeIISSample/NativeIISSample.csproj +++ b/samples/NativeIISSample/NativeIISSample.csproj @@ -17,4 +17,5 @@ inprocess + diff --git a/test/TestTasks/InjectRequestHandler.cs b/test/TestTasks/InjectRequestHandler.cs deleted file mode 100644 index a97d5718a4..0000000000 --- a/test/TestTasks/InjectRequestHandler.cs +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System.IO; -using System.Linq; -using Microsoft.Build.Framework; -using Microsoft.Build.Utilities; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; - -namespace TestTasks -{ - public class InjectRequestHandler : Task - { - [Required] - public string DepsFile { get; set; } - - [Required] - public string Rid { get; set; } - - [Required] - public string LibraryLocation { get; set; } - - public override bool Execute() - { - InjectNativeLibrary(DepsFile); - - // Parse input - return true; - } - - private void InjectNativeLibrary(string depsFile) - { - JToken deps; - using (var file = File.OpenText(depsFile)) - using (JsonTextReader reader = new JsonTextReader(file)) - { - deps = JObject.ReadFrom(reader); - } - - var libraryName = "ANCMRH/1.0"; - var libraries = (JObject)deps["libraries"]; - - var target = (JObject)((JObject)deps["targets"]).Properties().First().Value; - var targetLibrary = target.Properties().FirstOrDefault(p => p.Name == libraryName); - targetLibrary?.Remove(); - targetLibrary = - new JProperty(libraryName, new JObject( - new JProperty("runtimeTargets", new JObject( - new JProperty(LibraryLocation.Replace('\\', '/'), new JObject( - new JProperty("rid", Rid), - new JProperty("assetType", "native") - )))))); - target.AddFirst(targetLibrary); - - var library = libraries.Properties().FirstOrDefault(p => p.Name == libraryName); - library?.Remove(); - library = - new JProperty(libraryName, new JObject( - new JProperty("type", "package"), - new JProperty("serviceable", true), - new JProperty("sha512", ""), - new JProperty("path", libraryName), - new JProperty("hashPath", ""))); - libraries.AddFirst(library); - - using (var file = File.CreateText(depsFile)) - using (var writer = new JsonTextWriter(file) { Formatting = Formatting.Indented }) - { - deps.WriteTo(writer); - } - } - } -} diff --git a/test/TestTasks/TestTasks.csproj b/test/TestTasks/TestTasks.csproj deleted file mode 100644 index 24a26e6253..0000000000 --- a/test/TestTasks/TestTasks.csproj +++ /dev/null @@ -1,13 +0,0 @@ - - - - netstandard2.0 - - - - - - - - -