Thanks for getting in touch! Sorry to hear you’re hitting this unexpected issue. I’ve seen this exact thing in the past, but for the life of me I can’t spot it though I’m pretty sure this bug has been fixed. I haven’t been able to reproduce this in my local instance (running 2019.8.4); can you let me know which version you’re currently on? If you’re still hitting this issue, can you send a screenshot showing where and when you’re hitting this?
We have a package in zip format created with this command: dotnet octo pack --id="MyInstaller" --basePath="./src" --include="MyInstaller.exe" --include="install.ps1" --outFolder="./artifacts" --format="zip"
install.ps1 is just a simple wrapper that calls the embedded .exe:
When we use the template from the RUN button under Library/Step Templates, we get this error almost immediately (it does not seem long enough for the package to have copied to the target)
Thanks for keeping in touch! When running this step template on its own, it doesn’t actually deploy the package. If you had a package step that deployed the package, this step template running afterwards in the same process should then pick up this script file from that previously deployed package.
I’ve seen it accomplished (having the script in a package run directly from the step template, outside of the deployment process) in another way by instead referencing the package (by uploading and extracting) and executing the PowerShell script from an inline PS script in the step template. Something like the below:
Thanks for the workaround. I’ll try this later today.
I’m still curious when is it appropriate to use the “Script File in Package” option. If the package is not deployed within the context of the step template (and we dont yet have composite step templates) why does the option exist at all? If it requires a companion step in a project to deploy the package wouldn’t an additional script step in that project be a better option?