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:
- Reinstalled UiPath Studio: I’m using version
24.10.7. - Updated NuGet Packages: Dependencies include:
System.Activities.Api: 24.10.1System.Activities.ViewModels: 1.0.0-20241118.2UiPath.Workflow: 6.0.0-20220909-01
- Cleared
.nugetDirectory: Removed old dependencies. - Reinstalled .NET SDK: Using
.NET 6.0. - Modified Main.xaml: Explicitly defined
FactoryMethodand addedArgumentsin the XAML. - 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!