Command line for NuGet package creation

Hi Team

Wanted to check if one can generate NuGet package using command line interface. Any challenges or recommendations around using this approach



You can do with this

UiRobot.exe pack "C:\Path\To\Your\Project"

Or this

c:\Program Files (x84)\UiPath\Studio> UiRobot.exe -pack “C:\UiPath\Projects\Notepad\project.json” -o “destination file”

Then Click on enter

This command will create a NuGet package (a .nupkg file) in the specified folder

Refer this thread. For more details

Hope this helps

Cheers @Hope

1 Like

Hi @Hope ,
uirobot.exe “xaml path”
nuget.exe pack “nuspec file path”

Also the uipcli.exe can help:

I’m wondering if anyone experiencing following issue:

UiRobot.exe pack "C:\Users\******\project.json" -o "C:\Users\******\Documents\UiPath\library" #json{ Publish failed: The project 'C:\Users\******\project.json' could not be opened: Unable to properly unload Workflow Project. "ProjectPath": "C:\\Users\\******\\project.json" }#json

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.”


"C:\Program Files\UiPath\Studio\UiRobot.exe" pack "C:\Users\username\Documents\UiPath\MoveFileAfterDownload\project.json" --output "C:\Users\username\Documents\UiPath\RenameFile_StudioX"


"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:

"Project's next version number is $nextVersion"
$nextVersion = "1.0.7"
Write-host "##[section] Packing into .nuget"

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}
1 Like

@marian.platonov Thanks. I’m using the absolute path (I just want to encrypt my path in the reply). The command line was working properly util UiPath was upgrading to the latest version (2023.10 beta 14233), and I’m on the community license. Please let me know if you can reproduce the same issue on your side.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.