Skip to content

PSIC startup fails due to dot-sourcing in Constrained Language Mode #2547

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
jotrueck opened this issue Mar 11, 2020 · 4 comments
Closed

PSIC startup fails due to dot-sourcing in Constrained Language Mode #2547

jotrueck opened this issue Mar 11, 2020 · 4 comments
Labels
Resolution-Duplicate Will close automatically.

Comments

@jotrueck
Copy link

System Details

System Details Output

### VSCode version: 1.43.0 78a4c91400152c0f27ba4d363eb56d2835f9903a x64

### VSCode extensions:
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]


### PSES version:

### PowerShell version:

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

Issue Description

The Powershell Integrated Console Starts with Erroroutput

Expected Behaviour

The Powershell Integrated Console Starts without Error

Actual Behaviour

Whenever VSC is started with installed Powershell extension it fails

Attached Logs

Exception encountered starting EditorServices. Exception logged in D:\a\1\s\src\PowerShellEditorServices.Hosting\Commands\StartEditorServicesCommand.cs on line 247 in EndProcessing:
System.Management.Automation.CmdletInvocationException: Für diesen Befehl ist keine DOT-Quellentnahme möglich, da er in einem anderen Sprachmodus definiert wurde. Lassen Sie den Operator "." weg, um
diesen Befehl ohne Import des Inhalts aufzurufen. ---> System.NotSupportedException: Für diesen Befehl ist keine DOT-Quellentnahme möglich, da er in einem anderen Sprachmodus definiert wurde. Lassen
Sie den Operator "." weg, um diesen Befehl ohne Import des Inhalts aufzurufen.
   --- Ende der internen Ausnahmestapelüberwachung ---
   bei System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input)
   bei System.Management.Automation.PowerShell.Worker.ConstructPipelineAndDoWork(Runspace rs, Boolean performSyncInvoke)
   bei System.Management.Automation.PowerShell.CoreInvokeHelper[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
   bei System.Management.Automation.PowerShell.CoreInvoke[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
   bei System.Management.Automation.PowerShell.Invoke(IEnumerable input, PSInvocationSettings settings)
   bei Microsoft.PowerShell.EditorServices.Hosting.EditorServicesLoader.LogPowerShellDetails()
   bei Microsoft.PowerShell.EditorServices.Hosting.EditorServicesLoader.LogHostInformation()
   bei Microsoft.PowerShell.EditorServices.Hosting.EditorServicesLoader.LoadAndRunEditorServicesAsync()
   bei Microsoft.PowerShell.EditorServices.Commands.StartEditorServicesCommand.EndProcessing()

== Press any key to close terminal ==

11.3.2020 06:37:05 [NORMAL] - Visual Studio Code v1.43.0 64-bit
11.3.2020 06:37:05 [NORMAL] - PowerShell Extension v2020.3.0
11.3.2020 06:37:05 [NORMAL] - Operating System: Windows 64-bit
11.3.2020 06:37:05 [NORMAL] - Language server starting --
11.3.2020 06:37:05 [NORMAL] -     PowerShell executable: C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe
11.3.2020 06:37:05 [NORMAL] -     PowerShell args: -NoProfile -NonInteractive -ExecutionPolicy Bypass -Command Import-Module 'c:\Users\trueckj\.vscode\extensions\ms-vscode.powershell-2020.3.0\modules\PowerShellEditorServices\PowerShellEditorServices.psd1'; Start-EditorServices -HostName 'Visual Studio Code Host' -HostProfileId 'Microsoft.VSCode' -HostVersion '2020.3.0' -AdditionalModules @('PowerShellEditorServices.VSCode') -BundledModulesPath 'c:\Users\trueckj\.vscode\extensions\ms-vscode.powershell-2020.3.0\modules' -EnableConsoleRepl -LogLevel 'Normal' -LogPath 'c:\Users\trueckj\.vscode\extensions\ms-vscode.powershell-2020.3.0\logs\1583905025-872584e6-8d00-44ab-9f21-8c20f2a1b1c01583905021387\EditorServices.log' -SessionDetailsPath 'c:\Users\trueckj\.vscode\extensions\ms-vscode.powershell-2020.3.0\sessions\PSES-VSCode-8988-831212' -FeatureFlags @() 
11.3.2020 06:37:05 [NORMAL] -     PowerShell Editor Services args: Import-Module 'c:\Users\trueckj\.vscode\extensions\ms-vscode.powershell-2020.3.0\modules\PowerShellEditorServices\PowerShellEditorServices.psd1'; Start-EditorServices -HostName 'Visual Studio Code Host' -HostProfileId 'Microsoft.VSCode' -HostVersion '2020.3.0' -AdditionalModules @('PowerShellEditorServices.VSCode') -BundledModulesPath 'c:\Users\trueckj\.vscode\extensions\ms-vscode.powershell-2020.3.0\modules' -EnableConsoleRepl -LogLevel 'Normal' -LogPath 'c:\Users\trueckj\.vscode\extensions\ms-vscode.powershell-2020.3.0\logs\1583905025-872584e6-8d00-44ab-9f21-8c20f2a1b1c01583905021387\EditorServices.log' -SessionDetailsPath 'c:\Users\trueckj\.vscode\extensions\ms-vscode.powershell-2020.3.0\sessions\PSES-VSCode-8988-831212' -FeatureFlags @() 
11.3.2020 06:37:05 [NORMAL] - powershell.exe started.
11.3.2020 06:37:05 [NORMAL] - Waiting for session file
11.3.2020 06:39:05 [NORMAL] - Error occurred retrieving session file
11.3.2020 06:39:05 [NORMAL] - Language server startup failed.
11.3.2020 06:39:05 [ERROR] - The language service could not be started: 
11.3.2020 06:39:05 [ERROR] - Timed out waiting for session file to appear.

@ghost ghost added the Needs: Triage Maintainer attention needed! label Mar 11, 2020
@TylerLeonhardt
Copy link
Member

This is a duplicate of PowerShell/PowerShellEditorServices#1221.

@TylerLeonhardt TylerLeonhardt added Resolution-Duplicate Will close automatically. and removed Needs: Triage Maintainer attention needed! labels Mar 11, 2020
@rjmholt
Copy link
Contributor

rjmholt commented Mar 11, 2020

@rjmholt
Copy link
Contributor

rjmholt commented Mar 11, 2020

#606

@rjmholt rjmholt changed the title Powershell Integrated Console fails to start with Exception PSIC startup fails due to dot-sourcing in Constrained Language Mode Mar 11, 2020
@ghost
Copy link

ghost commented Mar 24, 2020

This issue has been marked as duplicate and has not had any activity for 1 day. It has been closed for housekeeping purposes.

@ghost ghost closed this as completed Mar 24, 2020
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution-Duplicate Will close automatically.
Projects
None yet
Development

No branches or pull requests

3 participants