Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
"program": "${workspaceFolder}/Cmdlet/bin/Debug/netcoreapp3.0/win10-x64/OutGridViewCmdlet.dll",
"program": "${workspaceFolder}/Cmdlet/bin/Debug/net6.0/win10-x64/OutGridViewCmdlet.dll",
"args": [],
"cwd": "${workspaceFolder}/Cmdlet",
"console": "internalConsole",
Expand All @@ -20,7 +20,7 @@
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
"program": "${workspaceFolder}/Application/bin/Debug/netcoreapp3.0/win10-x64/OutGridViewApplication.dll",
"program": "${workspaceFolder}/Application/bin/Debug/net6.0/win10-x64/OutGridViewApplication.dll",
"args": [],
"cwd": "${workspaceFolder}/Application",
"console": "internalConsole",
Expand Down
14 changes: 7 additions & 7 deletions GraphicalTools.build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ param(
[ValidateSet("Debug", "Release")]
[string]$Configuration = "Debug",

[string[]]$ModuleName = @(
"Microsoft.PowerShell.GraphicalTools",
"Microsoft.PowerShell.ConsoleGuiTools" )
[string[]]$ModuleName = @(
#"Microsoft.PowerShell.GraphicalTools",
"Microsoft.PowerShell.ConsoleGuiTools" )
)

$script:IsUnix = $PSVersionTable.PSEdition -and $PSVersionTable.PSEdition -eq "Core" -and !$IsWindows

$script:TargetFramework = "netcoreapp3.0"
$script:TargetFramework = "net6.0"
$script:RequiredSdkVersion = (Get-Content (Join-Path $PSScriptRoot 'global.json') | ConvertFrom-Json).sdk.version

$script:ModuleLayouts = @{}
Expand Down Expand Up @@ -152,12 +152,12 @@ task LayoutModule -After Build {
foreach ($projectName in $moduleLayout.NativeBuildAssets.Keys) {
foreach ($targetPlatform in $moduleLayout.NativeBuildAssets[$projectName]) {
$destDir = Join-Path $moduleBinPath $projectName $targetPlatform

$null = New-Item -Force $destDir -Type Directory

# Get the project build dir path
$publishPath = [System.IO.Path]::Combine($PSScriptRoot, 'src', $projectName, 'bin', $Configuration, $script:TargetFramework, $targetPlatform, "publish\*" )

Write-Host $publishPath
# Binplace the asset
Copy-Item -Recurse -Force $publishPath $destDir
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"sdk": {
"version": "3.1.102"
"version": "6.0.100"
}
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\GraphicalTools.Common.props" />
<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Nstack.Core" Version="0.16.0" />
<PackageReference Include="Terminal.Gui" Version="1.0" />
<PackageReference Include="Microsoft.PowerShell.SDK" Version="6.2.1" />
<PackageReference Include="Nstack.Core" Version="0.17.*" />
<PackageReference Include="Terminal.Gui" Version="1.6.*" />
<PackageReference Include="Microsoft.PowerShell.SDK" Version="7.2.*" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Copyright = '(c) Microsoft Corporation.'
Description = 'Cross-platform Console Gui Tools for PowerShell'

# Minimum version of the PowerShell engine required by this module
PowerShellVersion = '6.2'
PowerShellVersion = '7.2'

# Name of the PowerShell host required by this module
# PowerShellHostName = ''
Expand Down
6 changes: 4 additions & 2 deletions src/Microsoft.PowerShell.ConsoleGuiTools/TypeGetter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

using System;
using System.Management.Automation;
using System.Management.Automation.Internal;
using System.Linq;
using System.Globalization;
using System.Collections.Generic;
Expand All @@ -26,7 +27,7 @@ public FormatViewDefinition GetFormatViewDefinitionForObject(PSObject obj)
var types = _cmdlet.InvokeCommand.InvokeScript(@"Microsoft.PowerShell.Utility\Get-FormatData " + typeName).ToList();

//No custom type definitions found - try the PowerShell specific format data
if (types == null || types.Count == 0)
if (types == null || types.Count == 0)
{
types = _cmdlet.InvokeCommand
.InvokeScript(@"Microsoft.PowerShell.Utility\Get-FormatData -PowerShellVersion $PSVersionTable.PSVersion " + typeName).ToList();
Expand Down Expand Up @@ -62,7 +63,8 @@ public DataTableRow CastObjectToDataTableRow(PSObject ps, List<DataTableColumn>
}
else
{
valuePairs[dataColumn.ToString()] = new StringValue { DisplayValue = stringValue };
var stringDecorated = new StringDecorated(stringValue);
valuePairs[dataColumn.ToString()] = new StringValue { DisplayValue = stringDecorated.ToString(OutputRendering.PlainText) };
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\GraphicalTools.Common.props" />
<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\GraphicalTools.Common.props" />
<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="12.0.2" />
Expand Down
2 changes: 1 addition & 1 deletion src/OutGridView.Gui/OutGridView.Gui.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Import Project="..\..\GraphicalTools.Common.props" />
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Folder Include="Models\" />
Expand Down