Add Windows Compatibility Pack 2.0.0 to PS Core and adopt the official .NET Core 2.1 (#6958)

To support PowerShell modules built with .NET Windows Compatibility Pack, we decided that it was best to ship the WCP assemblies with PS Core. This also adds many new .NET APIs be default while only adding ~3.5 MB additional disk footprint (to a ~137 MB install currently).
Also update the build to adopt the official .NET Core 2.1.
This commit is contained in:
Steve Lee
2018-06-03 22:06:26 -07:00
committed by Dongbo Wang
parent 57b3d3380b
commit 5dc7a6cb07
14 changed files with 150 additions and 59 deletions
@@ -57,7 +57,7 @@
<ItemGroup>
<!-- the following package(s) are from https://github.com/dotnet/corefx -->
<PackageReference Include="System.ServiceProcess.ServiceController" Version="4.5.0-rc1-26423-06" />
<PackageReference Include="System.ServiceProcess.ServiceController" Version="4.5.0" />
</ItemGroup>
</Project>
@@ -67,7 +67,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="2.7.0" />
<PackageReference Include="Microsoft.CodeAnalysis.VisualBasic" Version="2.7.0" />
<PackageReference Include="NJsonSchema" Version="9.9.10" />
<PackageReference Include="NJsonSchema" Version="9.10.50" />
</ItemGroup>
</Project>
@@ -8,7 +8,7 @@
<ItemGroup>
<!-- the following package(s) are from https://github.com/dotnet/corefx -->
<PackageReference Include="System.Security.Principal.Windows" Version="4.5.0-rc1-26423-06" />
<PackageReference Include="System.Security.Principal.Windows" Version="4.5.0" />
</ItemGroup>
</Project>
@@ -16,21 +16,22 @@
<ItemGroup>
<!-- the following package(s) are from https://github.com/dotnet/fxdac -->
<PackageReference Include="System.Data.SqlClient" Version="4.5.0-rc1-26423-06" />
<PackageReference Include="System.Data.SqlClient" Version="4.5.0" />
<!-- the following package(s) are from https://github.com/dotnet/corefx -->
<PackageReference Include="System.IO.Packaging" Version="4.5.0-rc1-26423-06" />
<PackageReference Include="System.Net.Http.WinHttpHandler" Version="4.5.0-rc1-26423-06" />
<PackageReference Include="System.Text.Encodings.Web" Version="4.5.0-rc1-26423-06" />
<PackageReference Include="System.Threading.AccessControl" Version="4.5.0-rc1-26423-06" />
<PackageReference Include="System.IO.Packaging" Version="4.5.0" />
<PackageReference Include="System.Net.Http.WinHttpHandler" Version="4.5.0" />
<PackageReference Include="System.Text.Encodings.Web" Version="4.5.0" />
<PackageReference Include="System.Threading.AccessControl" Version="4.5.0" />
<!-- the following package(s) are from https://github.com/dotnet/wfc -->
<PackageReference Include="System.ServiceModel.Duplex" Version="4.5.0-rc1-26423-01" />
<PackageReference Include="System.ServiceModel.Http" Version="4.5.0-rc1-26423-01" />
<PackageReference Include="System.ServiceModel.NetTcp" Version="4.5.0-rc1-26423-01" />
<PackageReference Include="System.ServiceModel.Primitives" Version="4.5.0-rc1-26423-01" />
<PackageReference Include="System.ServiceModel.Security" Version="4.5.0-rc1-26423-01" />
<PackageReference Include="System.Private.ServiceModel" Version="4.5.0-rc1-26423-01" />
<PackageReference Include="System.ServiceModel.Duplex" Version="4.5.0" />
<PackageReference Include="System.ServiceModel.Http" Version="4.5.0" />
<PackageReference Include="System.ServiceModel.NetTcp" Version="4.5.0" />
<PackageReference Include="System.ServiceModel.Primitives" Version="4.5.0" />
<PackageReference Include="System.ServiceModel.Security" Version="4.5.0" />
<PackageReference Include="System.Private.ServiceModel" Version="4.5.0" />
<!-- the source could not be found for the following package(s) -->
<PackageReference Include="Microsoft.NETCore.Windows.ApiSets" Version="1.0.1" />
<PackageReference Include="Microsoft.Windows.Compatibility" Version="2.0.0" />
</ItemGroup>
</Project>
@@ -9,7 +9,7 @@
<ProjectReference Include="..\System.Management.Automation\System.Management.Automation.csproj" />
<ProjectReference Include="..\Microsoft.WSMan.Runtime\Microsoft.WSMan.Runtime.csproj" />
<!-- the following package(s) are from https://github.com/dotnet/corefx -->
<PackageReference Include="System.ServiceProcess.ServiceController" Version="4.5.0-rc1-26423-06" />
<PackageReference Include="System.ServiceProcess.ServiceController" Version="4.5.0" />
</ItemGroup>
<PropertyGroup>
@@ -9,14 +9,14 @@
<ItemGroup>
<ProjectReference Include="..\Microsoft.PowerShell.CoreCLR.Eventing\Microsoft.PowerShell.CoreCLR.Eventing.csproj" />
<!-- the following package(s) are from https://github.com/JamesNK/Newtonsoft.Json -->
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
<!-- the following package(s) are from https://github.com/dotnet/corefx -->
<PackageReference Include="Microsoft.Win32.Registry.AccessControl" Version="4.5.0-rc1-26423-06" />
<PackageReference Include="System.IO.FileSystem.AccessControl" Version="4.5.0-rc1-26423-06" />
<PackageReference Include="System.Security.AccessControl" Version="4.5.0-rc1-26423-06" />
<PackageReference Include="System.Security.Cryptography.Pkcs" Version="4.5.0-rc1-26423-06" />
<PackageReference Include="System.Security.Permissions" Version="4.5.0-rc1-26423-06" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="4.5.0-rc1-26423-06" />
<PackageReference Include="Microsoft.Win32.Registry.AccessControl" Version="4.5.0" />
<PackageReference Include="System.IO.FileSystem.AccessControl" Version="4.5.0" />
<PackageReference Include="System.Security.AccessControl" Version="4.5.0" />
<PackageReference Include="System.Security.Cryptography.Pkcs" Version="4.5.0" />
<PackageReference Include="System.Security.Permissions" Version="4.5.0" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="4.5.0" />
<!-- the following package(s) are from the powershell org -->
<PackageReference Include="Microsoft.Management.Infrastructure" Version="1.0.0-alpha*" />
<PackageReference Include="PowerShell.Core.Instrumentation" Version="6.0.0-beta*" />
@@ -669,9 +669,10 @@ namespace NativeMsh
static PCSTR trustedAssemblies[] =
{
"Microsoft.ApplicationInsights",
"Microsoft.CodeAnalysis",
"Microsoft.CodeAnalysis.CSharp",
"Microsoft.CodeAnalysis",
"Microsoft.CSharp",
"Microsoft.DiaSymReader.Native.amd64",
"Microsoft.Management.Infrastructure",
"Microsoft.Management.Infrastructure.CimCmdlets",
"Microsoft.Management.Infrastructure.Native",
@@ -680,7 +681,6 @@ namespace NativeMsh
"Microsoft.PowerShell.Commands.Utility",
"Microsoft.PowerShell.ConsoleHost",
"Microsoft.PowerShell.CoreCLR.Eventing",
"Microsoft.PowerShell.LocalAccounts",
"Microsoft.PowerShell.PSReadLine",
"Microsoft.PowerShell.SDK",
"Microsoft.PowerShell.Security",
@@ -688,46 +688,60 @@ namespace NativeMsh
"Microsoft.Win32.Primitives",
"Microsoft.Win32.Registry",
"Microsoft.Win32.Registry.AccessControl",
"Microsoft.Win32.SystemEvents",
"Microsoft.WSMan.Management",
"Microsoft.WSMan.Runtime",
"mscorlib",
"netstandard",
"Newtonsoft.Json",
"NJsonSchema",
"PowerShell.Core.Instrumentation",
"System",
"System.AppContext",
"System.Buffers",
"System.CodeDom",
"System.Collections",
"System.Collections.Concurrent",
"System.Collections.Immutable",
"System.Collections.NonGeneric",
"System.Collections.Specialized",
"System.Configuration",
"System.ComponentModel",
"System.ComponentModel.Annotations",
"System.ComponentModel.Composition",
"System.ComponentModel.DataAnnotations",
"System.ComponentModel",
"System.ComponentModel.EventBasedAsync",
"System.ComponentModel.Primitives",
"System.ComponentModel.TypeConverter",
"System.Configuration",
"System.Configuration.ConfigurationManager",
"System.Console",
"System.Core",
"System.Data",
"System.Data.Common",
"System.Data.DataSetExtensions",
"System.Data.Odbc",
"System.Data.SqlClient",
"System.Diagnostics.Contracts",
"System.Diagnostics.Debug",
"System.Diagnostics.DiagnosticSource",
"System.Diagnostics.EventLog",
"System.Diagnostics.FileVersionInfo",
"System.Diagnostics.PerformanceCounter",
"System.Diagnostics.Process",
"System.Diagnostics.StackTrace",
"System.Diagnostics.TextWriterTraceListener",
"System.Diagnostics.Tools",
"System.Diagnostics.TraceSource",
"System.Diagnostics.Tracing",
"System.DirectoryServices",
"System.DirectoryServices.AccountManagement",
"System.DirectoryServices.Protocols",
"System.Drawing",
"System.Drawing.Common",
"System.Drawing.Primitives",
"System.Dynamic.Runtime",
"System.Globalization",
"System.Globalization.Calendars",
"System.Globalization",
"System.Globalization.Extensions",
"System.IO",
"System.IO.Compression",
@@ -744,11 +758,13 @@ namespace NativeMsh
"System.IO.Packaging",
"System.IO.Pipes",
"System.IO.Pipes.AccessControl",
"System.IO.Ports",
"System.IO.UnmanagedMemoryStream",
"System.Linq",
"System.Linq.Expressions",
"System.Linq.Parallel",
"System.Linq.Queryable",
"System.Management",
"System.Management.Automation",
"System.Memory",
"System.Net",
@@ -791,6 +807,8 @@ namespace NativeMsh
"System.Resources.ResourceManager",
"System.Resources.Writer",
"System.Runtime",
"System.Runtime.Caching",
"System.Runtime.CompilerServices.Unsafe",
"System.Runtime.CompilerServices.VisualC",
"System.Runtime.Extensions",
"System.Runtime.Handles",
@@ -804,7 +822,6 @@ namespace NativeMsh
"System.Runtime.Serialization.Json",
"System.Runtime.Serialization.Primitives",
"System.Runtime.Serialization.Xml",
"System.Security",
"System.Security.AccessControl",
"System.Security.Claims",
"System.Security.Cryptography.Algorithms",
@@ -814,16 +831,21 @@ namespace NativeMsh
"System.Security.Cryptography.OpenSsl",
"System.Security.Cryptography.Pkcs",
"System.Security.Cryptography.Primitives",
"System.Security.Cryptography.ProtectedData",
"System.Security.Cryptography.X509Certificates",
"System.Security.Cryptography.Xml",
"System.Security",
"System.Security.Permissions",
"System.Security.Principal",
"System.Security.Principal.Windows",
"System.Security.SecureString",
"System.ServiceModel",
"System.ServiceModel.Duplex",
"System.ServiceModel.Http",
"System.ServiceModel.NetTcp",
"System.ServiceModel.Primitives",
"System.ServiceModel.Security",
"System.ServiceModel.Syndication",
"System.ServiceModel.Web",
"System.ServiceProcess",
"System.ServiceProcess.ServiceController",
@@ -835,8 +857,8 @@ namespace NativeMsh
"System.Threading",
"System.Threading.AccessControl",
"System.Threading.Overlapped",
"System.Threading.Tasks",
"System.Threading.Tasks.Dataflow",
"System.Threading.Tasks",
"System.Threading.Tasks.Extensions",
"System.Threading.Tasks.Parallel",
"System.Threading.Thread",