Powershell Studio 2023 - Packager (.exe) Build Problem

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 1 year and 2 months 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
jstedler
Posts: 17
Last visit: Tue Jan 31, 2023 10:46 am

Powershell Studio 2023 - Packager (.exe) Build Problem

Post by jstedler »

Product: PowerShell Studio 2023 (64 Bit)
Build: v5.8.215
OS: Windows 10 Pro (64 Bit)
Build: v10.0.17134.0
PowerShell version(s): 5 - 7 (5 in the current issue)


Issue:
I've upgraded to Powershell Studio 2023 and since doing so, I've been unable to successfully package/build into a .exe. I did not have this problem prior to upgrading and was using Powershell Studio 2022.

Description:
While troubleshooting this issue, I created a brand new form project with only a button and textbox. Below is the code:

Code: Select all

$buttonHelloWorld_Click={
	$textbox1.Text = "Hello World!"
}
When I click the "Build" button for the first time, below is the output:
>> Package 'C:\Working Folder\TestBuild\TestBuild.psproj'
SAPIEN Package and Deploy Tool 4.6 (c) 2005 - 2023 SAPIEN Technologies, Inc.

------ Build started: TestBuild, Configuration: x64 ------
Packaging with SAPIEN PowerShell V5 Host (Windows Forms) x64
Adding C:\Working Folder\TestBuild\TestBuild.Package.ps1
Writing scripts to bin\x64\TestBuild.exe
Embedding default manifest...
Package completed

>> Completed


However, when the Windows Explorer window pops up that would normally display the newly packaged .exe, I see the .exe for a split second before the file disappears!
This behavior was identical when I tried to build a .exe from a project created in Powershell Studio 2022, which lead me to try a brand new project created in Powershell Studio 2023...
I try to build the project again, and I get the following output:

>> Package 'C:\Working Folder\TestBuild\TestBuild.psproj'
SAPIEN Package and Deploy Tool 4.6 (c) 2005 - 2023 SAPIEN Technologies, Inc.

------ Build started: TestBuild, Configuration: x64 ------
Packaging with SAPIEN PowerShell V5 Host (Windows Forms) x64
Adding C:\Working Folder\TestBuild\TestBuild.Package.ps1
Writing scripts to bin\x64\TestBuild.exe
Error: Writing settings to bin\x64\TestBuild.exe failed, error code 87
Error: Updating icon resources failed: 87

>> Completed


I've tried various troubleshooting options with the Build Packager, but no matter what I try, the above behavior doesn't change. Obviously, packaging scripts is important to what I do and I need help in getting this issue resolved.
User avatar
Alexander Riedel
Posts: 8479
Last visit: Thu Mar 28, 2024 9:29 am
Answers: 20
Been upvoted: 37 times

Re: Powershell Studio 2023 - Packager (.exe) Build Problem

Post by Alexander Riedel »

If the file disappears or is blocked from writing, it is your anti-virus scanner. It quarantines the newly created file.
Check your logs and submit a quarantined file to your anti-virus vendor.
Alexander Riedel
SAPIEN Technologies, Inc.
User avatar
jstedler
Posts: 17
Last visit: Tue Jan 31, 2023 10:46 am

Re: Powershell Studio 2023 - Packager (.exe) Build Problem

Post by jstedler »

I suspected that, but since I just upgraded yesterday and had the problem yesterday, I wasn't sure... However, I did confirm with my IT that it is our A/V software auto-quarantining the newly built .exe file. A system policy must have just changed or something for the weird timing of the issue. Thank you and I'll continue on my end.
This topic is 1 year and 2 months 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.