Skip to main content

Assembly Updates

Given the nature of development, updates are inevitable—whether for bug fixes, performance improvements, feature enhancements, or changes to the set of supported calculations. gSharp is designed to support these updates with minimal disruption, ensuring smooth and continuous operation of your scheduled calculations.

Dynamic Updates​

Updating calculations primarily involves re-registering a new version of the corresponding .NET assembly. The gSharp scheduler supports re-registration of individual assemblies without interrupting the execution of others. While the nature of .NET assembly loading means that some level of disruption to the updated assembly is unavoidable, such updates typically have no impact on the operation of other registered assemblies.

Version Number​

As with all software development, updating the version number when any change is made is key to understanding what you're working with. By changing the version number you can be sure that you have the correct assembly in place, both in the Assembly Registration dialog and also in the gSharp Administration app.

To change the version number of your GSharpTankDemo assembly, double-click the GSharpTankDemo project in the Visual Studio Solution Explorer to open the project file.

Visual Studio Solution Explorer showing the assembly projects, with the mouse pointer hovering over the GSharpTankDemo project

Change the <FileVersion> tag in the project file. You can also change the <AssemblyVersion> tag if you so desire, but only the file version will be reflected in the gSharp logs and the user interface of the Administration app.

    <FileVersion>1.1.0.0</FileVersion>

Save the project file and rebuild.

Re-registering Assemblies​

To update an assembly, modify the source code as needed and then follow the same steps used to debug, build, and test the assembly. Once the updated assembly is ready, re-register it using the process outlined in Initial Registration.

The Assembly Registration dialog of the gSharp Administration app showing the updated assembly

As shown above, the Assembly Registration dialog reflects the new version of the assembly, and that it is an upgrade. If you haven't changed the version number, the dialog will indicate that it's a replacement.

Update Process​

When the OK button is clicked in the Register Assembly dialog, the gSharp scheduler performs the following steps:

  • Stops the currently running version of the assembly.
  • Creates an internal copy of the new version of the assembly, along with any associated support resource files.
  • Registers the assembly internally.
  • Starts the new version of the assembly.

This process is typically quick, but the duration may vary depending on factors such as the number of modules within the assembly, the number of defined contexts, the server’s processing power, and the speed of the connection to the real-time data server.

Incompatible Updates​

If an update removes a module or a point within a module, gSharp will not automatically delete these elements from its internal database. Instead, they are marked as orphaned and displayed as greyed out and hashed. The following example shows the updated TankVolume module with the Direction point removed:

The Module view of the Administration app showing orphaned points

These orphaned items are preserved deliberately so users can either delete them manually or investigate whether their removal was a mistake. If the removal was unintentional (for example, a class was mistakenly marked as internal), the point data and context definitions remain intact. Re-correcting the issue and re-registering the assembly will restore the items without any data loss.

If the removal was intentional, orphaned points or modules can be permanently deleted using the trash can icon next to each item.

Important

Renaming a module or point has the same effect as deleting the original and adding a new one. Currently, gSharp does not support rename detection.