sdk
latest
false
UiPath logo, featuring letters U and I in white

Developer Guide

Last updated Oct 25, 2024

Understanding the Activity Project Structure

The UiPath activities template for Visual Studio serves as a starting point for creating custom activities. Base your activities on this template and modify it to suit your needs. The template generates an activity scaffold called ActivityTemplate which contains all the necessary building blocks of a fully functional activity in UiPath Studio.

An activity solution based on this template contains three projects:

  • UiPath.Activities.Template - This project contains the activity logic, design, and metadata. The project contains the following:
    • ActivityTemplate.cs - The code file for the logic of the activity. Add the code to the body of the public void ExecuteInternal() function.
    • ViewModels - A folder containing the files that define the design of the activity. ViewModel is a concept used by UiPath activities to describe how they should be displayed in Studio (which properties to display, what input to accept, etc). Placing all the ViewModel files in this folder helps you keep track of them more easily.

      With ViewModel, the UI of activities is generated in a descriptive way. The UI element displayed in Studio is determined based on the selected input type of a property. For example, for properties with the input type bool an On/Off toggle is displayed, while for enum properties, a dropdown menu is displayed. For more information, see Writing the activity code.
    • Resources folder - Resources used by the activity, such as the icon, the activity metadata, and an RESX file that stores localized strings used by the activity (activity name, description, property labels and tooltips, etc.).
  • UiPath.Activities.Template.Packaging - This project create the NuGet package for the activity whenever the solution is built. For more information, see Building the solution and creating the NuGet package.
  • UiPath.Activities.Template.Tests - This is a testing project that contains unit and workflow tests. For more information, see Testing your activity.


Was this page helpful?

Get The Help You Need
Learning RPA - Automation Courses
UiPath Community Forum
Uipath Logo White
Trust and Security
© 2005-2024 UiPath. All rights reserved.