Compile to Generic PWSH 7?

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 9 months and 3 weeks old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
User avatar
sqlcursor
Posts: 2
Last visit: Tue Oct 17, 2023 6:45 am
Has voted: 1 time

Compile to Generic PWSH 7?

Post by sqlcursor »

Product, version and build:PowerShell Studio 2023 5.8.223
Operating system: Windows 11
PowerShell version(s): 7.3.2

Just made the jump from PowerShell Studio 2019 to 2023 as I needed PWSH 7.X support. However, I'm finding that I have to compile an exe to a targeted version of the PWSH 7 runtime and it will not run on any other version. For example, if I target 7.3.2 and the machine version of PWSH is upgraded to 7.3.4, it no longer runs on that machine. Is there no way to make this generic to 7.X? If this is covered in another topic/post, apologies and please point me to it.
by brittneyr » Mon Jun 05, 2023 2:13 pm
This is expected behavior. When deploying packaged scripts with PowerShell 7 engines to other machines, the specific version of PowerShell and .NET are needed on that machine for your packaged executable to run. We do provide runtimes that will allow applications to run on machines without that specific PowerShell 7 version installed:
SPS_RibbonPowerShellRuntimes.png
You may find the following article helpful:
https://www.sapien.com/blog/2020/08/12/ ... -net-core/
Go to full post
User avatar
brittneyr
Site Admin
Posts: 1655
Last visit: Thu Mar 28, 2024 3:14 pm
Answers: 39
Been upvoted: 30 times

Re: Compile to Generic PWSH 7?

Post by brittneyr »

This is expected behavior. When deploying packaged scripts with PowerShell 7 engines to other machines, the specific version of PowerShell and .NET are needed on that machine for your packaged executable to run. We do provide runtimes that will allow applications to run on machines without that specific PowerShell 7 version installed:
SPS_RibbonPowerShellRuntimes.png
SPS_RibbonPowerShellRuntimes.png (40.23 KiB) Viewed 1698 times
You may find the following article helpful:
https://www.sapien.com/blog/2020/08/12/ ... -net-core/
Brittney
SAPIEN Technologies, Inc.
User avatar
sqlcursor
Posts: 2
Last visit: Tue Oct 17, 2023 6:45 am
Has voted: 1 time

Re: Compile to Generic PWSH 7?

Post by sqlcursor »

Thank you, that article helped tremendously! Appreciate the quick response also.
This topic is 9 months and 3 weeks old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.