Transition to Reactive Extensions version 3.1.1
In version 5.2, the SyrveFront application transitioned to using the Reactive Extensions library (hereinafter Rx) version 3.1.1 instead of the previous version 2.2.5. This may affect the operation of plugins that used the previous version of Rx.
The libraries used within SyrveFront are implementation details and are formally unrelated to the public API, except for two points:
- the V3 API used the type
System.Reactive.Unitfrom theSystem.Reactive.Core.dlllibrary version 2.2.5, meaning the currently fixed version of the V3 API is tightly bound to Rx 2.2.5; - the plugins
SamplePluginandCustomerScreenPluginused Rx but did not publish the corresponding libraries in the build output folder, so plugin developers, following these examples, could do the same, effectively causing the plugins to implicitly use the Rx libraries from the SyrveFront application folder.
Binding the V3 API to Rx was a mistake. Starting from V4, the API’s dependency on Rx has been removed, and the type Resto.Front.Api.V4.VoidValue is used instead of System.Reactive.Unit. To ensure backward compatibility with V3, two libraries from Rx 2.2.5 — System.Reactive.Core.dll and System.Reactive.Interfaces.dll — have been retained (the first contains the type System.Reactive.Unit and references the second), and they will be loaded into memory automatically if needed.
After updating the SyrveFront application with a previously installed plugin to version 5.2, the following errors may start to occur in the plugin’s operation:
System.IO.FileNotFoundException: Could not load file or assembly ‘System.Reactive.Core, Version=2.2.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35’ or one of its dependencies. The system cannot find the file specified.
In this case, the plugin’s functionality can be restored by installing the missing files in the plugin folder. Since all SDK versions prior to 5.2 contained the same version of Rx 2.2.5, the missing files can be taken from any old SDK version. These files can also be taken from the folder where the SyrveFront application was installed before it was updated to 5.2. If the update is already installed and the Rx libraries have been overwritten with version 3.1.1, older versions of the files can be found online. For example, the System.Reactive.Core.dll library can be obtained by downloading and unpacking the nuget package Rx-Core, which is a regular zip archive containing lib/net40/System.Reactive.Core.dll.
When developing a new plugin, it should be ensured that all libraries used by the plugin and not part of the API are installed in the plugin folder. Although for V3, installing the plugin directly in the Plugins folder is allowed, to avoid conflicts with dependencies of other plugins, it is recommended to install it in a subfolder.