Getting Started

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


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:


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.

C:\lastest_build> Mobilize.PBNetMAP.ConversionTool.exe -i c:\pbprojects\testproject1 -o c:\pbprojects\converted
info: Migrator[0]
TC0001: Starting Composition Import
info: Migrator[0]
TC0003: Loading parts for category Rules
info: Migrator[0]
TC0005: Loading file ..\Rules\net461\Mobilize.Rules.PowerBuilderToCSharp.dll
HTMLGEN0004: Finish generating view w_main
info: Migrator[0]
[2020.02.21 16:14:06] Finish Generation of Migrated Code
info: Migrator[0]
[2020.02.21 16:14:06] Finish Migration

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:

C:\pbprojects\converted\MigratedSolution\testproject1Site\testproject1Site-angular> yarn install
arn install v1.13.0
[1/4] Resolving packages...
C:\pbprojects\converted\MigratedSolution\testproject1Site\testproject1Site-angular> ng build
Date: 2020-02-21T22:51:03.431Z
Hash: d9ed8a39693e87005cf1
Time: 73782ms
chunk {main} main.js, (main) 51.8 kB [initial] [rendered]
chunk {polyfills} polyfills.js, (polyfills) 384 kB [initial] [rendered]
chunk {polyfills-es5} polyfills-es5.js, (polyfills-es5) 463 kB [initial] [rendered]
chunk {runtime} runtime.js, (runtime) 6.08 kB [entry] [rendered]
chunk {scripts} scripts.js, (scripts) 86.1 kB [entry] [rendered]
chunk {styles} styles.js, (styles) 1.19 MB [initial] [rendered]
chunk {vendor} vendor.js, (vendor) 23.9 MB [initial] [rendered]

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