An open API service indexing awesome lists of open source software.

https://github.com/MobilizeNet/SKSWinForms_VBNET

Salmon King Seafood (SKS) Reference App to show some of the features of the Visual Basic Upgrade Companion tool from Mobilize.NET to migrate code from VB6 to .NET.
https://github.com/MobilizeNet/SKSWinForms_VBNET

vb6-to-vbnet vbmigration vbnet winforms

Last synced: 11 months ago
JSON representation

Salmon King Seafood (SKS) Reference App to show some of the features of the Visual Basic Upgrade Companion tool from Mobilize.NET to migrate code from VB6 to .NET.

Awesome Lists containing this project

README

          

# Salmon King Seafood migration tutorial

> NOTE: If you download this code as zip. You might need to unblock the files. To do that you can right click on a file (for example frmAbout.resX) and select unblock or you can open a `powershell` command line, go to folder where you downloaded these files and execute `Get-ChildItem . | Unblock-File`

> NOTE: this demo uses SQLite. You might need to install the [SQLite ODBC Driver](http://www.ch-werner.de/sqliteodbc/)

![SKS](/assets/SKS.PNG)

## VB6 to WinForms VB.NET

### **VBUC** - Visual Basic Upgrade Companion

![](/assets/VBUC-logo.webp)

VBUC is a [Mobilize.net](https://www.mobilize.net/) product capable of VB6 to VB.NET or WinForms migrations. For more information about this product click [here](https://www.mobilize.net/vbuc-free-trial).

To migrate SKS follow the next steps

#### 1. Create a new VBUC project

Start the VBUC desktop app and click the new project icon.

![](/assets//NewProject.PNG)

Next, choose a proper project name and set the source directory where the VB6 project file `SKS.vbp` is located. Then, set the output directory for your migration.

![](/assets//NewProjectSKS.png)

#### 2. Resolve References
Sometimes there might be some unresolved references that the VBUC can not resolve by itself, so they have to be set manually by right clicking it and selecting the option `Set Reference Manually`.

![](/assets//ResolveReferences.PNG)

If you are having a hard time looking for unresolved references, take a look a our [TLB Github Repo](https://github.com/orellabac/TLBRepo.git). The reference you are looking for might be there.

#### 3. Upgrade Options

Choose and confirm the upgrade options for your project. For SKS demo use default options.

![](/assets//UpgradeOptions.PNG)

#### 4. Upgrade Process

Before starting the upgrade, choose the target `ASP.NET` framework version and choose how you want to include our code helpers in the migrated app, for SKS demo use `.NET framework 4.7` and `Binary Helpers Integration` option.

![](/assets//UpgradeOutput.PNG)

Next, start the migration by clicking `Upgrade Projects` and wait for the process to end.

![](/assets//AfterMigration.PNG)

After the process ends, open your migrated solution and compile your app.

#### 5. Resolve migration conflicts

Finally, move the file `Orders.db` in the SKS_VB6 directory to the `bin` directory in the migration output directory. Also, create an `App.config` in the migrated solution and add the following to it.

``` xml





















```

This will set the default database driver that the SKS WinForms application will use in run time.

#### 6. Running the migrated app

Run the new WinForms version of SKS.

![](/assets/SKS.png)

## WinForms to Web

### WebMAP

![](/assets/WebMAP.png)

WebMAP is a [Mobilize.net](https://www.mobilize.net/) product capable of migrating WinForms apps to .NET core and Angular. For more information about this product click [here](https://www.mobilize.net/webmap).

#### 1. Prerequisites

* Contact [Mobilize.net](https://www.mobilize.net/) to request a WebMAP license required in the migration process.
* Download and install [node.js](https://nodejs.org/en/download/).
* Run the command `npm install yarn` to install yarn.
* Install Angular by running the command `npm install -g @angular/cli`.

These steps are required to migrate and install dependencies in your migrated web app.

#### 2. Migration process

Run WebMAP convertion tool using the following command.

```
./Mobilize.WFNetMAP.ConversionTool.exe -i -o -l --UseProductionNugets
```

#### 3. Installing dependencies

First, add the new dependencies registry by running the following command.

```
npm config set registry https://www.myget.org/F/mobilizewebmap/auth/559d63b6-5f30-45eb-8acb-d5f7cb2858bc/npm/
```

After the registry was added, install Angular dependencies, go to the `sks-angular` folder located inside the migrated app directory and run the following command.

```
yarn
```
This will automatically install all the required dependencies needed for the project. After the installation is finished, run the following command to build the Angular application.

```
ng build --prod
```

#### 4. Running the app

Before compiling and running the app, copy the files `Orders.db` and `App.config` to the migrated app root directory. After doing that just run your fresh new SKS web app.

![SKS Web](/assets/SKSWeb.png)