From 5744ca7b8090ff104762db4bf4e24cabde47ec35 Mon Sep 17 00:00:00 2001 From: Andrew Schwartzmeyer Date: Mon, 27 Jun 2016 13:49:18 -0700 Subject: [PATCH] Exclude MMI packages from type catalog parser Newtonsoft.Json will be excluded at a later date. --- src/TypeCatalogParser/Main.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/TypeCatalogParser/Main.cs b/src/TypeCatalogParser/Main.cs index bb9efe9538..778fbb1b95 100644 --- a/src/TypeCatalogParser/Main.cs +++ b/src/TypeCatalogParser/Main.cs @@ -13,6 +13,14 @@ namespace TypeCatalogParser { public static void Main(string[] args) { + // These are packages that are not part of .NET Core and must be excluded + string[] excludedPackages = { + "Microsoft.Management.Infrastructure", + "Microsoft.Management.Infrastructure.Native" + // We need to exclude Newtonsoft.Json once the ALC story is figured out + // "Newtonsoft.Json" + }; + // The TypeCatalogGen project takes this as input var outputPath = "../TypeCatalogGen/powershell.inc"; @@ -23,7 +31,7 @@ namespace TypeCatalogParser // Get the target for the current runtime from t in context.LockFile.Targets where t.RuntimeIdentifier == context.RuntimeIdentifier // Get the packages (not projects) - from x in t.Libraries where x.Type == "package" + from x in t.Libraries where (x.Type == "package" && !excludedPackages.Contains(x.Name)) // Get the real reference assemblies from y in x.CompileTimeAssemblies where y.Path.EndsWith(".dll") // Construct the path to the assemblies