From 7a02c83aa6561beac0bf6888db39b82cc42806f7 Mon Sep 17 00:00:00 2001 From: Tig Kindel Date: Thu, 3 Aug 2023 15:00:18 -0600 Subject: [PATCH 01/17] Added more debug flags incluidng -UseSystemConsole --- .vscode/settings.json | 3 +- Build.ps1 | 2 +- .../ConsoleGui.cs | 10 +++++- .../OutConsoleGridviewCmdletCommand.cs | 24 +++++++++++++- .../TypeGetter.cs | 3 +- .../ApplicationData.cs | 6 ++++ src/src.sln | 31 +++++++++++++++++++ 7 files changed, 74 insertions(+), 5 deletions(-) create mode 100644 src/src.sln diff --git a/.vscode/settings.json b/.vscode/settings.json index d528a62..c6416d5 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,5 +1,6 @@ { "files.associations": { "**/.vsts-ci/**/*.yml":"azure-pipelines", - } + }, + "dotnet.defaultSolution": "src/src.sln" } \ No newline at end of file diff --git a/Build.ps1 b/Build.ps1 index aac77f1..9fb4ea4 100644 --- a/Build.ps1 +++ b/Build.ps1 @@ -10,4 +10,4 @@ Invoke-Build Build -ModuleName Microsoft.PowerShell.ConsoleGuiTools # - Scale: recursive ls of the project # - Filter: proving regex works # - SelectMultiple -pwsh -noprofile -command "Import-Module -verbose '$PSScriptRoot/module/Microsoft.PowerShell.ConsoleGuiTools'; Get-ChildItem -Recurse | Out-ConsoleGridView -OutputMode Multiple -Title 'Imported Modules' -Filter \.xml" +pwsh -noprofile -command "Import-Module -verbose '$PSScriptRoot/module/Microsoft.PowerShell.ConsoleGuiTools'; Get-ChildItem -Recurse | Out-ConsoleGridView -Debug -OutputMode Multiple -Title 'Imported Modules' -Filter \.xml" diff --git a/src/Microsoft.PowerShell.ConsoleGuiTools/ConsoleGui.cs b/src/Microsoft.PowerShell.ConsoleGuiTools/ConsoleGui.cs index db60d1e..40deb62 100644 --- a/src/Microsoft.PowerShell.ConsoleGuiTools/ConsoleGui.cs +++ b/src/Microsoft.PowerShell.ConsoleGuiTools/ConsoleGui.cs @@ -3,7 +3,9 @@ using System; using System.Collections.Generic; +using System.Diagnostics; using System.Linq; +using System.Reflection; using System.Text; using NStack; using OutGridView.Models; @@ -36,8 +38,9 @@ internal class ConsoleGui : IDisposable public HashSet Start(ApplicationData applicationData) { - Application.Init(); _applicationData = applicationData; + Application.UseSystemConsole = _applicationData.UseSystemConsole; + Application.Init(); _gridViewDetails = new GridViewDetails { // If OutputMode is Single or Multiple, then we make items selectable. If we make them selectable, @@ -235,6 +238,11 @@ private void AddStatusBar(bool visible) } statusItems.Add(new StatusItem(Key.Esc, "~ESC~ Close", () => Close())); + if (_applicationData.Verbose || _applicationData.Debug) + { + statusItems.Add(new StatusItem(Key.Null, $" v{_applicationData.ModuleVersion}", null)); + statusItems.Add(new StatusItem(Key.Null, $"Terminal.Gui v{FileVersionInfo.GetVersionInfo(Assembly.GetAssembly(typeof(Application)).Location).FileVersion}", null)); + } var statusBar = new StatusBar(statusItems.ToArray()); statusBar.Visible = visible; diff --git a/src/Microsoft.PowerShell.ConsoleGuiTools/OutConsoleGridviewCmdletCommand.cs b/src/Microsoft.PowerShell.ConsoleGuiTools/OutConsoleGridviewCmdletCommand.cs index 57a0f56..04c0474 100644 --- a/src/Microsoft.PowerShell.ConsoleGuiTools/OutConsoleGridviewCmdletCommand.cs +++ b/src/Microsoft.PowerShell.ConsoleGuiTools/OutConsoleGridviewCmdletCommand.cs @@ -58,6 +58,24 @@ public class OutConsoleGridViewCmdletCommand : PSCmdlet, IDisposable [Parameter(HelpMessage = "If specified no window frame, filter box, or status bar will be displayed in the GUI.")] public SwitchParameter MinUI { set; get; } + /// + /// gets or sets the whether the Terminal.Gui System.Net.Console-based ConsoleDriver will be used instead of the + /// default platform-specific (Windows or Curses) ConsoleDriver. + /// + [Parameter(HelpMessage = "If specified the Terminal.Gui System.Net.Console-based ConsoleDriver will be used.")] + public SwitchParameter UseSystemConsole { set; get; } + + + /// + /// For the -Verbose switch + /// + public bool Verbose => MyInvocation.BoundParameters.TryGetValue("Verbose", out var o); + + /// + /// For the -Debug switch + /// + public bool Debug => MyInvocation.BoundParameters.TryGetValue("Debug", out var o); + #endregion Input Parameters // This method gets called once for each cmdlet in the pipeline when the pipeline starts executing @@ -140,7 +158,11 @@ protected override void EndProcessing() OutputMode = OutputMode, Filter = Filter, MinUI = MinUI, - DataTable = dataTable + DataTable = dataTable, + UseSystemConsole = UseSystemConsole, + Verbose = Verbose, + Debug = Debug, + ModuleVersion = MyInvocation.MyCommand.Version.ToString() }; diff --git a/src/Microsoft.PowerShell.ConsoleGuiTools/TypeGetter.cs b/src/Microsoft.PowerShell.ConsoleGuiTools/TypeGetter.cs index 48ed4cd..a7e3052 100644 --- a/src/Microsoft.PowerShell.ConsoleGuiTools/TypeGetter.cs +++ b/src/Microsoft.PowerShell.ConsoleGuiTools/TypeGetter.cs @@ -169,7 +169,8 @@ public DataTable CastObjectsToTableView(List psObjects) foreach (var dataColumn in dataTableColumns) { - _cmdlet.WriteVerbose(dataColumn.ToString()); + // See https://github.com/PowerShell/GraphicalTools/issues/192 + //_cmdlet.WriteVerbose(dataColumn.ToString()); } List dataTableRows = new List(); diff --git a/src/Microsoft.PowerShell.OutGridView.Models/ApplicationData.cs b/src/Microsoft.PowerShell.OutGridView.Models/ApplicationData.cs index d193e5a..a7be071 100644 --- a/src/Microsoft.PowerShell.OutGridView.Models/ApplicationData.cs +++ b/src/Microsoft.PowerShell.OutGridView.Models/ApplicationData.cs @@ -14,5 +14,11 @@ public class ApplicationData public string Filter { get; set; } public bool MinUI { get; set; } public DataTable DataTable { get; set; } + + public bool UseSystemConsole { get; set; } + public bool Verbose { get; set; } + public bool Debug { get; set; } + + public string ModuleVersion { get; set; } } } diff --git a/src/src.sln b/src/src.sln new file mode 100644 index 0000000..7cb207d --- /dev/null +++ b/src/src.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.5.002.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.PowerShell.ConsoleGuiTools", "Microsoft.PowerShell.ConsoleGuiTools\Microsoft.PowerShell.ConsoleGuiTools.csproj", "{62446F27-830C-42F5-9BBF-A3A1AAEC74FE}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.PowerShell.OutGridView.Models", "Microsoft.PowerShell.OutGridView.Models\Microsoft.PowerShell.OutGridView.Models.csproj", "{EA466581-C734-4D1F-93E7-094B7F15A39D}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {62446F27-830C-42F5-9BBF-A3A1AAEC74FE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {62446F27-830C-42F5-9BBF-A3A1AAEC74FE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {62446F27-830C-42F5-9BBF-A3A1AAEC74FE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {62446F27-830C-42F5-9BBF-A3A1AAEC74FE}.Release|Any CPU.Build.0 = Release|Any CPU + {EA466581-C734-4D1F-93E7-094B7F15A39D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EA466581-C734-4D1F-93E7-094B7F15A39D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EA466581-C734-4D1F-93E7-094B7F15A39D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EA466581-C734-4D1F-93E7-094B7F15A39D}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {060A50A1-A6B4-42B5-9975-E5CE3020630E} + EndGlobalSection +EndGlobal From e6167bc0595f066b5ab28175b541722e9080249d Mon Sep 17 00:00:00 2001 From: Tig Kindel Date: Thu, 3 Aug 2023 16:55:44 -0600 Subject: [PATCH 02/17] Added more debug flags incluidng -UseNetDriver --- .vsts-ci/templates/ci-general.yml | 4 ++-- GraphicalTools.build.ps1 | 2 +- global.json | 2 +- src/Microsoft.PowerShell.ConsoleGuiTools/ConsoleGui.cs | 4 +++- .../Microsoft.PowerShell.ConsoleGuiTools.csproj | 5 +++-- .../OutConsoleGridviewCmdletCommand.cs | 6 +++--- .../ApplicationData.cs | 2 +- .../Microsoft.PowerShell.OutGridView.Models.csproj | 2 +- 8 files changed, 15 insertions(+), 12 deletions(-) diff --git a/.vsts-ci/templates/ci-general.yml b/.vsts-ci/templates/ci-general.yml index 8eb60b2..7e7bcc9 100644 --- a/.vsts-ci/templates/ci-general.yml +++ b/.vsts-ci/templates/ci-general.yml @@ -12,10 +12,10 @@ steps: pwsh: ${{ parameters.pwsh }} - task: UseDotNet@2 - displayName: Install .NET 6.0.x SDK + displayName: Install .NET 7.0.x SDK inputs: packageType: sdk - version: 6.0.x + version: 7.0.x performMultiLevelLookup: true - task: PowerShell@2 diff --git a/GraphicalTools.build.ps1 b/GraphicalTools.build.ps1 index cd3f276..347b8a7 100644 --- a/GraphicalTools.build.ps1 +++ b/GraphicalTools.build.ps1 @@ -8,7 +8,7 @@ param( $script:IsUnix = $PSVersionTable.PSEdition -and $PSVersionTable.PSEdition -eq "Core" -and !$IsWindows -$script:TargetFramework = "net6.0" +$script:TargetFramework = "net7.0" $script:RequiredSdkVersion = (Get-Content (Join-Path $PSScriptRoot 'global.json') | ConvertFrom-Json).sdk.version $script:ModuleLayouts = @{} diff --git a/global.json b/global.json index 4e0b0e1..4eba8c9 100644 --- a/global.json +++ b/global.json @@ -1,5 +1,5 @@ { "sdk": { - "version": "6.0.400" + "version": "7.0.306" } } diff --git a/src/Microsoft.PowerShell.ConsoleGuiTools/ConsoleGui.cs b/src/Microsoft.PowerShell.ConsoleGuiTools/ConsoleGui.cs index 40deb62..f17983e 100644 --- a/src/Microsoft.PowerShell.ConsoleGuiTools/ConsoleGui.cs +++ b/src/Microsoft.PowerShell.ConsoleGuiTools/ConsoleGui.cs @@ -39,7 +39,9 @@ internal class ConsoleGui : IDisposable public HashSet Start(ApplicationData applicationData) { _applicationData = applicationData; - Application.UseSystemConsole = _applicationData.UseSystemConsole; + // Note, in Terminal.Gui v2, this property is renamed to Application.UseNetDriver, hence + // using that terminology here. + Application.UseSystemConsole = _applicationData.UseNetDriver; Application.Init(); _gridViewDetails = new GridViewDetails { diff --git a/src/Microsoft.PowerShell.ConsoleGuiTools/Microsoft.PowerShell.ConsoleGuiTools.csproj b/src/Microsoft.PowerShell.ConsoleGuiTools/Microsoft.PowerShell.ConsoleGuiTools.csproj index dd3c9e2..3548888 100644 --- a/src/Microsoft.PowerShell.ConsoleGuiTools/Microsoft.PowerShell.ConsoleGuiTools.csproj +++ b/src/Microsoft.PowerShell.ConsoleGuiTools/Microsoft.PowerShell.ConsoleGuiTools.csproj @@ -1,16 +1,17 @@ - net6.0 + net7.0 - + + diff --git a/src/Microsoft.PowerShell.ConsoleGuiTools/OutConsoleGridviewCmdletCommand.cs b/src/Microsoft.PowerShell.ConsoleGuiTools/OutConsoleGridviewCmdletCommand.cs index 04c0474..c457a6c 100644 --- a/src/Microsoft.PowerShell.ConsoleGuiTools/OutConsoleGridviewCmdletCommand.cs +++ b/src/Microsoft.PowerShell.ConsoleGuiTools/OutConsoleGridviewCmdletCommand.cs @@ -62,8 +62,8 @@ public class OutConsoleGridViewCmdletCommand : PSCmdlet, IDisposable /// gets or sets the whether the Terminal.Gui System.Net.Console-based ConsoleDriver will be used instead of the /// default platform-specific (Windows or Curses) ConsoleDriver. /// - [Parameter(HelpMessage = "If specified the Terminal.Gui System.Net.Console-based ConsoleDriver will be used.")] - public SwitchParameter UseSystemConsole { set; get; } + [Parameter(HelpMessage = "If specified the Terminal.Gui System.Net.Console-based ConsoleDriver (NetDriver) will be used.")] + public SwitchParameter UseNetDriver { set; get; } /// @@ -159,7 +159,7 @@ protected override void EndProcessing() Filter = Filter, MinUI = MinUI, DataTable = dataTable, - UseSystemConsole = UseSystemConsole, + UseNetDriver = UseNetDriver, Verbose = Verbose, Debug = Debug, ModuleVersion = MyInvocation.MyCommand.Version.ToString() diff --git a/src/Microsoft.PowerShell.OutGridView.Models/ApplicationData.cs b/src/Microsoft.PowerShell.OutGridView.Models/ApplicationData.cs index a7be071..84959f5 100644 --- a/src/Microsoft.PowerShell.OutGridView.Models/ApplicationData.cs +++ b/src/Microsoft.PowerShell.OutGridView.Models/ApplicationData.cs @@ -15,7 +15,7 @@ public class ApplicationData public bool MinUI { get; set; } public DataTable DataTable { get; set; } - public bool UseSystemConsole { get; set; } + public bool UseNetDriver { get; set; } public bool Verbose { get; set; } public bool Debug { get; set; } diff --git a/src/Microsoft.PowerShell.OutGridView.Models/Microsoft.PowerShell.OutGridView.Models.csproj b/src/Microsoft.PowerShell.OutGridView.Models/Microsoft.PowerShell.OutGridView.Models.csproj index 5604e73..5ebe142 100644 --- a/src/Microsoft.PowerShell.OutGridView.Models/Microsoft.PowerShell.OutGridView.Models.csproj +++ b/src/Microsoft.PowerShell.OutGridView.Models/Microsoft.PowerShell.OutGridView.Models.csproj @@ -1,7 +1,7 @@ - net6.0 + net7.0 From f20096a81ac55787eb894fe63233835736ca1079 Mon Sep 17 00:00:00 2001 From: Tig Kindel Date: Thu, 3 Aug 2023 17:14:02 -0600 Subject: [PATCH 03/17] Reverted temp package refs; requires Termianl.Gui 1.13.6 --- .../Microsoft.PowerShell.ConsoleGuiTools.csproj | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Microsoft.PowerShell.ConsoleGuiTools/Microsoft.PowerShell.ConsoleGuiTools.csproj b/src/Microsoft.PowerShell.ConsoleGuiTools/Microsoft.PowerShell.ConsoleGuiTools.csproj index 3548888..4f0a0ab 100644 --- a/src/Microsoft.PowerShell.ConsoleGuiTools/Microsoft.PowerShell.ConsoleGuiTools.csproj +++ b/src/Microsoft.PowerShell.ConsoleGuiTools/Microsoft.PowerShell.ConsoleGuiTools.csproj @@ -6,12 +6,11 @@ - + - From 13ac90b94c6fdb660c45a90d95b930abade015de Mon Sep 17 00:00:00 2001 From: Tig Kindel Date: Fri, 4 Aug 2023 14:49:10 -0600 Subject: [PATCH 04/17] Support local nuget feed for Terminal.Gui for dev --- .../ConsoleGui.cs | 3 +- ...icrosoft.PowerShell.ConsoleGuiTools.csproj | 11 ++++++- src/src.sln | 31 ------------------- 3 files changed, 12 insertions(+), 33 deletions(-) delete mode 100644 src/src.sln diff --git a/src/Microsoft.PowerShell.ConsoleGuiTools/ConsoleGui.cs b/src/Microsoft.PowerShell.ConsoleGuiTools/ConsoleGui.cs index f17983e..2373d6c 100644 --- a/src/Microsoft.PowerShell.ConsoleGuiTools/ConsoleGui.cs +++ b/src/Microsoft.PowerShell.ConsoleGuiTools/ConsoleGui.cs @@ -243,7 +243,8 @@ private void AddStatusBar(bool visible) if (_applicationData.Verbose || _applicationData.Debug) { statusItems.Add(new StatusItem(Key.Null, $" v{_applicationData.ModuleVersion}", null)); - statusItems.Add(new StatusItem(Key.Null, $"Terminal.Gui v{FileVersionInfo.GetVersionInfo(Assembly.GetAssembly(typeof(Application)).Location).FileVersion}", null)); + statusItems.Add(new StatusItem(Key.Null, + $"Terminal.Gui v{FileVersionInfo.GetVersionInfo(Assembly.GetAssembly(typeof(Application)).Location).ProductVersion}", null)); } var statusBar = new StatusBar(statusItems.ToArray()); diff --git a/src/Microsoft.PowerShell.ConsoleGuiTools/Microsoft.PowerShell.ConsoleGuiTools.csproj b/src/Microsoft.PowerShell.ConsoleGuiTools/Microsoft.PowerShell.ConsoleGuiTools.csproj index 4f0a0ab..04de2c6 100644 --- a/src/Microsoft.PowerShell.ConsoleGuiTools/Microsoft.PowerShell.ConsoleGuiTools.csproj +++ b/src/Microsoft.PowerShell.ConsoleGuiTools/Microsoft.PowerShell.ConsoleGuiTools.csproj @@ -4,9 +4,18 @@ net7.0 + + + + $(RestoreSources);../../../gui-cs/Terminal.Gui/Terminal.Gui/bin/Debug;https://api.nuget.org/v3/index.json + - + diff --git a/src/src.sln b/src/src.sln deleted file mode 100644 index 7cb207d..0000000 --- a/src/src.sln +++ /dev/null @@ -1,31 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.5.002.0 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.PowerShell.ConsoleGuiTools", "Microsoft.PowerShell.ConsoleGuiTools\Microsoft.PowerShell.ConsoleGuiTools.csproj", "{62446F27-830C-42F5-9BBF-A3A1AAEC74FE}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.PowerShell.OutGridView.Models", "Microsoft.PowerShell.OutGridView.Models\Microsoft.PowerShell.OutGridView.Models.csproj", "{EA466581-C734-4D1F-93E7-094B7F15A39D}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {62446F27-830C-42F5-9BBF-A3A1AAEC74FE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {62446F27-830C-42F5-9BBF-A3A1AAEC74FE}.Debug|Any CPU.Build.0 = Debug|Any CPU - {62446F27-830C-42F5-9BBF-A3A1AAEC74FE}.Release|Any CPU.ActiveCfg = Release|Any CPU - {62446F27-830C-42F5-9BBF-A3A1AAEC74FE}.Release|Any CPU.Build.0 = Release|Any CPU - {EA466581-C734-4D1F-93E7-094B7F15A39D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {EA466581-C734-4D1F-93E7-094B7F15A39D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {EA466581-C734-4D1F-93E7-094B7F15A39D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {EA466581-C734-4D1F-93E7-094B7F15A39D}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {060A50A1-A6B4-42B5-9975-E5CE3020630E} - EndGlobalSection -EndGlobal From de806bc00f04ed54098a91841ed8bb3ee17c8665 Mon Sep 17 00:00:00 2001 From: Tig Kindel Date: Sat, 5 Aug 2023 11:04:12 -0600 Subject: [PATCH 05/17] Update local build script further --- .vscode/settings.json | 3 +-- Build.ps1 | 3 +++ .../Microsoft.PowerShell.ConsoleGuiTools.psd1 | 2 +- .../OutConsoleGridviewCmdletCommand.cs | 3 +-- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index c6416d5..d528a62 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,6 +1,5 @@ { "files.associations": { "**/.vsts-ci/**/*.yml":"azure-pipelines", - }, - "dotnet.defaultSolution": "src/src.sln" + } } \ No newline at end of file diff --git a/Build.ps1 b/Build.ps1 index 9fb4ea4..9fea726 100644 --- a/Build.ps1 +++ b/Build.ps1 @@ -11,3 +11,6 @@ Invoke-Build Build -ModuleName Microsoft.PowerShell.ConsoleGuiTools # - Filter: proving regex works # - SelectMultiple pwsh -noprofile -command "Import-Module -verbose '$PSScriptRoot/module/Microsoft.PowerShell.ConsoleGuiTools'; Get-ChildItem -Recurse | Out-ConsoleGridView -Debug -OutputMode Multiple -Title 'Imported Modules' -Filter \.xml" + +Publish-Module -Path $PSScriptRoot/module/Microsoft.PowerShell.ConsoleGuiTools -Repository 'local' -Verbose +``` \ No newline at end of file diff --git a/src/Microsoft.PowerShell.ConsoleGuiTools/Microsoft.PowerShell.ConsoleGuiTools.psd1 b/src/Microsoft.PowerShell.ConsoleGuiTools/Microsoft.PowerShell.ConsoleGuiTools.psd1 index 06f4fa9..973d1c2 100644 --- a/src/Microsoft.PowerShell.ConsoleGuiTools/Microsoft.PowerShell.ConsoleGuiTools.psd1 +++ b/src/Microsoft.PowerShell.ConsoleGuiTools/Microsoft.PowerShell.ConsoleGuiTools.psd1 @@ -9,7 +9,7 @@ RootModule = 'Microsoft.PowerShell.ConsoleGuiTools.dll' # Version number of this module. -ModuleVersion = '0.7.4' +ModuleVersion = '0.7.5' # Supported PSEditions CompatiblePSEditions = @( 'Core' ) diff --git a/src/Microsoft.PowerShell.ConsoleGuiTools/OutConsoleGridviewCmdletCommand.cs b/src/Microsoft.PowerShell.ConsoleGuiTools/OutConsoleGridviewCmdletCommand.cs index c457a6c..f7edb50 100644 --- a/src/Microsoft.PowerShell.ConsoleGuiTools/OutConsoleGridviewCmdletCommand.cs +++ b/src/Microsoft.PowerShell.ConsoleGuiTools/OutConsoleGridviewCmdletCommand.cs @@ -65,8 +65,7 @@ public class OutConsoleGridViewCmdletCommand : PSCmdlet, IDisposable [Parameter(HelpMessage = "If specified the Terminal.Gui System.Net.Console-based ConsoleDriver (NetDriver) will be used.")] public SwitchParameter UseNetDriver { set; get; } - - /// + /// /// For the -Verbose switch /// public bool Verbose => MyInvocation.BoundParameters.TryGetValue("Verbose", out var o); From 87afd278d5651c4c2fbbc0e7207f4764733d7bba Mon Sep 17 00:00:00 2001 From: Tig Kindel Date: Sat, 5 Aug 2023 11:38:12 -0600 Subject: [PATCH 06/17] Enhanced Build script to publish module locally --- Build.ps1 | 50 ++++++++++++++++--- .../ConsoleGui.cs | 2 +- ...icrosoft.PowerShell.ConsoleGuiTools.csproj | 2 +- 3 files changed, 46 insertions(+), 8 deletions(-) diff --git a/Build.ps1 b/Build.ps1 index 9fea726..8cc5fb9 100644 --- a/Build.ps1 +++ b/Build.ps1 @@ -2,15 +2,53 @@ # GraphicalTools includes two modules: Microsoft.PowerShell.GraphicalTools and Microsoft.PowerShell.ConsoleGuiTools # To build them all leave -ModuleName off the `InvokeBuild` command (e.g. Invoke-Build Build). # To build only one, specify it using the -ModuleName paramater (e.g. Invoke-Build Build -ModuleName Microsoft.PowerShell.ConsoleGuiTools). +$ModuleName = "Microsoft.PowerShell.ConsoleGuiTools" -# Build... -Invoke-Build Build -ModuleName Microsoft.PowerShell.ConsoleGuiTools +$ModulePath = "$PSScriptRoot/module/$ModuleName" + +# Assume this is the first build +$build = 0 + +$psd1Content = Get-Content $($ModulePath + "/$($ModuleName).psd1") -Raw -ErrorAction SilentlyContinue +if ($psd1Content) { + # Extract the ModuleVersion from the .psd1 content using regular expression + if ($psd1Content -match "ModuleVersion\s+=\s+'(.*?)'") { + $prevVersion = $Matches[1] + $prevVersionParts = $prevVersion -split '\.' + $build = [int]$prevVersionParts[3] + 1 + $ModuleVersion = "{0}.{1}.{2}" -f $prevVersionParts[0], $prevVersionParts[1], $prevVersionParts[2] + } else { + throw "ModuleVersion not found in the old .psd1 file." + } +} else { + "No previous version found. Assuming this is the first build." + # Get the ModuleVersion using dotnet-gitversion + $prevVersion = "1.0.0" + $ModuleVersion = "$($prevVersion)" +} + +"New Version: $ModuleVersion" + +"Buildihg $ModuleName..." +Invoke-Build Build -ModuleName $ModuleName + +# Publish to a local PSRepository to enable downstream dependenies to use development builds +# - If `local` doesn't exist, create with `Register-PSRepository -Name local -SourceLocation "~/psrepo" -InstallationPolicy Trusted` +$localRepository = Get-PSRepository | Where-Object { $_.Name -eq 'local' } +if ($localRepository) { + $localRepositoryPath = $localRepository | Select-Object -ExpandProperty SourceLocation + # Un-publishing $ModuleName from local repository at $localRepositoryPath" + Remove-Item "${localRepositoryPath}/${ModuleName}.{$ModuleVersion}.nupkg" -Recurse -Force -ErrorAction SilentlyContinue +} + +"Publishing $ModuleName... to `local` PSRepository" +Publish-Module -Path $ModulePath -Repository 'local' # Run what was built as a bit of test of: # - Scale: recursive ls of the project # - Filter: proving regex works # - SelectMultiple -pwsh -noprofile -command "Import-Module -verbose '$PSScriptRoot/module/Microsoft.PowerShell.ConsoleGuiTools'; Get-ChildItem -Recurse | Out-ConsoleGridView -Debug -OutputMode Multiple -Title 'Imported Modules' -Filter \.xml" - -Publish-Module -Path $PSScriptRoot/module/Microsoft.PowerShell.ConsoleGuiTools -Repository 'local' -Verbose -``` \ No newline at end of file +$testCommand = "Get-ChildItem -Recurse | Out-ConsoleGridView -Debug -OutputMode Multiple -Title 'Imported Modules' -Filter \.xml" +"Running test in new pwsh session: $testCommand" +pwsh -noprofile -command "Import-Module -verbose '$PSScriptRoot/module/$ModuleName'; $testCommand" +"Test exited. Build complete." diff --git a/src/Microsoft.PowerShell.ConsoleGuiTools/ConsoleGui.cs b/src/Microsoft.PowerShell.ConsoleGuiTools/ConsoleGui.cs index 2373d6c..c5c95ee 100644 --- a/src/Microsoft.PowerShell.ConsoleGuiTools/ConsoleGui.cs +++ b/src/Microsoft.PowerShell.ConsoleGuiTools/ConsoleGui.cs @@ -244,7 +244,7 @@ private void AddStatusBar(bool visible) { statusItems.Add(new StatusItem(Key.Null, $" v{_applicationData.ModuleVersion}", null)); statusItems.Add(new StatusItem(Key.Null, - $"Terminal.Gui v{FileVersionInfo.GetVersionInfo(Assembly.GetAssembly(typeof(Application)).Location).ProductVersion}", null)); + $"{Application.Driver} v{FileVersionInfo.GetVersionInfo(Assembly.GetAssembly(typeof(Application)).Location).ProductVersion}", null)); } var statusBar = new StatusBar(statusItems.ToArray()); diff --git a/src/Microsoft.PowerShell.ConsoleGuiTools/Microsoft.PowerShell.ConsoleGuiTools.csproj b/src/Microsoft.PowerShell.ConsoleGuiTools/Microsoft.PowerShell.ConsoleGuiTools.csproj index 04de2c6..86c8a32 100644 --- a/src/Microsoft.PowerShell.ConsoleGuiTools/Microsoft.PowerShell.ConsoleGuiTools.csproj +++ b/src/Microsoft.PowerShell.ConsoleGuiTools/Microsoft.PowerShell.ConsoleGuiTools.csproj @@ -11,7 +11,7 @@ --> - $(RestoreSources);../../../gui-cs/Terminal.Gui/Terminal.Gui/bin/Debug;https://api.nuget.org/v3/index.json + $(RestoreSources);../../../gui-cs/Terminal.Gui/Terminal.Gui/bin/Debug From beba7740e93fe2e5c6710db878ce37db73f324db Mon Sep 17 00:00:00 2001 From: Tig Kindel Date: Sat, 5 Aug 2023 12:34:29 -0600 Subject: [PATCH 07/17] Enhanced Build script to increment bulid number automatically --- Build.ps1 | 35 ++++++++++--------- .../Microsoft.PowerShell.ConsoleGuiTools.psd1 | 11 +++++- 2 files changed, 29 insertions(+), 17 deletions(-) diff --git a/Build.ps1 b/Build.ps1 index 8cc5fb9..c527a93 100644 --- a/Build.ps1 +++ b/Build.ps1 @@ -3,31 +3,34 @@ # To build them all leave -ModuleName off the `InvokeBuild` command (e.g. Invoke-Build Build). # To build only one, specify it using the -ModuleName paramater (e.g. Invoke-Build Build -ModuleName Microsoft.PowerShell.ConsoleGuiTools). $ModuleName = "Microsoft.PowerShell.ConsoleGuiTools" - -$ModulePath = "$PSScriptRoot/module/$ModuleName" +$BuildPath = "$PSScriptRoot/module/$ModuleName" +$PsdPath = "src/$ModuleName/$ModulePath/$($ModuleName).psd1" # Assume this is the first build $build = 0 -$psd1Content = Get-Content $($ModulePath + "/$($ModuleName).psd1") -Raw -ErrorAction SilentlyContinue +$psd1Content = Get-Content $PsdPath -Raw -ErrorAction SilentlyContinue if ($psd1Content) { # Extract the ModuleVersion from the .psd1 content using regular expression if ($psd1Content -match "ModuleVersion\s+=\s+'(.*?)'") { $prevVersion = $Matches[1] $prevVersionParts = $prevVersion -split '\.' $build = [int]$prevVersionParts[3] + 1 - $ModuleVersion = "{0}.{1}.{2}" -f $prevVersionParts[0], $prevVersionParts[1], $prevVersionParts[2] - } else { - throw "ModuleVersion not found in the old .psd1 file." + $ModuleVersion = "{0}.{1}.{2}.{3}" -f $prevVersionParts[0], $prevVersionParts[1], $prevVersionParts[2], $build + } + else { + "No previous version found. Assuming this is the first build." + # Get the ModuleVersion using dotnet-gitversion + $prevVersion = "1.0.0.0" + $ModuleVersion = "$($prevVersion)" } -} else { - "No previous version found. Assuming this is the first build." - # Get the ModuleVersion using dotnet-gitversion - $prevVersion = "1.0.0" - $ModuleVersion = "$($prevVersion)" + "Rewriting $PsdPath with new ModuleVersion: $ModuleVersion" + $updatedpsd1Content = $psd1Content -replace "ModuleVersion\s+=\s+'([\d\.]+)'", "ModuleVersion = '$ModuleVersion'" + $updatedpsd1Content | Out-File -FilePath $PsdPath -Encoding ascii +} +else { + throw "$PsdPath not found." } - -"New Version: $ModuleVersion" "Buildihg $ModuleName..." Invoke-Build Build -ModuleName $ModuleName @@ -39,10 +42,10 @@ if ($localRepository) { $localRepositoryPath = $localRepository | Select-Object -ExpandProperty SourceLocation # Un-publishing $ModuleName from local repository at $localRepositoryPath" Remove-Item "${localRepositoryPath}/${ModuleName}.{$ModuleVersion}.nupkg" -Recurse -Force -ErrorAction SilentlyContinue + "Publishing ${localRepositoryPath}/${ModuleName}.$ModuleVersion.nupkg to `local'" + Publish-Module -Path $BuildPath -Repository 'local' } -"Publishing $ModuleName... to `local` PSRepository" -Publish-Module -Path $ModulePath -Repository 'local' # Run what was built as a bit of test of: # - Scale: recursive ls of the project @@ -50,5 +53,5 @@ Publish-Module -Path $ModulePath -Repository 'local' # - SelectMultiple $testCommand = "Get-ChildItem -Recurse | Out-ConsoleGridView -Debug -OutputMode Multiple -Title 'Imported Modules' -Filter \.xml" "Running test in new pwsh session: $testCommand" -pwsh -noprofile -command "Import-Module -verbose '$PSScriptRoot/module/$ModuleName'; $testCommand" +pwsh -noprofile -command "Import-Module -verbose $BuildPath; $testCommand" "Test exited. Build complete." diff --git a/src/Microsoft.PowerShell.ConsoleGuiTools/Microsoft.PowerShell.ConsoleGuiTools.psd1 b/src/Microsoft.PowerShell.ConsoleGuiTools/Microsoft.PowerShell.ConsoleGuiTools.psd1 index 973d1c2..3cd7bc9 100644 --- a/src/Microsoft.PowerShell.ConsoleGuiTools/Microsoft.PowerShell.ConsoleGuiTools.psd1 +++ b/src/Microsoft.PowerShell.ConsoleGuiTools/Microsoft.PowerShell.ConsoleGuiTools.psd1 @@ -9,7 +9,8 @@ RootModule = 'Microsoft.PowerShell.ConsoleGuiTools.dll' # Version number of this module. -ModuleVersion = '0.7.5' +# NOTE: This will get updated by build.ps1; the build number will be incremented for each build. +ModuleVersion = '0.7.5.3' # Supported PSEditions CompatiblePSEditions = @( 'Core' ) @@ -105,6 +106,11 @@ PrivateData = @{ # ReleaseNotes of this module ReleaseNotes = '# Release Notes +## v0.7.5 + +* Adds support for -Diagnostic switch to Out-ConsoleGridView #208 +* Adds support for -UseNetDriver switch to Out-ConsoleGridView #208 + ## v0.7.4 * Fixes last line not cleared on exit in WT by updating to Terminal.Gui v1.13.5 #205 @@ -219,3 +225,6 @@ Initial Release # DefaultCommandPrefix = '' } + + + From ea7d5ad84604501f7b0b63a01b68c4ea2cf2c89b Mon Sep 17 00:00:00 2001 From: Tig Kindel Date: Sun, 6 Aug 2023 04:10:48 -0600 Subject: [PATCH 08/17] Undo local build; set Terminal.Gui v to 1.14.0 --- .vscode/settings.json | 3 +- ...icrosoft.PowerShell.ConsoleGuiTools.csproj | 16 +++++----- .../Microsoft.PowerShell.ConsoleGuiTools.psd1 | 3 +- src/src.sln | 31 +++++++++++++++++++ 4 files changed, 43 insertions(+), 10 deletions(-) create mode 100644 src/src.sln diff --git a/.vscode/settings.json b/.vscode/settings.json index d528a62..c6416d5 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,5 +1,6 @@ { "files.associations": { "**/.vsts-ci/**/*.yml":"azure-pipelines", - } + }, + "dotnet.defaultSolution": "src/src.sln" } \ No newline at end of file diff --git a/src/Microsoft.PowerShell.ConsoleGuiTools/Microsoft.PowerShell.ConsoleGuiTools.csproj b/src/Microsoft.PowerShell.ConsoleGuiTools/Microsoft.PowerShell.ConsoleGuiTools.csproj index 86c8a32..3789c48 100644 --- a/src/Microsoft.PowerShell.ConsoleGuiTools/Microsoft.PowerShell.ConsoleGuiTools.csproj +++ b/src/Microsoft.PowerShell.ConsoleGuiTools/Microsoft.PowerShell.ConsoleGuiTools.csproj @@ -4,18 +4,18 @@ net7.0 - - - $(RestoreSources);../../../gui-cs/Terminal.Gui/Terminal.Gui/bin/Debug + + + - + diff --git a/src/Microsoft.PowerShell.ConsoleGuiTools/Microsoft.PowerShell.ConsoleGuiTools.psd1 b/src/Microsoft.PowerShell.ConsoleGuiTools/Microsoft.PowerShell.ConsoleGuiTools.psd1 index 3cd7bc9..fc18c57 100644 --- a/src/Microsoft.PowerShell.ConsoleGuiTools/Microsoft.PowerShell.ConsoleGuiTools.psd1 +++ b/src/Microsoft.PowerShell.ConsoleGuiTools/Microsoft.PowerShell.ConsoleGuiTools.psd1 @@ -10,7 +10,7 @@ RootModule = 'Microsoft.PowerShell.ConsoleGuiTools.dll' # Version number of this module. # NOTE: This will get updated by build.ps1; the build number will be incremented for each build. -ModuleVersion = '0.7.5.3' +ModuleVersion = '0.7.5.4' # Supported PSEditions CompatiblePSEditions = @( 'Core' ) @@ -228,3 +228,4 @@ Initial Release + diff --git a/src/src.sln b/src/src.sln new file mode 100644 index 0000000..a079e9f --- /dev/null +++ b/src/src.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.5.002.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.PowerShell.ConsoleGuiTools", "Microsoft.PowerShell.ConsoleGuiTools\Microsoft.PowerShell.ConsoleGuiTools.csproj", "{911EB931-77D9-4DC9-9503-58110DB4417A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.PowerShell.OutGridView.Models", "Microsoft.PowerShell.OutGridView.Models\Microsoft.PowerShell.OutGridView.Models.csproj", "{AB9BF39C-D278-43BD-BFF1-CBBEBBE8C94E}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {911EB931-77D9-4DC9-9503-58110DB4417A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {911EB931-77D9-4DC9-9503-58110DB4417A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {911EB931-77D9-4DC9-9503-58110DB4417A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {911EB931-77D9-4DC9-9503-58110DB4417A}.Release|Any CPU.Build.0 = Release|Any CPU + {AB9BF39C-D278-43BD-BFF1-CBBEBBE8C94E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AB9BF39C-D278-43BD-BFF1-CBBEBBE8C94E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AB9BF39C-D278-43BD-BFF1-CBBEBBE8C94E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AB9BF39C-D278-43BD-BFF1-CBBEBBE8C94E}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {5463BA3E-06A1-4EC6-B7E6-B94FCC18F3DF} + EndGlobalSection +EndGlobal From b285a36ba06dd87b4847d6ff9c3171160403a6ef Mon Sep 17 00:00:00 2001 From: Tigger Kindel Date: Sun, 13 Aug 2023 09:32:46 -0600 Subject: [PATCH 09/17] Tweaked build scripts --- ...icrosoft.PowerShell.ConsoleGuiTools.csproj | 4 +-- .../Microsoft.PowerShell.ConsoleGuiTools.psd1 | 28 ++++++++++++++++++- 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/src/Microsoft.PowerShell.ConsoleGuiTools/Microsoft.PowerShell.ConsoleGuiTools.csproj b/src/Microsoft.PowerShell.ConsoleGuiTools/Microsoft.PowerShell.ConsoleGuiTools.csproj index 3789c48..cbe4b12 100644 --- a/src/Microsoft.PowerShell.ConsoleGuiTools/Microsoft.PowerShell.ConsoleGuiTools.csproj +++ b/src/Microsoft.PowerShell.ConsoleGuiTools/Microsoft.PowerShell.ConsoleGuiTools.csproj @@ -10,12 +10,12 @@ - Change Version= to "1.99.*-*" - Uncomment the RestoreSources property group below --> - + $(RestoreSources);../../../gui-cs/Terminal.Gui/Terminal.Gui/bin/Debug;https://api.nuget.org/v3/index.json - + diff --git a/src/Microsoft.PowerShell.ConsoleGuiTools/Microsoft.PowerShell.ConsoleGuiTools.psd1 b/src/Microsoft.PowerShell.ConsoleGuiTools/Microsoft.PowerShell.ConsoleGuiTools.psd1 index fc18c57..0e8cdfd 100644 --- a/src/Microsoft.PowerShell.ConsoleGuiTools/Microsoft.PowerShell.ConsoleGuiTools.psd1 +++ b/src/Microsoft.PowerShell.ConsoleGuiTools/Microsoft.PowerShell.ConsoleGuiTools.psd1 @@ -10,7 +10,7 @@ RootModule = 'Microsoft.PowerShell.ConsoleGuiTools.dll' # Version number of this module. # NOTE: This will get updated by build.ps1; the build number will be incremented for each build. -ModuleVersion = '0.7.5.4' +ModuleVersion = '0.7.5.30' # Supported PSEditions CompatiblePSEditions = @( 'Core' ) @@ -229,3 +229,29 @@ Initial Release + + + + + + + + + + + + + + + + + + + + + + + + + + From bbbbf3f5127907fa8ec86bb5042cfdbcfc31ce16 Mon Sep 17 00:00:00 2001 From: Tigger Kindel Date: Sun, 13 Aug 2023 09:56:55 -0600 Subject: [PATCH 10/17] Removed local build setting --- .../Microsoft.PowerShell.ConsoleGuiTools.csproj | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Microsoft.PowerShell.ConsoleGuiTools/Microsoft.PowerShell.ConsoleGuiTools.csproj b/src/Microsoft.PowerShell.ConsoleGuiTools/Microsoft.PowerShell.ConsoleGuiTools.csproj index cbe4b12..b8580a5 100644 --- a/src/Microsoft.PowerShell.ConsoleGuiTools/Microsoft.PowerShell.ConsoleGuiTools.csproj +++ b/src/Microsoft.PowerShell.ConsoleGuiTools/Microsoft.PowerShell.ConsoleGuiTools.csproj @@ -7,15 +7,16 @@ - $(RestoreSources);../../../gui-cs/Terminal.Gui/Terminal.Gui/bin/Debug;https://api.nuget.org/v3/index.json + $(RestoreSources);../../../gui-cs/Terminal.Gui/Terminal.Gui/bin/Debug - + From 89b47a2ca302f65da5b5e0b591880a2bab333e2c Mon Sep 17 00:00:00 2001 From: Tigger Kindel Date: Sun, 13 Aug 2023 10:01:36 -0600 Subject: [PATCH 11/17] Verifying ci failure is due to new terminal.gui version req --- .../Microsoft.PowerShell.ConsoleGuiTools.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Microsoft.PowerShell.ConsoleGuiTools/Microsoft.PowerShell.ConsoleGuiTools.csproj b/src/Microsoft.PowerShell.ConsoleGuiTools/Microsoft.PowerShell.ConsoleGuiTools.csproj index b8580a5..54e2712 100644 --- a/src/Microsoft.PowerShell.ConsoleGuiTools/Microsoft.PowerShell.ConsoleGuiTools.csproj +++ b/src/Microsoft.PowerShell.ConsoleGuiTools/Microsoft.PowerShell.ConsoleGuiTools.csproj @@ -16,7 +16,7 @@ - + From eccc3731724cc96eef0ba6882a73a0882ace7432 Mon Sep 17 00:00:00 2001 From: Tigger Kindel Date: Sun, 13 Aug 2023 10:05:50 -0600 Subject: [PATCH 12/17] Verifying ci failure is due to new terminal.gui version req --- .../Microsoft.PowerShell.ConsoleGuiTools.csproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Microsoft.PowerShell.ConsoleGuiTools/Microsoft.PowerShell.ConsoleGuiTools.csproj b/src/Microsoft.PowerShell.ConsoleGuiTools/Microsoft.PowerShell.ConsoleGuiTools.csproj index 54e2712..52605d7 100644 --- a/src/Microsoft.PowerShell.ConsoleGuiTools/Microsoft.PowerShell.ConsoleGuiTools.csproj +++ b/src/Microsoft.PowerShell.ConsoleGuiTools/Microsoft.PowerShell.ConsoleGuiTools.csproj @@ -7,11 +7,11 @@ - $(RestoreSources);../../../gui-cs/Terminal.Gui/Terminal.Gui/bin/Debug + From b1d1c48be7d845bd944421e111a0ea462982321d Mon Sep 17 00:00:00 2001 From: Tig Kindel Date: Fri, 6 Oct 2023 09:11:27 -0600 Subject: [PATCH 13/17] net 7.0.401 --- global.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/global.json b/global.json index 4eba8c9..6a42911 100644 --- a/global.json +++ b/global.json @@ -1,5 +1,5 @@ { "sdk": { - "version": "7.0.306" + "version": "7.0.401" } } From bddd29c973097a06dc5ee8f13a9f923c5b53768c Mon Sep 17 00:00:00 2001 From: Tig Kindel Date: Fri, 6 Oct 2023 09:14:34 -0600 Subject: [PATCH 14/17] Removed old verbosed code --- .../Microsoft.PowerShell.ConsoleGuiTools.psd1 | 7 ++++++- src/Microsoft.PowerShell.ConsoleGuiTools/TypeGetter.cs | 6 ------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/Microsoft.PowerShell.ConsoleGuiTools/Microsoft.PowerShell.ConsoleGuiTools.psd1 b/src/Microsoft.PowerShell.ConsoleGuiTools/Microsoft.PowerShell.ConsoleGuiTools.psd1 index 0e8cdfd..67c0c42 100644 --- a/src/Microsoft.PowerShell.ConsoleGuiTools/Microsoft.PowerShell.ConsoleGuiTools.psd1 +++ b/src/Microsoft.PowerShell.ConsoleGuiTools/Microsoft.PowerShell.ConsoleGuiTools.psd1 @@ -10,7 +10,7 @@ RootModule = 'Microsoft.PowerShell.ConsoleGuiTools.dll' # Version number of this module. # NOTE: This will get updated by build.ps1; the build number will be incremented for each build. -ModuleVersion = '0.7.5.30' +ModuleVersion = '0.7.5.35' # Supported PSEditions CompatiblePSEditions = @( 'Core' ) @@ -249,6 +249,11 @@ Initial Release + + + + + diff --git a/src/Microsoft.PowerShell.ConsoleGuiTools/TypeGetter.cs b/src/Microsoft.PowerShell.ConsoleGuiTools/TypeGetter.cs index a7e3052..f5e4237 100644 --- a/src/Microsoft.PowerShell.ConsoleGuiTools/TypeGetter.cs +++ b/src/Microsoft.PowerShell.ConsoleGuiTools/TypeGetter.cs @@ -167,12 +167,6 @@ public DataTable CastObjectsToTableView(List psObjects) var dataTableColumns = GetDataColumnsForObject(psObjects); - foreach (var dataColumn in dataTableColumns) - { - // See https://github.com/PowerShell/GraphicalTools/issues/192 - //_cmdlet.WriteVerbose(dataColumn.ToString()); - } - List dataTableRows = new List(); for (var i = 0; i < objectFormats.Count; i++) { From 87e5f22bda0f7b07b5e18179cbaa0f70a69d74e3 Mon Sep 17 00:00:00 2001 From: Tig Kindel Date: Fri, 6 Oct 2023 09:16:04 -0600 Subject: [PATCH 15/17] Removed extra lines --- .../Microsoft.PowerShell.ConsoleGuiTools.psd1 | 35 ------------------- 1 file changed, 35 deletions(-) diff --git a/src/Microsoft.PowerShell.ConsoleGuiTools/Microsoft.PowerShell.ConsoleGuiTools.psd1 b/src/Microsoft.PowerShell.ConsoleGuiTools/Microsoft.PowerShell.ConsoleGuiTools.psd1 index 67c0c42..8ba9d30 100644 --- a/src/Microsoft.PowerShell.ConsoleGuiTools/Microsoft.PowerShell.ConsoleGuiTools.psd1 +++ b/src/Microsoft.PowerShell.ConsoleGuiTools/Microsoft.PowerShell.ConsoleGuiTools.psd1 @@ -225,38 +225,3 @@ Initial Release # DefaultCommandPrefix = '' } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - From d11de395c22ec2798acd6b22332fc3da5ffc9af3 Mon Sep 17 00:00:00 2001 From: Tig Kindel Date: Fri, 6 Oct 2023 09:16:34 -0600 Subject: [PATCH 16/17] Removed unneeded sln file --- src/src.sln | 31 ------------------------------- 1 file changed, 31 deletions(-) delete mode 100644 src/src.sln diff --git a/src/src.sln b/src/src.sln deleted file mode 100644 index a079e9f..0000000 --- a/src/src.sln +++ /dev/null @@ -1,31 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.5.002.0 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.PowerShell.ConsoleGuiTools", "Microsoft.PowerShell.ConsoleGuiTools\Microsoft.PowerShell.ConsoleGuiTools.csproj", "{911EB931-77D9-4DC9-9503-58110DB4417A}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.PowerShell.OutGridView.Models", "Microsoft.PowerShell.OutGridView.Models\Microsoft.PowerShell.OutGridView.Models.csproj", "{AB9BF39C-D278-43BD-BFF1-CBBEBBE8C94E}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {911EB931-77D9-4DC9-9503-58110DB4417A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {911EB931-77D9-4DC9-9503-58110DB4417A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {911EB931-77D9-4DC9-9503-58110DB4417A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {911EB931-77D9-4DC9-9503-58110DB4417A}.Release|Any CPU.Build.0 = Release|Any CPU - {AB9BF39C-D278-43BD-BFF1-CBBEBBE8C94E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {AB9BF39C-D278-43BD-BFF1-CBBEBBE8C94E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {AB9BF39C-D278-43BD-BFF1-CBBEBBE8C94E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {AB9BF39C-D278-43BD-BFF1-CBBEBBE8C94E}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {5463BA3E-06A1-4EC6-B7E6-B94FCC18F3DF} - EndGlobalSection -EndGlobal From 84d1eccfc75b6eae9452dd0df49faa5b9cfee964 Mon Sep 17 00:00:00 2001 From: Tig Kindel Date: Fri, 6 Oct 2023 09:17:25 -0600 Subject: [PATCH 17/17] Removed unneeded sln file --- .vscode/settings.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index c6416d5..d528a62 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,6 +1,5 @@ { "files.associations": { "**/.vsts-ci/**/*.yml":"azure-pipelines", - }, - "dotnet.defaultSolution": "src/src.sln" + } } \ No newline at end of file