Tip: How to use Notepad++ with CS-Script PlugIn to Develop and Debug VB.NET Invoke Code Sequences

A longer time ago I presented the possibility how to use Notepad++ with CS-Script Plugin to Develop C# Invoke Code Sequences. The CS-Script Plugin supports C# directly, without any additional libraries. But the CS-Script Plugin supports also alternative compilers, like VBdotNET. Thus exactly the same approach is also suitable for the pre-development of VBdotNET sequences, which can then be transferred to the Invoke Code Activity on the same way.

Here the steps how to setup the environment:

  1. Download and install Notepad++.
  2. Install the CS-Script Plugin as I have described it here.
  3. Follow the step by step tutorial of CS-Script to build a library to use alternative compilers.
    Hint: You can find cscs.exe in the directory plugins\CSScriptNpp\CSScriptNpp of your Notepad++ installation.
  4. Copy the library CSSCodeProvider.v4.0.dll in the path plugins\CSScriptNpp\CSScriptNpp.
  5. Restart Notepad++

Now you can use Notepad++ also as development environment for VBdotNET.

The same thing I wrote for C# code applies here as well: This approach can be used to pre-develop VBdotNET Invoke Code activities. This makes it much easier to test your code, also because the behavior of the code can be explore with a debugger line by line. And this is a real advantage, that code sequences can be analyzed precisely.

You can find the script engine directives here, e.g. to reference to additional libraries.

As you can see in the following example, I use a frame in which the Invoke code sequence is embedded.


'//css_host /platform:x86

Imports System

Class UiPathFrame

  Public Shared Sub Main()

    '-Invoke Code Begin-------------------------------------------------

Console.WriteLine("Hello World from UiPath")

    '-Invoke Code End---------------------------------------------------

  End Sub

End Class


With this approach I can develop code sequences in C# or VBdotNET, test them and easily copy’n’paste them into the Invoke Code Activity.