Hi, for my project I have a powershell script that runs post build which combines a few different dll’s into a folder. This folder is what is needed to be uploaded to Octopus repository as a package. I’ve tried creating a nuget package out of the folder with no luck. So i’m now creating a zip folder. As far as i’m aware it’s possible to use Octo.exe to push the zip file to the Octopus repository, but i can’t get the code working out of powershell.
My guess is that this is a CMD script therefore is there a way of either getting the command to run in powershell or if i have to push it to a CMD command how do i do it so that the powershell variable $VersionDLL is correct and not null?
Is the powershell command Invoke-ASCmd correct before the Octo.exe?
I’m currently getting the error :
Invoke-ASCmd : A positional parameter cannot be found that accepts argument ‘Octo.exe’.
At C:\Users\sharrison\Desktop\Test\New-NuGetPackage.ps1:1 char:1
The below should work. If it doesn’t, I’m afraid the best thing would be to contact one of your teammates that’s skilled in Powershell to give you a hand. This is mostly a PS syntax error, and not an Octopus one. Kinda hard for me to troubleshoot if I don’t know the context on which you are executing this command. Someone that’s sitting next to you might solve this in 2 seconds
$Octoexe = "C:\tools\Octo.exe" #Put your own path here
& $Octoexe push --package ("MyPackage" + $VersionDLL + ".zip") --replace-existing --server http://myserver --apiKey API-#########