Getting Started
This guide describes the basic steps involved in converting a small PowerBuilder project to a C#/Angular web application.

Requirements

This guide requires the following software packages:
The PBNet conversion tool is Windows executable. Get in touch with the team to get an appropriate build of the tool.
A simple migration could be performed using just the -i and -o command line arguments.
A PowerBuilder project is expected to be composed of a group of PB libraries (.PBL files) and assets such as images and configuration files. An important element to tie everything together is the target file (a .PBT file).
For example, say that the project to be converted is located in the path C:\pbprojects\testproject1 . For a very simple project the contents of this directory may have something like this:
    testproject1.pbl
    testproject1.pbt
    testproject1.pbw
    testproject1.usr.opt
This is a simple project that when executed shows a simple window like this:
The current version of the conversion tool must be executed from the command line. The current directory must be the directory where the tool Mobilize.PBNetMAP.ConversionTool.exe was copied. For example:
1
C:\lastest_build\>
Copied!
The -i command line argument is used to specify the path where the target file (testproject1.pbt) is located. The -o command line argument is used to specify the output directory . This path is going to have the converted C# project.
1
C:\lastest_build> Mobilize.PBNetMAP.ConversionTool.exe -i c:\pbprojects\testproject1 -o c:\pbprojects\converted
2
info: Migrator[0]
3
TC0001: Starting Composition Import
4
info: Migrator[0]
5
TC0003: Loading parts for category Rules
6
info: Migrator[0]
7
TC0005: Loading file ..\Rules\net461\Mobilize.Rules.PowerBuilderToCSharp.dll
8
...
9
...
10
...
11
HTMLGEN0004: Finish generating view w_main
12
info: Migrator[0]
13
[2020.02.21 16:14:06] Finish Generation of Migrated Code
14
info: Migrator[0]
15
[2020.02.21 16:14:06] Finish Migration
16
C:\lastest_build>
Copied!
While running, the conversion tool shows many internal execution messages.

The generated project

The output folder looks like this:
This output folder contains log files(ConversionTool.Log...txt), temporary migration folders (repository) and the generated C# solution in MigratedSolution.
The MigratedSolution contains one C# project (.CSPROJ) and directory per PowerBuilder library (.PBL) . Two additional projects are created for each migration:
    AllInterfaces.csproj contains interfaces for class definitions in all the libraries of the solution
    testproject1Site.csproj contains the website for the converted application.

Executing the converted project

Two steps need to be performed for executing the converted project.

1. Compile the frontend

The compilation of the frontend components need to be executed from the command line. First run the yarn install command to install all the required third party packages (including Angular, Kendo UI, etc). Then compile the code using ng build.
For example:
1
C:\pbprojects\converted\MigratedSolution\testproject1Site\testproject1Site-angular> yarn install
2
arn install v1.13.0
3
[1/4] Resolving packages...
4
...
5
...
6
...
7
Done.
8
C:\pbprojects\converted\MigratedSolution\testproject1Site\testproject1Site-angular> ng build
9
10
Date: 2020-02-21T22:51:03.431Z
11
Hash: d9ed8a39693e87005cf1
12
Time: 73782ms
13
chunk {main} main.js, main.js.map (main) 51.8 kB [initial] [rendered]
14
chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 384 kB [initial] [rendered]
15
chunk {polyfills-es5} polyfills-es5.js, polyfills-es5.js.map (polyfills-es5) 463 kB [initial] [rendered]
16
chunk {runtime} runtime.js, runtime.js.map (runtime) 6.08 kB [entry] [rendered]
17
chunk {scripts} scripts.js, scripts.js.map (scripts) 86.1 kB [entry] [rendered]
18
chunk {styles} styles.js, styles.js.map (styles) 1.19 MB [initial] [rendered]
19
chunk {vendor} vendor.js, vendor.js.map (vendor) 23.9 MB [initial] [rendered]
20
C:\pbprojects\converted\MigratedSolution\testproject1Site\testproject1Site-angular>
Copied!
Downloading the packages and compiling the code may take a couple of minutes depending on the size of your project.

2. Build and execute the converted solution

The server side code needs to be compiled using Visual Studio 2017 or above. The solution is located in MigratedSolution\MigratedSolution.sln .
Compile and execute this project and execute this project to get
Last modified 1yr ago