To help you better we need some information from you.
*** Please fill in the fields below. If you leave fields empty or specify 'latest' rather than the actual version your answer will be delayed as we will be forced to ask you for this information. ***
Product, version and build: PowerShell Studio 2022 5.8.213
Operating system: Windows 10 22H2
PowerShell version(s): 5.1, 7.2.0.0, 7.2.7.0, 7.3.0.0
*** Please add details and screenshots as needed below. ***
DO NOT POST LICENSES, KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM
I'm having a problem with Job Tracking not working once I compile the code to a winform executable. My code works as expected in PowerShell Studio IDE but as soon as I create the executable it will no longer work, this seems to be all versions of PowerShell 7. This problem is happening on the computer that I used created the program and another test computer (even did a clean install of Windows 10 on the test computer). If I compile the code to PowerShell 5.1 it works without issues on both computers. I even created a new project and just added the start job button. When I run the program in PowerShell Studio it works just fine, I then compile it to winform executable and it no longer works on both machines. All the prerequisites are installed and the program launches without any issues.
When I click on the button on the compiled program it just does nothing once it gets to the job tracker portion of the code.
Thank you in advance for any help / advice.
Justin
Job Tracker isn't working after compiling code
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.
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.
-
- Posts: 7
- Last visit: Mon Jul 10, 2023 8:29 am
Job Tracker isn't working after compiling code
We are looking into this and will get back to you soon.
It most likely has to do with the Start-Job command not being supported when PowerShell 7 is being hosted in other applications, such as packaged scripts from our SAPIEN Script Packager.
Start-Job depends on the PowerShell executable to be available under $PSHOME to start an out-of-process background job, but when an application is hosting PowerShell, it’s directly using the PowerShell NuGet SDK packages and won’t have PowerShell executable shipped along.
Go to full postIt most likely has to do with the Start-Job command not being supported when PowerShell 7 is being hosted in other applications, such as packaged scripts from our SAPIEN Script Packager.
Start-Job depends on the PowerShell executable to be available under $PSHOME to start an out-of-process background job, but when an application is hosting PowerShell, it’s directly using the PowerShell NuGet SDK packages and won’t have PowerShell executable shipped along.
Re: Job Tracker isn't working after compiling code
When the code is running in the IDE, does it work with both v5 and v7?
Brittney
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
-
- Posts: 7
- Last visit: Mon Jul 10, 2023 8:29 am
-
- Posts: 7
- Last visit: Mon Jul 10, 2023 8:29 am
Re: Job Tracker isn't working after compiling code
I tried compiling the code on another computer with PowerShell Studio 2022 on it and I'm having the exact same problem with the Job Tracker not working.
Product: PowerShell Studio 2022 (64 Bit)
Build: v5.8.213
OS: Windows 10 Pro (64 Bit)
Build: v10.0.22621.0installed
Product: PowerShell Studio 2022 (64 Bit)
Build: v5.8.213
OS: Windows 10 Pro (64 Bit)
Build: v10.0.22621.0installed
Re: Job Tracker isn't working after compiling code
We are looking into this and will get back to you soon.
It most likely has to do with the Start-Job command not being supported when PowerShell 7 is being hosted in other applications, such as packaged scripts from our SAPIEN Script Packager.
Start-Job depends on the PowerShell executable to be available under $PSHOME to start an out-of-process background job, but when an application is hosting PowerShell, it’s directly using the PowerShell NuGet SDK packages and won’t have PowerShell executable shipped along.
It most likely has to do with the Start-Job command not being supported when PowerShell 7 is being hosted in other applications, such as packaged scripts from our SAPIEN Script Packager.
Start-Job depends on the PowerShell executable to be available under $PSHOME to start an out-of-process background job, but when an application is hosting PowerShell, it’s directly using the PowerShell NuGet SDK packages and won’t have PowerShell executable shipped along.
Brittney
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
-
- Posts: 7
- Last visit: Mon Jul 10, 2023 8:29 am
Re: Job Tracker isn't working after compiling code
Just checking to see if there is any update on this issue?
Thank you!
Justin
Thank you!
Justin
Re: Job Tracker isn't working after compiling code
The issue is indeed as I stated above. It's an issue with the Start-Job command when PowerShell 7 is being hosted in another application. While we are aware of the issue, we do not have an implemented solution at this time.
A possible workaround could be to use the Start-ThreadJob command from the module ThreadJob. ThreadJob is just an extension of the existing PowerShell background jobs. The main difference is that the jobs which are created run in separate threads within the local process.
A possible workaround could be to use the Start-ThreadJob command from the module ThreadJob. ThreadJob is just an extension of the existing PowerShell background jobs. The main difference is that the jobs which are created run in separate threads within the local process.
Brittney
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.