From 3d831ac6827ded389166060fc67e1b40930f66ad Mon Sep 17 00:00:00 2001 From: lijinpei2008 <31384087+lijinpei2008@users.noreply.github.com> Date: Tue, 6 Aug 2024 16:33:26 +0800 Subject: [PATCH] [Account] Recent changes to Connect-AZAccount -DeviceCode cause display issues in the PowerShell ISE (#25735) * Add new file: InitializePSStyle.ps1 * update * update * update changelog * update changelog * update changelog and update reference of azure powershell common to 1.3.100-preview --- src/Accounts/Accounts/Accounts.csproj | 3 +- src/Accounts/Accounts/ChangeLog.md | 2 ++ .../StartupScripts/InitializePSStyle.ps1 | 7 ++++ tools/Common.Netcore.Dependencies.targets | 34 +++++++++---------- 4 files changed, 28 insertions(+), 18 deletions(-) create mode 100644 src/Accounts/Accounts/StartupScripts/InitializePSStyle.ps1 diff --git a/src/Accounts/Accounts/Accounts.csproj b/src/Accounts/Accounts/Accounts.csproj index 38f3e2e761b7..4b9fa2be1568 100644 --- a/src/Accounts/Accounts/Accounts.csproj +++ b/src/Accounts/Accounts/Accounts.csproj @@ -1,4 +1,4 @@ - + Accounts @@ -37,6 +37,7 @@ + diff --git a/src/Accounts/Accounts/ChangeLog.md b/src/Accounts/Accounts/ChangeLog.md index c6ffbaf170bf..358e56a05ac6 100644 --- a/src/Accounts/Accounts/ChangeLog.md +++ b/src/Accounts/Accounts/ChangeLog.md @@ -19,6 +19,8 @@ --> ## Upcoming Release +* Updated `Connect-AzAccount` to fix a display issue in PowerShell ISE [#24556]. +* Updated the reference of Azure PowerShell Common to 1.3.100-preview. * Used Azure.Identity and Azure.Core directly for client assertion [#22628]. ## Version 3.0.3 diff --git a/src/Accounts/Accounts/StartupScripts/InitializePSStyle.ps1 b/src/Accounts/Accounts/StartupScripts/InitializePSStyle.ps1 new file mode 100644 index 000000000000..017afce55065 --- /dev/null +++ b/src/Accounts/Accounts/StartupScripts/InitializePSStyle.ps1 @@ -0,0 +1,7 @@ +try{ + Write-Debug "Initializing PSStyle." + [Microsoft.WindowsAzure.Commands.Common.PSStyle]::Initialize($Host) +} +catch{ + Write-Warning $_ +} \ No newline at end of file diff --git a/tools/Common.Netcore.Dependencies.targets b/tools/Common.Netcore.Dependencies.targets index fb4e1c1aa9c7..66669692f557 100644 --- a/tools/Common.Netcore.Dependencies.targets +++ b/tools/Common.Netcore.Dependencies.targets @@ -3,22 +3,22 @@ - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + @@ -37,7 +37,7 @@ - $(NugetPackageRoot)\microsoft.azure.powershell.storage\1.3.99-preview\tools\ + $(NugetPackageRoot)\microsoft.azure.powershell.storage\1.3.100-preview\tools\