-
Notifications
You must be signed in to change notification settings - Fork 511
2.0.0-insiders-834: Current thread must be set to single thread apartment (STA) mode before OLE calls can be made #1571
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
Comments
Hi @skest3qc thanks for opening an issue. Can you please attach information on your system environment? You'll find a PowerShell snippet in the issue template you can paste into the Integrated Console that will provide this information. |
Issue DescriptionI am experiencing a problem with... Attached LogsFollow the instructions in the README about Environment InformationVisual Studio Code
PowerShell Information
Visual Studio Code ExtensionsVisual Studio Code Extensions(Click to Expand)
|
I'm not sure how easy to fix this will be -- I suspect a number of the Windows PowerShell cmdlets could display strange behaviour in our context. Tagging @SeeminglyScience for visibility too |
The runspace just needs to be set to STA when it's created. There was a compiler directive that excluded it from Core, must have just gotten missed in the netstandard migration. |
Ah! My fault! I will put it back in :) |
I've just run into this as well |
GitHub should have closed this issue but didn't for some reason. The fix for this is merged. I'll trigger a v2 AppVeyor build so you can get it. |
@rjmholt I am using the Powershell Preview now, i still do see the message. Is this not merged in the preview? |
This should be in the preview, see the code here. Have you uninstalled the non-preview extension? You should be able to check the version of the backend in the Integrated Terminal with |
@rjmholt
I have already disabled the stable release |
@rjmholt could you please push this out in the next preview release? |
I can confirm that this is still a problem in preview 2. |
Hi,
i just tried this piece of code:
"out " | Set-Clipboard
and got this error:
Set-Clipboard : Current thread must be set to single thread apartment (STA) mode before OLE calls can be made. Ensure that your Main function has STAThreadAttribute marked on it.
It works in Windows Powershell 5.1
The text was updated successfully, but these errors were encountered: