I cannot find UiPath.Studio.Constants

I would like to reference a file in my project and wish to use the project location to create the filepath like: FilePath = UiPath.Constants.Project.Location + “filename.xml”

However I get this error:
Test_bench_for_ARB_getting_acc45_and_18: Could not load file or assembly ‘UiPath.Studio.Constants, Version=1.2.2.0, Culture=neutral, PublicKeyToken=null’. The system cannot find the file specified.

I tried to find the relevant namespace to add it to the project, but have not succeeded.

Anyone know how to get around this, please?

Hi @Phillip_Duncan

Use Environment.CurrentDirectory + "\filename.xml" to get the full path of a file inside your project folder.

UiPath.Constants.Project.Location is not a valid reference in UiPath.

If you found helpful please mark as a solution. Thanks
Happy Automation with UiPath

1 Like

@Phillip_Duncan,

Environment.CurrentDirectory will give you the project running folder but you can use relative path also like this:

1 Like

Hi @Phillip_Duncan

Please help me understand why are you trying to use UiPath.project.constants?

Exactly where you are trying to save the file?

I have to type the xml file’s full path into a ‘File Open’ dialogue which comes up when I load a new report definition file in an application which knows nothing about the UiPath project which is automating the process.

So, it’s not a save operation, it’s opening a file which is used to run a database query.

1 Like

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