Skip to content

Unable to Load Terminal #3395

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
CATgwalker opened this issue Jun 3, 2021 · 14 comments · Fixed by PowerShell/PowerShellEditorServices#1494
Closed

Unable to Load Terminal #3395

CATgwalker opened this issue Jun 3, 2021 · 14 comments · Fixed by PowerShell/PowerShellEditorServices#1494
Assignees
Labels
Area-Startup Bug: PowerShell 5.1 Bugs when using PowerShell 5.1. Issue-Bug A bug to squash.

Comments

@CATgwalker
Copy link

Issue Type: Bug

After recent update to 2021.5.1, the terminal fails to load with below error on Windows Server 2016 with WMF 5.1

image

Extension version: 2021.5.1
VS Code version: Code 1.56.2 (054a9295330880ed74ceaedda236253b4f39a335, 2021-05-12T17:13:13.157Z)
OS version: Windows_NT x64 10.0.14393

@ghost ghost added the Needs: Triage Maintainer attention needed! label Jun 3, 2021
@andyleejordan
Copy link
Member

What version of PowerShell are you using? @rjmholt we should take a look at this.

@CATgwalker
Copy link
Author

Name                           Value
----                           -----
PSVersion                      5.1.14393.4402
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.14393.4402
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

@andyleejordan
Copy link
Member

Interesting...can you tell me if it repros with PowerShell 7? Just to help narrow down the cause.

Also, could you please provide your logs by following these steps?

@CATgwalker
Copy link
Author

I am not able to install PowerShell 7 on this server - it is an Azure Automation hybrid worker and only works with PS 5.1.

1622738848-33b3fe3f-9d15-4d9e-95f6-08cd39cb8ff81622738843439.zip

@andyleejordan
Copy link
Member

That is helpful, thanks!

@rjmholt curiously I see this:

Could not load file or assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'

Why on earth is netstandard trying to be loaded for PowerShell 5.1? This PowerShell/PowerShellEditorServices#1426 is the only related change I can think of, but it doesn't appear like it'd cause this.

@andyleejordan andyleejordan added Area-Startup Issue-Bug A bug to squash. and removed Needs: Triage Maintainer attention needed! labels Jun 3, 2021
@andyleejordan
Copy link
Member

Could this have something to do with it @rjmholt:

2 The versions listed here represent the rules that NuGet uses to determine whether a given .NET Standard library is applicable. While NuGet considers .NET Framework 4.6.1 as supporting .NET Standard 1.5 through 2.0, there are several issues with consuming .NET Standard libraries that were built for those versions from .NET Framework 4.6.1 projects. For .NET Framework projects that need to use such libraries, we recommend that you upgrade the project to target .NET Framework 4.7.2 or higher.

From https://docs.microsoft.com/en-us/dotnet/standard/net-standard

@andyleejordan
Copy link
Member

andyleejordan commented Jun 4, 2021

Well, that's a bug. @rjmholt I can confirm that netstandard.dll is not contained in PowerShell-2021.5.1, but I have no idea why:

$ find PowerShell-2021.2.2 -name netstandard.dll
PowerShell-2021.2.2/extension/modules/PowerShellEditorServices/bin/Desktop/netstandard.dll
@JEWANG3 ~/Downloads 
$ find PowerShell-2021.5.1 -name netstandard.dll
@JEWANG3 ~/Downloads 
$ 
$ ls PowerShell-2021.5.1/extension/modules/PowerShellEditorServices/bin/Desktop/
Microsoft.PowerShell.EditorServices.Hosting.dll  System.Runtime.InteropServices.RuntimeInformation.dll
Microsoft.PowerShell.EditorServices.Hosting.pdb  System.ValueTuple.dll

@andyleejordan
Copy link
Member

Ok so I can reproduce this in the build and have a good commit at v2.3.0, and a bad commit at v2.4.0-preview.1, but only if I delete the whole .dotnet folder and run our SetupDotnet task (in addition to cleaning and building). In former, we were only installing up to .NET SDK 5.0, in the latter we now install .NET SDK 6.0 (to support PowerShell 7.2). The behavior of dotnet publish appears to have changed because with the former version, netstandard.dll is included upon publishing, and with the latter it is not.

@andyleejordan
Copy link
Member

Hello! @CATgwalker can you unzip this attached zip file and use "Extensions: Install from VSIX..." to test this in your environment? I think it should fix the problem.

PowerShell-insiders.vsix.zip

@CATgwalker
Copy link
Author

Thanks! Apologies for the delay.

Unfortunately I receive a different error now. See attached logs.
1622836655-7c736c18-4425-4e95-bca5-8721574ee9501622836574157.zip

@ghost ghost added the Needs: Maintainer Attention Maintainer attention needed! label Jun 4, 2021
@andyleejordan
Copy link
Member

Ah, ok, no problem. I need to copy all the stuff out of bin and not just that one folder. We did figure out the problem upstream, I'm just figuring out a workaround until it's fixed properly.

@andyleejordan
Copy link
Member

Ok, one more insiders build to test if you would please:
PowerShell-insiders.vsix.zip

@CATgwalker
Copy link
Author

Thanks! Terminal is loading correctly now with that build.

@andyleejordan
Copy link
Member

Perfect, thanks for the info! This will get fixed in the next preview release (or maybe I'll just drop it straight into a stable release, we'll see).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Startup Bug: PowerShell 5.1 Bugs when using PowerShell 5.1. Issue-Bug A bug to squash.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants