Conversion Process
Last updated
Last updated
In order to start with the conversion process, a license key is required. Either a trial version or a previously purchased license with a specific line code limit.
As soon as the conversion tool is open it will prompt for the license activation.
The next screen is going to ask for a solution file (Project written in C#) and the destination folder for the converted project.
Before the input solution file (“.sln”) and the output folder for the future converted project is selected, there are some options that the conversion tool offers.
The repository cache is a mechanism used to optimize the parsing process for subsequent conversions, this is intended to keep the latest un-cached source code version stored. This repository is generated on each un-cached new conversion, and it is used to maintain local references for the preprocessing of a new conversion that is using the same source code version.
In case that the source code gets updated to a new version, the cache must be deleted to ensure that the newest source code is used instead of currently cached version, this process can be done by selecting the "Delete source code cache" checkbox placed under the input solution file (“.sln”) in the initial conversion screen.
The first conversion of a solution always generates a cache. If a cache for a solution is not found it also generates a cache.
This cache can be found on %localappdata% / Mobilize.NET / CommonEF /repo.
There is a wrench looking button in the middle of the conversion tool that opens the advance options, which are divided in two sections:
General section:
In this section, the following options could be configured:
Start-up project: A specific project could be set as the start-up project in the converted project.
Custom conversion file: A config file could be given to modify the conversion tool behavior or to specify a project version.
2. Conversion results section:
In this section, the following options could be configured:
Conversion results: Generate only the angular project (Frontend) or both the frontend and the backend.
Target framework: Set the desired target framework (.NET Framework, .NET Core or .NET 6)
Angular project: Either generate the Angular project or not.
In the custom conversion file, the following options could be configured:
Excluded projects: The GUID’s for the projects that need to be excluded are added in this section.
Packages: The version for the DCP, HTMLGenerator, Visual Components, Weaving, WebMapExtension, CoreServices and VBUC Helpers projects could be specified.
Maps’ file path: A relative path for a folder with map files to be loaded by the conversion tool.
ByRef: Mechanism for dynamics to “refs”, where a wrapper for an instance of any type could be modified by reference, could be activated or deactivated.
Package sources: The feeds’ addresses for the conversion tool to download the necessary nuggets.
Componentized controls: The controls which inner content is going to be created as a separate component.
Here is an example of a custom conversion file:
The conversion tool will depend on the following projects:
WinForms DesktopCompatibilityPlatform (DCP)
WebMapExtension
HTMLGenerator
CoreServices
Visual Components
VBUC Helpers
Weaving
The conversion tool will run a set of tasks that when they are run together it will let the source code be converted to WebMap.
Some of the tasks the conversion tool is going to run are:
Initialize common properties related to the different projects in the source code.
Collect the information to be converted to observable classes (DCP Helpers).
Collect the information related to any “BackgroundWorker” if used in the original project.
Collect the information to resolve the visual control’s inheritance in the code to be converted into angular templates.
Generate the frontend (Angular)
Transform the source code to WebMap.
Generate the required projects and the solution with the collected and converted information.
When the conversion process is finished it will show a summary:
The log folder will contain the log file, which contains the different annotations and timestamps for the conversion process.
The output folder contains the converted code (C# and Angular) to be compiled. This folder has the following structure:
Solution file
A Lib folder, where the DLLs for the required libraries are.
A Log folder, where the log file is located.
A folder with the same name as the original project, where the backend and frontend files are.
A reports folder, where the assessment files are.
A stub folder, where all the stubbed controls are.