.NET+ protocol

The VuGen .NET+ (DotNetPlus) protocol is used to create scripts that emulate users of Microsoft .NET client applications created in .NET 6.

.NET+ protocol overview

.NET+ Vuser scripts are coded manually in C#. There is no recording option.

The .NET+ protocol enables you to load test by replaying the application’s method calls.


Although .NET-based and Java protocols support creating threads, we recommend that you do not use background threads in real load testing scenarios because:

  • Threads can degrade tests scalability.

  • Threads can affect performance measurements.

  • The utility functions' behavior is undetermined if called from any thread except the Vuser main thread which runs the vuser_init, Action, and vuser_end actions. This applies to all functions named lr*.

Back to top

Manually create a .NET+ script

You can manually code .NET+ scripts in the VuGen editor, or from Visual Studio.

For information on creating and coding scripts, see Code a .NET script.

For information on editing in Visual Studio, see Create and view Vuser Scripts in Visual Studio.

Note: The following restrictions currently apply for .NET+ scripts:

  • There are no Visual Studio add-ins or templates.

  • Breakpoints and step-by-step mode are not supported.

To manually create and edit a .NET+ script:

  1. Prerequisites:

    • Download and install the Microsoft .NET 6 SDK. During replay, the installed .NET 6 SDK is identified using internal logic.

    • If you are using Visual Studio, make sure a supported version is installed. For details, see the Supported Protocols.

  2. In VuGen, in the Create a New Script dialog box, open a new .NET+ script.

  3. Open the Runtime Settings window and define the settings for your script. Use the following pages to define how to work with .NET+ at runtime:

    • Dotnet Settings. Provide the path to any additional build parameters you want to use. If you want to use an alternative .NET SDK, specify the path to the SDK executable.

    • Package References. Add NuGet packages for referenced DLLs.

    • Local References. Add local referenced DLLs.

    • Shared Libraries. Add paths to shared libraries for referenced DLLs that are not copied locally.


    • You can add COM reference dependencies from Visual Studio only, not from VuGen Runtime Settings.

    • Script replay is supported on 32 and 64-bit. For 64-bit, in Runtime Settings > Miscellaneous, select Replay script with 64-bit.

  4. Insert your code into the script. .NET+ supports all the .NET functions. For details, see the Function Reference (select the relevant version).

    Tip: To open and edit the script in Visual Studio, click the button on the toolbar.

    You can include methods returning a dataset, data table, or data reader action, and VuGen generates a grid for displaying the data. For details, see View data sets and grids.

Back to top

Replay limitations

The following limitations apply for replay of a .NET+ Vuser script:

  • Exceptions in .NET+ scripts generated by vts functions, may cause the replay to abort, even when the Continue on error runtime setting is enabled.
    Workaround: Use try and catch statements for error handling of the vts functions.
  • .NET+ scripts that contain UI objects can behave unexpectedly during replay in VuGen, Controller, or on a load generator machine.

Back to top

See also: