Project cannot be published. Main file has validation errors

Hi! First of all, thank you for your help. I’m working with UiPath studio and my problem is that when I try to publish my project the system show me this message:

Project cannot be published. Main file has validation errors.

But when I execute in design or execute mode works fine without any error.

This are the logs
System.Exception: Project cannot be published. Main file has validation errors. —> System.Activities.InvalidWorkflowException: Main
at UiPath.Workflow.ViewModels.MainViewModel.CheckProjectForErrors()
at UiPath.Workflow.ViewModels.MainViewModel.PackAndPush()
— End of inner exception stack trace —

What I’m doing wrong?

could you please upload your workflow.

It’s a simple job to download a report from a web and move it to a folder, but I can’t upload the file because I’m a new user :frowning:
Can I send it by another way?

Well when you are publishing a project so is there any other files also exists in that project?

Suppose you have created a project name “Abc” and inside that created workflow1, workflow2 and so".

and if there is some eror in workflow1 and you are wants to publish and working on workflow 2 then it will not allow you to publish. it will publish project having all workflows inside it as with that package name. so make sure you are following such thing .

3 Likes

use dropbox/gdrive/ etc

Thank you for your quick response, in this case I have a project with a single sequence

Do you have single Main.xaml file or any other .xaml file in the same project folder?

Correct, there were several xaml files in the same folder. I moved the project file to another folder and now it works!
I have now a .nupkg file but when I try to execute it from the UiPath robot, the system returns this message:
“Invalid package. Project json file was not found”
I’ll appreciate very much your help

Because earlier Jason file had the all the metadata of all the xaml file within the folder .so could you please republish again and check .

2 Likes

Perfect! Thank you very much for your help

I was getting the same kind of error while publishing project… my issue also solved… this post helped me :slight_smile:

1 Like

I am getting following error when trying to publish a simple project

Project cannot be published. GetAppCredentials file has validation errors.

System.Exception: Project cannot be published. GetAppCredentials file has validation errors. —> System.Activities.InvalidWorkflowException: GetAppCredentials

at UiPath.Workflow.ViewModels.MainViewModel.CheckProjectForErrors()
at UiPath.Workflow.ViewModels.MainViewModel.PackAndPush()
— End of inner exception stack trace —

Please help me

Hi ANGLEZ,

Can you share and attached your poject .xaml file here.its useful to practice or reference as a example.

Thanks,
Pratap
+919959334687

No Way!!! This helps MASSIVE!!

all this is not working in my case - I am wondering what may be the issue…

After reinstallation - and even from the first myexperiences with UiPath I have notice many samples (original ones) were not working at all. Like my VS2017 interferes with it or Nvidia CUDnn ?

Hi,

Am facing the same issue where the following error keeps coming up.

Project cannot be published. ~Filtering rows file has validation errors.

System.Exception: Project cannot be published. ~Filtering rows file has validation errors. —> System.Activities.InvalidWorkflowException: ~Filtering rows
at UiPath.Workflow.ViewModels.MainViewModel.CheckProjectForErrors()
at UiPath.Workflow.ViewModels.MainViewModel.PackAndPush()
— End of inner exception stack trace —

The Filtering rows is an old sample example file which is not even in the folder in which my main xaml is present.

I have noticed one thing… The path of the file on the project pane is not the actual path of the main file.
The project pane in UiPath Studio shows the path as “C:\Users\Satin\Downloads”.
But the main file is actually present in “C:\Users\Satin\Downloads\Folderone\Foldertwo” and I have opened the file by navigating to that path. Filtering rows is not present in this folder.

Please help…
Satin

What exactly did you do to correct the error - I am still struggling.

Thanks in advance!

Hi,
I re-published the project and still I don’t have any .json file. Please help.

Thanks.