Converting solutions from Linx 5

Due to important changes that were introduced with Linx 6, solutions created in Linx 5 cannot merely be opened and saved with the Linx 6 Designer to convert them to Linx 6. The Linx converter has to be used for this purpose.

Key differences between Linx 5 and Linx 6

A Linx 5 solution is contained in one solution file, whereas a Linx 6 solution is saved to various files, including the main solution file, and all the relevant function, event, properties, type and settings files.

The Linx Converter application will create all the different files required by Linx 6.

Linx 6 handles nulls differently to Linx 5. Therefore, lists and objects that are initialized as null in Linx 5 will cause runtime errors when converted to Linx 6. See the Manual changes section for help on dealing with nulls.

Preparing for conversion

Prerequisites

  • A machine with .NET 4.8 and .NET 6 installed
  • Even though the converter may convert the solution successfully, it is a good idea to ensure that the Linx 5 source solution that you want to convert does not contain any validation errors.
  • Linx Designer/Server v6.3.0 or higher

Important

Before running the conversion, remove from your Linx 5 solution the plugins that cannot be converted from Linx 5 to Linx 6. See below for details.

What cannot be converted?

  1. Deprecated plugins cannot be converted:
    • AWS
    • Pastel
    • Web
  2. SignalR and Secret setting values will not be converted.
  3. Solutions containing obsolete functions and plugins will not be converted (with the exception of the items listed below). If possible, modify the Linx 5 solution to use the corresponding new plugin or function, e.g. if you make use of the Web plugin, change your solution to make use of the REST or SOAP plugins.
    • The following obsolete functions will be converted:
      • FileOperations
      • DirectoryOperations
  4. SetValue functions (usually in events) that do not set the root result ($.Result) will probably result in object reference errors. This is not just an event problem ($.Result.Data) and can also occur in functions.
  5. Solutions containing lists and objects that are initialized as null will compile successfully, but you will receive runtime errors (usually object reference errors).
Note
Functions with an empty result (no properties specified on the result) will be converted to a function with a None result type.

Download

Go here to download the converter.

Usage

convert.exe [options]

Example

convert.exe -l5 "c:\temp\mysolution.lsoz" -l6 "c:\temp\theoutputdir"

Options

  • -l5|--linx5SolutionFilePath
    Full file path to the Linx 5 solution.
  • -l6|--linx6SolutionDirectory
    Directory where the converted Linx 6 solution will be saved.
  • -log|--logFilePath
    Full file path to the log file.
  • -f|--force
    Allow saving the converted solution to a non-empty directory.
  • -c|--clear
    Clear the existing package cache and re-download all packages during the conversion.
  • -?|-h|--help
    Show help information.

Manual changes and improvements

  • Since it is now possible to specify a specific type as the result of a function, functions with a single property in the result type can be simplified by removing the single property and replacing it with a specific type result. [optional]
  • In Linx 5 web methods could implement the function without setting any return value - a default return object with status 200 was created for you. In Linx 6 this must either be manually set, i.e. $.Result.HttpContext.StatusCode, or objects must be returned through $.Result.Response200.[ObjectName].
  • In Linx 5 a blank field denoted an empty object. In Linx 6, when you drop an object into a function it defaults the value to {} (an empty instantiated object). When you delete these brackets you will have a null object. When you click on the details of the null object you will see that any subobjects will also have null as their value. Therefore, after converting, do the following:
    • if you want a null value, remove the {} brackets
    • if you want an empty instantiated object, keep the {} brackets
    • click on the details of an object to get an empty subobject for which you can then set property values.