Skip to content
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

Thread.Abort is not supported error thrown on newer versions of powershell #11

Open
Yannik opened this issue Mar 17, 2023 · 2 comments
Open
Labels
bug Something isn't working

Comments

@Yannik
Copy link

Yannik commented Mar 17, 2023

With powershell 7, the following error gets thrown when executing Invoke-ConPtyShell:

Add-Type:
Line |
 113 |      Add-Type -TypeDefinition $Source -Language CSharp;
     |      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | (1465,9): error CS0618: 'Thread.Abort()' is obsolete: 'Thread.Abort is not supported and throws PlatformNotSupportedException.'
        thThreadReadPipeWriteSocket.Abort();
        ^

Add-Type:
Line |
 113 |      Add-Type -TypeDefinition $Source -Language CSharp;
     |      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | (1466,9): error CS0618: 'Thread.Abort()' is obsolete: 'Thread.Abort is not supported and throws PlatformNotSupportedException.'
        thReadSocketWritePipe.Abort();
        ^

Add-Type:
Line |
 113 |      Add-Type -TypeDefinition $Source -Language CSharp;
     |      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Cannot add type. Compilation errors occurred.
InvalidOperation:
Line |
 114 |      $output = [ConPtyShellMainClass]::ConPtyShellMain($parametersConP …
     |                ~~~~~~~~~~~~~~~~~~~~~~
     | Unable to find type [ConPtyShellMainClass].
@antonioCoco antonioCoco added the bug Something isn't working label May 19, 2023
@antonioCoco
Copy link
Owner

thanks for reporting, will address this in the next release.

@Yannik
Copy link
Author

Yannik commented May 20, 2023

@antonioCoco thank you, that's great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants