diff --git a/DotnetRuntimeMetadata.json b/DotnetRuntimeMetadata.json
index ffd8f4380..119291dcc 100644
--- a/DotnetRuntimeMetadata.json
+++ b/DotnetRuntimeMetadata.json
@@ -1,8 +1,8 @@
{
"sdk": {
- "channel": "release/5.0.1xx-preview7",
- "packageVersionPattern": "5.0.0-preview.7",
- "sdkImageVersion": "5.0.100-preview.7",
- "nextChannel": "net5/preview7"
+ "channel": "release/5.0.1xx-preview8",
+ "packageVersionPattern": "5.0.0-preview.8",
+ "sdkImageVersion": "5.0.100-preview.8",
+ "nextChannel": "net5/preview8"
}
}
diff --git a/assets/files.wxs b/assets/files.wxs
index 5d7b42ca9..a5d09c260 100644
--- a/assets/files.wxs
+++ b/assets/files.wxs
@@ -3105,12 +3105,12 @@
-
-
-
+
+
+
@@ -4112,8 +4112,8 @@
-
+
diff --git a/global.json b/global.json
index 8255d028e..fe1d9f915 100644
--- a/global.json
+++ b/global.json
@@ -1,5 +1,5 @@
{
"sdk": {
- "version": "5.0.100-preview.7.20366.15"
+ "version": "5.0.100-preview.8.20417.9"
}
}
diff --git a/src/Microsoft.Management.UI.Internal/ManagementList/FilterCore/FilterRules/FilterRuleExtensions.cs b/src/Microsoft.Management.UI.Internal/ManagementList/FilterCore/FilterRules/FilterRuleExtensions.cs
index cb0a79de7..4a09321ed 100644
--- a/src/Microsoft.Management.UI.Internal/ManagementList/FilterCore/FilterRules/FilterRuleExtensions.cs
+++ b/src/Microsoft.Management.UI.Internal/ManagementList/FilterCore/FilterRules/FilterRuleExtensions.cs
@@ -40,10 +40,14 @@ namespace Microsoft.Management.UI.Internal
FilterRule copy = null;
try
{
+#pragma warning disable MSLIB0003
formatter.Serialize(ms, rule);
+#pragma warning restore MSLIB0003
ms.Position = 0;
+#pragma warning disable MSLIB0003
copy = (FilterRule)formatter.Deserialize(ms);
+#pragma warning restore MSLIB0003
}
finally
{
diff --git a/src/Microsoft.Management.UI.Internal/Microsoft.PowerShell.GraphicalHost.csproj b/src/Microsoft.Management.UI.Internal/Microsoft.PowerShell.GraphicalHost.csproj
index 466511d6d..72eb8d657 100644
--- a/src/Microsoft.Management.UI.Internal/Microsoft.PowerShell.GraphicalHost.csproj
+++ b/src/Microsoft.Management.UI.Internal/Microsoft.PowerShell.GraphicalHost.csproj
@@ -1,4 +1,4 @@
-
+
Assembly containing WPF code for Out-GridView, HelpWindow, and Show-Command
@@ -6,6 +6,8 @@
Microsoft.Management.UI.Internal
Microsoft.PowerShell.GraphicalHost
True
+ Windows
+ 7.0
diff --git a/src/Microsoft.PowerShell.Commands.Management/Microsoft.PowerShell.Commands.Management.csproj b/src/Microsoft.PowerShell.Commands.Management/Microsoft.PowerShell.Commands.Management.csproj
index 67a701661..4b04038e4 100644
--- a/src/Microsoft.PowerShell.Commands.Management/Microsoft.PowerShell.Commands.Management.csproj
+++ b/src/Microsoft.PowerShell.Commands.Management/Microsoft.PowerShell.Commands.Management.csproj
@@ -47,7 +47,7 @@
-
+
diff --git a/src/Microsoft.PowerShell.Commands.Management/commands/management/Process.cs b/src/Microsoft.PowerShell.Commands.Management/commands/management/Process.cs
index b825266e6..b05ce1e0e 100644
--- a/src/Microsoft.PowerShell.Commands.Management/commands/management/Process.cs
+++ b/src/Microsoft.PowerShell.Commands.Management/commands/management/Process.cs
@@ -784,8 +784,10 @@ namespace Microsoft.PowerShell.Commands
// The buffer length must be +1, last position is for a null string terminator.
int userNameLength = 257;
int domainNameLength = 16;
+#pragma warning disable CA2014
Span userNameStr = stackalloc char[userNameLength];
Span domainNameStr = stackalloc char[domainNameLength];
+#pragma warning restore CA2014
Win32Native.SID_NAME_USE accountType;
// userNameLength and domainNameLength will be set to actual lengths.
diff --git a/src/Microsoft.PowerShell.Commands.Utility/Microsoft.PowerShell.Commands.Utility.csproj b/src/Microsoft.PowerShell.Commands.Utility/Microsoft.PowerShell.Commands.Utility.csproj
index efdd37f42..8225e0345 100644
--- a/src/Microsoft.PowerShell.Commands.Utility/Microsoft.PowerShell.Commands.Utility.csproj
+++ b/src/Microsoft.PowerShell.Commands.Utility/Microsoft.PowerShell.Commands.Utility.csproj
@@ -32,8 +32,8 @@
-
-
+
+
diff --git a/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleControl.cs b/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleControl.cs
index 0403fdf41..1fec13c46 100644
--- a/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleControl.cs
+++ b/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleControl.cs
@@ -2576,7 +2576,9 @@ namespace Microsoft.PowerShell
{
var endOfLine = Environment.NewLine.AsSpan();
var endOfLineLength = endOfLine.Length;
+#pragma warning disable CA2014
Span outBufferLine = stackalloc char[outBuffer.Length + endOfLineLength];
+#pragma warning restore CA2014
outBuffer.CopyTo(outBufferLine);
endOfLine.CopyTo(outBufferLine.Slice(outBufferLine.Length - endOfLineLength));
WriteConsole(consoleHandle, outBufferLine);
diff --git a/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostUserInterface.cs b/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostUserInterface.cs
index b48af7eab..2d494cf70 100644
--- a/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostUserInterface.cs
+++ b/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostUserInterface.cs
@@ -305,7 +305,9 @@ namespace Microsoft.PowerShell
ConsoleKeyInfo keyInfo = Console.ReadKey(true);
#else
const int CharactersToRead = 1;
+#pragma warning disable CA2014
Span inputBuffer = stackalloc char[CharactersToRead + 1];
+#pragma warning restore CA2014
string key = ConsoleControl.ReadConsole(handle, initialContentLength: 0, inputBuffer, charactersToRead: CharactersToRead, endOnTab: false, out _);
#endif
diff --git a/src/Microsoft.PowerShell.CoreCLR.Eventing/Microsoft.PowerShell.CoreCLR.Eventing.csproj b/src/Microsoft.PowerShell.CoreCLR.Eventing/Microsoft.PowerShell.CoreCLR.Eventing.csproj
index 6a0944359..09bb1c95a 100644
--- a/src/Microsoft.PowerShell.CoreCLR.Eventing/Microsoft.PowerShell.CoreCLR.Eventing.csproj
+++ b/src/Microsoft.PowerShell.CoreCLR.Eventing/Microsoft.PowerShell.CoreCLR.Eventing.csproj
@@ -8,7 +8,7 @@
-
+
diff --git a/src/Microsoft.PowerShell.SDK/Microsoft.PowerShell.SDK.csproj b/src/Microsoft.PowerShell.SDK/Microsoft.PowerShell.SDK.csproj
index 45ed6de51..6798baf83 100644
--- a/src/Microsoft.PowerShell.SDK/Microsoft.PowerShell.SDK.csproj
+++ b/src/Microsoft.PowerShell.SDK/Microsoft.PowerShell.SDK.csproj
@@ -18,9 +18,9 @@
-
-
-
+
+
+
@@ -30,7 +30,7 @@
-
+
diff --git a/src/Microsoft.WSMan.Management/Microsoft.WSMan.Management.csproj b/src/Microsoft.WSMan.Management/Microsoft.WSMan.Management.csproj
index fd826ae01..a63b25963 100644
--- a/src/Microsoft.WSMan.Management/Microsoft.WSMan.Management.csproj
+++ b/src/Microsoft.WSMan.Management/Microsoft.WSMan.Management.csproj
@@ -9,7 +9,7 @@
-
+
diff --git a/src/System.Management.Automation/System.Management.Automation.csproj b/src/System.Management.Automation/System.Management.Automation.csproj
index ae6bd145a..e0d81d950 100644
--- a/src/System.Management.Automation/System.Management.Automation.csproj
+++ b/src/System.Management.Automation/System.Management.Automation.csproj
@@ -16,16 +16,16 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
diff --git a/src/System.Management.Automation/engine/remoting/common/WireDataFormat/RemoteSessionCapability.cs b/src/System.Management.Automation/engine/remoting/common/WireDataFormat/RemoteSessionCapability.cs
index 86f43cbcc..3c631c0f4 100644
--- a/src/System.Management.Automation/engine/remoting/common/WireDataFormat/RemoteSessionCapability.cs
+++ b/src/System.Management.Automation/engine/remoting/common/WireDataFormat/RemoteSessionCapability.cs
@@ -107,7 +107,9 @@ namespace System.Management.Automation.Remoting
BinaryFormatter formatter = new BinaryFormatter();
using (MemoryStream stream = new MemoryStream())
{
+#pragma warning disable MSLIB0003
formatter.Serialize(stream, TimeZoneInfo.Local);
+#pragma warning restore MSLIB0003
stream.Seek(0, SeekOrigin.Begin);
byte[] result = new byte[stream.Length];
stream.Read(result, 0, (int)stream.Length);
diff --git a/src/System.Management.Automation/namespaces/FileSystemProvider.cs b/src/System.Management.Automation/namespaces/FileSystemProvider.cs
index e4567a96b..b548e4b91 100644
--- a/src/System.Management.Automation/namespaces/FileSystemProvider.cs
+++ b/src/System.Management.Automation/namespaces/FileSystemProvider.cs
@@ -7617,9 +7617,9 @@ namespace Microsoft.PowerShell.Commands
set
{
-#pragma warning disable 612, 618
- if (value == System.Text.Encoding.UTF7)
-#pragma warning restore 612, 618
+ // Check for UTF-7 by checking for code page 65000
+ // See: https://docs.microsoft.com/en-us/dotnet/core/compatibility/corefx#utf-7-code-paths-are-obsolete
+ if (value != null && value.CodePage == 65000)
{
_provider.WriteWarning(PathUtilsStrings.Utf7EncodingObsolete);
}
diff --git a/src/System.Management.Automation/utils/EncodingUtils.cs b/src/System.Management.Automation/utils/EncodingUtils.cs
index abbe4a569..366d74944 100644
--- a/src/System.Management.Automation/utils/EncodingUtils.cs
+++ b/src/System.Management.Automation/utils/EncodingUtils.cs
@@ -38,7 +38,9 @@ namespace System.Management.Automation
{ Default, ClrFacade.GetDefaultEncoding() },
{ OEM, ClrFacade.GetOEMEncoding() },
{ Unicode, System.Text.Encoding.Unicode },
+#pragma warning disable MSLIB0001
{ Utf7, System.Text.Encoding.UTF7 },
+#pragma warning restore MSLIB0001
{ Utf8, ClrFacade.GetDefaultEncoding() },
{ Utf8Bom, System.Text.Encoding.UTF8 },
{ Utf8NoBom, ClrFacade.GetDefaultEncoding() },
@@ -95,9 +97,9 @@ namespace System.Management.Automation
/// The encoding to check for obsolescence.
internal static void WarnIfObsolete(Cmdlet cmdlet, Encoding encoding)
{
-#pragma warning disable 612, 618
- if (encoding == System.Text.Encoding.UTF7)
-#pragma warning restore 612, 618
+ // Check for UTF-7 by checking for code page 65000
+ // See: https://docs.microsoft.com/en-us/dotnet/core/compatibility/corefx#utf-7-code-paths-are-obsolete
+ if (encoding != null && encoding.CodePage == 65000)
{
cmdlet.WriteWarning(PathUtilsStrings.Utf7EncodingObsolete);
}
diff --git a/src/powershell-win-core/powershell-win-core.csproj b/src/powershell-win-core/powershell-win-core.csproj
index f2c31f6ff..16f625827 100644
--- a/src/powershell-win-core/powershell-win-core.csproj
+++ b/src/powershell-win-core/powershell-win-core.csproj
@@ -11,23 +11,11 @@
win7-x86;win7-x64
Microsoft.PowerShell
..\..\assets\pwsh.manifest
+ Windows
+ 7.0
-
-
- Microsoft.NET.Sdk.WindowsDesktop
-
-
-
-
-
-
-
-
-
- true
- true
-
+
@@ -64,4 +52,6 @@
+
+
diff --git a/test/tools/TestService/TestService.csproj b/test/tools/TestService/TestService.csproj
index 939507939..97d0c4637 100644
--- a/test/tools/TestService/TestService.csproj
+++ b/test/tools/TestService/TestService.csproj
@@ -12,7 +12,7 @@
-
+
diff --git a/test/tools/WebListener/WebListener.csproj b/test/tools/WebListener/WebListener.csproj
index 2948ec069..f9b93fa77 100644
--- a/test/tools/WebListener/WebListener.csproj
+++ b/test/tools/WebListener/WebListener.csproj
@@ -7,8 +7,8 @@
-
-
+
+
diff --git a/tools/packaging/projects/reference/Microsoft.PowerShell.Commands.Utility/Microsoft.PowerShell.Commands.Utility.csproj b/tools/packaging/projects/reference/Microsoft.PowerShell.Commands.Utility/Microsoft.PowerShell.Commands.Utility.csproj
index 46738ca93..7630af87d 100644
--- a/tools/packaging/projects/reference/Microsoft.PowerShell.Commands.Utility/Microsoft.PowerShell.Commands.Utility.csproj
+++ b/tools/packaging/projects/reference/Microsoft.PowerShell.Commands.Utility/Microsoft.PowerShell.Commands.Utility.csproj
@@ -14,6 +14,6 @@
-
+
diff --git a/tools/packaging/projects/reference/System.Management.Automation/System.Management.Automation.csproj b/tools/packaging/projects/reference/System.Management.Automation/System.Management.Automation.csproj
index 8c5dcc0bb..6e5dc7b45 100644
--- a/tools/packaging/projects/reference/System.Management.Automation/System.Management.Automation.csproj
+++ b/tools/packaging/projects/reference/System.Management.Automation/System.Management.Automation.csproj
@@ -9,7 +9,7 @@
-
-
+
+