From 6fbb220df3199cafdd854a46792701f31fea7240 Mon Sep 17 00:00:00 2001 From: Andrew Schwartzmeyer Date: Tue, 8 Dec 2015 14:30:24 -0800 Subject: [PATCH] Brought back PowerShell's AssemblyLoadContext Removes dependency on Microsoft.Extensions.Platform.Abstractions. Makes use of native executable from `dotnet-cli` impossible; must use `powershell` from monad-native. --- .../project.json | 1 - .../project.json | 1 - .../project.json | 1 - .../project.json | 1 - src/Microsoft.PowerShell.Linux.Host/main.cs | 7 ---- .../project.json | 1 - src/System.Management.Automation/project.json | 35 +++++++++---------- 7 files changed, 16 insertions(+), 31 deletions(-) diff --git a/src/Microsoft.Management.Infrastructure.Native/project.json b/src/Microsoft.Management.Infrastructure.Native/project.json index de2251f616..541c613f01 100644 --- a/src/Microsoft.Management.Infrastructure.Native/project.json +++ b/src/Microsoft.Management.Infrastructure.Native/project.json @@ -27,7 +27,6 @@ "frameworks": { "dnxcore50": { "dependencies": { - "Microsoft.Extensions.PlatformAbstractions": "1.0.0-*", "Microsoft.CSharp": "4.0.1-*", "Microsoft.VisualBasic": "10.0.1-*", "Microsoft.Win32.Primitives": "4.0.1-*", diff --git a/src/Microsoft.Management.Infrastructure/project.json b/src/Microsoft.Management.Infrastructure/project.json index e7d9a4df61..215370fbe2 100644 --- a/src/Microsoft.Management.Infrastructure/project.json +++ b/src/Microsoft.Management.Infrastructure/project.json @@ -113,7 +113,6 @@ "frameworks": { "dnxcore50": { "dependencies": { - "Microsoft.Extensions.PlatformAbstractions": "1.0.0-*", "Microsoft.CSharp": "4.0.1-*", "Microsoft.VisualBasic": "10.0.1-*", "Microsoft.Win32.Primitives": "4.0.1-*", diff --git a/src/Microsoft.PowerShell.Commands.Management/project.json b/src/Microsoft.PowerShell.Commands.Management/project.json index ad2ee992b5..6b4f648299 100644 --- a/src/Microsoft.PowerShell.Commands.Management/project.json +++ b/src/Microsoft.PowerShell.Commands.Management/project.json @@ -85,7 +85,6 @@ "frameworks": { "dnxcore50": { "dependencies": { - "Microsoft.Extensions.PlatformAbstractions": "1.0.0-*", "Microsoft.CSharp": "4.0.1-*", "Microsoft.VisualBasic": "10.0.1-*", "Microsoft.Win32.Primitives": "4.0.1-*", diff --git a/src/Microsoft.PowerShell.Commands.Utility/project.json b/src/Microsoft.PowerShell.Commands.Utility/project.json index 3710eb6e97..791f345c60 100644 --- a/src/Microsoft.PowerShell.Commands.Utility/project.json +++ b/src/Microsoft.PowerShell.Commands.Utility/project.json @@ -122,7 +122,6 @@ "frameworks": { "dnxcore50": { "dependencies": { - "Microsoft.Extensions.PlatformAbstractions": "1.0.0-*", "Microsoft.CSharp": "4.0.1-*", "Microsoft.VisualBasic": "10.0.1-*", "Microsoft.Win32.Primitives": "4.0.1-*", diff --git a/src/Microsoft.PowerShell.Linux.Host/main.cs b/src/Microsoft.PowerShell.Linux.Host/main.cs index 3a77a1e43e..9f2a0753b5 100644 --- a/src/Microsoft.PowerShell.Linux.Host/main.cs +++ b/src/Microsoft.PowerShell.Linux.Host/main.cs @@ -18,13 +18,6 @@ namespace Microsoft.PowerShell.Linux.Host /// public static void Main(string[] args) { - // create the typecatalog so they can find assemblies for a given type. - TypeCatalog.GenerateTypeCatalog(); - if (System.Management.Automation.ClrHost.TypeCatalog == null) - { - Console.WriteLine("TypeCatalog generation failed!"); - } - // Custom argument parsing string initialScript = null; if (args.Length > 0) diff --git a/src/Microsoft.PowerShell.Security/project.json b/src/Microsoft.PowerShell.Security/project.json index d899bbde41..eacb5a8b2b 100644 --- a/src/Microsoft.PowerShell.Security/project.json +++ b/src/Microsoft.PowerShell.Security/project.json @@ -38,7 +38,6 @@ "frameworks": { "dnxcore50": { "dependencies": { - "Microsoft.Extensions.PlatformAbstractions": "1.0.0-*", "Microsoft.CSharp": "4.0.1-*", "Microsoft.VisualBasic": "10.0.1-*", "Microsoft.Win32.Primitives": "4.0.1-*", diff --git a/src/System.Management.Automation/project.json b/src/System.Management.Automation/project.json index 556c40711f..1874aad331 100644 --- a/src/System.Management.Automation/project.json +++ b/src/System.Management.Automation/project.json @@ -6,6 +6,22 @@ "projectUrl": "", "licenseUrl": "", + "dependencies": { + "Microsoft.Management.Infrastructure" : "", + "Microsoft.PowerShell.CoreCLR.AssemblyLoadContext": "" + }, + + "compilationOptions": { + "define": [ + "CORECLR", + "_CORECLR", + "LINUX" + ], + "allowUnsafe": true + }, + + "compile" : [ "../monad-build/gen/SYS_AUTO/*.cs" ], + "compileFiles": [ "../monad/monad/src/engine/ChildrenCmdletProviderInterfaces.cs", "../monad/monad/src/engine/CmdletFamilyProviderInterfaces.cs", @@ -584,20 +600,6 @@ "../monad/monad/src/DscSupport/CimDSCParser.cs" ], - "compile" : [ - "../monad-build/gen/SYS_AUTO/*.cs" - ], - - "compilationOptions": { - "define": [ - "CORECLR", - "_CORECLR", - "NOALC", - "LINUX" - ], - "allowUnsafe": true - }, - "namedResource": { "Authenticode": "../monad/monad/src/engine/resources/Authenticode.resx", "AutomationExceptions" : "../monad/monad/src/engine/resources/AutomationExceptions.resx", @@ -667,14 +669,9 @@ "Modules" : "../monad/monad/src/engine/resources/modules.resx" }, - "dependencies": { - "Microsoft.Management.Infrastructure" : "" - }, - "frameworks": { "dnxcore50": { "dependencies": { - "Microsoft.Extensions.PlatformAbstractions": "1.0.0-*", "Microsoft.CSharp": "4.0.1-*", "Microsoft.VisualBasic": "10.0.1-*", "Microsoft.Win32.Primitives": "4.0.1-*",