Provide the full (absolute) path of the project.json file, otherwise, you will receive an error as “The project ‘…\project.json’ could not be opened: Unable to properly unload Workflow Project.”
Example:
"C:\Program Files\UiPath\Studio\UiRobot.exe" pack "C:\Users\username\Documents\UiPath\MoveFileAfterDownload\project.json" --output "C:\Users\username\Documents\UiPath\RenameFile_StudioX"
or
"C:\Program Files\UiPath\Studio\UiPath.Studio.CommandLine.exe" publish --project-path "C:\Users\username\Documents\UiPath\MoveFileAfterDownload\project.json" --target Custom --feed "C:\Users\username\Documents\UiPath\MoveFileAfterDownload" --notes "Changes were made to the Excel package"
Create a nupkg from UiPath.Studio.CommandLine.exe:
Cls
"Project's next version number is $nextVersion"
$nextVersion = "1.0.7"
#Pack
Write-host "##[section] Packing into .nuget"
[System.Security.Principal.WindowsIdentity]::GetCurrent().Name
$env:Username
Invoke-Command - ScriptBlock{
$ProjectPath = "C:\Marian\PackageProject\project.json"
$Command = "C:\Program Files\UiPath\Studio\UiPath.Studio.CommandLine.exe"
$feed = "C:\Marian\PackageProject"
$Params = "publish --project-path $ProjectPath --target Custom --feed $feed --new-version $netVersion"
$Prms = $Parms.Split(" ")
&"$Command" $Prms}