PowerShell requires the ref folder to compile the Add-Type code. But it looks for the folder in a wrong place.
https://github.com/PowerShell/PowerShell/issues/18028
Set role exeProgram. Tested, works. Not tested with Publish.
https://github.com/PowerShell/PowerShell/issues/18028
Set role exeProgram. Tested, works. Not tested with Publish.