Skip to content

Visual Studio 2022 Community Shell Function runtime error #91449

Open
@vsfeedback

Description

@vsfeedback

This issue has been moved from a ticket on Developer Community.


[severity:It's more difficult to complete my work]
The following code executes without error in Visual Studio 2019

Shell("powershell c:\SystemCommon\Scripts\CollectHistoricalVersionFolders.ps1", AppWinStyle.Hide, True)

In VS 2022 Community, the step just blows right thru the line, returning powershell is not a valid program.
This happens with powershell.exe and with the full path specified.

I added -command at the suggestion of another post (although I never needed it in 2019), resulting in the same error.

Is there a path that I need to set up for my project's execution that differs from what "path" returns in cmd (powershell is in that)?

If so, how do I accomplish that?

Or is it something else?


Original Comments

Feedback Bot on 7/9/2023, 07:29 PM:

(private comment, text removed)

Feedback Bot on 7/10/2023, 07:56 PM:

(private comment, text removed)

Stella Chen [MSFT] on 7/10/2023, 10:23 PM:

(private comment, text removed)

Joseph Helander on 7/12/2023, 02:31 PM:

(private comment, text removed)

Javier Enrique De la Garza Sanchez [MSFT] on 7/13/2023, 10:24 AM:

(private comment, text removed)

Feedback Bot on 7/13/2023, 10:32 AM:

(private comment, text removed)

Joseph Helander on 7/13/2023, 02:20 PM:

(private comment, text removed)

Joseph Helander on 7/21/2023, 09:57 PM:

(private comment, text removed)


Original Solutions

(no solutions)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions