I previously asked a question on Stack Overflow here, and I was pointed in the direction of a YouTube tutorial here.
The video starts by stating that they are using an extension called PowerShell Pro Tools for Visual Studio from Ironman Software. I installed Visual studio with no issues and I installed the pro tools by downloading the .vsix file from their website here and running it.
Then, following the video tutorial, I created a new project using the “powershell windows form” template and configured the following project settings as per the tutorial:
Packaging Settings:
\-Entry Point: CloneHeroSongDownloader.ps1
\-Bundle: Yes
\-Package as Executable: Yes
Executable Properties:
\-.NET Version: net7.0
\-PowerShell Version: 7.4.0
\-Output Type: Console
\-Platform: x64
\-Operating System: Windows
Following this, the guide states to attempt to build the project in this untouched state, however the build fails and gives me the following error:
Failed to start external PowerShell process to determine modules. The
system cannot find the file specified
And it has this in the output console:
\------ Build started: Project: CloneHeroSongDownloader, Configuration: Debug Any CPU ------
C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\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 "CloneHeroSongDownloader.pssproj" -- FAILED.
Build FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
========== Build completed at 5:01 PM and took 00.241 seconds ==========
Fixes I have tried:
- Fully restart computer via holding the power button for 5ish seconds
- Ensured that PowerShell is installed on my machine and the executable is in the system’s path
- Checked Powershell Execution Policy: It is currently set as Unrestricted
- Ensured that PowerShellToolsPro.MsBuild.dll was present in the C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\PowerShell Tools for Visual Studio directory
- Uninstall & Reinstall Powershell Pro Tools
After each one of this potential fixes, I tried to build the project but got the same error every time. I’m not sure what to try next so I’m coming here to see if anyone knows what to do.