Add class to a Custom Created Library Visual Studio

Hello,

How to add a custom class to a Visual Studio created Custom Activity Library.

The Full explanation is below:

I am using the Custom activity Visual Studio Extension to create a library.

However, as this library is fairly extensive, I would like to create it with some Unit Testing features to expedite testing/development

My issue starts when I tried to test the asynchronous activities generated by the extensions (failed miserably)

The workaround to the complications of asynchronous unit testing was creating a supporting class project with the actually needed logic as methods and invoking them at the activity Library.

In VS code works fine but when I pack my project and upload it to Uipath to test it, I receive an error saying that this particular support class created is missing.

Returning to the original question, would anyone know how to add any created class to the custom-created library?

Hi
I have many custom libraries or custom projects included in activity creator projects.
Try to double click on .Activities.Design project and check if every dependency is properly included. For my custom project i added line here:

<ItemGroup>
    <ProjectReference Include="..\Analyzer\Analyzer.csproj" PrivateAssets="All" />
    <ProjectReference Include="..\OfficeSamurai.Standard.Activities\OfficeSamurai.Standard.Activities.csproj" PrivateAssets="All" />
  </ItemGroup>

It should work with PrivateAssets=β€œAll”
I also recommend to check community activities repository on github: GitHub - UiPath/Community.Activities: Repository of Windows Workflow Foundation Activities for UiPath Community
Some projects have implemented unit tests and we can learn many things analyzing this solution

Best Regards,
Konrad

1 Like

Thank you! It worked!

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