psbuild does not build a working .exe file.
Posted: Thu May 17, 2018 1:52 pm
PowerShell Studio 2018 v5.5.152
64 bit version of product:
Operating system:
64 bit OS:
The .exe produced by running the Packager from PowerShell Studio 2018 works correctly.
When using the command line tool 'psbuild' with the /PACKAGE option the .exe produced does not work.
The error displayed suggests that the .ps1 files that contain the required functions are not in the .exe.
Again, this works fine when packaged from PowerShell Studio GUI. We need the command line to work for our automated
build environment.
The output from PowershellStudio when it works: (I altered the names of our actual files.)
>> Package 'C:\GIT\tools\test.psproj'
>> Building (test) Project...
>> Merging 'Startup.pss' ...
>> Merging 'file1.ps1' ...
>> Merging 'file2.ps1' ...
>> Merging 'file3.ps1' ...
>> Merging 'file4.ps1' ...
>> Merging 'file5.ps1' ...
>> Merging 'file6.ps1' ...
>> Merging 'file7.ps1' ...
>> Merging 'file8.ps1' ...
>> Merging 'file9.ps1' ...
>> Writing 'test.Package.ps1' ...
SAPIEN Package and Deploy Tool 4.1 (c) 2005 - 2018 SAPIEN Technologies, Inc.
------ Build started: test, Configuration: x64 ------
Packaging with SAPIEN PowerShell V5 Host (Command line) x64
Adding C:\GIT\tools\test.Package.ps1
Writing scripts to bin\x64\test.exe
Embedding default manifest...
Package completed
>> Completed
The output from the 'psbuild' command when the .exe does not work:
C:\GIT\DG\hotfix_7.4.x\dgserver\hotfix\tools\services-stop>psbuild /PACKAGE "C:\GIT\tools\test.psproj.psbuild"
SAPIEN Package and Deploy Tool 4.1 (c) 2005 - 2018 SAPIEN Technologies, Inc.
------ Build started: test, Configuration: x64 ------
Packaging with SAPIEN PowerShell V5 Host (Command line) x64
Adding C:\GIT\tools\test.psproj
Writing scripts to bin\x64\test.exe
Embedding default manifest...
Package completed
It does seem obvious that the merging of the .ps1 files that contain required functions did not occur from the command line in the
same way that it did from the GUI.
Is my project missing a build option setting in order to get the command line to work for the same project file that works in PowerShell Studio?
Is there anything else that I might be doing wrong to cause this type of problem?
Your quick response would be very much appreciated.
-Regards
64 bit version of product:
Operating system:
64 bit OS:
The .exe produced by running the Packager from PowerShell Studio 2018 works correctly.
When using the command line tool 'psbuild' with the /PACKAGE option the .exe produced does not work.
The error displayed suggests that the .ps1 files that contain the required functions are not in the .exe.
Again, this works fine when packaged from PowerShell Studio GUI. We need the command line to work for our automated
build environment.
The output from PowershellStudio when it works: (I altered the names of our actual files.)
>> Package 'C:\GIT\tools\test.psproj'
>> Building (test) Project...
>> Merging 'Startup.pss' ...
>> Merging 'file1.ps1' ...
>> Merging 'file2.ps1' ...
>> Merging 'file3.ps1' ...
>> Merging 'file4.ps1' ...
>> Merging 'file5.ps1' ...
>> Merging 'file6.ps1' ...
>> Merging 'file7.ps1' ...
>> Merging 'file8.ps1' ...
>> Merging 'file9.ps1' ...
>> Writing 'test.Package.ps1' ...
SAPIEN Package and Deploy Tool 4.1 (c) 2005 - 2018 SAPIEN Technologies, Inc.
------ Build started: test, Configuration: x64 ------
Packaging with SAPIEN PowerShell V5 Host (Command line) x64
Adding C:\GIT\tools\test.Package.ps1
Writing scripts to bin\x64\test.exe
Embedding default manifest...
Package completed
>> Completed
The output from the 'psbuild' command when the .exe does not work:
C:\GIT\DG\hotfix_7.4.x\dgserver\hotfix\tools\services-stop>psbuild /PACKAGE "C:\GIT\tools\test.psproj.psbuild"
SAPIEN Package and Deploy Tool 4.1 (c) 2005 - 2018 SAPIEN Technologies, Inc.
------ Build started: test, Configuration: x64 ------
Packaging with SAPIEN PowerShell V5 Host (Command line) x64
Adding C:\GIT\tools\test.psproj
Writing scripts to bin\x64\test.exe
Embedding default manifest...
Package completed
It does seem obvious that the merging of the .ps1 files that contain required functions did not occur from the command line in the
same way that it did from the GUI.
Is my project missing a build option setting in order to get the command line to work for the same project file that works in PowerShell Studio?
Is there anything else that I might be doing wrong to cause this type of problem?
Your quick response would be very much appreciated.
-Regards