Help Needed: Error "No matching constructor found on type 'System.Activities.Activity'" While Creating Custom Activity

Hi Everyone,

I’m following the UiPath SDK Developer Guide to create a custom activity in code, but I’m encountering an error during library compilation:

Unexpected error has occurred during the library compilation process:
Unable to create activity builder for Main.xaml.
Reason was ‘No matching constructor found on type ‘System.Activities.Activity’.
You can use the Arguments or FactoryMethod directives to construct this type.
No default constructor found for type ‘System.Activities.Activity’.
You can use the Arguments or FactoryMethod directives to construct this type.’.

Troubleshooting Steps Taken

Here’s what I’ve tried so far to resolve this issue:

  1. Reinstalled UiPath Studio: I’m using version 24.10.7.
  2. Updated NuGet Packages: Dependencies include:
    • System.Activities.Api : 24.10.1
    • System.Activities.ViewModels: 1.0.0-20241118.2
    • UiPath.Workflow: 6.0.0-20220909-01
  3. Cleared .nuget Directory: Removed old dependencies.
  4. Reinstalled .NET SDK: Using .NET 6.0.
  5. Modified Main.xaml: Explicitly defined FactoryMethod and added Arguments in the XAML.
  6. Tested Example Project: Even the unmodified example from GitHub gives me the same error.

Environment Details

  • UiPath Studio Version: 24.10.7 - Enterprise
  • .NET Runtime: .NET 6.0
  • Module Dependencies: Listed above

Despite these efforts, the error persists.

I know this issue has been raised multiple times on the forms, but none of the suggested resolutions have worked for me.

Any help would be greatly appreciated!

Thank you, and have a great day!