Failed to start external PowerShell process to determine modules. The system cannot find the file specified

Tool: Visual Studio 2022 PowerShell Tools
Version: 2024.3.0

Hello There,

I am fairly new to using visual studio 2022 and the powershell tool.
I have downloaded and installed the powershell tools for Visual Studio 2022 extension and I am getting an error packaging a very simple winForm.ps1 to exe

The error i get is

|Error||Failed to start external PowerShell process to determine modules. The system cannot find the file specified|PowerShellProject2|D:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\PowerShell Tools for Visual Studio\PowerShellTools.targets|14||

Output:
Build started at 4:37 PM…
------ Build started: Project: PowerShellProject2, Configuration: Debug Any CPU ------
D:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\PowerShell Tools for Visual Studio\PowerShellTools.targets(14,5): error : Failed to start external PowerShell process to determine modules. The system cannot find the file specified
Done building project “PowerShellProject2.pssproj” – FAILED.

Build FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
========== Build completed at 4:37 PM and took 00.223 seconds ==========

Any help would be greatly appreciated

anyone else have this issue? I could not fi nd any related articles