Tip: Develop Your Own Custom Activity with CShell

In the last days I developed my own custom activity for UiPath. But before I asked myself, is the using of Microsoft Visual Studio, as described here, absolut necessary to do that? In my opinion it is not necessary.

To execute UiPath Studio you must install the Microsoft dotNET Framework. The dotNET Framework contains the C# compiler csc.exe and that is the first component you need. To code your own custom activity you can use CShell. CShell is an interactive C# scripting environment. It allows you to use C# in a read-eval-print-loop (REPL) environment. Your code is directly evaluated and executed in a shell window, no separate executable has to be compiled and then run in a different process. On this way I developed and tested my custom activity.

Then I embedded my code into the UiPath template of the custom activity and compile it via csc.exe command line to create the library. All works well and without problems. With CShell you can develop C# programs easily, it offers code completion and it is all in all very handy. If you are an “occasion” custom activity developer like me, CShell is worth a look.

Addendum 16.04.2022
CShell bases on dotNET 4.5 and was last updated in 2014. From this perspective, it only supports Windows legacy compatibility mode. This is certainly not a problem for many use cases, but it should be considered.

12 Likes