Visual Studio CODE
I have previously compiled sources OK.
Tried today and compile log shows completion and output of EXE (Failed to locate Import-Xaml warning).
When I run output EXE in command-line, it does nothing.
++
I stepped back to basics:
- Created a PowerShell with two lines:
Write-Host “Hello World”
“Hello World” | Out-Host
Compiled taking all defaults. Default PSD1 too
Ran, but no output.
Windows 10. .Net 4.6.2, 4.7.2, .4.8, 5.0.x, Core SDK 3.1.411 all loaded/available. Latest Powershell Pro Tools.
Any tips or clues to diagnose, greatfully accepted?
+++
Starting PowerShell Pro Tools host from: c:\Users\aprob.vscode\extensions\ironmansoftware.powershellprotools-5.29.4\out\windows\PowerShellProTools.Host.exe}
Process started
[4/08/2021 11:27:47 PM] connect
Connecting to PowerShell process 14448
[4/08/2021 11:27:49 PM] Opening a remote runspace.
[4/08/2021 11:27:51 PM] Loading PowerShell Pro Tools module
[4/08/2021 11:27:51 PM] Executing command: [System.Reflection.Assembly]::LoadFrom(‘c:\Users\aprob.vscode\extensions\ironmansoftware.powershellprotools-5.29.4\out\windows\PowerShellProTools.VSCode.dll’)
[4/08/2021 11:27:52 PM] Executing command: Import-Module ‘c:\Users\aprob.vscode\extensions\ironmansoftware.powershellprotools-5.29.4\out\windows\PowerShellProTools.VSCode.dll’
[4/08/2021 11:27:52 PM] Executing command: $Env:PSModulePath += ‘;c:\Users\aprob.vscode\extensions\ironmansoftware.powershellprotools-5.29.4\out\windows…\Modules’
[4/08/2021 11:27:52 PM] Configuring runspace scheduler.
[4/08/2021 11:27:52 PM] Executing command:
Get-Runspace | ForEach-Object {
$h = $.GetType().GetProperty(‘Host’, [System.Reflection.BindingFlags]::Instance -bor [System.Reflection.BindingFlags]::NonPublic).GetValue($)
if ($h.Name -eq ‘Visual Studio Code Host’)
{
$_.Id
}
}
[4/08/2021 11:27:53 PM] Executing command:
Get-Runspace | ForEach-Object {
$h = $.GetType().GetProperty(‘Host’, [System.Reflection.BindingFlags]::Instance -bor [System.Reflection.BindingFlags]::NonPublic).GetValue($
)
if ($h.Name -eq ‘Visual Studio Code Host’)
{
$_.Id
}
}
[4/08/2021 11:27:53 PM] Executing command:
Get-Runspace | ForEach-Object {
$h = $.GetType().GetProperty(‘Host’, [System.Reflection.BindingFlags]::Instance -bor [System.Reflection.BindingFlags]::NonPublic).GetValue($
)
if ($h.Name -eq ‘Visual Studio Code Host’)
{
$_.Id
}
}
[4/08/2021 11:27:53 PM] Executing command:
Get-Runspace | ForEach-Object {
$h = $.GetType().GetProperty(‘Host’, [System.Reflection.BindingFlags]::Instance -bor [System.Reflection.BindingFlags]::NonPublic).GetValue($
)
if ($h.Name -eq ‘Visual Studio Code Host’)
{
$_.Id
}
}
[4/08/2021 11:27:53 PM] Executing command:
Get-Runspace | ForEach-Object {
$h = $.GetType().GetProperty(‘Host’, [System.Reflection.BindingFlags]::Instance -bor [System.Reflection.BindingFlags]::NonPublic).GetValue($
)
if ($h.Name -eq ‘Visual Studio Code Host’)
{
$_.Id
}
}
[4/08/2021 11:27:53 PM] Executing command:
Get-Runspace | ForEach-Object {
$h = $.GetType().GetProperty(‘Host’, [System.Reflection.BindingFlags]::Instance -bor [System.Reflection.BindingFlags]::NonPublic).GetValue($
)
if ($h.Name -eq ‘Visual Studio Code Host’)
{
$_.Id
}
}
[4/08/2021 11:27:54 PM] Executing command:
Get-Runspace | ForEach-Object {
$h = $.GetType().GetProperty(‘Host’, [System.Reflection.BindingFlags]::Instance -bor [System.Reflection.BindingFlags]::NonPublic).GetValue($)
if ($h.Name -eq ‘Visual Studio Code Host’)
{
$_.Id
}
}
[4/08/2021 11:27:54 PM] Executing command:
Get-Runspace | ForEach-Object {
$h = $.GetType().GetProperty(‘Host’, [System.Reflection.BindingFlags]::Instance -bor [System.Reflection.BindingFlags]::NonPublic).GetValue($)
if ($h.Name -eq ‘Visual Studio Code Host’)
{
$_.Id
}
}
[4/08/2021 11:27:54 PM] Executing command:
Get-Runspace | ForEach-Object {
$h = $.GetType().GetProperty(‘Host’, [System.Reflection.BindingFlags]::Instance -bor [System.Reflection.BindingFlags]::NonPublic).GetValue($
)
if ($h.Name -eq ‘Visual Studio Code Host’)
{
$_.Id
}
}
[4/08/2021 11:27:54 PM] Executing command:
Get-Runspace | ForEach-Object {
$h = $.GetType().GetProperty(‘Host’, [System.Reflection.BindingFlags]::Instance -bor [System.Reflection.BindingFlags]::NonPublic).GetValue($
)
if ($h.Name -eq ‘Visual Studio Code Host’)
{
$_.Id
}
}
[4/08/2021 11:27:54 PM] Executing command:
Get-Runspace | ForEach-Object {
$h = $.GetType().GetProperty(‘Host’, [System.Reflection.BindingFlags]::Instance -bor [System.Reflection.BindingFlags]::NonPublic).GetValue($)
if ($h.Name -eq ‘Visual Studio Code Host’)
{
$_.Id
}
}
[4/08/2021 11:27:54 PM] Executing command:
Get-Runspace | ForEach-Object {
$h = $.GetType().GetProperty(‘Host’, [System.Reflection.BindingFlags]::Instance -bor [System.Reflection.BindingFlags]::NonPublic).GetValue($
)
if ($h.Name -eq ‘Visual Studio Code Host’)
{
$_.Id
}
}
[4/08/2021 11:27:55 PM] Executing command:
Get-Runspace | ForEach-Object {
$h = $.GetType().GetProperty(‘Host’, [System.Reflection.BindingFlags]::Instance -bor [System.Reflection.BindingFlags]::NonPublic).GetValue($
)
if ($h.Name -eq ‘Visual Studio Code Host’)
{
$_.Id
}
}
[4/08/2021 11:27:55 PM] Executing command:
Get-Runspace | ForEach-Object {
$h = $.GetType().GetProperty(‘Host’, [System.Reflection.BindingFlags]::Instance -bor [System.Reflection.BindingFlags]::NonPublic).GetValue($
)
if ($h.Name -eq ‘Visual Studio Code Host’)
{
$_.Id
}
}
[4/08/2021 11:27:55 PM] Executing command:
Get-Runspace | ForEach-Object {
$h = $.GetType().GetProperty(‘Host’, [System.Reflection.BindingFlags]::Instance -bor [System.Reflection.BindingFlags]::NonPublic).GetValue($)
if ($h.Name -eq ‘Visual Studio Code Host’)
{
$_.Id
}
}
[4/08/2021 11:27:55 PM] Executing command:
Get-Runspace | ForEach-Object {
$h = $.GetType().GetProperty(‘Host’, [System.Reflection.BindingFlags]::Instance -bor [System.Reflection.BindingFlags]::NonPublic).GetValue($
)
if ($h.Name -eq ‘Visual Studio Code Host’)
{
$_.Id
}
}
[4/08/2021 11:27:55 PM] Executing command:
Get-Runspace | ForEach-Object {
$h = $.GetType().GetProperty(‘Host’, [System.Reflection.BindingFlags]::Instance -bor [System.Reflection.BindingFlags]::NonPublic).GetValue($)
if ($h.Name -eq ‘Visual Studio Code Host’)
{
$_.Id
}
}
[4/08/2021 11:27:55 PM] Executing command:
Get-Runspace | ForEach-Object {
$h = $.GetType().GetProperty(‘Host’, [System.Reflection.BindingFlags]::Instance -bor [System.Reflection.BindingFlags]::NonPublic).GetValue($
)
if ($h.Name -eq ‘Visual Studio Code Host’)
{
$_.Id
}
}
[4/08/2021 11:27:56 PM] Executing command:
Get-Runspace | ForEach-Object {
$h = $.GetType().GetProperty(‘Host’, [System.Reflection.BindingFlags]::Instance -bor [System.Reflection.BindingFlags]::NonPublic).GetValue($
)
if ($h.Name -eq ‘Visual Studio Code Host’)
{
$_.Id
}
}
[4/08/2021 11:27:56 PM] Found VS Code runspace: 5
[4/08/2021 11:27:56 PM] Executing command:
$RS = Get-Runspace -Id 5
$RS.Events.SubscribeEvent($null, ‘PowerShell.OnIdle’, ‘PowerShell.OnIdle’, $null, {
try {
$PSPCommand = [PowerShellProTools.CommandQueue]::GetCommand()
if ($PSPCommand)
{
$PSPResults = Invoke-Expression $PSPCommand.Value
[PowerShellProTools.CommandQueue]::SetResults($PSPResults, $PSPCommand)
}
} catch { [PowerShellProTools.CommandQueue]::SetResults($_.ToString(), $PSPCommand) }
}, $true, $false)
[4/08/2021 11:27:56 PM] Scheduling command for main runspace: Import-Module ‘c:\Users\aprob.vscode\extensions\ironmansoftware.powershellprotools-5.29.4\out\windows\PowerShellProTools.VSCode.dll’ -Scope Global
Connected to PowerShell process.
Started PowerShell Pro Tools process.
[4/08/2021 11:28:57 PM] Scheduling command for main runspace: $Commands = Get-Command ‘Write-Host’ -ErrorAction SilentlyContinue; if ($Commands) { try { [System.Management.Automation.ProxyCommand]::Create((New-Object System.Management.Automation.CommandMetaData $Commands)) } catch { } } else { ‘’ }
[4/08/2021 11:29:05 PM] Scheduling command for main runspace: $Commands = Get-Command ‘O’ -ErrorAction SilentlyContinue; if ($Commands) { try { [System.Management.Automation.ProxyCommand]::Create((New-Object System.Management.Automation.CommandMetaData $Commands)) } catch { } } else { ‘’ }
[4/08/2021 11:29:06 PM] Scheduling command for main runspace: $Commands = Get-Command ‘Ou’ -ErrorAction SilentlyContinue; if ($Commands) { try { [System.Management.Automation.ProxyCommand]::Create((New-Object System.Management.Automation.CommandMetaData $Commands)) } catch { } } else { ‘’ }
[4/08/2021 11:29:07 PM] Scheduling command for main runspace: $Commands = Get-Command ‘Out-’ -ErrorAction SilentlyContinue; if ($Commands) { try { [System.Management.Automation.ProxyCommand]::Create((New-Object System.Management.Automation.CommandMetaData $Commands)) } catch { } } else { ‘’ }
[4/08/2021 11:29:07 PM] Scheduling command for main runspace: $Commands = Get-Command ‘Out-H’ -ErrorAction SilentlyContinue; if ($Commands) { try { [System.Management.Automation.ProxyCommand]::Create((New-Object System.Management.Automation.CommandMetaData $Commands)) } catch { } } else { ‘’ }
INFO: Checking license
INFO: OutputPath is c:\Users\aprob\Documents\GitHub\Tools\Test-POSH\out
INFO: Bundling c:\Users\aprob\Documents\GitHub\Tools\Test-POSH\Hello-World.ps1
INFO: Parsing file c:\Users\aprob\Documents\GitHub\Tools\Test-POSH\Hello-World.ps1.
INFO: Bundling XAML
INFO: Failed to locate Import-Xaml
INFO: Packaging C:\Users\aprob\AppData\Local\Temp\Hello-World.ps1
INFO: Creating temp directory: C:\Users\aprob\AppData\Local\Temp\534acf5cd2b9454c92067c84a6c797e5
INFO: Packaging modules…
INFO: Checking dotnet version.
INFO: Checking dotnet version.
INFO: 5.0.205
INFO: 5.0.205
INFO: Creating package project.
INFO: Using .NET Framework version: net462
INFO: Determining projects to restore…
Restored C:\Users\aprob\AppData\Local\Temp\534acf5cd2b9454c92067c84a6c797e5\Hello-World.csproj (in 154 ms).
INFO: Determining projects to restore…
Restored C:\Users\aprob\AppData\Local\Temp\534acf5cd2b9454c92067c84a6c797e5\Hello-World.csproj (in 154 ms).
INFO: Packaging C:\Users\aprob\AppData\Local\Temp\Hello-World.ps1 → c:\Users\aprob\Documents\GitHub\Tools\Test-POSH\out\Hello-World.exe
INFO: Microsoft (R) Build Engine version 16.9.0+57a23d249 for .NET
Copyright (C) Microsoft Corporation. All rights reserved.
Determining projects to restore…
All projects are up-to-date for restore.
Hello-World → c:\Users\aprob\Documents\GitHub\Tools\Test-POSH\out\Hello-World.exe
Build succeeded.
0 Warning(s)
0 Error(s)
Time Elapsed 00:00:05.47
INFO: Microsoft (R) Build Engine version 16.9.0+57a23d249 for .NET
Copyright (C) Microsoft Corporation. All rights reserved.
Determining projects to restore…
All projects are up-to-date for restore.
Hello-World → c:\Users\aprob\Documents\GitHub\Tools\Test-POSH\out\Hello-World.exe
Build succeeded.
0 Warning(s)
0 Error(s)
Time Elapsed 00:00:05.47