diff --git a/.spelling b/.spelling index 8f8bbd2ca61..08cddf17bbd 100644 --- a/.spelling +++ b/.spelling @@ -1575,5 +1575,6 @@ vmImage ci.psm1 jcotton42 centos-7 +Security.types.ps1xml - ADOPTERS.md MicrosoftPowerBIMgmt diff --git a/CHANGELOG/preview.md b/CHANGELOG/preview.md index cf80d139a56..41a27232a2b 100644 --- a/CHANGELOG/preview.md +++ b/CHANGELOG/preview.md @@ -1,5 +1,45 @@ # Current preview release +## [7.3.0-preview.8] - 2022-09-20 + +### General Cmdlet Updates and Fixes + +- Filter out compiler generated types for `Add-Type -PassThru` (#18095) +- Fix error formatting to use color defined in `$PSStyle.Formatting` (#17987) +- Handle `PSObject` argument specially in method invocation logging (#18060) +- Revert the experimental feature `PSStrictModeAssignment` (#18040) +- Make experimental feature `PSAMSIMethodInvocationLogging` stable (#18041) +- Make experimental feature `PSAnsiRenderingFileInfo` stable (#18042) +- Make experimental feature `PSCleanBlock` stable (#18043) +- Make experimental feature `PSNativeCommandArgumentPassing` stable (#18044) +- Make experimental feature `PSExec` stable (#18045) +- Make experimental feature `PSRemotingSSHTransportErrorHandling` stable (#18046) +- Add the `ConfigurationFile` option to the PowerShell help content (#18093) + +### Build and Packaging Improvements + + +Bump .NET SDK to version `7.0.100-rc.1` + + + + +Update ThirdPartyNotices.txt for 7.3.0-preview.8 (Internal 22553) +Update cgmanifest.json for 7.3.0-preview.8 (Internal 22551) +Re-enable building with Ready-to-Run (#18107) +Make sure Security.types.ps1xml gets signed in release build (#17930) +Update DotnetRuntimeMetadata.json for .NET 7 RC1 build (#18106) +Add XML reference documents to NuPkg files for SDK (#18017) +Make Register MU timeout (#17995) +Bump Microsoft.NET.Test.Sdk from 17.2.0 to 17.3.0 (#17924) +Update list of PS team members in release tools (#17928) +Update to use version 2.21.0 of Application Insights (#17927) +Complete ongoing Write-Progress in test (#17922) + + + +[7.3.0-preview.8]: https://github.com/PowerShell/PowerShell/compare/v7.3.0-preview.7...v7.3.0-preview.8 + ## [7.3.0-preview.7] - 2022-08-09 ### Breaking Changes diff --git a/DotnetRuntimeMetadata.json b/DotnetRuntimeMetadata.json index 7b07dcc16c3..c13bf52cd59 100644 --- a/DotnetRuntimeMetadata.json +++ b/DotnetRuntimeMetadata.json @@ -1,13 +1,13 @@ { "sdk": { - "channel": "7.0.1xx-preview7", + "channel": "7.0.1xx-rc1", "quality": "daily", "qualityFallback": "preview", - "packageVersionPattern": "7.0.0-preview.7", + "packageVersionPattern": "7.0.0-rc.1", "sdkImageVersion": "7.0.100", - "nextChannel": "7.0.1xx-preview7", + "nextChannel": "7.0.1xx-rc1", "azureFeed": "", - "sdkImageOverride": "" + "sdkImageOverride": "7.0.100-rc.1.22431.12" }, "internalfeed": { "url": "" diff --git a/PowerShell.Common.props b/PowerShell.Common.props index 593570c3589..cf5c11c9ed2 100644 --- a/PowerShell.Common.props +++ b/PowerShell.Common.props @@ -137,9 +137,8 @@ net7.0 10.0 - + true true true diff --git a/README.md b/README.md index 518bf2ba212..49061b9d33a 100644 --- a/README.md +++ b/README.md @@ -64,49 +64,49 @@ You can also download the PowerShell binary archives for Windows, macOS and Linu | Windows (Arm) | [64-bit][rl-winarm64] (preview) | [64-bit][pv-winarm64] | [Instructions][in-arm] | | Raspbian (Arm) | [32-bit][rl-arm32]/[64-bit][rl-arm64] | [32-bit][pv-arm32]/[64-bit][pv-arm64] | [Instructions][in-raspbian] | -[lts-windows-86]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.5/PowerShell-7.2.5-win-x86.msi -[lts-windows-64]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.5/PowerShell-7.2.5-win-x64.msi -[lts-deb]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.5/powershell-lts_7.2.5-1.deb_amd64.deb -[lts-rh]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.5/powershell-lts-7.2.5-1.rh.x86_64.rpm -[lts-macos]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.5/powershell-lts-7.2.5-osx-x64.pkg -[lts-macos-arm64]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.5/powershell-lts-7.2.5-osx-arm64.pkg - -[rl-windows-64]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.5/PowerShell-7.2.5-win-x64.msi -[rl-windows-86]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.5/PowerShell-7.2.5-win-x86.msi -[rl-ubuntu20]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.5/powershell_7.2.5-1.deb_amd64.deb -[rl-ubuntu18]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.5/powershell_7.2.5-1.deb_amd64.deb -[rl-ubuntu16]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.5/powershell_7.2.5-1.deb_amd64.deb -[rl-debian9]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.5/powershell_7.2.5-1.deb_amd64.deb -[rl-debian10]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.5/powershell_7.2.5-1.deb_amd64.deb -[rl-debian11]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.5/powershell_7.2.5-1.deb_amd64.deb -[rl-centos]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.5/powershell-7.2.5-1.rh.x86_64.rpm -[rl-centos8]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.5/powershell-7.2.5-1.rh.x86_64.rpm -[rl-macos]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.5/powershell-7.2.5-osx-x64.pkg -[rl-macos-arm64]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.5/powershell-7.2.5-osx-arm64.pkg -[rl-winarm64]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.5/PowerShell-7.2.5-win-arm64.zip -[rl-winx86-zip]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.5/PowerShell-7.2.5-win-x86.zip -[rl-winx64-zip]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.5/PowerShell-7.2.5-win-x64.zip -[rl-macos-tar]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.5/powershell-7.2.5-osx-x64.tar.gz -[rl-macos-tar-arm64]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.5/powershell-7.2.5-osx-arm64.tar.gz -[rl-linux-tar]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.5/powershell-7.2.5-linux-x64.tar.gz -[rl-arm32]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.5/powershell-7.2.5-linux-arm32.tar.gz -[rl-arm64]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.5/powershell-7.2.5-linux-arm64.tar.gz +[lts-windows-86]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.6/PowerShell-7.2.6-win-x86.msi +[lts-windows-64]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.6/PowerShell-7.2.6-win-x64.msi +[lts-deb]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.6/powershell-lts_7.2.6-1.deb_amd64.deb +[lts-rh]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.6/powershell-lts-7.2.6-1.rh.x86_64.rpm +[lts-macos]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.6/powershell-lts-7.2.6-osx-x64.pkg +[lts-macos-arm64]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.6/powershell-lts-7.2.6-osx-arm64.pkg + +[rl-windows-64]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.6/PowerShell-7.2.6-win-x64.msi +[rl-windows-86]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.6/PowerShell-7.2.6-win-x86.msi +[rl-ubuntu20]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.6/powershell_7.2.6-1.deb_amd64.deb +[rl-ubuntu18]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.6/powershell_7.2.6-1.deb_amd64.deb +[rl-ubuntu16]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.6/powershell_7.2.6-1.deb_amd64.deb +[rl-debian9]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.6/powershell_7.2.6-1.deb_amd64.deb +[rl-debian10]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.6/powershell_7.2.6-1.deb_amd64.deb +[rl-debian11]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.6/powershell_7.2.6-1.deb_amd64.deb +[rl-centos]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.6/powershell-7.2.6-1.rh.x86_64.rpm +[rl-centos8]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.6/powershell-7.2.6-1.rh.x86_64.rpm +[rl-macos]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.6/powershell-7.2.6-osx-x64.pkg +[rl-macos-arm64]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.6/powershell-7.2.6-osx-arm64.pkg +[rl-winarm64]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.6/PowerShell-7.2.6-win-arm64.zip +[rl-winx86-zip]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.6/PowerShell-7.2.6-win-x86.zip +[rl-winx64-zip]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.6/PowerShell-7.2.6-win-x64.zip +[rl-macos-tar]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.6/powershell-7.2.6-osx-x64.tar.gz +[rl-macos-tar-arm64]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.6/powershell-7.2.6-osx-arm64.tar.gz +[rl-linux-tar]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.6/powershell-7.2.6-linux-x64.tar.gz +[rl-arm32]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.6/powershell-7.2.6-linux-arm32.tar.gz +[rl-arm64]: https://github.com/PowerShell/PowerShell/releases/download/v7.2.6/powershell-7.2.6-linux-arm64.tar.gz [rl-snap]: https://snapcraft.io/powershell -[pv-windows-64]: https://github.com/PowerShell/PowerShell/releases/download/v7.3.0-preview.6/PowerShell-7.3.0-preview.6-win-x64.msi -[pv-windows-86]: https://github.com/PowerShell/PowerShell/releases/download/v7.3.0-preview.6/PowerShell-7.3.0-preview.6-win-x86.msi -[pv-deb]: https://github.com/PowerShell/PowerShell/releases/download/v7.3.0-preview.6/powershell-preview_7.3.0-preview.6-1.deb_amd64.deb -[pv-rpm]: https://github.com/PowerShell/PowerShell/releases/download/v7.3.0-preview.6/powershell-preview-7.3.0_preview.6-1.rh.x86_64.rpm -[pv-macos]: https://github.com/PowerShell/PowerShell/releases/download/v7.3.0-preview.6/powershell-7.3.0-preview.6-osx-x64.pkg -[pv-macos-arm64]: https://github.com/PowerShell/PowerShell/releases/download/v7.3.0-preview.6/powershell-7.3.0-preview.6-osx-arm64.pkg -[pv-winarm64]: https://github.com/PowerShell/PowerShell/releases/download/v7.3.0-preview.6/PowerShell-7.3.0-preview.6-win-arm64.zip -[pv-winx86-zip]: https://github.com/PowerShell/PowerShell/releases/download/v7.3.0-preview.6/PowerShell-7.3.0-preview.6-win-x86.zip -[pv-winx64-zip]: https://github.com/PowerShell/PowerShell/releases/download/v7.3.0-preview.6/PowerShell-7.3.0-preview.6-win-x64.zip -[pv-macos-tar]: https://github.com/PowerShell/PowerShell/releases/download/v7.3.0-preview.6/powershell-7.3.0-preview.6-osx-x64.tar.gz -[pv-macos-tar-arm64]: https://github.com/PowerShell/PowerShell/releases/download/v7.3.0-preview.6/powershell-7.3.0-preview.6-osx-arm64.tar.gz -[pv-linux-tar]: https://github.com/PowerShell/PowerShell/releases/download/v7.3.0-preview.6/powershell-7.3.0-preview.6-linux-x64.tar.gz -[pv-arm32]: https://github.com/PowerShell/PowerShell/releases/download/v7.3.0-preview.6/powershell-7.3.0-preview.6-linux-arm32.tar.gz -[pv-arm64]: https://github.com/PowerShell/PowerShell/releases/download/v7.3.0-preview.6/powershell-7.3.0-preview.6-linux-arm64.tar.gz +[pv-windows-64]: https://github.com/PowerShell/PowerShell/releases/download/v7.3.0-preview.7/PowerShell-7.3.0-preview.7-win-x64.msi +[pv-windows-86]: https://github.com/PowerShell/PowerShell/releases/download/v7.3.0-preview.7/PowerShell-7.3.0-preview.7-win-x86.msi +[pv-deb]: https://github.com/PowerShell/PowerShell/releases/download/v7.3.0-preview.7/powershell-preview_7.3.0-preview.7-1.deb_amd64.deb +[pv-rpm]: https://github.com/PowerShell/PowerShell/releases/download/v7.3.0-preview.7/powershell-preview-7.3.0_preview.7-1.rh.x86_64.rpm +[pv-macos]: https://github.com/PowerShell/PowerShell/releases/download/v7.3.0-preview.7/powershell-7.3.0-preview.7-osx-x64.pkg +[pv-macos-arm64]: https://github.com/PowerShell/PowerShell/releases/download/v7.3.0-preview.7/powershell-7.3.0-preview.7-osx-arm64.pkg +[pv-winarm64]: https://github.com/PowerShell/PowerShell/releases/download/v7.3.0-preview.7/PowerShell-7.3.0-preview.7-win-arm64.zip +[pv-winx86-zip]: https://github.com/PowerShell/PowerShell/releases/download/v7.3.0-preview.7/PowerShell-7.3.0-preview.7-win-x86.zip +[pv-winx64-zip]: https://github.com/PowerShell/PowerShell/releases/download/v7.3.0-preview.7/PowerShell-7.3.0-preview.7-win-x64.zip +[pv-macos-tar]: https://github.com/PowerShell/PowerShell/releases/download/v7.3.0-preview.7/powershell-7.3.0-preview.7-osx-x64.tar.gz +[pv-macos-tar-arm64]: https://github.com/PowerShell/PowerShell/releases/download/v7.3.0-preview.7/powershell-7.3.0-preview.7-osx-arm64.tar.gz +[pv-linux-tar]: https://github.com/PowerShell/PowerShell/releases/download/v7.3.0-preview.7/powershell-7.3.0-preview.7-linux-x64.tar.gz +[pv-arm32]: https://github.com/PowerShell/PowerShell/releases/download/v7.3.0-preview.7/powershell-7.3.0-preview.7-linux-arm32.tar.gz +[pv-arm64]: https://github.com/PowerShell/PowerShell/releases/download/v7.3.0-preview.7/powershell-7.3.0-preview.7-linux-arm64.tar.gz [pv-snap]: https://snapcraft.io/powershell-preview [in-windows]: https://docs.microsoft.com/powershell/scripting/install/installing-powershell-core-on-windows diff --git a/ThirdPartyNotices.txt b/ThirdPartyNotices.txt index 64621d33567..ceb1155c1b2 100644 --- a/ThirdPartyNotices.txt +++ b/ThirdPartyNotices.txt @@ -141,10 +141,9 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND --------------------------------------------------------- -Microsoft.ApplicationInsights 2.20.0 - MIT +Microsoft.ApplicationInsights 2.21.0 - MIT -(c) Microsoft Corporation. MIT License @@ -229,7 +228,7 @@ SOFTWARE. --------------------------------------------------------- -Microsoft.CodeAnalysis.Common 4.2.0 - MIT +Microsoft.CodeAnalysis.Common 4.3.0 - MIT @@ -247,7 +246,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI --------------------------------------------------------- -Microsoft.CodeAnalysis.CSharp 4.2.0 - MIT +Microsoft.CodeAnalysis.CSharp 4.3.0 - MIT @@ -1409,45 +1408,50 @@ SOFTWARE. --------------------------------------------------------- -System.Configuration.ConfigurationManager 6.0.0 - MIT +System.Configuration.ConfigurationManager 6.0.1 - MIT -(c) Microsoft Corporation. +(c) Microsoft Corporation Copyright (c) Andrew Arnott +Copyright 2019 LLVM Project Copyright 2018 Daniel Lemire -Copyright 2012 the V8 project -Copyright (c) .NET Foundation. +Copyright (c) .NET Foundation Copyright (c) 2011, Google Inc. +Copyright (c) 2020 Dan Shechter +(c) 1997-2005 Sean Eron Anderson Copyright (c) 1998 Microsoft. To -(c) 1997-2005 Sean Eron Anderson. Copyright (c) 2017 Yoshifumi Kawai +Copyright (c) 2005-2020 Rich Felker Copyright (c) Microsoft Corporation Copyright (c) 2007 James Newton-King Copyright (c) 2012-2014, Yann Collet +Copyright (c) 1991-2020 Unicode, Inc. Copyright (c) 2013-2017, Alfred Klomp +Copyright 2012 the V8 project authors +Copyright (c) 2011-2020 Microsoft Corp Copyright (c) 2015-2017, Wojciech Mula Copyright (c) 2005-2007, Nick Galbreath +Copyright (c) 2015 The Chromium Authors Copyright (c) 2018 Alexander Chermyanin +Copyright (c) The Internet Society 1997 Portions (c) International Organization -Copyright (c) 2015 The Chromium Authors. -Copyright (c) The Internet Society 1997. Copyright (c) 2004-2006 Intel Corporation Copyright (c) 2013-2017, Milosz Krajewski Copyright (c) 2016-2017, Matthieu Darbois +Copyright (c) The Internet Society (2003) Copyright (c) .NET Foundation Contributors -Copyright (c) The Internet Society (2003). Copyright (c) .NET Foundation and Contributors Copyright (c) 2019 Microsoft Corporation, Daan Leijen Copyright (c) 2011 Novell, Inc (http://www.novell.com) Copyright (c) 1995-2017 Jean-loup Gailly and Mark Adler Copyright (c) 2015 Xamarin, Inc (http://www.xamarin.com) -Copyright (c) 2009, 2010, 2013-2016 by the Brotli Authors. +Copyright (c) 2009, 2010, 2013-2016 by the Brotli Authors Copyright (c) 2014 Ryan Juckett http://www.ryanjuckett.com Copyright (c) 1990- 1993, 1996 Open Software Foundation, Inc. -Copyright (c) 2015 THL A29 Limited, a Tencent company, and Milo Yip. -Copyright (c) YEAR W3C(r) (MIT, ERCIM, Keio, Beihang). Disclaimers THIS WORK IS PROVIDED AS -Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 The Regents of the University of California. -Copyright (c) 1989 by Hewlett-Packard Company, Palo Alto, Ca. & Digital Equipment Corporation, Maynard, Mass. +Copyright (c) YEAR W3C(r) (MIT, ERCIM, Keio, Beihang). Disclaimers +Copyright (c) 2015 THL A29 Limited, a Tencent company, and Milo Yip +Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 The Regents of the University of California +Copyright (c) 1989 by Hewlett-Packard Company, Palo Alto, Ca. & Digital Equipment Corporation, Maynard, Mass Copyright (c) 1989 by Hewlett-Packard Company, Palo Alto, Ca. & Digital Equipment Corporation, Maynard, Mass. To The MIT License (MIT) @@ -1479,45 +1483,50 @@ SOFTWARE. --------------------------------------------------------- -System.Data.Odbc 6.0.0 - MIT +System.Data.Odbc 6.0.1 - MIT -(c) Microsoft Corporation. +(c) Microsoft Corporation Copyright (c) Andrew Arnott +Copyright 2019 LLVM Project Copyright 2018 Daniel Lemire -Copyright 2012 the V8 project -Copyright (c) .NET Foundation. +Copyright (c) .NET Foundation Copyright (c) 2011, Google Inc. +Copyright (c) 2020 Dan Shechter +(c) 1997-2005 Sean Eron Anderson Copyright (c) 1998 Microsoft. To -(c) 1997-2005 Sean Eron Anderson. Copyright (c) 2017 Yoshifumi Kawai +Copyright (c) 2005-2020 Rich Felker Copyright (c) Microsoft Corporation Copyright (c) 2007 James Newton-King Copyright (c) 2012-2014, Yann Collet +Copyright (c) 1991-2020 Unicode, Inc. Copyright (c) 2013-2017, Alfred Klomp +Copyright 2012 the V8 project authors +Copyright (c) 2011-2020 Microsoft Corp Copyright (c) 2015-2017, Wojciech Mula Copyright (c) 2005-2007, Nick Galbreath +Copyright (c) 2015 The Chromium Authors Copyright (c) 2018 Alexander Chermyanin +Copyright (c) The Internet Society 1997 Portions (c) International Organization -Copyright (c) 2015 The Chromium Authors. -Copyright (c) The Internet Society 1997. Copyright (c) 2004-2006 Intel Corporation Copyright (c) 2013-2017, Milosz Krajewski Copyright (c) 2016-2017, Matthieu Darbois +Copyright (c) The Internet Society (2003) Copyright (c) .NET Foundation Contributors -Copyright (c) The Internet Society (2003). Copyright (c) .NET Foundation and Contributors Copyright (c) 2019 Microsoft Corporation, Daan Leijen Copyright (c) 2011 Novell, Inc (http://www.novell.com) Copyright (c) 1995-2017 Jean-loup Gailly and Mark Adler Copyright (c) 2015 Xamarin, Inc (http://www.xamarin.com) -Copyright (c) 2009, 2010, 2013-2016 by the Brotli Authors. +Copyright (c) 2009, 2010, 2013-2016 by the Brotli Authors Copyright (c) 2014 Ryan Juckett http://www.ryanjuckett.com Copyright (c) 1990- 1993, 1996 Open Software Foundation, Inc. -Copyright (c) 2015 THL A29 Limited, a Tencent company, and Milo Yip. -Copyright (c) YEAR W3C(r) (MIT, ERCIM, Keio, Beihang). Disclaimers THIS WORK IS PROVIDED AS -Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 The Regents of the University of California. -Copyright (c) 1989 by Hewlett-Packard Company, Palo Alto, Ca. & Digital Equipment Corporation, Maynard, Mass. +Copyright (c) YEAR W3C(r) (MIT, ERCIM, Keio, Beihang). Disclaimers +Copyright (c) 2015 THL A29 Limited, a Tencent company, and Milo Yip +Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 The Regents of the University of California +Copyright (c) 1989 by Hewlett-Packard Company, Palo Alto, Ca. & Digital Equipment Corporation, Maynard, Mass Copyright (c) 1989 by Hewlett-Packard Company, Palo Alto, Ca. & Digital Equipment Corporation, Maynard, Mass. To The MIT License (MIT) @@ -2577,12 +2586,9 @@ SOFTWARE. --------------------------------------------------------- -System.Private.ServiceModel 4.9.0 - MIT +System.Private.ServiceModel 4.10.0 - MIT -(c) Microsoft Corporation. -Copyright (c) .NET Foundation and Contributors -Copyright (c) 2000-2014 The Legion of the Bouncy Castle Inc. (http://www.bouncycastle.org) The MIT License (MIT) @@ -3118,46 +3124,9 @@ SOFTWARE. --------------------------------------------------------- -System.Security.Cryptography.Xml 6.0.0 - MIT +System.Security.Cryptography.Xml 6.0.1 - MIT -(c) Microsoft Corporation. -Copyright (c) Andrew Arnott -Copyright 2018 Daniel Lemire -Copyright 2012 the V8 project -Copyright (c) .NET Foundation. -Copyright (c) 2011, Google Inc. -Copyright (c) 1998 Microsoft. To -(c) 1997-2005 Sean Eron Anderson. -Copyright (c) 2017 Yoshifumi Kawai -Copyright (c) Microsoft Corporation -Copyright (c) 2007 James Newton-King -Copyright (c) 2012-2014, Yann Collet -Copyright (c) 2013-2017, Alfred Klomp -Copyright (c) 2015-2017, Wojciech Mula -Copyright (c) 2005-2007, Nick Galbreath -Copyright (c) 2018 Alexander Chermyanin -Portions (c) International Organization -Copyright (c) 2015 The Chromium Authors. -Copyright (c) The Internet Society 1997. -Copyright (c) 2004-2006 Intel Corporation -Copyright (c) 2013-2017, Milosz Krajewski -Copyright (c) 2016-2017, Matthieu Darbois -Copyright (c) .NET Foundation Contributors -Copyright (c) The Internet Society (2003). -Copyright (c) .NET Foundation and Contributors -Copyright (c) 2019 Microsoft Corporation, Daan Leijen -Copyright (c) 2011 Novell, Inc (http://www.novell.com) -Copyright (c) 1995-2017 Jean-loup Gailly and Mark Adler -Copyright (c) 2015 Xamarin, Inc (http://www.xamarin.com) -Copyright (c) 2009, 2010, 2013-2016 by the Brotli Authors. -Copyright (c) 2014 Ryan Juckett http://www.ryanjuckett.com -Copyright (c) 1990- 1993, 1996 Open Software Foundation, Inc. -Copyright (c) 2015 THL A29 Limited, a Tencent company, and Milo Yip. -Copyright (c) YEAR W3C(r) (MIT, ERCIM, Keio, Beihang). Disclaimers THIS WORK IS PROVIDED AS -Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 The Regents of the University of California. -Copyright (c) 1989 by Hewlett-Packard Company, Palo Alto, Ca. & Digital Equipment Corporation, Maynard, Mass. -Copyright (c) 1989 by Hewlett-Packard Company, Palo Alto, Ca. & Digital Equipment Corporation, Maynard, Mass. To The MIT License (MIT) @@ -3327,12 +3296,9 @@ SOFTWARE. --------------------------------------------------------- -System.ServiceModel.Duplex 4.9.0 - MIT +System.ServiceModel.Duplex 4.10.0 - MIT -(c) Microsoft Corporation. -Copyright (c) .NET Foundation and Contributors -Copyright (c) 2000-2014 The Legion of the Bouncy Castle Inc. (http://www.bouncycastle.org) The MIT License (MIT) @@ -3363,12 +3329,9 @@ SOFTWARE. --------------------------------------------------------- -System.ServiceModel.Http 4.9.0 - MIT +System.ServiceModel.Http 4.10.0 - MIT -(c) Microsoft Corporation. -Copyright (c) .NET Foundation and Contributors -Copyright (c) 2000-2014 The Legion of the Bouncy Castle Inc. (http://www.bouncycastle.org) The MIT License (MIT) @@ -3399,12 +3362,9 @@ SOFTWARE. --------------------------------------------------------- -System.ServiceModel.NetTcp 4.9.0 - MIT +System.ServiceModel.NetTcp 4.10.0 - MIT -(c) Microsoft Corporation. -Copyright (c) .NET Foundation and Contributors -Copyright (c) 2000-2014 The Legion of the Bouncy Castle Inc. (http://www.bouncycastle.org) The MIT License (MIT) @@ -3435,12 +3395,9 @@ SOFTWARE. --------------------------------------------------------- -System.ServiceModel.Primitives 4.9.0 - MIT +System.ServiceModel.Primitives 4.10.0 - MIT -(c) Microsoft Corporation. -Copyright (c) .NET Foundation and Contributors -Copyright (c) 2000-2014 The Legion of the Bouncy Castle Inc. (http://www.bouncycastle.org) The MIT License (MIT) @@ -3471,12 +3428,9 @@ SOFTWARE. --------------------------------------------------------- -System.ServiceModel.Security 4.9.0 - MIT +System.ServiceModel.Security 4.10.0 - MIT -(c) Microsoft Corporation. -Copyright (c) .NET Foundation and Contributors -Copyright (c) 2000-2014 The Legion of the Bouncy Castle Inc. (http://www.bouncycastle.org) The MIT License (MIT) diff --git a/assets/MicrosoftUpdate/RegisterMicrosoftUpdate.ps1 b/assets/MicrosoftUpdate/RegisterMicrosoftUpdate.ps1 new file mode 100644 index 00000000000..fd341d4fbef --- /dev/null +++ b/assets/MicrosoftUpdate/RegisterMicrosoftUpdate.ps1 @@ -0,0 +1,70 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. + +param( + [ValidateSet('Hang', 'Fail')] + $TestHook +) + +$waitTimeoutSeconds = 300 +switch ($TestHook) { + 'Hang' { + $waitTimeoutSeconds = 10 + $jobScript = { Start-Sleep -Seconds 600 } + } + 'Fail' { + $jobScript = { throw "This job script should fail" } + } + default { + $jobScript = { + # This registers Microsoft Update via a predifened GUID with the Windows Update Agent. + # https://docs.microsoft.com/en-us/windows/win32/wua_sdk/opt-in-to-microsoft-update + + $serviceManager = (New-Object -ComObject Microsoft.Update.ServiceManager) + $isRegistered = $serviceManager.QueryServiceRegistration('7971f918-a847-4430-9279-4a52d1efe18d').Service.IsRegisteredWithAu + + if (!$isRegistered) { + Write-Verbose -Verbose "Opting into Microsoft Update as the Autmatic Update Service" + # 7 is the combination of asfAllowPendingRegistration, asfAllowOnlineRegistration, asfRegisterServiceWithAU + # AU means Automatic Updates + $null = $serviceManager.AddService2('7971f918-a847-4430-9279-4a52d1efe18d', 7, '') + } + else { + Write-Verbose -Verbose "Microsoft Update is already registered for Automatic Updates" + } + + $isRegistered = $serviceManager.QueryServiceRegistration('7971f918-a847-4430-9279-4a52d1efe18d').Service.IsRegisteredWithAu + + # Return if it was successful, which is the opposite of Pending. + return $isRegistered + } + } +} + +Write-Verbose "Running job script: $jobScript" -Verbose +$job = Start-ThreadJob -ScriptBlock $jobScript + +Write-Verbose "Waiting on Job for $waitTimeoutSeconds seconds" -Verbose +$null = Wait-Job -Job $job -Timeout $waitTimeoutSeconds + +if ($job.State -ne 'Running') { + Write-Verbose "Job finished. State: $($job.State)" -Verbose + $result = Receive-Job -Job $job -Verbose + Write-Verbose "Result: $result" -Verbose + if ($result) { + Write-Verbose "Registration succeeded" -Verbose + exit 0 + } + else { + Write-Verbose "Registration failed" -Verbose + # at the time this was written, the MSI is ignoring the exit code + exit 1 + } +} +else { + Write-Verbose "Job timed out" -Verbose + Write-Verbose "Stopping Job. State: $($job.State)" -Verbose + Stop-Job -Job $job + # at the time this was written, the MSI is ignoring the exit code + exit 258 +} diff --git a/assets/wix/Product.wxs b/assets/wix/Product.wxs index bf6ab5d7cd8..85cc0011d36 100644 --- a/assets/wix/Product.wxs +++ b/assets/wix/Product.wxs @@ -87,7 +87,7 @@ + Value=""[VersionFolder]pwsh.exe" -NoProfile -ExecutionPolicy Bypass -File "[VersionFolder]RegisterMicrosoftUpdate.ps1"" /> - - - - - - - - + + + + + + + + @@ -3141,15 +3141,18 @@ - - - + + + + + + @@ -4154,14 +4157,15 @@ - - - - + + + + + diff --git a/experimental-feature-linux.json b/experimental-feature-linux.json index b0a5a696381..4dee9496504 100644 --- a/experimental-feature-linux.json +++ b/experimental-feature-linux.json @@ -1,13 +1,6 @@ [ - "PSAMSIMethodInvocationLogging", - "PSAnsiRenderingFileInfo", - "PSCleanBlock", "PSCommandNotFoundSuggestion", - "PSExec", "PSLoadAssemblyFromNativeCode", - "PSNativeCommandArgumentPassing", "PSNativeCommandErrorActionPreference", - "PSRemotingSSHTransportErrorHandling", - "PSStrictModeAssignment", "PSSubsystemPluginModel" ] diff --git a/experimental-feature-windows.json b/experimental-feature-windows.json index b0a5a696381..4dee9496504 100644 --- a/experimental-feature-windows.json +++ b/experimental-feature-windows.json @@ -1,13 +1,6 @@ [ - "PSAMSIMethodInvocationLogging", - "PSAnsiRenderingFileInfo", - "PSCleanBlock", "PSCommandNotFoundSuggestion", - "PSExec", "PSLoadAssemblyFromNativeCode", - "PSNativeCommandArgumentPassing", "PSNativeCommandErrorActionPreference", - "PSRemotingSSHTransportErrorHandling", - "PSStrictModeAssignment", "PSSubsystemPluginModel" ] diff --git a/global.json b/global.json index 638ff46a12c..fa6c98cbf9e 100644 --- a/global.json +++ b/global.json @@ -1,5 +1,5 @@ { "sdk": { - "version": "7.0.100-preview.7.22377.5" + "version": "7.0.100-rc.1.22431.12" } } 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 483985aee84..48fcd1861c4 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.Utility/Microsoft.PowerShell.Commands.Utility.csproj b/src/Microsoft.PowerShell.Commands.Utility/Microsoft.PowerShell.Commands.Utility.csproj index a09a69a84ee..18f9c39df02 100644 --- a/src/Microsoft.PowerShell.Commands.Utility/Microsoft.PowerShell.Commands.Utility.csproj +++ b/src/Microsoft.PowerShell.Commands.Utility/Microsoft.PowerShell.Commands.Utility.csproj @@ -31,9 +31,9 @@ - - - + + + diff --git a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/AddType.cs b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/AddType.cs index 6cdfb512dce..00d6b11efcf 100644 --- a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/AddType.cs +++ b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/AddType.cs @@ -13,6 +13,7 @@ using System.Management.Automation.Internal; using System.Management.Automation.Security; using System.Reflection; +using System.Runtime.CompilerServices; using System.Runtime.Loader; using System.Security; using System.Text; @@ -891,7 +892,14 @@ private IEnumerable GetPortableExecutableReferences private void WriteTypes(Assembly assembly) { - WriteObject(assembly.GetTypes(), true); + foreach (Type type in assembly.GetTypes()) + { + // We only write out types that are not auto-generated by compiler. + if (type.GetCustomAttribute() is null) + { + WriteObject(type); + } + } } #endregion LoadAssembly diff --git a/src/Microsoft.PowerShell.ConsoleHost/resources/ManagedEntranceStrings.resx b/src/Microsoft.PowerShell.ConsoleHost/resources/ManagedEntranceStrings.resx index 778584742b6..15cd09e7de0 100644 --- a/src/Microsoft.PowerShell.ConsoleHost/resources/ManagedEntranceStrings.resx +++ b/src/Microsoft.PowerShell.ConsoleHost/resources/ManagedEntranceStrings.resx @@ -145,8 +145,8 @@ Usage: pwsh[.exe] [-Login] [[-File] <filePath> [args]] [-Command { - | <script-block> [-args <arg-array>] | <string> [<CommandParameters>] } ] - [-ConfigurationName <string>] [-CustomPipeName <string>] - [-EncodedCommand <Base64EncodedCommand>] + [-ConfigurationName <string>] [-ConfigurationFile <filePath>] + [-CustomPipeName <string>] [-EncodedCommand <Base64EncodedCommand>] [-ExecutionPolicy <ExecutionPolicy>] [-InputFormat {Text | XML}] [-Interactive] [-MTA] [-NoExit] [-NoLogo] [-NonInteractive] [-NoProfile] [-NoProfileLoadTime] [-OutputFormat {Text | XML}] 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 f61abc2f4c5..36317ba86ee 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 aa699cf5eb3..e2d6644ae25 100644 --- a/src/Microsoft.PowerShell.SDK/Microsoft.PowerShell.SDK.csproj +++ b/src/Microsoft.PowerShell.SDK/Microsoft.PowerShell.SDK.csproj @@ -18,19 +18,19 @@ - - - + + + - - - - - - + + + + + + - + diff --git a/src/Microsoft.WSMan.Management/Microsoft.WSMan.Management.csproj b/src/Microsoft.WSMan.Management/Microsoft.WSMan.Management.csproj index a8010f4d216..0ac640d196e 100644 --- a/src/Microsoft.WSMan.Management/Microsoft.WSMan.Management.csproj +++ b/src/Microsoft.WSMan.Management/Microsoft.WSMan.Management.csproj @@ -10,7 +10,7 @@ - + diff --git a/src/System.Management.Automation/FormatAndOutput/DefaultFormatters/PowerShellCore_format_ps1xml.cs b/src/System.Management.Automation/FormatAndOutput/DefaultFormatters/PowerShellCore_format_ps1xml.cs index f4b9d03489c..9b2f6596bd5 100644 --- a/src/System.Management.Automation/FormatAndOutput/DefaultFormatters/PowerShellCore_format_ps1xml.cs +++ b/src/System.Management.Automation/FormatAndOutput/DefaultFormatters/PowerShellCore_format_ps1xml.cs @@ -811,33 +811,18 @@ private static IEnumerable ViewsOf_System_Management_Autom $ellipsis = ""`u{2026}"" $resetColor = '' $errorColor = '' - if ($Host.UI.SupportsVirtualTerminal -and ([string]::IsNullOrEmpty($env:__SuppressAnsiEscapeSequences))) { - if ($null -ne $psstyle) { - $errorColor = $psstyle.Formatting.Error - } - - $resetColor = [System.Management.Automation.VTUtility]::GetEscapeSequence( - [System.Management.Automation.VTUtility+VT]::Reset - ) - } + $accentColor = '' - function Get-VT100Color([ConsoleColor] $color) { - if (!$Host.UI.SupportsVirtualTerminal -or !([string]::IsNullOrEmpty($env:__SuppressAnsiEscapeSequences))) { - return '' - } - - return [System.Management.Automation.VTUtility]::GetEscapeSequence($color) + if ($Host.UI.SupportsVirtualTerminal -and ([string]::IsNullOrEmpty($env:__SuppressAnsiEscapeSequences))) { + $resetColor = $PSStyle.Reset + $errorColor = $psstyle.Formatting.Error + $accentColor = $PSStyle.Formatting.FormatAccent } function Show-ErrorRecord($obj, [int]$indent = 0, [int]$depth = 1) { $newline = [Environment]::Newline $output = [System.Text.StringBuilder]::new() $prefix = ' ' * $indent - $accentColor = '' - - if ($null -ne $Host.PrivateData) { - $accentColor = Get-VT100Color ($Host.PrivateData.FormatAccentColor ?? $Host.PrivateData.ErrorForegroundColor) - } $expandTypes = @( 'Microsoft.Rest.HttpRequestMessageWrapper' @@ -1066,36 +1051,17 @@ private static IEnumerable ViewsOf_System_Management_Autom Set-StrictMode -Off $newline = [Environment]::Newline - function Get-ConciseViewPositionMessage { - - $resetColor = '' - if ($Host.UI.SupportsVirtualTerminal -and ([string]::IsNullOrEmpty($env:__SuppressAnsiEscapeSequences))) { - $resetColor = [System.Management.Automation.VTUtility]::GetEscapeSequence( - [System.Management.Automation.VTUtility+VT]::Reset - ) - } - - function Get-VT100Color([ConsoleColor] $color) { - if (!$Host.UI.SupportsVirtualTerminal -or !([string]::IsNullOrEmpty($env:__SuppressAnsiEscapeSequences))) { - return '' - } - - return [System.Management.Automation.VTUtility]::GetEscapeSequence($color) - } + $resetColor = '' + $errorColor = '' + $accentColor = '' - # return length of string sans VT100 codes - function Get-RawStringLength($string) { - $vtCodes = ""`e[0m"", ""`e[2;30m"", ""`e[2;31m"", ""`e[2;32m"", ""`e[2;33m"", ""`e[2;34m"", - ""`e[2;35m"", ""`e[2;36m"", ""`e[2;37m"", ""`e[1;30m"", ""`e[1;31m"", ""`e[1;32m"", - ""`e[1;33m"", ""`e[1;34m"", ""`e[1;35m"", ""`e[1;36m"", ""`e[1;37m"" - - $newString = $string - foreach ($vtCode in $vtCodes) { - $newString = $newString.Replace($vtCode, '') - } + if ($Host.UI.SupportsVirtualTerminal -and ([string]::IsNullOrEmpty($env:__SuppressAnsiEscapeSequences))) { + $resetColor = $PSStyle.Reset + $errorColor = $PSStyle.Formatting.Error + $accentColor = $PSStyle.Formatting.ErrorAccent + } - return $newString.Length - } + function Get-ConciseViewPositionMessage { # returns a string cut to last whitespace function Get-TruncatedString($string, [int]$length) { @@ -1107,14 +1073,6 @@ function Get-ConciseViewPositionMessage { return ($string.Substring(0,$length) -split '\s',-2)[0] } - $errorColor = '' - $accentColor = '' - - if ($null -ne $Host.PrivateData) { - $errorColor = Get-VT100Color $Host.PrivateData.ErrorForegroundColor - $accentColor = Get-VT100Color ($Host.PrivateData.ErrorAccentColor ?? $errorColor) - } - $posmsg = '' $headerWhitespace = '' $offsetWhitespace = '' @@ -1217,7 +1175,7 @@ function Get-ConciseViewPositionMessage { # if rendering line information, break up the message if it's wider than the console if ($myinv -and $myinv.ScriptName -or $err.CategoryInfo.Category -eq 'ParserError') { - $prefixLength = Get-RawStringLength -string $prefix + $prefixLength = [System.Management.Automation.Internal.StringDecorated]::new($prefix).ContentLength $prefixVtLength = $prefix.Length - $prefixLength # replace newlines in message so it lines up correct @@ -1296,82 +1254,77 @@ function Get-ConciseViewPositionMessage { $myinv = $err.InvocationInfo } - if ($ErrorView -ne 'ConciseView' -and $null -ne $host.PrivateData) { - if ($null -ne $host.PrivateData.ErrorForegroundColor) { - [Console]::ForegroundColor = $host.PrivateData.ErrorForegroundColor - } + if ($err.FullyQualifiedErrorId -eq 'NativeCommandErrorMessage' -or $err.FullyQualifiedErrorId -eq 'NativeCommandError') { + return ""${errorColor}$($err.Exception.Message)${resetcolor}"" + } - if ($null -ne $host.PrivateData.ErrorBackgroundColor) { - [Console]::BackgroundColor = $host.PrivateData.ErrorBackgroundColor - } + $myinv = $err.InvocationInfo + if ($ErrorView -eq 'DetailedView') { + $message = Get-Error | Out-String + return ""${errorColor}${message}${resetcolor}"" } - if ($err.FullyQualifiedErrorId -eq 'NativeCommandErrorMessage' -or $err.FullyQualifiedErrorId -eq 'NativeCommandError') { - $err.Exception.Message + if ($ErrorView -eq 'CategoryView') { + $message = $err.CategoryInfo.GetMessage() + return ""${errorColor}${message}${resetcolor}"" } - else - { - $myinv = $err.InvocationInfo - if ($ErrorView -eq 'DetailedView') { - return (Get-Error | Out-String) - } - elseif ($ErrorView -eq 'ConciseView') { - $posmsg = Get-ConciseViewPositionMessage - } - elseif ($myinv -and ($myinv.MyCommand -or ($err.CategoryInfo.Category -ne 'ParserError'))) { - $posmsg = $myinv.PositionMessage - } else { - $posmsg = '' - } - if ($posmsg -ne '') - { - $posmsg = $newline + $posmsg - } + $posmsg = '' + if ($ErrorView -eq 'ConciseView') { + $posmsg = Get-ConciseViewPositionMessage + } + elseif ($myinv -and ($myinv.MyCommand -or ($err.CategoryInfo.Category -ne 'ParserError'))) { + $posmsg = $myinv.PositionMessage + } - if ($err.PSMessageDetails) { - $posmsg = ' : ' + $err.PSMessageDetails + $posmsg - } + if ($posmsg -ne '') { + $posmsg = $newline + $posmsg + } + + if ($err.PSMessageDetails) { + $posmsg = ' : ' + $err.PSMessageDetails + $posmsg + } - if ($ErrorView -eq 'ConciseView') { - return $posmsg + if ($ErrorView -eq 'ConciseView') { + if ($err.PSMessageDetails) { + $posmsg = ""${errorColor}${posmsg}"" } + return $posmsg + } - $indent = 4 + $indent = 4 - $errorCategoryMsg = $err.ErrorCategory_Message + $errorCategoryMsg = $err.ErrorCategory_Message - if ($null -ne $errorCategoryMsg) - { - $indentString = '+ CategoryInfo : ' + $err.ErrorCategory_Message - } - else - { - $indentString = '+ CategoryInfo : ' + $err.CategoryInfo - } + if ($null -ne $errorCategoryMsg) + { + $indentString = '+ CategoryInfo : ' + $err.ErrorCategory_Message + } + else + { + $indentString = '+ CategoryInfo : ' + $err.CategoryInfo + } - $posmsg += $newline + $indentString + $posmsg += $newline + $indentString - $indentString = ""+ FullyQualifiedErrorId : "" + $err.FullyQualifiedErrorId - $posmsg += $newline + $indentString + $indentString = ""+ FullyQualifiedErrorId : "" + $err.FullyQualifiedErrorId + $posmsg += $newline + $indentString - $originInfo = $err.OriginInfo + $originInfo = $err.OriginInfo - if (($null -ne $originInfo) -and ($null -ne $originInfo.PSComputerName)) - { - $indentString = ""+ PSComputerName : "" + $originInfo.PSComputerName - $posmsg += $newline + $indentString - } + if (($null -ne $originInfo) -and ($null -ne $originInfo.PSComputerName)) + { + $indentString = ""+ PSComputerName : "" + $originInfo.PSComputerName + $posmsg += $newline + $indentString + } - if ($ErrorView -eq 'CategoryView') { - $err.CategoryInfo.GetMessage() - } - elseif (! $err.ErrorDetails -or ! $err.ErrorDetails.Message) { - $err.Exception.Message + $posmsg - } else { - $err.ErrorDetails.Message + $posmsg - } + $finalMsg = if ($err.ErrorDetails.Message) { + $err.ErrorDetails.Message + $posmsg + } else { + $err.Exception.Message + $posmsg } + + ""${errorColor}${finalMsg}${resetcolor}"" ") .EndEntry() .EndControl()); diff --git a/src/System.Management.Automation/System.Management.Automation.csproj b/src/System.Management.Automation/System.Management.Automation.csproj index cc867501e8b..03414ef381b 100644 --- a/src/System.Management.Automation/System.Management.Automation.csproj +++ b/src/System.Management.Automation/System.Management.Automation.csproj @@ -14,18 +14,18 @@ - + - - - + + + - + - - - + + + diff --git a/src/System.Management.Automation/engine/CommandMetadata.cs b/src/System.Management.Automation/engine/CommandMetadata.cs index 75d02ed59d5..a9094f54b36 100644 --- a/src/System.Management.Automation/engine/CommandMetadata.cs +++ b/src/System.Management.Automation/engine/CommandMetadata.cs @@ -864,15 +864,6 @@ internal string GetProxyCommand(string helpComment, bool generateDynamicParamete ", GetDynamicParamBlock()); } - string cleanBlock = string.Empty; - if (ExperimentalFeature.IsEnabled(ExperimentalFeature.PSCleanBlockFeatureName)) - { - cleanBlock = string.Format(CultureInfo.InvariantCulture, @" -clean -{{{0}}} -", GetCleanBlock()); - } - string result = string.Format(CultureInfo.InvariantCulture, @"{0} param({1}) @@ -884,7 +875,9 @@ internal string GetProxyCommand(string helpComment, bool generateDynamicParamete end {{{5}}} -{6} + +clean +{{{6}}} <# {7} #> @@ -895,7 +888,7 @@ internal string GetProxyCommand(string helpComment, bool generateDynamicParamete GetBeginBlock(), GetProcessBlock(), GetEndBlock(), - cleanBlock, + GetCleanBlock(), CodeGeneration.EscapeBlockCommentContent(helpComment)); return result; diff --git a/src/System.Management.Automation/engine/ExperimentalFeature/ExperimentalFeature.cs b/src/System.Management.Automation/engine/ExperimentalFeature/ExperimentalFeature.cs index 8a3e428b9c4..517b153d7ad 100644 --- a/src/System.Management.Automation/engine/ExperimentalFeature/ExperimentalFeature.cs +++ b/src/System.Management.Automation/engine/ExperimentalFeature/ExperimentalFeature.cs @@ -21,13 +21,7 @@ public class ExperimentalFeature #region Const Members internal const string EngineSource = "PSEngine"; - internal const string PSNativeCommandArgumentPassingFeatureName = "PSNativeCommandArgumentPassing"; internal const string PSNativeCommandErrorActionPreferenceFeatureName = "PSNativeCommandErrorActionPreference"; - internal const string PSRemotingSSHTransportErrorHandling = "PSRemotingSSHTransportErrorHandling"; - internal const string PSCleanBlockFeatureName = "PSCleanBlock"; - internal const string PSAMSIMethodInvocationLogging = "PSAMSIMethodInvocationLogging"; - internal const string PSExecFeatureName = "PSExec"; - internal const string PSStrictModeAssignment = "PSStrictModeAssignment"; #endregion @@ -116,33 +110,12 @@ static ExperimentalFeature() new ExperimentalFeature( name: "PSSubsystemPluginModel", description: "A plugin model for registering and un-registering PowerShell subsystems"), - new ExperimentalFeature( - name: PSNativeCommandArgumentPassingFeatureName, - description: "Use ArgumentList when invoking a native command"), new ExperimentalFeature( name: "PSLoadAssemblyFromNativeCode", description: "Expose an API to allow assembly loading from native code"), - new ExperimentalFeature( - name: "PSAnsiRenderingFileInfo", - description: "Enable coloring for FileInfo objects"), new ExperimentalFeature( name: PSNativeCommandErrorActionPreferenceFeatureName, - description: "Native commands with non-zero exit codes issue errors according to $ErrorActionPreference when $PSNativeCommandUseErrorActionPreference is $true"), - new ExperimentalFeature( - name: PSRemotingSSHTransportErrorHandling, - description: "Removes the SSH remoting transport stdErr stream message handling as terminating errors, and instead just writes error messages to console."), - new ExperimentalFeature( - name: PSCleanBlockFeatureName, - description: "Add support of a 'Clean' block to functions and script cmdlets for easy resource cleanup"), - new ExperimentalFeature( - name: PSAMSIMethodInvocationLogging, - description: "Provides AMSI notification of .NET method invocations."), - new ExperimentalFeature( - name: PSExecFeatureName, - description: "Add 'exec' built-in command on Linux and macOS"), - new ExperimentalFeature( - name: PSStrictModeAssignment, - description: "Add support of setting Strict-Mode with Invoke-Command"), + description: "Native commands with non-zero exit codes issue errors according to $ErrorActionPreference when $PSNativeCommandUseErrorActionPreference is $true") }; EngineExperimentalFeatures = new ReadOnlyCollection(engineFeatures); diff --git a/src/System.Management.Automation/engine/InitialSessionState.cs b/src/System.Management.Automation/engine/InitialSessionState.cs index 7a6d09cba67..e75ca018f8e 100644 --- a/src/System.Management.Automation/engine/InitialSessionState.cs +++ b/src/System.Management.Automation/engine/InitialSessionState.cs @@ -4161,13 +4161,7 @@ .FORWARDHELPCATEGORY Cmdlet } else { $pagerCommand = 'less' - # PSNativeCommandArgumentPassing arguments should be constructed differently. - if ($EnabledExperimentalFeatures -contains 'PSNativeCommandArgumentPassing') { - $pagerArgs = '-s','-P','Page %db?B of %D:.\. Press h for help or q to quit\.' - } - else { - $pagerArgs = '-Ps""Page %db?B of %D:.\. Press h for help or q to quit\.$""' - } + $pagerArgs = '-s','-P','Page %db?B of %D:.\. Press h for help or q to quit\.' } # Respect PAGER environment variable which allows user to specify a custom pager. @@ -4207,16 +4201,7 @@ .FORWARDHELPCATEGORY Cmdlet $consoleWidth = [System.Math]::Max([System.Console]::WindowWidth, 20) if ($pagerArgs) { - # Start the pager arguments directly if the PSNativeCommandArgumentPassing feature is enabled. - # Otherwise, supply pager arguments to an application without any PowerShell parsing of the arguments. - # Leave environment variable to help user debug arguments supplied in $env:PAGER. - if ($EnabledExperimentalFeatures -contains 'PSNativeCommandArgumentPassing') { - $help | Out-String -Stream -Width ($consoleWidth - 1) | & $pagerCommand $pagerArgs - } - else { - $env:__PSPAGER_ARGS = $pagerArgs - $help | Out-String -Stream -Width ($consoleWidth - 1) | & $pagerCommand --% %__PSPAGER_ARGS% - } + $help | Out-String -Stream -Width ($consoleWidth - 1) | & $pagerCommand $pagerArgs } else { $help | Out-String -Stream -Width ($consoleWidth - 1) | & $pagerCommand @@ -4350,7 +4335,7 @@ static InitialSessionState() SpecialVariables.PSStyle, PSStyle.Instance, RunspaceInit.PSStyleDescription, - ScopedItemOptions.None), + ScopedItemOptions.Constant), // Variable which controls the encoding for piping data to a NativeCommand new SessionStateVariableEntry( @@ -4492,16 +4477,13 @@ static InitialSessionState() new ArgumentTypeConverterAttribute(typeof(bool)))); } - if (ExperimentalFeature.IsEnabled(ExperimentalFeature.PSNativeCommandArgumentPassingFeatureName)) - { - builtinVariables.Add( - new SessionStateVariableEntry( - SpecialVariables.NativeArgumentPassing, - Platform.IsWindows ? NativeArgumentPassingStyle.Windows : NativeArgumentPassingStyle.Standard, - RunspaceInit.NativeCommandArgumentPassingDescription, - ScopedItemOptions.None, - new ArgumentTypeConverterAttribute(typeof(NativeArgumentPassingStyle)))); - } + builtinVariables.Add( + new SessionStateVariableEntry( + SpecialVariables.NativeArgumentPassing, + Platform.IsWindows ? NativeArgumentPassingStyle.Windows : NativeArgumentPassingStyle.Standard, + RunspaceInit.NativeCommandArgumentPassingDescription, + ScopedItemOptions.None, + new ArgumentTypeConverterAttribute(typeof(NativeArgumentPassingStyle)))); BuiltInVariables = builtinVariables.ToArray(); } @@ -4696,10 +4678,7 @@ internal static SessionStateAliasEntry[] BuiltInAliases }; #if UNIX - if (ExperimentalFeature.IsEnabled(ExperimentalFeature.PSExecFeatureName)) - { - builtInAliases.Add(new SessionStateAliasEntry("exec", "Switch-Process")); - } + builtInAliases.Add(new SessionStateAliasEntry("exec", "Switch-Process")); #endif return builtInAliases.ToArray(); @@ -5341,10 +5320,7 @@ private static void InitializeCoreCmdletsAndProviders( } #if UNIX - if (ExperimentalFeature.IsEnabled(ExperimentalFeature.PSExecFeatureName)) - { - cmdlets.Add("Switch-Process", new SessionStateCmdletEntry("Switch-Process", typeof(SwitchProcessCommand), helpFile)); - } + cmdlets.Add("Switch-Process", new SessionStateCmdletEntry("Switch-Process", typeof(SwitchProcessCommand), helpFile)); #endif foreach (var val in cmdlets.Values) diff --git a/src/System.Management.Automation/engine/Modules/SwitchProcessCommand.cs b/src/System.Management.Automation/engine/Modules/SwitchProcessCommand.cs index 298587679b1..1bad35bfd31 100644 --- a/src/System.Management.Automation/engine/Modules/SwitchProcessCommand.cs +++ b/src/System.Management.Automation/engine/Modules/SwitchProcessCommand.cs @@ -17,7 +17,6 @@ namespace Microsoft.PowerShell.Commands /// /// Implements a cmdlet that allows use of execv API. /// - [Experimental(ExperimentalFeature.PSExecFeatureName, ExperimentAction.Show)] [Cmdlet(VerbsCommon.Switch, "Process", HelpUri = "https://go.microsoft.com/fwlink/?linkid=2181448")] public sealed class SwitchProcessCommand : PSCmdlet { diff --git a/src/System.Management.Automation/engine/NativeCommandParameterBinder.cs b/src/System.Management.Automation/engine/NativeCommandParameterBinder.cs index aa0e94a5837..567a00387d5 100644 --- a/src/System.Management.Automation/engine/NativeCommandParameterBinder.cs +++ b/src/System.Management.Automation/engine/NativeCommandParameterBinder.cs @@ -193,23 +193,17 @@ internal NativeArgumentPassingStyle ArgumentPassingStyle { get { - if (ExperimentalFeature.IsEnabled(ExperimentalFeature.PSNativeCommandArgumentPassingFeatureName)) + try { - try - { - // This will default to the new behavior if it is set to anything other than Legacy - var preference = LanguagePrimitives.ConvertTo( - Context.GetVariableValue(SpecialVariables.NativeArgumentPassingVarPath, NativeArgumentPassingStyle.Standard)); - return preference; - } - catch - { - // The value is not convertable send back Legacy - return NativeArgumentPassingStyle.Legacy; - } + var preference = LanguagePrimitives.ConvertTo( + Context.GetVariableValue(SpecialVariables.NativeArgumentPassingVarPath, NativeArgumentPassingStyle.Standard)); + return preference; + } + catch + { + // The value is not convertable send back Legacy + return NativeArgumentPassingStyle.Legacy; } - - return NativeArgumentPassingStyle.Legacy; } } diff --git a/src/System.Management.Automation/engine/parser/tokenizer.cs b/src/System.Management.Automation/engine/parser/tokenizer.cs index 1c5654b34c4..9e133016e85 100644 --- a/src/System.Management.Automation/engine/parser/tokenizer.cs +++ b/src/System.Management.Automation/engine/parser/tokenizer.cs @@ -699,16 +699,8 @@ static Tokenizer() Diagnostics.Assert(s_keywordText.Length == s_keywordTokenKind.Length, "Keyword table sizes must match"); Diagnostics.Assert(_operatorText.Length == s_operatorTokenKind.Length, "Operator table sizes must match"); - bool isCleanBlockFeatureEnabled = ExperimentalFeature.IsEnabled(ExperimentalFeature.PSCleanBlockFeatureName); - for (int i = 0; i < s_keywordText.Length; ++i) { - if (!isCleanBlockFeatureEnabled && s_keywordText[i] == "clean") - { - // Skip adding the 'clean' keyword when the feature is disabled. - continue; - } - s_keywordTable.Add(s_keywordText[i], s_keywordTokenKind[i]); } diff --git a/src/System.Management.Automation/engine/remoting/commands/InvokeCommandCommand.cs b/src/System.Management.Automation/engine/remoting/commands/InvokeCommandCommand.cs index 804355d2e8d..a2a2397cb7a 100644 --- a/src/System.Management.Automation/engine/remoting/commands/InvokeCommandCommand.cs +++ b/src/System.Management.Automation/engine/remoting/commands/InvokeCommandCommand.cs @@ -263,72 +263,6 @@ public override SwitchParameter UseSSL } } - private sealed class ArgumentToPSVersionTransformationAttribute : ArgumentToVersionTransformationAttribute - { - protected override bool TryConvertFromString(string versionString, [NotNullWhen(true)] out Version version) - { - if (string.Equals("off", versionString, StringComparison.OrdinalIgnoreCase)) - { - version = new Version(0, 0); - return true; - } - - if (string.Equals("latest", versionString, StringComparison.OrdinalIgnoreCase)) - { - version = PSVersionInfo.PSVersion; - return true; - } - - return base.TryConvertFromString(versionString, out version); - } - } - - private static readonly Version s_OffVersion = new Version(0, 0); - - private sealed class ValidateVersionAttribute : ValidateArgumentsAttribute - { - protected override void Validate(object arguments, EngineIntrinsics engineIntrinsics) - { - Version version = arguments as Version; - if (version == s_OffVersion) - { - return; - } - - if (version == null || !PSVersionInfo.IsValidPSVersion(version)) - { - // No conversion succeeded so throw an exception... - throw new ValidationMetadataException( - "InvalidPSVersion", - null, - Metadata.ValidateVersionFailure, - arguments); - } - } - } - - /// - /// Gets or sets strict mode. - /// - [Experimental(ExperimentalFeature.PSStrictModeAssignment, ExperimentAction.Show)] - [Parameter(ParameterSetName = InvokeCommandCommand.InProcParameterSet)] - [ArgumentToPSVersionTransformation] - [ValidateVersion] - public Version StrictMode - { - get - { - return _strictmodeversion; - } - - set - { - _strictmodeversion = value; - } - } - - private Version _strictmodeversion = null; - /// /// For WSMan session: /// If this parameter is not specified then the value specified in @@ -908,8 +842,6 @@ public virtual SwitchParameter RemoteDebug #endregion - private Version _savedStrictModeVersion; - #endregion Parameters #region Overrides @@ -1033,12 +965,6 @@ protected override void BeginProcessing() } } - if (_strictmodeversion != null) - { - _savedStrictModeVersion = Context.EngineSessionState.CurrentScope.StrictModeVersion; - Context.EngineSessionState.CurrentScope.StrictModeVersion = _strictmodeversion; - } - return; } @@ -1255,19 +1181,7 @@ protected override void ProcessRecord() } else if (ParameterSetName.Equals(InvokeCommandCommand.InProcParameterSet) && (_steppablePipeline != null)) { - try - { - _steppablePipeline.Process(InputObject); - } - catch - { - if (_strictmodeversion != null) - { - Context.EngineSessionState.CurrentScope.StrictModeVersion = _savedStrictModeVersion; - } - - throw; - } + _steppablePipeline.Process(InputObject); } else { @@ -1298,30 +1212,20 @@ protected override void EndProcessing() { if (ParameterSetName.Equals(InvokeCommandCommand.InProcParameterSet)) { - try - { - if (_steppablePipeline != null) - { - _steppablePipeline.End(); - } - else - { - ScriptBlock.InvokeUsingCmdlet( - contextCmdlet: this, - useLocalScope: !NoNewScope, - errorHandlingBehavior: ScriptBlock.ErrorHandlingBehavior.WriteToCurrentErrorPipe, - dollarUnder: AutomationNull.Value, - input: _input, - scriptThis: AutomationNull.Value, - args: ArgumentList); - } + if (_steppablePipeline != null) + { + _steppablePipeline.End(); } - finally + else { - if (_strictmodeversion != null) - { - Context.EngineSessionState.CurrentScope.StrictModeVersion = _savedStrictModeVersion; - } + ScriptBlock.InvokeUsingCmdlet( + contextCmdlet: this, + useLocalScope: !NoNewScope, + errorHandlingBehavior: ScriptBlock.ErrorHandlingBehavior.WriteToCurrentErrorPipe, + dollarUnder: AutomationNull.Value, + input: _input, + scriptThis: AutomationNull.Value, + args: ArgumentList); } } else diff --git a/src/System.Management.Automation/engine/remoting/fanin/OutOfProcTransportManager.cs b/src/System.Management.Automation/engine/remoting/fanin/OutOfProcTransportManager.cs index 9a1e4ff47e3..e270a3efeb2 100644 --- a/src/System.Management.Automation/engine/remoting/fanin/OutOfProcTransportManager.cs +++ b/src/System.Management.Automation/engine/remoting/fanin/OutOfProcTransportManager.cs @@ -1819,50 +1819,30 @@ private void ProcessErrorThread(object state) { string error; - if (ExperimentalFeature.IsEnabled(ExperimentalFeature.PSRemotingSSHTransportErrorHandling)) - { - // Blocking read from StdError stream - error = reader.ReadLine(); - - if (error == null) - { - // Stream is closed unexpectedly. - throw new PSInvalidOperationException(RemotingErrorIdStrings.SSHAbruptlyTerminated); - } - - if (error.Length == 0) - { - // Ignore - continue; - } - - try - { - // Messages in error stream from ssh are unreliable, and may just be warnings or - // banner text. - // So just report the messages but don't act on them. - System.Console.WriteLine(error); - } - catch (IOException) - { } + // Blocking read from StdError stream + error = reader.ReadLine(); - continue; + if (error == null) + { + // Stream is closed unexpectedly. + throw new PSInvalidOperationException(RemotingErrorIdStrings.SSHAbruptlyTerminated); } - error = ReadError(reader); - if (error.Length == 0) { // Ignore continue; } - // Any SSH client error results in a broken session. - PSRemotingTransportException psrte = new PSRemotingTransportException( - PSRemotingErrorId.IPCServerProcessReportedError, - RemotingErrorIdStrings.IPCServerProcessReportedError, - StringUtil.Format(RemotingErrorIdStrings.SSHClientEndWithErrorMessage, error)); - HandleSSHError(psrte); + try + { + // Messages in error stream from ssh are unreliable, and may just be warnings or + // banner text. + // So just report the messages but don't act on them. + System.Console.WriteLine(error); + } + catch (IOException) + { } } } catch (ObjectDisposedException) @@ -1888,55 +1868,6 @@ private void HandleSSHError(PSRemotingTransportException psrte) CloseConnection(); } - private static string ReadError(StreamReader reader) - { - // Blocking read from StdError stream - string error = reader.ReadLine(); - - if (error == null) - { - // Stream is closed unexpectedly. - throw new PSInvalidOperationException(RemotingErrorIdStrings.SSHAbruptlyTerminated); - } - - if ((error.Length == 0) || - error.Contains("WARNING:", StringComparison.OrdinalIgnoreCase)) - { - // Handle as interactive warning message - Console.WriteLine(error); - return string.Empty; - } - - // SSH may return a multi-line error message. - // The StdError pipe stream is open ended causing StreamReader read operations to block - // if there is no incoming data. Since we don't know how many error message lines there - // will be we use an asynchronous read with timeout to prevent blocking indefinitely. - System.Text.StringBuilder sb = new Text.StringBuilder(error); - var running = true; - while (running) - { - try - { - var task = reader.ReadLineAsync(); - if (task.Wait(1000) && (task.Result != null)) - { - sb.Append(Environment.NewLine); - sb.Append(task.Result); - } - else - { - running = false; - } - } - catch (Exception) - { - running = false; - } - } - - return sb.ToString(); - } - private void StartReaderThread( StreamReader reader) { diff --git a/src/System.Management.Automation/engine/runtime/Binding/Binders.cs b/src/System.Management.Automation/engine/runtime/Binding/Binders.cs index e6f7eee438e..8662cc72ecd 100644 --- a/src/System.Management.Automation/engine/runtime/Binding/Binders.cs +++ b/src/System.Management.Automation/engine/runtime/Binding/Binders.cs @@ -6891,22 +6891,19 @@ internal static DynamicMetaObject InvokeDotNetMethod( expr = Expression.Block(expr, ExpressionCache.AutomationNullConstant); } - if (ExperimentalFeature.IsEnabled(ExperimentalFeature.PSAMSIMethodInvocationLogging)) - { - // Expression block runs two expressions in order: - // - Log method invocation to AMSI Notifications (can throw PSSecurityException) - // - Invoke method - string targetName = methodInfo.ReflectedType?.FullName ?? string.Empty; - expr = Expression.Block( - Expression.Call( - CachedReflectionInfo.MemberInvocationLoggingOps_LogMemberInvocation, - Expression.Constant(targetName), - Expression.Constant(name), - Expression.NewArrayInit( - typeof(object), - args.Select(static e => e.Expression.Cast(typeof(object))))), - expr); - } + // Expression block runs two expressions in order: + // - Log method invocation to AMSI Notifications (can throw PSSecurityException) + // - Invoke method + string targetName = methodInfo.ReflectedType?.FullName ?? string.Empty; + expr = Expression.Block( + Expression.Call( + CachedReflectionInfo.MemberInvocationLoggingOps_LogMemberInvocation, + Expression.Constant(targetName), + Expression.Constant(name), + Expression.NewArrayInit( + typeof(object), + args.Select(static e => e.Expression.Cast(typeof(object))))), + expr); // If we're calling SteppablePipeline.{Begin|Process|End}, we don't want // to wrap exceptions - this is very much a special case to help error diff --git a/src/System.Management.Automation/engine/runtime/Operations/MiscOps.cs b/src/System.Management.Automation/engine/runtime/Operations/MiscOps.cs index a85bc8a8e78..1c15c6510bc 100644 --- a/src/System.Management.Automation/engine/runtime/Operations/MiscOps.cs +++ b/src/System.Management.Automation/engine/runtime/Operations/MiscOps.cs @@ -13,6 +13,7 @@ using System.Management.Automation.Internal.Host; using System.Management.Automation.Language; using System.Management.Automation.Runspaces; +using System.Numerics; using System.Reflection; using System.Runtime.CompilerServices; using System.Text.RegularExpressions; @@ -3545,6 +3546,38 @@ internal static class MemberInvocationLoggingOps } ); + private static string ArgumentToString(object arg) + { + object baseObj = PSObject.Base(arg); + if (baseObj is null) + { + // The argument is null or AutomationNull.Value. + return "null"; + } + + // The comparisons below are ordered by the likelihood of arguments being of those types. + if (baseObj is string str) + { + return str; + } + + // Special case some types to call 'ToString' on the object. For the rest, we return its + // full type name to avoid calling a potentially expensive 'ToString' implementation. + Type baseType = baseObj.GetType(); + if (baseType.IsEnum || baseType.IsPrimitive + || baseType == typeof(Guid) + || baseType == typeof(Uri) + || baseType == typeof(Version) + || baseType == typeof(SemanticVersion) + || baseType == typeof(BigInteger) + || baseType == typeof(decimal)) + { + return baseObj.ToString(); + } + + return baseType.FullName; + } + internal static void LogMemberInvocation(string targetName, string name, object[] args) { try @@ -3554,7 +3587,7 @@ internal static void LogMemberInvocation(string targetName, string name, object[ for (int i = 0; i < args.Length; i++) { - string value = args[i] is null ? "null" : args[i].ToString(); + string value = ArgumentToString(args[i]); if (i > 0) { diff --git a/src/System.Management.Automation/namespaces/FileSystemProvider.cs b/src/System.Management.Automation/namespaces/FileSystemProvider.cs index 3c0aeaddc7b..07625fc2ab0 100644 --- a/src/System.Management.Automation/namespaces/FileSystemProvider.cs +++ b/src/System.Management.Automation/namespaces/FileSystemProvider.cs @@ -2068,43 +2068,32 @@ string ToModeString(FileSystemInfo fileSystemInfo) /// Name if a file or directory, Name -> Target if symlink. public static string NameString(PSObject instance) { - if (ExperimentalFeature.IsEnabled("PSAnsiRenderingFileInfo")) + if (instance?.BaseObject is FileSystemInfo fileInfo) { - if (instance?.BaseObject is FileSystemInfo fileInfo) + if (InternalSymbolicLinkLinkCodeMethods.IsReparsePointLikeSymlink(fileInfo)) { - if (InternalSymbolicLinkLinkCodeMethods.IsReparsePointLikeSymlink(fileInfo)) - { - return $"{PSStyle.Instance.FileInfo.SymbolicLink}{fileInfo.Name}{PSStyle.Instance.Reset} -> {fileInfo.LinkTarget}"; - } - else if (fileInfo.Attributes.HasFlag(FileAttributes.Directory)) - { - return $"{PSStyle.Instance.FileInfo.Directory}{fileInfo.Name}{PSStyle.Instance.Reset}"; - } - else if (PSStyle.Instance.FileInfo.Extension.ContainsKey(fileInfo.Extension)) - { - return $"{PSStyle.Instance.FileInfo.Extension[fileInfo.Extension]}{fileInfo.Name}{PSStyle.Instance.Reset}"; - } - else if ((Platform.IsWindows && CommandDiscovery.PathExtensions.Contains(fileInfo.Extension.ToLower())) || - (!Platform.IsWindows && Platform.NonWindowsIsExecutable(fileInfo.FullName))) - { - return $"{PSStyle.Instance.FileInfo.Executable}{fileInfo.Name}{PSStyle.Instance.Reset}"; - } - else - { - return fileInfo.Name; - } + return $"{PSStyle.Instance.FileInfo.SymbolicLink}{fileInfo.Name}{PSStyle.Instance.Reset} -> {fileInfo.LinkTarget}"; + } + else if (fileInfo.Attributes.HasFlag(FileAttributes.Directory)) + { + return $"{PSStyle.Instance.FileInfo.Directory}{fileInfo.Name}{PSStyle.Instance.Reset}"; + } + else if (PSStyle.Instance.FileInfo.Extension.ContainsKey(fileInfo.Extension)) + { + return $"{PSStyle.Instance.FileInfo.Extension[fileInfo.Extension]}{fileInfo.Name}{PSStyle.Instance.Reset}"; + } + else if ((Platform.IsWindows && CommandDiscovery.PathExtensions.Contains(fileInfo.Extension.ToLower())) || + (!Platform.IsWindows && Platform.NonWindowsIsExecutable(fileInfo.FullName))) + { + return $"{PSStyle.Instance.FileInfo.Executable}{fileInfo.Name}{PSStyle.Instance.Reset}"; + } + else + { + return fileInfo.Name; } - - return string.Empty; - } - else - { - return instance?.BaseObject is FileSystemInfo fileInfo - ? InternalSymbolicLinkLinkCodeMethods.IsReparsePointLikeSymlink(fileInfo) - ? $"{fileInfo.Name} -> {fileInfo.LinkTarget}" - : fileInfo.Name - : string.Empty; } + + return string.Empty; } /// diff --git a/src/System.Management.Automation/utils/Telemetry.cs b/src/System.Management.Automation/utils/Telemetry.cs index 625f9571651..3d9f3c9e1f7 100644 --- a/src/System.Management.Automation/utils/Telemetry.cs +++ b/src/System.Management.Automation/utils/Telemetry.cs @@ -143,7 +143,7 @@ static ApplicationInsightsTelemetry() { s_sessionId = Guid.NewGuid().ToString(); TelemetryConfiguration configuration = TelemetryConfiguration.CreateDefault(); - configuration.InstrumentationKey = _psCoreTelemetryKey; + configuration.ConnectionString = "InstrumentationKey=" + _psCoreTelemetryKey; // Set this to true to reduce latency during development configuration.TelemetryChannel.DeveloperMode = false; diff --git a/src/powershell-win-core/powershell-win-core.csproj b/src/powershell-win-core/powershell-win-core.csproj index 16f625827d4..9879e8485b4 100644 --- a/src/powershell-win-core/powershell-win-core.csproj +++ b/src/powershell-win-core/powershell-win-core.csproj @@ -29,7 +29,7 @@ PreserveNewest PreserveNewest - + PreserveNewest PreserveNewest diff --git a/test/perf/dotnet-tools/BenchmarkDotNet.Extensions/BenchmarkDotNet.Extensions.csproj b/test/perf/dotnet-tools/BenchmarkDotNet.Extensions/BenchmarkDotNet.Extensions.csproj index f0c3a35115e..02a372fa115 100644 --- a/test/perf/dotnet-tools/BenchmarkDotNet.Extensions/BenchmarkDotNet.Extensions.csproj +++ b/test/perf/dotnet-tools/BenchmarkDotNet.Extensions/BenchmarkDotNet.Extensions.csproj @@ -6,8 +6,8 @@ - - + + diff --git a/test/perf/dotnet-tools/ResultsComparer/ResultsComparer.csproj b/test/perf/dotnet-tools/ResultsComparer/ResultsComparer.csproj index 3180d45b64a..c40f05d7b77 100644 --- a/test/perf/dotnet-tools/ResultsComparer/ResultsComparer.csproj +++ b/test/perf/dotnet-tools/ResultsComparer/ResultsComparer.csproj @@ -9,7 +9,7 @@ - + diff --git a/test/powershell/Host/ConsoleHost.Tests.ps1 b/test/powershell/Host/ConsoleHost.Tests.ps1 index ff2d537d836..ccec3d7455f 100644 --- a/test/powershell/Host/ConsoleHost.Tests.ps1 +++ b/test/powershell/Host/ConsoleHost.Tests.ps1 @@ -420,14 +420,15 @@ export $envVarName='$guid' It "errors are in text if error is redirected, encoded command, non-interactive, and outputformat specified" { $p = [Diagnostics.Process]::new() $p.StartInfo.FileName = "pwsh" - $encoded = [Convert]::ToBase64String([Text.Encoding]::Unicode.GetBytes('$ErrorView="NormalView";throw "boom"')) + $encoded = [Convert]::ToBase64String([Text.Encoding]::Unicode.GetBytes('throw "boom"')) $p.StartInfo.Arguments = "-EncodedCommand $encoded -ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile -OutputFormat text" $p.StartInfo.UseShellExecute = $false $p.StartInfo.RedirectStandardError = $true $p.Start() | Out-Null $out = $p.StandardError.ReadToEnd() $out | Should -Not -BeNullOrEmpty - $out.Split([Environment]::NewLine)[0] | Should -BeExactly "boom" + $out = $out.Split([Environment]::NewLine)[0] + [System.Management.Automation.Internal.StringDecorated]::new($out).ToString("PlainText") | Should -BeExactly "Exception: boom" } } diff --git a/test/powershell/Host/Startup.Tests.ps1 b/test/powershell/Host/Startup.Tests.ps1 index 47ad858a801..ddaa2736a5c 100644 --- a/test/powershell/Host/Startup.Tests.ps1 +++ b/test/powershell/Host/Startup.Tests.ps1 @@ -70,7 +70,6 @@ Describe "Validate start of console host" -Tag CI { else { $allowedAssemblies += @( 'System.Net.Sockets.dll' - 'System.Reflection.Emit.dll' ) } diff --git a/test/powershell/Language/Scripting/NativeExecution/NativeCommandArguments.Tests.ps1 b/test/powershell/Language/Scripting/NativeExecution/NativeCommandArguments.Tests.ps1 index 191f7211f6a..d96720139bb 100644 --- a/test/powershell/Language/Scripting/NativeExecution/NativeCommandArguments.Tests.ps1 +++ b/test/powershell/Language/Scripting/NativeExecution/NativeCommandArguments.Tests.ps1 @@ -4,9 +4,6 @@ param() Describe "Behavior is specific for each platform" -tags "CI" { - BeforeAll { - $skipTests = $EnabledExperimentalFeatures -notcontains 'PSNativeCommandArgumentPassing' - } It "PSNativeCommandArgumentPassing is set to 'Windows' on Windows systems" -skip:(-not $IsWindows) { $PSNativeCommandArgumentPassing | Should -Be "Windows" } @@ -28,8 +25,7 @@ Describe "Behavior is specific for each platform" -tags "CI" { Describe "tests for multiple languages and extensions" -tags "CI" { AfterAll { - if (-not $IsWindows -or - $EnabledExperimentalFeatures -notcontains 'PSNativeCommandArgumentPassing') { + if (-not $IsWindows) { return } $PSNativeCommandArgumentPassing = $passingStyle @@ -126,7 +122,7 @@ echo Argument 4 is: ^<%4^> # determine whether we should skip the tests we just defined # doing it in this order ensures that the test output will show each skipped test - $skipTests = -not $IsWindows -or $EnabledExperimentalFeatures -notcontains 'PSNativeCommandArgumentPassing' + $skipTests = -not $IsWindows if ($skipTests) { return } @@ -162,12 +158,7 @@ echo Argument 4 is: ^<%4^> Describe "Will error correctly if an attempt to set variable to improper value" -tags "CI" { It "will error when setting variable incorrectly" { - if ($EnabledExperimentalFeatures -contains 'PSNativeCommandArgumentPassing') { - { $global:PSNativeCommandArgumentPassing = "zzz" } | Should -Throw -ExceptionType System.Management.Automation.ArgumentTransformationMetadataException - } - else { - Set-Test -State skipped -Because "Experimental feature 'PSNativeCommandArgumentPassing' is not enabled" - } + { $global:PSNativeCommandArgumentPassing = "zzz" } | Should -Throw -ExceptionType System.Management.Automation.ArgumentTransformationMetadataException } } @@ -203,7 +194,7 @@ foreach ( $argumentListValue in "Standard","Legacy","Windows" ) { $a = 'a"b c"d' $lines = testexe -echoargs $a 'a"b c"d' a"b c"d "a'b c'd" $lines.Count | Should -Be 4 - if (($EnabledExperimentalFeatures -contains 'PSNativeCommandArgumentPassing') -and $PSNativeCommandArgumentPassing -ne "Legacy") { + if ($PSNativeCommandArgumentPassing -ne "Legacy") { $lines[0] | Should -BeExactly 'Arg 0 is ' $lines[1] | Should -BeExactly 'Arg 1 is ' } @@ -229,7 +220,7 @@ foreach ( $argumentListValue in "Standard","Legacy","Windows" ) { It "Should handle spaces between escaped quotes (ArgumentList=${PSNativeCommandArgumentPassing})" { $lines = testexe -echoargs 'a\"b c\"d' "a\`"b c\`"d" $lines.Count | Should -Be 2 - if (($EnabledExperimentalFeatures -contains 'PSNativeCommandArgumentPassing') -and $PSNativeCommandArgumentPassing -ne "Legacy") { + if ($PSNativeCommandArgumentPassing -ne "Legacy") { $lines[0] | Should -BeExactly 'Arg 0 is ' $lines[1] | Should -BeExactly 'Arg 1 is ' } diff --git a/test/powershell/Modules/Microsoft.PowerShell.Core/Exec.Tests.ps1 b/test/powershell/Modules/Microsoft.PowerShell.Core/Exec.Tests.ps1 index bd3c87e0f5c..640fb8e0fc9 100644 --- a/test/powershell/Modules/Microsoft.PowerShell.Core/Exec.Tests.ps1 +++ b/test/powershell/Modules/Microsoft.PowerShell.Core/Exec.Tests.ps1 @@ -4,7 +4,7 @@ Describe 'Switch-Process tests for Unix' -Tags 'CI' { BeforeAll { $originalDefaultParameterValues = $PSDefaultParameterValues.Clone() - if (-not [ExperimentalFeature]::IsEnabled('PSExec') -or $IsWindows) + if ($IsWindows) { $PSDefaultParameterValues['It:Skip'] = $true return @@ -53,7 +53,7 @@ Describe 'Switch-Process tests for Unix' -Tags 'CI' { Describe 'Switch-Process for Windows' { BeforeAll { $originalDefaultParameterValues = $PSDefaultParameterValues.Clone() - if (-not $IsWindows) + if (!$IsWindows) { $PSDefaultParameterValues['It:Skip'] = $true return diff --git a/test/powershell/Modules/Microsoft.PowerShell.Core/Invoke-Command.Tests.ps1 b/test/powershell/Modules/Microsoft.PowerShell.Core/Invoke-Command.Tests.ps1 deleted file mode 100644 index 1765e5d8217..00000000000 --- a/test/powershell/Modules/Microsoft.PowerShell.Core/Invoke-Command.Tests.ps1 +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. - -Describe "Invoke-Command" -Tags "CI" { - Context "StrictMode tests" { - BeforeAll { - $skipTest = !($EnabledExperimentalFeatures -contains "PSStrictModeAssignment"); - If (Test-Path Variable:InvokeCommand__Test) { - Remove-Item Variable:InvokeCommand__Test - } - } - - It "Setting -StrictMode parameter with uninitialized variable throws error" -skip:$skipTest { - { Invoke-Command -StrictMode 3.0 {$InvokeCommand__Test} } | Should -Throw -ErrorId 'VariableIsUndefined' - } - - It "Setting -StrictMode parameter with initialized variable does not throw error" -skip:$skipTest { - $InvokeCommand__Test = 'Something' - Invoke-Command -StrictMode 3.0 {$InvokeCommand__Test} | Should -Be 'Something' - Remove-Item Variable:InvokeCommand__Test - } - - It "-StrictMode parameter sets StrictMode back to original state after process completes" -skip:$skipTest { - { Invoke-Command -StrictMode 3.0 {$InvokeCommand__Test} } | Should -Throw -ErrorId 'VariableIsUndefined' - { Invoke-Command {$InvokeCommand__Test} } | Should -Not -Throw - } - - It "-StrictMode parameter works on piped input" -skip:$skipTest { - "There" | Invoke-Command -ScriptBlock { "Hello $input" } -StrictMode 3.0 | Should -Be 'Hello There' - { "There" | Invoke-Command -ScriptBlock { "Hello $InvokeCommand__Test" } -StrictMode 3.0 } | Should -Throw -ErrorId 'VariableIsUndefined' - } - - It "-StrictMode latest works" -skip:$skipTest { - { Invoke-Command -StrictMode latest {$InvokeCommand__Test} } | Should -Throw -ErrorId 'VariableIsUndefined' - } - - It "-StrictMode off works" -skip:$skipTest { - { Invoke-Command -StrictMode off {$InvokeCommand__Test} } | Should -Not -Throw - } - } -} diff --git a/test/powershell/Modules/Microsoft.PowerShell.Management/Get-Item.Tests.ps1 b/test/powershell/Modules/Microsoft.PowerShell.Management/Get-Item.Tests.ps1 index 35c05b1bb12..4efc250e0d7 100644 --- a/test/powershell/Modules/Microsoft.PowerShell.Management/Get-Item.Tests.ps1 +++ b/test/powershell/Modules/Microsoft.PowerShell.Management/Get-Item.Tests.ps1 @@ -208,17 +208,12 @@ Describe "Get-Item environment provider on Windows with accidental case-variant Describe 'Formatting for FileInfo objects' -Tags 'CI' { BeforeAll { - $PSDefaultParameterValues.Add('It:Skip', (-not $EnabledExperimentalFeatures.Contains('PSAnsiRenderingFileInfo'))) $extensionTests = [System.Collections.Generic.List[HashTable]]::new() foreach ($extension in @('.zip', '.tgz', '.tar', '.gz', '.nupkg', '.cab', '.7z', '.ps1', '.psd1', '.psm1', '.ps1xml')) { $extensionTests.Add(@{extension = $extension}) } } - AfterAll { - $PSDefaultParameterValues.Remove('It:Skip') - } - It 'File type should have correct color' -TestCases $extensionTests { param($extension) @@ -250,14 +245,6 @@ Describe 'Formatting for FileInfo objects' -Tags 'CI' { } Describe 'Formatting for FileInfo requiring admin' -Tags 'CI','RequireAdminOnWindows' { - BeforeAll { - $PSDefaultParameterValues.Add('It:Skip', (-not $EnabledExperimentalFeatures.Contains('PSAnsiRenderingFileInfo'))) - } - - AfterAll { - $PSDefaultParameterValues.Remove('It:Skip') - } - It 'Symlink should have correct color' { $linkPath = Join-Path -Path $TestDrive -ChildPath 'link' $link = New-Item -ItemType SymbolicLink -Name 'link' -Value $TestDrive -Path $TestDrive diff --git a/test/powershell/Modules/Microsoft.PowerShell.Utility/Write-Progress.Tests.ps1 b/test/powershell/Modules/Microsoft.PowerShell.Utility/Write-Progress.Tests.ps1 index 6e6c9ee57c4..0f62cbcb6a6 100644 --- a/test/powershell/Modules/Microsoft.PowerShell.Utility/Write-Progress.Tests.ps1 +++ b/test/powershell/Modules/Microsoft.PowerShell.Utility/Write-Progress.Tests.ps1 @@ -24,6 +24,8 @@ Describe "Write-Progress DRT Unit Tests" -Tags "CI" { } It 'Activity longer than console width works' { - { Write-Progress -Activity ('a' * ([console]::WindowWidth + 1)) -Status ('b' * ([console]::WindowWidth + 1)) -Id 1 } | Should -Not -Throw + $activity = 'a' * ([console]::WindowWidth + 1) + { Write-Progress -Activity $activity -Status ('b' * ([console]::WindowWidth + 1)) -Id 1 } | Should -Not -Throw + Write-Progress -Activity $activity -Id 1 -Completed } } diff --git a/test/powershell/engine/Basic/DefaultCommands.Tests.ps1 b/test/powershell/engine/Basic/DefaultCommands.Tests.ps1 index aaa6cb432bd..bdcd5af0000 100644 --- a/test/powershell/engine/Basic/DefaultCommands.Tests.ps1 +++ b/test/powershell/engine/Basic/DefaultCommands.Tests.ps1 @@ -58,6 +58,7 @@ Describe "Verify approved aliases list" -Tags "CI" { "Alias", "epsn", "Export-PSSession", $($FullCLR ), "", "", "" "Alias", "erase", "Remove-Item", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "" "Alias", "etsn", "Enter-PSSession", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "" +"Alias", "exec", "Switch-Process", $( $CoreUnix), "", "", "" "Alias", "exsn", "Exit-PSSession", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "" "Alias", "fc", "Format-Custom", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "", "" "Alias", "fhx", "Format-Hex", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "" @@ -482,6 +483,7 @@ Describe "Verify approved aliases list" -Tags "CI" { "Cmdlet", "Stop-Transcript", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Suspend-Job", "", $($FullCLR ), "", "", "" "Cmdlet", "Suspend-Service", "", $($FullCLR -or $CoreWindows ), "", "", "Medium" +"Cmdlet", "Switch-Process", "", $( $CoreUnix), "", "", "None" "Cmdlet", "Tee-Object", "", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "", "Medium" "Cmdlet", "Test-Connection", "", $( $CoreWindows -or $CoreUnix), "", "", "None" "Cmdlet", "Test-ComputerSecureChannel", "", $($FullCLR ), "", "", "" diff --git a/test/tools/TestService/TestService.csproj b/test/tools/TestService/TestService.csproj index 579c339efc5..3b8ded97a05 100644 --- a/test/tools/TestService/TestService.csproj +++ b/test/tools/TestService/TestService.csproj @@ -13,7 +13,7 @@ - + diff --git a/test/tools/WebListener/WebListener.csproj b/test/tools/WebListener/WebListener.csproj index 0b42550cd48..972638cbba0 100644 --- a/test/tools/WebListener/WebListener.csproj +++ b/test/tools/WebListener/WebListener.csproj @@ -7,8 +7,8 @@ - - + + diff --git a/test/xUnit/xUnit.tests.csproj b/test/xUnit/xUnit.tests.csproj index 6579631951d..797f1bd52be 100644 --- a/test/xUnit/xUnit.tests.csproj +++ b/test/xUnit/xUnit.tests.csproj @@ -27,7 +27,7 @@ - + diff --git a/tools/cgmanifest.json b/tools/cgmanifest.json index 1f792a61def..b69881cd658 100644 --- a/tools/cgmanifest.json +++ b/tools/cgmanifest.json @@ -35,7 +35,7 @@ "Type": "nuget", "Nuget": { "Name": "Microsoft.ApplicationInsights", - "Version": "2.20.0" + "Version": "2.21.0" } }, "DevelopmentDependency": false @@ -65,7 +65,7 @@ "Type": "nuget", "Nuget": { "Name": "Microsoft.CodeAnalysis.Common", - "Version": "4.2.0" + "Version": "4.3.0" } }, "DevelopmentDependency": false @@ -75,7 +75,7 @@ "Type": "nuget", "Nuget": { "Name": "Microsoft.CodeAnalysis.CSharp", - "Version": "4.2.0" + "Version": "4.3.0" } }, "DevelopmentDependency": false @@ -765,7 +765,7 @@ "Type": "nuget", "Nuget": { "Name": "System.Configuration.ConfigurationManager", - "Version": "6.0.0" + "Version": "6.0.1" } }, "DevelopmentDependency": false @@ -775,7 +775,7 @@ "Type": "nuget", "Nuget": { "Name": "System.Data.Odbc", - "Version": "6.0.0" + "Version": "6.0.1" } }, "DevelopmentDependency": false @@ -1015,7 +1015,7 @@ "Type": "nuget", "Nuget": { "Name": "System.Private.ServiceModel", - "Version": "4.9.0" + "Version": "4.10.0" } }, "DevelopmentDependency": false @@ -1235,7 +1235,7 @@ "Type": "nuget", "Nuget": { "Name": "System.Security.Cryptography.Xml", - "Version": "6.0.0" + "Version": "6.0.1" } }, "DevelopmentDependency": false @@ -1265,7 +1265,7 @@ "Type": "nuget", "Nuget": { "Name": "System.ServiceModel.Duplex", - "Version": "4.9.0" + "Version": "4.10.0" } }, "DevelopmentDependency": false @@ -1275,7 +1275,7 @@ "Type": "nuget", "Nuget": { "Name": "System.ServiceModel.Http", - "Version": "4.9.0" + "Version": "4.10.0" } }, "DevelopmentDependency": false @@ -1285,7 +1285,7 @@ "Type": "nuget", "Nuget": { "Name": "System.ServiceModel.NetTcp", - "Version": "4.9.0" + "Version": "4.10.0" } }, "DevelopmentDependency": false @@ -1295,7 +1295,7 @@ "Type": "nuget", "Nuget": { "Name": "System.ServiceModel.Primitives", - "Version": "4.9.0" + "Version": "4.10.0" } }, "DevelopmentDependency": false @@ -1305,7 +1305,7 @@ "Type": "nuget", "Nuget": { "Name": "System.ServiceModel.Security", - "Version": "4.9.0" + "Version": "4.10.0" } }, "DevelopmentDependency": false diff --git a/tools/metadata.json b/tools/metadata.json index 986bd104fab..44192df371d 100644 --- a/tools/metadata.json +++ b/tools/metadata.json @@ -1,10 +1,10 @@ { - "StableReleaseTag": "v7.2.5", - "PreviewReleaseTag": "v7.3.0-preview.6", - "ServicingReleaseTag": "v7.0.11", - "ReleaseTag": "v7.2.5", - "LTSReleaseTag" : ["v7.2.5", "v7.0.11"], - "NextReleaseTag": "v7.3.0-preview.7", + "StableReleaseTag": "v7.2.6", + "PreviewReleaseTag": "v7.3.0-preview.7", + "ServicingReleaseTag": "v7.0.12", + "ReleaseTag": "v7.2.6", + "LTSReleaseTag" : ["v7.2.6", "v7.0.12"], + "NextReleaseTag": "v7.3.0-preview.8", "LTSRelease": { "Latest": false, "Package": false }, "StableRelease": { "Latest": false, "Package": false } } diff --git a/tools/packaging/packaging.psm1 b/tools/packaging/packaging.psm1 index 2e278182f9b..775270acaba 100644 --- a/tools/packaging/packaging.psm1 +++ b/tools/packaging/packaging.psm1 @@ -2108,7 +2108,7 @@ function New-ILNugetPackageSource #region ref $refFolder = New-Item (Join-Path $filePackageFolder.FullName "ref/$script:netCoreRuntime") -ItemType Directory -Force - CopyReferenceAssemblies -assemblyName $fileBaseName -refBinPath $refBinPath -refNugetPath $refFolder -assemblyFileList $fileList + CopyReferenceAssemblies -assemblyName $fileBaseName -refBinPath $refBinPath -refNugetPath $refFolder -assemblyFileList $fileList -winBinPath $WinFxdBinPath #endregion ref $packageRuntimesFolderPath = $packageRuntimesFolder.FullName @@ -2257,7 +2257,8 @@ function CopyReferenceAssemblies [string] $assemblyName, [string] $refBinPath, [string] $refNugetPath, - [string[]] $assemblyFileList + [string[]] $assemblyFileList, + [string] $winBinPath ) $supportedRefList = @( @@ -2286,7 +2287,8 @@ function CopyReferenceAssemblies default { $ref_SMA = Join-Path -Path $refBinPath -ChildPath System.Management.Automation.dll $ref_doc = Join-Path -Path $refBinPath -ChildPath System.Management.Automation.xml - Copy-Item $ref_SMA, $ref_doc -Destination $refNugetPath -Force + $self_ref_doc = Join-Path -Path $winBinPath -ChildPath "$assemblyName.xml" + Copy-Item $ref_SMA, $ref_doc, $self_ref_doc -Destination $refNugetPath -Force Write-Log "Copied file '$ref_SMA' and '$ref_doc' to '$refNugetPath'" } } diff --git a/tools/releaseBuild/azureDevOps/templates/windows-packaging.yml b/tools/releaseBuild/azureDevOps/templates/windows-packaging.yml index 7cd0f5e33a4..cb5b7ea8e7b 100644 --- a/tools/releaseBuild/azureDevOps/templates/windows-packaging.yml +++ b/tools/releaseBuild/azureDevOps/templates/windows-packaging.yml @@ -104,6 +104,7 @@ jobs: "$($fullSymbolsFolder)\Modules\Microsoft.PowerShell.Host\Microsoft.PowerShell.Host.psd1" = "Modules\Microsoft.PowerShell.Host" "$($fullSymbolsFolder)\Modules\Microsoft.PowerShell.Management\Microsoft.PowerShell.Management.psd1" = "Modules\Microsoft.PowerShell.Management" "$($fullSymbolsFolder)\Modules\Microsoft.PowerShell.Security\Microsoft.PowerShell.Security.psd1" = "Modules\Microsoft.PowerShell.Security" + "$($fullSymbolsFolder)\Modules\Microsoft.PowerShell.Security\Security.types.ps1xml" = "Modules\Microsoft.PowerShell.Security" "$($fullSymbolsFolder)\Modules\Microsoft.PowerShell.Utility\Microsoft.PowerShell.Utility.psd1" = "Modules\Microsoft.PowerShell.Utility" "$($fullSymbolsFolder)\Modules\Microsoft.WSMan.Management\Microsoft.WSMan.Management.psd1" = "Modules\Microsoft.WSMan.Management" "$($fullSymbolsFolder)\Modules\Microsoft.WSMan.Management\WSMan.format.ps1xml" = "Modules\Microsoft.WSMan.Management" diff --git a/tools/releaseTools.psm1 b/tools/releaseTools.psm1 index c900135aaee..388f3654c37 100644 --- a/tools/releaseTools.psm1 +++ b/tools/releaseTools.psm1 @@ -33,15 +33,14 @@ class CommitNode { # These powershell team members don't use 'microsoft.com' for Github email or choose to not show their emails. # We have their names in this array so that we don't need to query GitHub to find out if they are powershell team members. $Script:powershell_team = @( - "Robert Holt" "Travis Plunk" "dependabot-preview[bot]" "dependabot[bot]" - "Joey Aiello" - "Tyler James Leonhardt" + "github-actions[bot]" "Anam Navied" "Andrew Schwartzmeyer" "Jason Helmick" + "Patrick Meinecke" ) # They are very active contributors, so we keep their email-login mappings here to save a few queries to Github.
Bump .NET SDK to version `7.0.100-rc.1`
Security.types.ps1xml
DotnetRuntimeMetadata.json
Write-Progress