Problem when analyzing project with CLI

Hello,
I want to automate Analyze on all my team’s projects.
I tried this command in powershell :

Invoke-Expression "$Cli analyze -p $Project -c $Config"

where :

$Cli="C:\'Program Files'\UiPath\Studio\UiPath.Studio.CommandLine.exe"
$Project="[pathToProject]/project.json"
$Config="[pathToConfigFile]\uipath.policies.cible.config"

I get this error :

The project ‘./project.json’ could not be opened: An exception was thrown while activating UiPath.Studio.Plugin.Workflow.Project.DevelopmentProjectModel…

What can I do?
Thanks for your help,
Thomas

Have you tested with a backward slash instead?

$Project="[pathToProject]\project.json"

Yes, this does not change the result.
I also tried running the script as an Administrator, without success.

If you run the command below, what is the output? Can you see if the full path is included?

echo "$Cli analyze -p $Project -c $Config"

OK, your comment helped me solve my problem. I was doing a “cd” in the folder containing the project.json file before running the analyzer.
But this wasn’t the good way, I must specify the full path in the command.
Thanks!

You are welcome! Nice to hear that you managed to figure out the issue.

1 Like

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