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.
License activation screen.
The next screen is going to ask for a solution file (Project written in C#) and the destination folder for the converted project.
Main conversion tool screen.
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:
- 1.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:
<?xml version="1.0" encoding="utf-8"?>
<project name="unknown" category="legacy-helper">2A0D89E4-4A6F-4D8B-BC9B-E56246DEE6D8</project>
<project name="unknown" category="legacy-helper">0115609E-6AF3-4B02-A2B7-51E47841E41C</project>
<package id="Mobilize.Web.BundleBasic.All" version="6.3.1-rc0006" />
<package id="winforms-components" version="7.1.4" />
<package id="Mobilize.HtmlGenerator.WFNet.All" version="5.2.20" depth="1" />
<package id="Mobilize.Weaving.WebMapExtensions.All" version="7.0.33" />
<package id="Mobilize.Weaving" version="2.0.4" />
<package id="Mobilize.WebMap.CoreServices.All" version="7.0.35" />
<package id="Mobilize.VBUC.Helpers.All" version="9.1.3" />
<path value="Maps" />
<!--ByRef param: Off or ByRefWithDynamic-->
<param id="ByRef" value="ByRefWithDynamic" />
<!--StubFilter param: path\StubFilter.xml-->
<param id="StubFilter" value="" />
<style path="node_modules/@progress/kendo-theme-default/dist/all.css" />
<style path="node_modules/@mobilize/winforms-components/style-min/styles.css" />
<style path="node_modules/@mobilize/winforms-components/style-min/jQueryStyles.css" />
<style path="node_modules/material-icons/iconfont/material-icons.css" />
<style path="src/styles.css" />
<package-source key="public" value="https://packages.mobilize.net/nuget/mobilizenet-nuget/v3/index.json" />
<control id="System.Windows.Forms.TabPage" />
<include all="true" />
The conversion tool will depend on the following projects:
WinForms DesktopCompatibilityPlatform (DCP)
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.
Conversion finished screen
When the conversion process is finished it will show a summary:
Conversion completed screen
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.