Skip to content

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

@Yannik

Description

@Yannik

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].

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions