Skip to content

Add rpa common pitfall with pkgs that end up in proj folder#77

Open
AdiNicuPopa wants to merge 4 commits intomainfrom
fix/rpa-common-pitfalls-project-deps-in-project-folder
Open

Add rpa common pitfall with pkgs that end up in proj folder#77
AdiNicuPopa wants to merge 4 commits intomainfrom
fix/rpa-common-pitfalls-project-deps-in-project-folder

Conversation

@AdiNicuPopa
Copy link
Copy Markdown

@AdiNicuPopa AdiNicuPopa commented Mar 26, 2026

We noticed this while testing the PDF activities.

Problem: uip rpa restore without --destination-path dumps all NuGet packages into the project root
Fix: Always pass --destination-path (e.g., {projectRoot}/.local/packages) to keep packages out of the project directory

UPDATE: fixing more issues
Issue 1: Studio caches validation results and get-errors might miss some errors.
Fix: updated skills/uipath-rpa-workflows/references/validation-and-fixing.md

Issue 2: presence of .Item elements may cause "None of the overload groups have all their required/optional activity arguments configured" errors.
Fix: updated skills/uipath-rpa-workflows/references/common-pitfalls.md and skills/uipath-rpa-workflows/SKILL.md

Issue 3: agent created workflows in subfolders and named them x:Class="Subfolder.WorkflowName"; this caused a runtime error because of the dot. Correct version is x:Class="Subfolder_WorkflowName"
Fix: added a note in xaml-basics-and-rules.md, under the XAML File Anatomy section

- Use LINQ with explicit conversion: `dtData.AsEnumerable().Where(Function(row) CDbl(row("Amount")) > 1000).CopyToDataTable()`
- Convert the column type after reading: loop through rows and convert values, or clone the DataTable with the correct column types

### `uip rpa restore` dumps .nupkg files into the project directory
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aoltean16 shouldn't we rather fail without a destination path? And instruct it like this in there.

I feel like adding this would pollute the skill.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done, removed

Comment on lines +63 to +73
### Stale Validation Cache

Studio may cache validation results internally. If `get-errors` reports persistent errors after multiple edits to the same file — especially OverloadGroup errors that should be resolved by your changes — the cache may be stale. To clear it:

```bash
uip rpa close-project --project-dir "<PROJECT_DIR>" --format json
uip rpa open-project --project-dir "<PROJECT_DIR>" --format json
```

Then re-run `get-errors`. This forces Studio to reload all files from disk and revalidate from scratch.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We shouldn't do this: closing and reopening studio for every "get errors" isn't a solution.

Also, this has been fixed at the get-errors-command-level. It should now return the freshest errors if you fetch the latest Studio version.

So we should be okay to revert this section.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done, removed

Comment on lines +502 to +519
### `uip rpa restore` dumps .nupkg files into the project directory

When calling `uip rpa restore` without `--destination-path`, the command restores NuGet packages directly into the project root directory, polluting it with hundreds of `.nupkg` files. These are cached package files, not project artifacts, and should not be there.

**Always specify `--destination-path`** pointing to a location outside the project directory:

```bash
# Correct — restore to a temp/cache directory
uip rpa restore --project-path "{projectRoot}" --destination-path "{projectRoot}/.local/packages" --format json

# Wrong — packages end up in project root
uip rpa restore --project-path "{projectRoot}" --format json
```

If you already have `.nupkg` files littering the project root, clean them up:
```bash
rm "{projectRoot}"/*.nupkg
```
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same for this -- this looks more like something that should be addressed through the command's business logic itself rather than have the model deal with these.

Let's revert this section and open a PR or a Jira to track this change. It should default the package restore dump path to where Studio usually does too.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done, removed

Comment on lines +58 to +59
| PDF activities (ReadPDFText, GetPDFPageCount, ExtractPDFPageRange, ManagePDFPassword, ExportPDFPageAsImage, ExtractImagesFromPDF, ReadXPSText) | `FileName` (string) | `ResourceFile` (IResource) | — |
| PDF convert activities (ConvertHtmlToPDF, ConvertTextToPDF) | `FileName` (string, when InputMode=File) | `ResourceFile` (IResource, when InputMode=File) | `Html`/`Text` (string, when InputMode=Content) |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is another table below that handles conditional properties ## Conditional Property Requirements

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moved the conditional properties

Comment on lines +327 to +328
**IMPORTANT — `.Item` child elements:** The default XAML returned by this command may contain `.Item` child elements with `ItemArgument` nodes (e.g., `<activity:SomeActivity.Item><upap:ItemArgument .../></activity:SomeActivity.Item>`). These are internal scaffolding for OverloadGroup (FileName/ResourceFile) switching. **Do NOT copy `.Item` children into your generated XAML.** Instead, set the desired property (e.g., `FileName`) directly on the activity element and omit the `.Item` child. Studio auto-generates the internal structure when it loads the workflow. Including a misconfigured `.Item` child causes `"None of the overload groups have all their required/optional activity arguments configured"` errors. See [common-pitfalls.md](./references/common-pitfalls.md) for details.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is almost the same as the common-pitfalls.md text. Keep just a reference here

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@AdiNicuPopa AdiNicuPopa force-pushed the fix/rpa-common-pitfalls-project-deps-in-project-folder branch from 801e4de to de8cc6a Compare March 31, 2026 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants