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:
Visual Studio 2017 or 2019
.NET Framework 4.6.1
.NET Core 2.2 SDK
NodeJS 12.9.* (https://nodejs.org/en/)
Angular-CLI (https://cli.angular.io/)
Yarn (https://yarnpkg.com/)
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.
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 solutiontestproject1Site.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:
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 updated