Error while trying to create Pack with uipath cli

I am getting below error while trying to create a package from uipcli package command. Anyone tried this before ?

C:\uipathcli\cli\tools>uipcli.exe package pack “C:\actions-runner_work\UiPath-CICD\UiPath-CICD\project.json” -o “C:\actions-runner_work\output” --autoVersion

Packing project(s) at path C:\actions-runner_work\UiPath-CICD\UiPath-CICD\project.json…
Detected schema version 4.0
Compiling…
Starting AssemblyCompilerHost process…
Object reference not set to an instance of an object.
Failed to run the command. UiPath.CommandLine.Exceptions.CommandException: Packaging failed due to one or more errors. Message : Object reference not set to an instance of an object. Error : at UiPath.Studio.AssemblyCompilerHost.Shared.Services.AssemblyCompilerHostServerAdapter.Dispose(Boolean disposing)
at UiPath.Studio.AssemblyCompilerHost.Shared.Services.AssemblyCompilerHostServerAdapter.Dispose()
at UiPath.Studio.AssemblyCompiler.Services.GeneratedAssembliesServiceProxy.RepairAllAssemblies(IWorkflowProjectModel project, String initiatedBy, IProgress1 progress, CancellationToken ct) at UiPath.Studio.ProjectPackager.ProjectPackagerHelper.<>c__DisplayClass1_0.<<GenerateCustomAssmeblies>b__0>d.MoveNext() --- End of stack trace from previous location --- at UiPath.Studio.ProjectPackager.ProjectPackagerHelper.GenerateCustomAssmeblies(IWorkflowProjectModel projectModel, ProjectPublishSettings settings, ILoadingFormService loadingFormService, IGeneratedAssembliesRepairService generatedAssembliesRepairService) at UiPath.Studio.ProjectPackager.Publish.Services.ProjectPublishProcessor.SetupAsync(IWorkflowProjectModel projectModel, ProjectPublishSettings settings) at UiPath.Studio.ProjectPackager.Publish.Services.ProcessPublishProcessor.SetupAsync(IWorkflowProjectModel projectModel, ProjectPublishSettings settings) at UiPath.Studio.ProjectPackager.Publish.Services.PublishService.PerformPrePackOperationsAsync(IWorkflowProjectModel projectModel, IPublishSettings settings) at UiPath.Studio.ProjectPackager.Packager.Services.ProjectPackagerService.PrePackAsync(IPackagerHelperService packagerHelper, IWorkflowProject workflowProject, IPublishSettings publishSettings, IReadOnlyCollection1 dependencies)
at UiPath.Studio.ProjectPackager.Packager.Services.ProjectPackagerService.PackProjectExternal(String projectPath, UpdateProjectVersionEnum updateProjectVersion, PublishSettings publishSettings, IProgress1 progress, Action1 logEvent, List`1 packageSources, String destinationFolder, CancellationToken cancellationToken)
Details…
Message: Error :
at UiPath.CommandLine.Services.Impl.PackService.PackProject(String projectPath, ProjectVersion currentVersion, String destinationFolder, PublishSettings settings

@mehakarkarog Facing the same issue. Were you able to find a solution?

The error:

Unexpected error has occurred during the library compilation process:
Exception has been thrown by the target of an invocation.uipcli Error: 0 : Unexpected error has occurred during the library compilation process:
Exception has been thrown by the target of an invocation.

Compilation failed or was cancelled.
Compilation failed or was cancelled.
Failed to run the command. UiPath.CommandLine.Exceptions.CommandException: Packaging failed due to one or more errors. Message : Compilation failed or was cancelled. Error : at UiPath.Studio.ProjectPackager.Publish.Services.PublishService.PerformPrePackOperationsAsync(IWorkflowProjectModel projectModel, IPublishSettings settings)
at UiPath.Studio.ProjectPackager.Packager.Services.ProjectPackagerService.PrePackAsync(IPackagerHelperService packagerHelper, IWorkflowProject workflowProject, IPublishSettings publishSettings, IReadOnlyCollection1 dependencies) at UiPath.Studio.ProjectPackager.Packager.Services.ProjectPackagerService.PackProjectExternal(String projectPath, UpdateProjectVersionEnum updateProjectVersion, PublishSettings publishSettings, IProgress1 progress, Action1 logEvent, List1 packageSources, String destinationFolder, CancellationToken cancellationToken)
Details…
Message: Error :
at UiPath.CommandLine.Services.Impl.PackService.PackProject(String projectPath, ProjectVersion currentVersion, String destinationFolder, PublishSettings settings)
##[error]Error packaging project: Error: The process ‘C:\Program Files\dotnet\dotnet.exe’ failed with exit code 1

Same with me.
@mehakarkarog - any news / workaround on your end?

  • 1 we are also facing the same issue

Hello @mehakarkarog , We are facing the same issue, did anyone find a solution for this?

@UiPath_Community

Hi @Vaishnavi_Yadati I’m also facing the same issue . Any solutions if you know pls help …thanks

@UiPath_Community kindly help how to overcome this error .

I was getting a slightly different error and my pipeline compilation was failing.
CLI package used: UiPath.CLI.Windows.23.10.8753.32995
My PowerShell command that i ran :
CD C:\UiPath.CLI.Windows.23.10.8753.32995\tools
.\uipcli.exe package pack “C:<ProjectName>\project.json” -o “C:<Package_Path>” --outputType Process -v “1.0.1”
Error I got :
Begin dependencies restore for .
Finished dependencies restore for .Compiling…
Value cannot be null. (Parameter ‘version’)Failed to run the command. UiPath.CommandLine.Exceptions.CommandException: Packaging failed due to one or more errors. Message : Value cannot be null. (Parameter ‘version’) Error : at UiPath.NuGet.Package…ctor(String id, String version)
at UiPath.Studio.ProjectPackager.Standalone.ProjectDependenciesProviderStandalone.<>c.b__4_1(ValueTuple3 d) at System.Linq.Enumerable.SelectListIterator2.MoveNext()

Resolution: I extracted latest version of UiPath.CLI.Windows 23.10.8894.39673 from https://uipath.visualstudio.com/Public.Feeds/_artifacts/feed/UiPath-Official
and unzipped to C:
My PowerShell command that i ran :
CD C:\UiPath.CLI.Windows.23.10.8894.39673
.\uipcli.exe package pack “C:<ProjectName>\project.json” -o “C:<Package_Path>” --outputType Process -v “1.0.1”

And the package was compiled and found in C:<Package_Path>