mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-14 05:39:11 +00:00
Update PowerShell to build against dotnet 5.0-RC.1 (#13643)
This commit is contained in:
1 parent
3effa20410
commit
10237bdeb3
61 files changed
+105
-147
No files matched your search
@@ -3,7 +3,7 @@
|
||||
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
|
||||
#-------------------------------------------------------------------------------------------------------------
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/nightly/sdk:5.0.100-preview.7
|
||||
FROM mcr.microsoft.com/dotnet/nightly/sdk:5.0.100-rc.1
|
||||
|
||||
# Avoid warnings by switching to noninteractive
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"sdk": {
|
||||
"channel": "release/5.0.1xx-preview8",
|
||||
"packageVersionPattern": "5.0.0-preview.8",
|
||||
"sdkImageVersion": "5.0.100-preview.8",
|
||||
"nextChannel": "net5/preview8"
|
||||
"channel": "release/5.0.1xx-rc1",
|
||||
"packageVersionPattern": "5.0.0-rc.1",
|
||||
"sdkImageVersion": "5.0.100-rc.1",
|
||||
"nextChannel": "net5/rc1"
|
||||
}
|
||||
}
|
||||
@@ -97,7 +97,7 @@
|
||||
<Copyright>(c) Microsoft Corporation.</Copyright>
|
||||
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<LangVersion>preview</LangVersion>
|
||||
<LangVersion>9.0</LangVersion>
|
||||
<PublishReadyToRun Condition=" '$(Configuration)' != 'Debug' ">true</PublishReadyToRun>
|
||||
|
||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
|
||||
+19
-7
@@ -1623,6 +1623,12 @@
|
||||
<Component Id="cmp72C41225E0B4457C8CB5F4C5FE6E3187" Guid="{ee32f38f-14ee-4a85-914f-d02522cc3635}">
|
||||
<File Id="fil04B0F83A7AED430A86A7E6E3E99AB45D" KeyPath="yes" Source="$(var.ProductSourcePath)\ref\System.Formats.Asn1.dll" />
|
||||
</Component>
|
||||
<Component Id="cmp9407AB75A97A459C8EC1EE3BDB63740C">
|
||||
<File Id="fil068384878908467D8CE96F14D7956169" KeyPath="yes" Source="$(var.ProductSourcePath)\ref\System.Net.Connections.dll" />
|
||||
</Component>
|
||||
<Component Id="cmp54F79ECE6EC8435E976CD10403092841">
|
||||
<File Id="filB954C7041A90438BBF70EEE79A4C111C" KeyPath="yes" Source="$(var.ProductSourcePath)\ref\System.IO.Pipelines.dll" />
|
||||
</Component>
|
||||
</Directory>
|
||||
<Directory Id="dirC72EEAF9434D4AD066E0F4D20D8E816C" Name="en-US">
|
||||
<Component Id="cmpDC2EF4541FA5A2E63F36A8CD6C5FA51B">
|
||||
@@ -3096,17 +3102,20 @@
|
||||
<Component Id="cmp0989343D60B74AF082291F612F0E6FA6">
|
||||
<File Id="filECDFEB9313BF4BF68CEE13A6EA1DB388" KeyPath="yes" Source="$(var.ProductSourcePath)\createdump.exe" />
|
||||
</Component>
|
||||
<Component Id="cmp7BDE558CCB344A399134DE2C9E2C8D3D">
|
||||
<File Id="filF907AD3E73324DEA94AE90E9625AFA73" KeyPath="yes" Source="$(var.ProductSourcePath)\api-ms-win-core-console-l1-2-0.dll" />
|
||||
</Component>
|
||||
<Component Id="cmp0BD7D15E0377407FA4C43BFE89F0C12E">
|
||||
<File Id="fil6EF5C2AED8674A32B0F3CCEE9CBEED71" KeyPath="yes" Source="$(var.ProductSourcePath)\System.Formats.Asn1.dll" />
|
||||
</Component>
|
||||
<Component Id="cmpC0FFB3F4FB30438082D2DC0F4E4BF12D">
|
||||
<File Id="fil8FEEEB3B27DF40148EB85CE6AE1A420B" KeyPath="yes" Source="$(var.ProductSourcePath)\Microsoft.DiaSymReader.Native.$(var.FileArchitecture).dll" />
|
||||
</Component>
|
||||
<Component Id="cmp9AFE828DDCCC4A0E83C4D7476B353023">
|
||||
<File Id="filBE5924015B7147E5BE1D6CDEB8AFB6C3" KeyPath="yes" Source="$(var.ProductSourcePath)\mscordaccore_$(var.FileArchitecture)_$(var.FileArchitecture)_5.0.20.40711.dll" />
|
||||
<Component Id="cmpF76ECC3925E043EB98C4578A3346B684">
|
||||
<File Id="fil251640C5EE634742AE9450F846FEC9AF" KeyPath="yes" Source="$(var.ProductSourcePath)\System.IO.Pipelines.dll" />
|
||||
</Component>
|
||||
<Component Id="cmpA3CF1D943BA741049C9F72CF4446E741">
|
||||
<File Id="filC95A84B32FDC4F63B82B9AF643B92648" KeyPath="yes" Source="$(var.ProductSourcePath)\System.Net.Connections.dll" />
|
||||
</Component>
|
||||
<Component Id="cmp57C0FF2ADCED4FF79BA2F72269483746">
|
||||
<File Id="fil5113EA907A714CB69F9A621DC4BAAAD4" KeyPath="yes" Source="$(var.ProductSourcePath)\mscordaccore_$(var.FileArchitecture)_$(var.FileArchitecture)_5.0.20.45114.dll" />
|
||||
</Component>
|
||||
</DirectoryRef>
|
||||
</Fragment>
|
||||
@@ -4105,11 +4114,14 @@
|
||||
<ComponentRef Id="cmpBB705B2570064C99A71B6FA65CDF9DC8" />
|
||||
<ComponentRef Id="cmpE9599A00802144DF98F5792E029C8875" />
|
||||
<ComponentRef Id="cmp0989343D60B74AF082291F612F0E6FA6" />
|
||||
<ComponentRef Id="cmp7BDE558CCB344A399134DE2C9E2C8D3D" />
|
||||
<ComponentRef Id="cmp72C41225E0B4457C8CB5F4C5FE6E3187" />
|
||||
<ComponentRef Id="cmp0BD7D15E0377407FA4C43BFE89F0C12E" />
|
||||
<ComponentRef Id="cmpC0FFB3F4FB30438082D2DC0F4E4BF12D" />
|
||||
<ComponentRef Id="cmp9AFE828DDCCC4A0E83C4D7476B353023" />
|
||||
<ComponentRef Id="cmp9407AB75A97A459C8EC1EE3BDB63740C" />
|
||||
<ComponentRef Id="cmp54F79ECE6EC8435E976CD10403092841" />
|
||||
<ComponentRef Id="cmpF76ECC3925E043EB98C4578A3346B684" />
|
||||
<ComponentRef Id="cmpA3CF1D943BA741049C9F72CF4446E741" />
|
||||
<ComponentRef Id="cmp57C0FF2ADCED4FF79BA2F72269483746" />
|
||||
</ComponentGroup>
|
||||
</Fragment>
|
||||
</Wix>
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"sdk": {
|
||||
"version": "5.0.100-preview.8.20417.9"
|
||||
"version": "5.0.100-rc.1.20452.10"
|
||||
}
|
||||
}
|
||||
+4
-4
@@ -40,14 +40,14 @@ namespace Microsoft.Management.UI.Internal
|
||||
FilterRule copy = null;
|
||||
try
|
||||
{
|
||||
#pragma warning disable MSLIB0003
|
||||
#pragma warning disable SYSLIB0011
|
||||
formatter.Serialize(ms, rule);
|
||||
#pragma warning restore MSLIB0003
|
||||
#pragma warning restore SYSLIB0011
|
||||
|
||||
ms.Position = 0;
|
||||
#pragma warning disable MSLIB0003
|
||||
#pragma warning disable SYSLIB0011
|
||||
copy = (FilterRule)formatter.Deserialize(ms);
|
||||
#pragma warning restore MSLIB0003
|
||||
#pragma warning restore SYSLIB0011
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
<Import Project="..\..\PowerShell.Common.props" />
|
||||
<PropertyGroup>
|
||||
<Description>PowerShell's Microsoft.PowerShell.Commands.Diagnostics project</Description>
|
||||
<NoWarn>$(NoWarn);CS1591</NoWarn>
|
||||
<NoWarn>$(NoWarn);CS1591;CA1416</NoWarn>
|
||||
<AssemblyName>Microsoft.PowerShell.Commands.Diagnostics</AssemblyName>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
@@ -20,7 +20,6 @@ namespace Microsoft.Powershell.Commands.GetCounter.PdhNative
|
||||
}
|
||||
}
|
||||
|
||||
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)]
|
||||
protected override bool ReleaseHandle()
|
||||
{
|
||||
return (PdhHelper.PdhCloseLog(handle, 0) == 0);
|
||||
@@ -39,7 +38,6 @@ namespace Microsoft.Powershell.Commands.GetCounter.PdhNative
|
||||
}
|
||||
}
|
||||
|
||||
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)]
|
||||
protected override bool ReleaseHandle()
|
||||
{
|
||||
return (PdhHelper.PdhCloseQuery(handle) == 0);
|
||||
@@ -58,7 +56,6 @@ namespace Microsoft.Powershell.Commands.GetCounter.PdhNative
|
||||
}
|
||||
}
|
||||
|
||||
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)]
|
||||
protected override bool ReleaseHandle()
|
||||
{
|
||||
return (PdhHelper.PdhCloseLog(handle, 0) == 0);
|
||||
|
||||
+2
-2
@@ -2,7 +2,7 @@
|
||||
<Import Project="..\..\PowerShell.Common.props" />
|
||||
<PropertyGroup>
|
||||
<Description>PowerShell's Microsoft.PowerShell.Commands.Management project</Description>
|
||||
<NoWarn>$(NoWarn);CS1570</NoWarn>
|
||||
<NoWarn>$(NoWarn);CS1570;CA1416</NoWarn>
|
||||
<AssemblyName>Microsoft.PowerShell.Commands.Management</AssemblyName>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
|
||||
<ItemGroup>
|
||||
<!-- the following package(s) are from https://github.com/dotnet/corefx -->
|
||||
<PackageReference Include="System.ServiceProcess.ServiceController" Version="5.0.0-preview.8.20407.11" />
|
||||
<PackageReference Include="System.ServiceProcess.ServiceController" Version="5.0.0-rc.1.20451.14" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -123,7 +123,6 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// <param name="context">
|
||||
/// streaming context
|
||||
/// </param>
|
||||
[SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)]
|
||||
public override void GetObjectData(SerializationInfo info, StreamingContext context)
|
||||
{
|
||||
if (info == null)
|
||||
|
||||
@@ -2794,14 +2794,13 @@ namespace Microsoft.PowerShell.Commands
|
||||
{
|
||||
}
|
||||
|
||||
[SecurityPermission(SecurityAction.LinkDemand, UnmanagedCode = true)]
|
||||
internal SafeLocalMemHandle(IntPtr existingHandle, bool ownsHandle)
|
||||
: base(ownsHandle)
|
||||
{
|
||||
base.SetHandle(existingHandle);
|
||||
}
|
||||
|
||||
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success), DllImport(PinvokeDllNames.LocalFreeDllName)]
|
||||
[DllImport(PinvokeDllNames.LocalFreeDllName)]
|
||||
private static extern IntPtr LocalFree(IntPtr hMem);
|
||||
|
||||
protected override bool ReleaseHandle()
|
||||
@@ -2877,7 +2876,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
|
||||
internal static class SafeNativeMethods
|
||||
{
|
||||
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success), DllImport(PinvokeDllNames.CloseHandleDllName, SetLastError = true, ExactSpelling = true)]
|
||||
[DllImport(PinvokeDllNames.CloseHandleDllName, SetLastError = true, ExactSpelling = true)]
|
||||
public static extern bool CloseHandle(IntPtr handle);
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
@@ -2999,9 +2998,6 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// </summary>
|
||||
/// <param name="info">Serialization information.</param>
|
||||
/// <param name="context">Streaming context.</param>
|
||||
[SecurityPermissionAttribute(
|
||||
SecurityAction.Demand,
|
||||
SerializationFormatter = true)]
|
||||
public override void GetObjectData(
|
||||
SerializationInfo info,
|
||||
StreamingContext context)
|
||||
|
||||
@@ -2575,7 +2575,6 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// </summary>
|
||||
/// <param name="info">Serialization information.</param>
|
||||
/// <param name="context">Streaming context.</param>
|
||||
[SecurityPermissionAttribute(SecurityAction.Demand, SerializationFormatter = true)]
|
||||
public override void GetObjectData(SerializationInfo info, StreamingContext context)
|
||||
{
|
||||
if (info == null)
|
||||
|
||||
+3
-3
@@ -2,7 +2,7 @@
|
||||
<Import Project="..\..\PowerShell.Common.props" />
|
||||
<PropertyGroup>
|
||||
<Description>PowerShell's Microsoft.PowerShell.Commands.Utility project</Description>
|
||||
<NoWarn>$(NoWarn);CS1570</NoWarn>
|
||||
<NoWarn>$(NoWarn);CS1570;CA1416</NoWarn>
|
||||
<AssemblyName>Microsoft.PowerShell.Commands.Utility</AssemblyName>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -32,8 +32,8 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="3.7.0" />
|
||||
<PackageReference Include="System.Threading.AccessControl" Version="5.0.0-preview.8.20407.11" />
|
||||
<PackageReference Include="System.Drawing.Common" Version="5.0.0-preview.8.20407.11" />
|
||||
<PackageReference Include="System.Threading.AccessControl" Version="5.0.0-rc.1.20451.14" />
|
||||
<PackageReference Include="System.Drawing.Common" Version="5.0.0-rc.1.20451.14" />
|
||||
<PackageReference Include="NJsonSchema" Version="10.1.26" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
-3
@@ -52,7 +52,6 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// <param name="disposing">
|
||||
/// True if the TraceListener is being disposed, false otherwise.
|
||||
/// </param>
|
||||
[SecurityPermission(SecurityAction.LinkDemand)]
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
try
|
||||
@@ -76,7 +75,6 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// <param name="output">
|
||||
/// The trace output to be written.
|
||||
/// </param>
|
||||
[SecurityPermission(SecurityAction.LinkDemand)]
|
||||
public override void Write(string output)
|
||||
{
|
||||
try
|
||||
@@ -98,7 +96,6 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// <param name="output">
|
||||
/// The trace output to be written.
|
||||
/// </param>
|
||||
[SecurityPermission(SecurityAction.LinkDemand)]
|
||||
public override void WriteLine(string output)
|
||||
{
|
||||
try
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<Import Project="..\..\PowerShell.Common.props" />
|
||||
<PropertyGroup>
|
||||
<Description>PowerShell Host</Description>
|
||||
<NoWarn>$(NoWarn);CS1570</NoWarn>
|
||||
<NoWarn>$(NoWarn);CS1570;CA1416</NoWarn>
|
||||
<AssemblyName>Microsoft.PowerShell.ConsoleHost</AssemblyName>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
+2
-2
@@ -2,13 +2,13 @@
|
||||
<Import Project="..\..\PowerShell.Common.props" />
|
||||
<PropertyGroup>
|
||||
<Description>PowerShell's Microsoft.PowerShell.CoreCLR.Eventing project</Description>
|
||||
<NoWarn>$(NoWarn);CS1591</NoWarn>
|
||||
<NoWarn>$(NoWarn);CS1591;CA1416</NoWarn>
|
||||
<AssemblyName>Microsoft.PowerShell.CoreCLR.Eventing</AssemblyName>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<!-- the following package(s) are from https://github.com/dotnet/corefx -->
|
||||
<PackageReference Include="System.Diagnostics.EventLog" Version="5.0.0-preview.8.20407.11" />
|
||||
<PackageReference Include="System.Diagnostics.EventLog" Version="5.0.0-rc.1.20451.14" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -18,9 +18,9 @@
|
||||
<!-- the following package(s) are from https://github.com/dotnet/fxdac -->
|
||||
<PackageReference Include="System.Data.SqlClient" Version="4.8.1" />
|
||||
<!-- the following package(s) are from https://github.com/dotnet/corefx -->
|
||||
<PackageReference Include="System.IO.Packaging" Version="5.0.0-preview.8.20407.11" />
|
||||
<PackageReference Include="System.Net.Http.WinHttpHandler" Version="5.0.0-preview.8.20407.11" />
|
||||
<PackageReference Include="System.Text.Encodings.Web" Version="5.0.0-preview.8.20407.11" />
|
||||
<PackageReference Include="System.IO.Packaging" Version="5.0.0-rc.1.20451.14" />
|
||||
<PackageReference Include="System.Net.Http.WinHttpHandler" Version="5.0.0-rc.1.20451.14" />
|
||||
<PackageReference Include="System.Text.Encodings.Web" Version="5.0.0-rc.1.20451.14" />
|
||||
<!-- the following package(s) are from https://github.com/dotnet/wcf -->
|
||||
<PackageReference Include="System.ServiceModel.Duplex" Version="4.7.0" />
|
||||
<PackageReference Include="System.ServiceModel.Http" Version="4.7.0" />
|
||||
@@ -30,7 +30,7 @@
|
||||
<PackageReference Include="System.Private.ServiceModel" Version="4.7.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="5.0.0-preview.8.20407.11" />
|
||||
<PackageReference Include="Microsoft.Windows.Compatibility" Version="5.0.0-rc.1.20451.14" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -387,7 +387,6 @@ namespace Microsoft.PowerShell.ScheduledJob
|
||||
/// </summary>
|
||||
/// <param name="info">SerializationInfo.</param>
|
||||
/// <param name="context">StreamingContext.</param>
|
||||
[SecurityPermissionAttribute(SecurityAction.Demand, SerializationFormatter = true)]
|
||||
private ScheduledJob(
|
||||
SerializationInfo info,
|
||||
StreamingContext context)
|
||||
@@ -407,7 +406,6 @@ namespace Microsoft.PowerShell.ScheduledJob
|
||||
/// </summary>
|
||||
/// <param name="info">SerializationInfo.</param>
|
||||
/// <param name="context">StreamingContext.</param>
|
||||
[SecurityPermissionAttribute(SecurityAction.Demand, SerializationFormatter = true)]
|
||||
public void GetObjectData(
|
||||
SerializationInfo info,
|
||||
StreamingContext context)
|
||||
@@ -1058,7 +1056,6 @@ namespace Microsoft.PowerShell.ScheduledJob
|
||||
}
|
||||
|
||||
// ISerializable
|
||||
[SecurityPermissionAttribute(SecurityAction.Demand, SerializationFormatter = true)]
|
||||
private ResultsInfo(
|
||||
SerializationInfo info,
|
||||
StreamingContext context)
|
||||
@@ -1086,7 +1083,6 @@ namespace Microsoft.PowerShell.ScheduledJob
|
||||
}
|
||||
}
|
||||
|
||||
[SecurityPermissionAttribute(SecurityAction.Demand, SerializationFormatter = true)]
|
||||
public void GetObjectData(
|
||||
SerializationInfo info,
|
||||
StreamingContext context)
|
||||
@@ -1208,7 +1204,6 @@ namespace Microsoft.PowerShell.ScheduledJob
|
||||
}
|
||||
|
||||
// ISerializable
|
||||
[SecurityPermissionAttribute(SecurityAction.Demand, SerializationFormatter = true)]
|
||||
private StatusInfo(
|
||||
SerializationInfo info,
|
||||
StreamingContext context)
|
||||
@@ -1248,7 +1243,6 @@ namespace Microsoft.PowerShell.ScheduledJob
|
||||
}
|
||||
}
|
||||
|
||||
[SecurityPermissionAttribute(SecurityAction.Demand, SerializationFormatter = true)]
|
||||
public void GetObjectData(
|
||||
SerializationInfo info,
|
||||
StreamingContext context)
|
||||
|
||||
@@ -235,7 +235,6 @@ namespace Microsoft.PowerShell.ScheduledJob
|
||||
/// </summary>
|
||||
/// <param name="info">SerializationInfo.</param>
|
||||
/// <param name="context">StreamingContext.</param>
|
||||
[SecurityPermissionAttribute(SecurityAction.Demand, SerializationFormatter = true)]
|
||||
private ScheduledJobDefinition(
|
||||
SerializationInfo info,
|
||||
StreamingContext context)
|
||||
@@ -275,7 +274,6 @@ namespace Microsoft.PowerShell.ScheduledJob
|
||||
/// </summary>
|
||||
/// <param name="info">SerializationInfo.</param>
|
||||
/// <param name="context">StreamingContext.</param>
|
||||
[SecurityPermissionAttribute(SecurityAction.Demand, SerializationFormatter = true)]
|
||||
public void GetObjectData(SerializationInfo info, StreamingContext context)
|
||||
{
|
||||
if (info == null)
|
||||
|
||||
@@ -294,7 +294,6 @@ namespace Microsoft.PowerShell.ScheduledJob
|
||||
/// </summary>
|
||||
/// <param name="info">SerializationInfo.</param>
|
||||
/// <param name="context">StreamingContext.</param>
|
||||
[SecurityPermissionAttribute(SecurityAction.Demand, SerializationFormatter = true)]
|
||||
private ScheduledJobOptions(
|
||||
SerializationInfo info,
|
||||
StreamingContext context)
|
||||
@@ -327,7 +326,6 @@ namespace Microsoft.PowerShell.ScheduledJob
|
||||
/// </summary>
|
||||
/// <param name="info">SerializationInfo.</param>
|
||||
/// <param name="context">StreamingContext.</param>
|
||||
[SecurityPermissionAttribute(SecurityAction.Demand, SerializationFormatter = true)]
|
||||
public void GetObjectData(SerializationInfo info, StreamingContext context)
|
||||
{
|
||||
if (info == null)
|
||||
|
||||
@@ -240,7 +240,6 @@ namespace Microsoft.PowerShell.ScheduledJob
|
||||
/// </summary>
|
||||
/// <param name="info">SerializationInfo.</param>
|
||||
/// <param name="context">StreamingContext.</param>
|
||||
[SecurityPermissionAttribute(SecurityAction.Demand, SerializationFormatter = true)]
|
||||
private ScheduledJobTrigger(
|
||||
SerializationInfo info,
|
||||
StreamingContext context)
|
||||
@@ -284,7 +283,6 @@ namespace Microsoft.PowerShell.ScheduledJob
|
||||
/// </summary>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="context"></param>
|
||||
[SecurityPermissionAttribute(SecurityAction.Demand, SerializationFormatter = true)]
|
||||
public void GetObjectData(SerializationInfo info, StreamingContext context)
|
||||
{
|
||||
if (info == null)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<Import Project="..\..\PowerShell.Common.props" />
|
||||
<PropertyGroup>
|
||||
<Description>PowerShell's Microsoft.PowerShell.Security project</Description>
|
||||
<NoWarn>$(NoWarn);CS1570</NoWarn>
|
||||
<NoWarn>$(NoWarn);CS1570;CA1416</NoWarn>
|
||||
<AssemblyName>Microsoft.PowerShell.Security</AssemblyName>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<Import Project="..\..\PowerShell.Common.props" />
|
||||
<PropertyGroup>
|
||||
<Description>PowerShell's Microsoft.WSMan.Management project</Description>
|
||||
<NoWarn>$(NoWarn);CA1416</NoWarn>
|
||||
<AssemblyName>Microsoft.WSMan.Management</AssemblyName>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -9,7 +10,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="5.0.0-preview.8.20407.11" />
|
||||
<PackageReference Include="System.ServiceProcess.ServiceController" Version="5.0.0-rc.1.20451.14" />
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
|
||||
@@ -109,7 +109,6 @@ namespace System.Management.Automation.Runspaces
|
||||
/// </summary>
|
||||
/// <param name="info">Serialization information.</param>
|
||||
/// <param name="context">Streaming context.</param>
|
||||
[SecurityPermissionAttribute(SecurityAction.Demand, SerializationFormatter = true)]
|
||||
public override void GetObjectData(SerializationInfo info, StreamingContext context)
|
||||
{
|
||||
if (info == null)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<Import Project="..\..\PowerShell.Common.props" />
|
||||
<PropertyGroup>
|
||||
<Description>PowerShell's System.Management.Automation project</Description>
|
||||
<NoWarn>$(NoWarn);CS1570;CS1734</NoWarn>
|
||||
<NoWarn>$(NoWarn);CS1570;CS1734;CA1416</NoWarn>
|
||||
<AssemblyName>System.Management.Automation</AssemblyName>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -16,16 +16,16 @@
|
||||
<!-- the Application Insights package -->
|
||||
<PackageReference Include="Microsoft.ApplicationInsights" Version="2.14.0" />
|
||||
<!-- the following package(s) are from https://github.com/dotnet/corefx -->
|
||||
<PackageReference Include="Microsoft.Win32.Registry.AccessControl" Version="5.0.0-preview.8.20407.11" />
|
||||
<PackageReference Include="System.Configuration.ConfigurationManager" Version="5.0.0-preview.8.20407.11" />
|
||||
<PackageReference Include="System.DirectoryServices" Version="5.0.0-preview.8.20407.11" />
|
||||
<PackageReference Include="System.IO.FileSystem.AccessControl" Version="5.0.0-preview.8.20407.11" />
|
||||
<PackageReference Include="System.Management" Version="5.0.0-preview.8.20407.11" />
|
||||
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="5.0.0-preview.8.20407.11" />
|
||||
<PackageReference Include="System.Security.AccessControl" Version="5.0.0-preview.8.20407.11" />
|
||||
<PackageReference Include="System.Security.Cryptography.Pkcs" Version="5.0.0-preview.8.20407.11" />
|
||||
<PackageReference Include="System.Security.Permissions" Version="5.0.0-preview.8.20407.11" />
|
||||
<PackageReference Include="System.Text.Encoding.CodePages" Version="5.0.0-preview.8.20407.11" />
|
||||
<PackageReference Include="Microsoft.Win32.Registry.AccessControl" Version="5.0.0-rc.1.20451.14" />
|
||||
<PackageReference Include="System.Configuration.ConfigurationManager" Version="5.0.0-rc.1.20451.14" />
|
||||
<PackageReference Include="System.DirectoryServices" Version="5.0.0-rc.1.20451.14" />
|
||||
<PackageReference Include="System.IO.FileSystem.AccessControl" Version="5.0.0-rc.1.20451.14" />
|
||||
<PackageReference Include="System.Management" Version="5.0.0-rc.1.20451.14" />
|
||||
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="5.0.0-rc.1.20451.14" />
|
||||
<PackageReference Include="System.Security.AccessControl" Version="5.0.0-rc.1.20451.14" />
|
||||
<PackageReference Include="System.Security.Cryptography.Pkcs" Version="5.0.0-rc.1.20451.14" />
|
||||
<PackageReference Include="System.Security.Permissions" Version="5.0.0-rc.1.20451.14" />
|
||||
<PackageReference Include="System.Text.Encoding.CodePages" Version="5.0.0-rc.1.20451.14" />
|
||||
<!-- the following package(s) are from the powershell org -->
|
||||
<PackageReference Include="Microsoft.Management.Infrastructure" Version="2.0.0" />
|
||||
<PackageReference Include="Microsoft.PowerShell.Native" Version="7.0.0" />
|
||||
|
||||
@@ -336,7 +336,7 @@ namespace System.Management.Automation.ComInterop
|
||||
// This method is intended for use through reflection and should only be used directly by IUnknownReleaseNotZero
|
||||
public static unsafe int IUnknownRelease(IntPtr interfacePointer)
|
||||
{
|
||||
return ((delegate* stdcall<IntPtr, int>)(*(*(void***)interfacePointer + 2 /* IUnknown.Release slot */)))(interfacePointer);
|
||||
return ((delegate* unmanaged<IntPtr, int>)(*(*(void***)interfacePointer + 2 /* IUnknown.Release slot */)))(interfacePointer);
|
||||
}
|
||||
|
||||
// This method is intended for use through reflection and should not be used directly
|
||||
@@ -365,7 +365,7 @@ namespace System.Management.Automation.ComInterop
|
||||
fixed (ExcepInfo* pExcepInfo = &excepInfo)
|
||||
fixed (uint* pArgErr = &argErr)
|
||||
{
|
||||
var pfnIDispatchInvoke = (delegate* stdcall <IntPtr, int, Guid*, int, ushort, ComTypes.DISPPARAMS*, Variant*, ExcepInfo*, uint*, int>)
|
||||
var pfnIDispatchInvoke = (delegate* unmanaged<IntPtr, int, Guid*, int, ushort, ComTypes.DISPPARAMS*, Variant*, ExcepInfo*, uint*, int>)
|
||||
(*(*(void***)dispatchPointer + 6 /* IDispatch.Invoke slot */));
|
||||
|
||||
int hresult = pfnIDispatchInvoke(dispatchPointer,
|
||||
|
||||
@@ -720,7 +720,6 @@ namespace System.Management.Automation
|
||||
/// </summary>
|
||||
/// <param name="info">Serialization information.</param>
|
||||
/// <param name="context">Streaming context.</param>
|
||||
[SecurityPermissionAttribute(SecurityAction.Demand, SerializationFormatter = true)]
|
||||
public virtual void GetObjectData(SerializationInfo info, StreamingContext context)
|
||||
{
|
||||
if (info != null)
|
||||
@@ -1077,7 +1076,6 @@ namespace System.Management.Automation
|
||||
/// </summary>
|
||||
/// <param name="info">Serialization information.</param>
|
||||
/// <param name="context">Streaming context.</param>
|
||||
[SecurityPermissionAttribute(SecurityAction.Demand, SerializationFormatter = true)]
|
||||
public virtual void GetObjectData(SerializationInfo info, StreamingContext context)
|
||||
{
|
||||
if (info != null)
|
||||
|
||||
@@ -527,7 +527,6 @@ namespace System.Management.Automation
|
||||
/// </summary>
|
||||
/// <param name="info">The <see cref="System.Runtime.Serialization.SerializationInfo"/> to populate with data.</param>
|
||||
/// <param name="context">The destination for this serialization.</param>
|
||||
[SecurityPermissionAttribute(SecurityAction.Demand, SerializationFormatter = true)]
|
||||
public override void GetObjectData(SerializationInfo info, StreamingContext context)
|
||||
{
|
||||
if (info == null)
|
||||
|
||||
@@ -1838,7 +1838,6 @@ namespace System.Management.Automation.Runspaces
|
||||
/// </summary>
|
||||
/// <param name="info">Serialization information.</param>
|
||||
/// <param name="context">Streaming context.</param>
|
||||
[SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)]
|
||||
public override void GetObjectData(SerializationInfo info, StreamingContext context)
|
||||
{
|
||||
if (info == null)
|
||||
|
||||
@@ -58,7 +58,6 @@ namespace System.Management.Automation.Runspaces
|
||||
/// </summary>
|
||||
/// <param name="info">Serializer information.</param>
|
||||
/// <param name="context">Streaming context.</param>
|
||||
[SecurityPermissionAttribute(SecurityAction.Demand, SerializationFormatter = true)]
|
||||
public override void GetObjectData(SerializationInfo info, StreamingContext context)
|
||||
{
|
||||
if (info == null)
|
||||
|
||||
+2
-2
@@ -107,9 +107,9 @@ namespace System.Management.Automation.Remoting
|
||||
BinaryFormatter formatter = new BinaryFormatter();
|
||||
using (MemoryStream stream = new MemoryStream())
|
||||
{
|
||||
#pragma warning disable MSLIB0003
|
||||
#pragma warning disable SYSLIB0011
|
||||
formatter.Serialize(stream, TimeZoneInfo.Local);
|
||||
#pragma warning restore MSLIB0003
|
||||
#pragma warning restore SYSLIB0011
|
||||
stream.Seek(0, SeekOrigin.Begin);
|
||||
byte[] result = new byte[stream.Length];
|
||||
stream.Read(result, 0, (int)stream.Length);
|
||||
|
||||
@@ -489,7 +489,6 @@ namespace System.Management.Automation.Remoting
|
||||
/// </summary>
|
||||
/// <param name="info">Serialization information.</param>
|
||||
/// <param name="context">Streaming context.</param>
|
||||
[SecurityPermissionAttribute(SecurityAction.Demand, SerializationFormatter = true)]
|
||||
public override void GetObjectData(SerializationInfo info, StreamingContext context)
|
||||
{
|
||||
if (info == null)
|
||||
@@ -654,7 +653,6 @@ namespace System.Management.Automation.Remoting
|
||||
/// </summary>
|
||||
/// <param name="info">Serialization information.</param>
|
||||
/// <param name="context">Streaming context.</param>
|
||||
[SecurityPermissionAttribute(SecurityAction.Demand, SerializationFormatter = true)]
|
||||
public override void GetObjectData(SerializationInfo info, StreamingContext context)
|
||||
{
|
||||
if (info == null)
|
||||
|
||||
@@ -123,7 +123,6 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// </summary>
|
||||
/// <param name="info">The <see cref="System.Runtime.Serialization.SerializationInfo"/> to populate with data.</param>
|
||||
/// <param name="context">The destination for this serialization.</param>
|
||||
[SecurityPermissionAttribute(SecurityAction.Demand, SerializationFormatter = true)]
|
||||
public override void GetObjectData(SerializationInfo info, StreamingContext context)
|
||||
{
|
||||
if (info == null)
|
||||
|
||||
@@ -129,7 +129,6 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// </summary>
|
||||
/// <param name="info">The <see cref="System.Runtime.Serialization.SerializationInfo"/> to populate with data.</param>
|
||||
/// <param name="context">The destination for this serialization.</param>
|
||||
[SecurityPermissionAttribute(SecurityAction.Demand, SerializationFormatter = true)]
|
||||
public override void GetObjectData(SerializationInfo info, StreamingContext context)
|
||||
{
|
||||
if (info == null)
|
||||
|
||||
@@ -31,10 +31,8 @@ namespace Microsoft.PowerShell.Commands.Internal
|
||||
// registry keys, but we'll also get back 0 as an invalid handle from
|
||||
// RegOpenKeyEx.
|
||||
|
||||
[SecurityPermission(SecurityAction.LinkDemand, UnmanagedCode = true)]
|
||||
internal SafeRegistryHandle() : base(true) { }
|
||||
|
||||
[SecurityPermission(SecurityAction.LinkDemand, UnmanagedCode = true)]
|
||||
internal SafeRegistryHandle(IntPtr preexistingHandle, bool ownsHandle) : base(ownsHandle)
|
||||
{
|
||||
SetHandle(preexistingHandle);
|
||||
@@ -42,8 +40,7 @@ namespace Microsoft.PowerShell.Commands.Internal
|
||||
|
||||
[DllImport(PinvokeDllNames.RegCloseKeyDllName),
|
||||
SuppressUnmanagedCodeSecurity,
|
||||
ResourceExposure(ResourceScope.None),
|
||||
ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
|
||||
ResourceExposure(ResourceScope.None)]
|
||||
internal static extern int RegCloseKey(IntPtr hKey);
|
||||
|
||||
protected override bool ReleaseHandle()
|
||||
|
||||
@@ -190,7 +190,6 @@ namespace Microsoft.PowerShell.Commands.Internal
|
||||
// The name of registry key must start with a predefined string,
|
||||
// like CLASSES_ROOT, CURRENT_USER, MACHINE, and USERS. See
|
||||
// MSDN's help for SetNamedSecurityInfo for details.
|
||||
[SecurityPermission(SecurityAction.Assert, UnmanagedCode=true)]
|
||||
internal TransactedRegistrySecurity(string name, AccessControlSections includeSections)
|
||||
: base(true, ResourceType.RegistryKey, HKeyNameToWindowsName(name), includeSections)
|
||||
{
|
||||
@@ -198,7 +197,6 @@ namespace Microsoft.PowerShell.Commands.Internal
|
||||
}
|
||||
*/
|
||||
|
||||
[SecurityPermission(SecurityAction.Assert, UnmanagedCode = true)]
|
||||
// Suppressed because the passed name and hkey won't change.
|
||||
[SuppressMessage("Microsoft.Security", "CA2103:ReviewImperativeSecurity")]
|
||||
internal TransactedRegistrySecurity(SafeRegistryHandle hKey, string name, AccessControlSections includeSections)
|
||||
@@ -278,7 +276,6 @@ namespace Microsoft.PowerShell.Commands.Internal
|
||||
return persistRules;
|
||||
}
|
||||
|
||||
[SecurityPermission(SecurityAction.Assert, UnmanagedCode = true)]
|
||||
// Suppressed because the passed keyName won't change.
|
||||
[SuppressMessage("Microsoft.Security", "CA2103:ReviewImperativeSecurity")]
|
||||
internal void Persist(SafeRegistryHandle hKey, string keyName)
|
||||
|
||||
@@ -146,7 +146,6 @@ namespace Microsoft.PowerShell.Commands.Internal
|
||||
|
||||
[DllImport(PinvokeDllNames.CloseHandleDllName, SetLastError = true)]
|
||||
[ResourceExposure(ResourceScope.Machine)]
|
||||
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
|
||||
[SuppressMessage("Microsoft.Security", "CA2118:ReviewSuppressUnmanagedCodeSecurityUsage")]
|
||||
[return: MarshalAs(UnmanagedType.Bool)]
|
||||
internal static extern bool CloseHandle(IntPtr handle);
|
||||
|
||||
@@ -194,7 +194,6 @@ namespace System.Management.Automation.Security
|
||||
CERT_FIND_HASH_STR = 20 << 16, // thumbprint
|
||||
}
|
||||
|
||||
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
|
||||
[DllImport("crypt32.dll", SetLastError = true, CharSet = CharSet.Unicode)]
|
||||
internal static extern
|
||||
bool CertCloseStore(IntPtr hCertStore, int dwFlags);
|
||||
@@ -472,7 +471,6 @@ namespace System.Management.Automation.Security
|
||||
DWORD dwAddDisposition,
|
||||
ref IntPtr ppStoreContext);
|
||||
|
||||
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
|
||||
[DllImport("crypt32.dll", SetLastError = true, CharSet = CharSet.Unicode)]
|
||||
internal static extern
|
||||
bool CertFreeCertificateContext(IntPtr certContext);
|
||||
|
||||
@@ -187,7 +187,6 @@ namespace System.Management.Automation.Runspaces
|
||||
/// </summary>
|
||||
/// <param name="info">Serialization information.</param>
|
||||
/// <param name="context">Streaming context.</param>
|
||||
[SecurityPermissionAttribute(SecurityAction.Demand, SerializationFormatter = true)]
|
||||
public override void GetObjectData(SerializationInfo info, StreamingContext context)
|
||||
{
|
||||
if (info == null)
|
||||
|
||||
@@ -102,7 +102,6 @@ namespace System.Management.Automation
|
||||
/// <param name="context">
|
||||
/// streaming context
|
||||
/// </param>
|
||||
[SecurityPermissionAttribute(SecurityAction.Demand, SerializationFormatter = true)]
|
||||
public override void GetObjectData(SerializationInfo info, StreamingContext context)
|
||||
{
|
||||
if (info == null)
|
||||
@@ -389,7 +388,6 @@ namespace System.Management.Automation
|
||||
/// <param name="context">
|
||||
/// streaming context
|
||||
/// </param>
|
||||
[SecurityPermissionAttribute(SecurityAction.Demand, SerializationFormatter = true)]
|
||||
public override void GetObjectData(SerializationInfo info, StreamingContext context)
|
||||
{
|
||||
if (info == null)
|
||||
|
||||
@@ -611,7 +611,6 @@ namespace System.Management.Automation.Internal
|
||||
System.GC.SuppressFinalize(this);
|
||||
}
|
||||
|
||||
// [SecurityPermission(SecurityAction.Demand, UnmanagedCode=true)]
|
||||
protected void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing)
|
||||
|
||||
@@ -38,9 +38,9 @@ namespace System.Management.Automation
|
||||
{ Default, ClrFacade.GetDefaultEncoding() },
|
||||
{ OEM, ClrFacade.GetOEMEncoding() },
|
||||
{ Unicode, System.Text.Encoding.Unicode },
|
||||
#pragma warning disable MSLIB0001
|
||||
#pragma warning disable SYSLIB0001
|
||||
{ Utf7, System.Text.Encoding.UTF7 },
|
||||
#pragma warning restore MSLIB0001
|
||||
#pragma warning restore SYSLIB0001
|
||||
{ Utf8, ClrFacade.GetDefaultEncoding() },
|
||||
{ Utf8Bom, System.Text.Encoding.UTF8 },
|
||||
{ Utf8NoBom, ClrFacade.GetDefaultEncoding() },
|
||||
|
||||
@@ -137,7 +137,6 @@ namespace System.Management.Automation
|
||||
/// </summary>
|
||||
/// <param name="info">Serialization information.</param>
|
||||
/// <param name="context">Streaming context.</param>
|
||||
[SecurityPermissionAttribute(SecurityAction.Demand, SerializationFormatter = true)]
|
||||
public override void GetObjectData(SerializationInfo info, StreamingContext context)
|
||||
{
|
||||
if (info == null)
|
||||
@@ -537,7 +536,6 @@ namespace System.Management.Automation
|
||||
/// </summary>
|
||||
/// <param name="info">Serialization information.</param>
|
||||
/// <param name="context">Streaming context.</param>
|
||||
[SecurityPermissionAttribute(SecurityAction.Demand, SerializationFormatter = true)]
|
||||
public override void GetObjectData(SerializationInfo info, StreamingContext context)
|
||||
{
|
||||
base.GetObjectData(info, context);
|
||||
@@ -878,9 +876,7 @@ namespace System.Management.Automation
|
||||
/// </summary>
|
||||
/// <param name="info">Serialization information.</param>
|
||||
/// <param name="context">Context.</param>
|
||||
[SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)]
|
||||
public override
|
||||
void GetObjectData(SerializationInfo info, StreamingContext context)
|
||||
public override void GetObjectData(SerializationInfo info, StreamingContext context)
|
||||
{
|
||||
base.GetObjectData(info, context);
|
||||
}
|
||||
@@ -987,9 +983,7 @@ namespace System.Management.Automation
|
||||
/// </summary>
|
||||
/// <param name="info">Serialization information.</param>
|
||||
/// <param name="context">Context.</param>
|
||||
[SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)]
|
||||
public override
|
||||
void GetObjectData(SerializationInfo info, StreamingContext context)
|
||||
public override void GetObjectData(SerializationInfo info, StreamingContext context)
|
||||
{
|
||||
base.GetObjectData(info, context);
|
||||
}
|
||||
|
||||
@@ -83,7 +83,6 @@ namespace System.Management.Automation
|
||||
/// </summary>
|
||||
/// <param name="info">Serialization information.</param>
|
||||
/// <param name="context">Streaming context.</param>
|
||||
[SecurityPermissionAttribute(SecurityAction.Demand, SerializationFormatter = true)]
|
||||
public override void GetObjectData(SerializationInfo info, StreamingContext context)
|
||||
{
|
||||
if (info == null)
|
||||
|
||||
@@ -94,7 +94,6 @@ namespace System.Management.Automation
|
||||
/// </summary>
|
||||
/// <param name="info">Serialization information.</param>
|
||||
/// <param name="context">Streaming context.</param>
|
||||
[SecurityPermissionAttribute(SecurityAction.Demand, SerializationFormatter = true)]
|
||||
public override void GetObjectData(SerializationInfo info, StreamingContext context)
|
||||
{
|
||||
if (info == null)
|
||||
|
||||
@@ -81,7 +81,6 @@ namespace System.Management.Automation
|
||||
/// </summary>
|
||||
/// <param name="info">Serialization information.</param>
|
||||
/// <param name="context">Streaming context.</param>
|
||||
[SecurityPermissionAttribute(SecurityAction.Demand, SerializationFormatter = true)]
|
||||
public override void GetObjectData(SerializationInfo info, StreamingContext context)
|
||||
{
|
||||
if (info == null)
|
||||
|
||||
@@ -52,7 +52,6 @@ namespace System.Management.Automation
|
||||
/// </summary>
|
||||
/// <param name="info">Serialization information.</param>
|
||||
/// <param name="context">Streaming context.</param>
|
||||
[SecurityPermissionAttribute(SecurityAction.Demand, SerializationFormatter = true)]
|
||||
public override void GetObjectData(SerializationInfo info, StreamingContext context)
|
||||
{
|
||||
if (info == null)
|
||||
|
||||
@@ -52,7 +52,6 @@ namespace System.Management.Automation
|
||||
/// </summary>
|
||||
/// <param name="info">Serialization information.</param>
|
||||
/// <param name="context">Streaming context.</param>
|
||||
[SecurityPermissionAttribute(SecurityAction.Demand, SerializationFormatter = true)]
|
||||
public override void GetObjectData(SerializationInfo info, StreamingContext context)
|
||||
{
|
||||
if (info == null)
|
||||
|
||||
@@ -52,7 +52,6 @@ namespace System.Management.Automation
|
||||
/// </summary>
|
||||
/// <param name="info">Serialization information.</param>
|
||||
/// <param name="context">Streaming context.</param>
|
||||
[SecurityPermissionAttribute(SecurityAction.Demand, SerializationFormatter = true)]
|
||||
public override void GetObjectData(SerializationInfo info, StreamingContext context)
|
||||
{
|
||||
if (info == null)
|
||||
|
||||
@@ -80,7 +80,6 @@ namespace System.Management.Automation
|
||||
/// </summary>
|
||||
/// <param name="info">Serialization information.</param>
|
||||
/// <param name="context">Streaming context.</param>
|
||||
[SecurityPermissionAttribute(SecurityAction.Demand, SerializationFormatter = true)]
|
||||
public override void GetObjectData(SerializationInfo info, StreamingContext context)
|
||||
{
|
||||
if (info == null)
|
||||
|
||||
@@ -322,7 +322,6 @@ namespace System.Management.Automation
|
||||
/// <param name="context">
|
||||
/// streaming context
|
||||
/// </param>
|
||||
[SecurityPermissionAttribute(SecurityAction.Demand, SerializationFormatter = true)]
|
||||
public override void GetObjectData(SerializationInfo info, StreamingContext context)
|
||||
{
|
||||
if (info == null)
|
||||
|
||||
@@ -116,14 +116,13 @@ namespace System.Management.Automation
|
||||
{
|
||||
}
|
||||
|
||||
[SecurityPermission(SecurityAction.LinkDemand, UnmanagedCode = true)]
|
||||
internal SafeLocalMemHandle(IntPtr existingHandle, bool ownsHandle)
|
||||
: base(ownsHandle)
|
||||
{
|
||||
base.SetHandle(existingHandle);
|
||||
}
|
||||
|
||||
[DllImport(PinvokeDllNames.LocalFreeDllName), ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
|
||||
[DllImport(PinvokeDllNames.LocalFreeDllName)]
|
||||
private static extern IntPtr LocalFree(IntPtr hMem);
|
||||
|
||||
protected override bool ReleaseHandle()
|
||||
@@ -236,7 +235,7 @@ namespace System.Management.Automation
|
||||
/// This can happen if you close a handle twice, or if you call CloseHandle on a handle
|
||||
/// returned by the FindFirstFile function.
|
||||
/// </returns>
|
||||
[DllImport(PinvokeDllNames.CloseHandleDllName, SetLastError = true)]//, ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
|
||||
[DllImport(PinvokeDllNames.CloseHandleDllName, SetLastError = true)]
|
||||
[return: MarshalAs(UnmanagedType.Bool)]
|
||||
// [SuppressMessage("Microsoft.Security", "CA2118:ReviewSuppressUnmanagedCodeSecurityUsage")]
|
||||
internal static extern bool CloseHandle(IntPtr handle);
|
||||
|
||||
@@ -55,7 +55,6 @@ namespace System.Management.Automation
|
||||
/// </summary>
|
||||
/// <param name="info">Serialization information.</param>
|
||||
/// <param name="context">Streaming context.</param>
|
||||
[SecurityPermissionAttribute(SecurityAction.Demand, SerializationFormatter = true)]
|
||||
public override void GetObjectData(SerializationInfo info, StreamingContext context)
|
||||
{
|
||||
if (info == null)
|
||||
|
||||
@@ -477,7 +477,6 @@ namespace System.Management.Automation
|
||||
/// </summary>
|
||||
/// <param name="info">Serialization information.</param>
|
||||
/// <param name="context">Streaming context.</param>
|
||||
[SecurityPermissionAttribute(SecurityAction.Demand, SerializationFormatter = true)]
|
||||
public override void GetObjectData(SerializationInfo info, StreamingContext context)
|
||||
{
|
||||
if (info == null)
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
<Company>Microsoft Corporation</Company>
|
||||
<Copyright>(c) Microsoft Corporation.</Copyright>
|
||||
|
||||
<TargetFramework>netcoreapp5.0</TargetFramework>
|
||||
<LangVersion>8.0</LangVersion>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<LangVersion>9.0</LangVersion>
|
||||
|
||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
|
||||
@@ -1691,23 +1691,25 @@ Describe "Invoke-WebRequest tests" -Tags "Feature", "RequireAdminOnWindows" {
|
||||
# We put Tls13 tests at pending due to modern OS limitations.
|
||||
# Tracking issue https://github.com/PowerShell/PowerShell/issues/13439
|
||||
|
||||
$skipForTls1OnLinux = $IsLinux -and $env:TF_BUILD
|
||||
|
||||
## Test cases for the 1st 'It'
|
||||
$testCases1 = @(
|
||||
@{ Test = @{SslProtocol = 'Default'; ActualProtocol = 'Default'}; Pending = $false }
|
||||
@{ Test = @{SslProtocol = 'Tls'; ActualProtocol = 'Tls'}; Pending = $false }
|
||||
@{ Test = @{SslProtocol = 'Tls11'; ActualProtocol = 'Tls11'}; Pending = $false }
|
||||
@{ Test = @{SslProtocol = 'Tls'; ActualProtocol = 'Tls'}; Pending = $skipForTls1OnLinux }
|
||||
@{ Test = @{SslProtocol = 'Tls11'; ActualProtocol = 'Tls11'}; Pending = $skipForTls1OnLinux }
|
||||
@{ Test = @{SslProtocol = 'Tls12'; ActualProtocol = 'Tls12'}; Pending = $false }
|
||||
@{ Test = @{SslProtocol = 'Tls13'; ActualProtocol = 'Tls13'}; Pending = $true }
|
||||
@{ Test = @{SslProtocol = 'Tls, Tls11, Tls12'; ActualProtocol = 'Tls12'}; Pending = $false }
|
||||
@{ Test = @{SslProtocol = 'Tls, Tls11, Tls12, Tls13'; ActualProtocol = 'Tls13'}; Pending = $true }
|
||||
@{ Test = @{SslProtocol = 'Tls11, Tls12'; ActualProtocol = 'Tls12'}; Pending = $false }
|
||||
@{ Test = @{SslProtocol = 'Tls, Tls11, Tls12'; ActualProtocol = 'Tls11'}; Pending = $false }
|
||||
@{ Test = @{SslProtocol = 'Tls, Tls11, Tls12, Tls13'; ActualProtocol = 'Tls11'}; Pending = $true }
|
||||
@{ Test = @{SslProtocol = 'Tls11, Tls12'; ActualProtocol = 'Tls11'}; Pending = $false }
|
||||
@{ Test = @{SslProtocol = 'Tls, Tls11'; ActualProtocol = 'Tls11'}; Pending = $false }
|
||||
@{ Test = @{SslProtocol = 'Tls, Tls11, Tls12'; ActualProtocol = 'Tls'}; Pending = $false }
|
||||
@{ Test = @{SslProtocol = 'Tls, Tls11, Tls12'; ActualProtocol = 'Tls11'}; Pending = $skipForTls1OnLinux }
|
||||
@{ Test = @{SslProtocol = 'Tls, Tls11, Tls12, Tls13'; ActualProtocol = 'Tls11'}; Pending = $skipForTls1OnLinux }
|
||||
@{ Test = @{SslProtocol = 'Tls11, Tls12'; ActualProtocol = 'Tls11'}; Pending = $skipForTls1OnLinux }
|
||||
@{ Test = @{SslProtocol = 'Tls, Tls11'; ActualProtocol = 'Tls11'}; Pending = $skipForTls1OnLinux }
|
||||
@{ Test = @{SslProtocol = 'Tls, Tls11, Tls12'; ActualProtocol = 'Tls'}; Pending = $skipForTls1OnLinux }
|
||||
@{ Test = @{SslProtocol = 'Tls, Tls11, Tls13'; ActualProtocol = 'Tls'}; Pending = $true }
|
||||
@{ Test = @{SslProtocol = 'Tls, Tls11'; ActualProtocol = 'Tls'}; Pending = $false }
|
||||
@{ Test = @{SslProtocol = 'Tls, Tls11'; ActualProtocol = 'Tls'}; Pending = $skipForTls1OnLinux }
|
||||
# Skipping intermediary protocols is not supported on all platforms
|
||||
@{ Test = @{SslProtocol = 'Tls, Tls12'; ActualProtocol = 'Tls'}; Pending = -not $IsWindows }
|
||||
@{ Test = @{SslProtocol = 'Tls, Tls12'; ActualProtocol = 'Tls12'}; Pending = -not $IsWindows }
|
||||
@@ -3207,22 +3209,24 @@ Describe "Invoke-RestMethod tests" -Tags "Feature", "RequireAdminOnWindows" {
|
||||
# We put Tls13 tests at pending due to modern OS limitations.
|
||||
# Tracking issue https://github.com/PowerShell/PowerShell/issues/13439
|
||||
|
||||
$skipForTls1OnLinux = $IsLinux -and $env:TF_BUILD
|
||||
|
||||
$testCases1 = @(
|
||||
@{ Test = @{SslProtocol = 'Default'; ActualProtocol = 'Default'}; Pending = $false }
|
||||
@{ Test = @{SslProtocol = 'Tls'; ActualProtocol = 'Tls'}; Pending = $false }
|
||||
@{ Test = @{SslProtocol = 'Tls11'; ActualProtocol = 'Tls11'}; Pending = $false }
|
||||
@{ Test = @{SslProtocol = 'Tls'; ActualProtocol = 'Tls'}; Pending = $skipForTls1OnLinux }
|
||||
@{ Test = @{SslProtocol = 'Tls11'; ActualProtocol = 'Tls11'}; Pending = $skipForTls1OnLinux }
|
||||
@{ Test = @{SslProtocol = 'Tls12'; ActualProtocol = 'Tls12'}; Pending = $false }
|
||||
@{ Test = @{SslProtocol = 'Tls13'; ActualProtocol = 'Tls13'}; Pending = $true }
|
||||
@{ Test = @{SslProtocol = 'Tls, Tls11, Tls12'; ActualProtocol = 'Tls12'}; Pending = $false }
|
||||
@{ Test = @{SslProtocol = 'Tls, Tls11, Tls12, Tls13'; ActualProtocol = 'Tls13'}; Pending = $true }
|
||||
@{ Test = @{SslProtocol = 'Tls11, Tls12'; ActualProtocol = 'Tls12'}; Pending = $false }
|
||||
@{ Test = @{SslProtocol = 'Tls, Tls11, Tls12'; ActualProtocol = 'Tls11'}; Pending = $false }
|
||||
@{ Test = @{SslProtocol = 'Tls, Tls11, Tls12, Tls13'; ActualProtocol = 'Tls11'}; Pending = $true }
|
||||
@{ Test = @{SslProtocol = 'Tls11, Tls12'; ActualProtocol = 'Tls11'}; Pending = $false }
|
||||
@{ Test = @{SslProtocol = 'Tls, Tls11'; ActualProtocol = 'Tls11'}; Pending = $false }
|
||||
@{ Test = @{SslProtocol = 'Tls, Tls11, Tls12'; ActualProtocol = 'Tls'}; Pending = $false }
|
||||
@{ Test = @{SslProtocol = 'Tls, Tls11, Tls12'; ActualProtocol = 'Tls11'}; Pending = $skipForTls1OnLinux }
|
||||
@{ Test = @{SslProtocol = 'Tls, Tls11, Tls12, Tls13'; ActualProtocol = 'Tls11'}; Pending = $skipForTls1OnLinux }
|
||||
@{ Test = @{SslProtocol = 'Tls11, Tls12'; ActualProtocol = 'Tls11'}; Pending = $skipForTls1OnLinux }
|
||||
@{ Test = @{SslProtocol = 'Tls, Tls11'; ActualProtocol = 'Tls11'}; Pending = $skipForTls1OnLinux }
|
||||
@{ Test = @{SslProtocol = 'Tls, Tls11, Tls12'; ActualProtocol = 'Tls'}; Pending = $skipForTls1OnLinux }
|
||||
@{ Test = @{SslProtocol = 'Tls, Tls11, Tls13'; ActualProtocol = 'Tls'}; Pending = $true }
|
||||
@{ Test = @{SslProtocol = 'Tls, Tls11'; ActualProtocol = 'Tls'}; Pending = $false }
|
||||
@{ Test = @{SslProtocol = 'Tls, Tls11'; ActualProtocol = 'Tls'}; Pending = $skipForTls1OnLinux }
|
||||
# Skipping intermediary protocols is not supported on all platforms
|
||||
@{ Test = @{SslProtocol = 'Tls, Tls12'; ActualProtocol = 'Tls'}; Pending = -not $IsWindows }
|
||||
@{ Test = @{SslProtocol = 'Tls, Tls12'; ActualProtocol = 'Tls12'}; Pending = -not $IsWindows }
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<Description>Very tiny windows service to do service testing</Description>
|
||||
<NoWarn>$(NoWarn);CA1416</NoWarn>
|
||||
<AssemblyName>TestService</AssemblyName>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TieredCompilation>true</TieredCompilation>
|
||||
@@ -12,7 +13,7 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Windows.Compatibility" Version="5.0.0-preview.8.20407.11" />
|
||||
<PackageReference Include="Microsoft.Windows.Compatibility" Version="5.0.0-rc.1.20451.14" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -7,8 +7,8 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="5.0.0-preview.8.20364.8" />
|
||||
<PackageReference Include="System.Text.Encoding.CodePages" Version="5.0.0-preview.8.20407.11" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="5.0.0-rc.1.20451.17" />
|
||||
<PackageReference Include="System.Text.Encoding.CodePages" Version="5.0.0-rc.1.20451.14" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -6,6 +6,9 @@ param (
|
||||
[Parameter()]
|
||||
[string]$SDKVersionOverride,
|
||||
|
||||
[Parameter()]
|
||||
[switch]$UseNuGetOrg,
|
||||
|
||||
[Parameter()]
|
||||
[switch]$UpdateMSIPackaging,
|
||||
|
||||
@@ -91,8 +94,9 @@ function Update-PackageVersion {
|
||||
|
||||
$versionPattern = (Get-Content "$PSScriptRoot/../DotnetRuntimeMetadata.json" | ConvertFrom-Json).sdk.packageVersionPattern
|
||||
|
||||
$source = if ($UseNuGetOrg) { 'nuget.org' } else { 'dotnet5' }
|
||||
$packages.GetEnumerator() | ForEach-Object {
|
||||
$pkgs = Find-Package -Name $_.Key -AllVersions -AllowPrereleaseVersions -Source 'dotnet5'
|
||||
$pkgs = Find-Package -Name $_.Key -AllVersions -AllowPrereleaseVersions -Source $source
|
||||
|
||||
foreach ($v in $_.Value) {
|
||||
$version = $v.Version
|
||||
@@ -200,7 +204,7 @@ if ($dotnetUpdate.ShouldUpdate) {
|
||||
$addDotnet5Source = (-not (Get-PackageSource -Name 'dotnet5' -ErrorAction SilentlyContinue))
|
||||
$addDotnet5InternalSource = (-not (Get-PackageSource -Name 'dotnet5-internal' -ErrorAction SilentlyContinue))
|
||||
|
||||
if ($addDotnet5Source -or $addDotnet5InternalSource) {
|
||||
if (!$UseNuGetOrg -and ($addDotnet5Source -or $addDotnet5InternalSource)) {
|
||||
$nugetFileSources = ([xml](Get-Content .\nuget.config -Raw)).Configuration.packagesources.add
|
||||
|
||||
if ($addDotnet5Source) {
|
||||
|
||||
+1
-1
@@ -14,6 +14,6 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
|
||||
<PackageReference Include="System.Security.AccessControl" Version="5.0.0-preview.8.20407.11" />
|
||||
<PackageReference Include="System.Security.AccessControl" Version="5.0.0-rc.1.20451.14" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
+2
-2
@@ -9,7 +9,7 @@
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Management.Infrastructure" Version="2.0.0" />
|
||||
<PackageReference Include="System.Security.AccessControl" Version="5.0.0-preview.8.20407.11" />
|
||||
<PackageReference Include="System.Security.Principal.Windows" Version="5.0.0-preview.8.20407.11" />
|
||||
<PackageReference Include="System.Security.AccessControl" Version="5.0.0-rc.1.20451.14" />
|
||||
<PackageReference Include="System.Security.Principal.Windows" Version="5.0.0-rc.1.20451.14" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
Reference in new issue
Block a user