Skip to content

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.

Notifications You must be signed in to change notification settings

MobilizeNet/SKSWinForms_VBNET

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

SKS

VB6 to WinForms VB.NET

VBUC - Visual Basic Upgrade Companion

VBUC is a Mobilize.net product capable of VB6 to VB.NET or WinForms migrations. For more information about this product click here.

To migrate SKS follow the next steps

1. Create a new VBUC project

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

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.

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.

If you are having a hard time looking for unresolved references, take a look a our TLB Github Repo. 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.

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.

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

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 version="1.0" encoding="utf-8"?>
<configuration>
  <configSections>
    <section name="AdoFactories" type="UpgradeHelpers.DB.AdoFactoriesConfigurationSection, UpgradeHelpers.DB.Essentials" allowExeDefinition="MachineToApplication" allowLocation="true" />
    <section name="AdoIdentityColumns" type="UpgradeHelpers.DB.AdoIdentityColumnsConfigurationSection, UpgradeHelpers.DB.Essentials" allowExeDefinition="MachineToApplication" allowLocation="true" />
  </configSections>
  <connectionStrings>
  </connectionStrings>
  <AdoFactories>
    <!--
    
    The following section declares some of the most common factories. It can be modified in order to accomplish your needs.
	The factory declaration with the "isdefault" attribute set to true will be used by the upgraded application as the current provider factory.
    
    The database type attribute can take one of the following values
      * SQLServer: when the application interacts wiht Ms SQL Server
      * Oracle: when the application interacts wiht Oracle
      * Access: when the application interacts wiht Ms Access
      * Undefined: when none of the previous is being used
    
    -->
    <Factories>
      <add name="SQLServer" factorytype="System.Data.SqlClient" isdefault="false" databasetype="SQLServer" />
      <!-- MS SQL Server -->
      <add name="Oracle" factorytype="System.Data.OracleClient" isdefault="false" databasetype="Oracle" />
      <!-- Oracle -->
      <add name="Oledb" factorytype="System.Data.OleDb" isdefault="false" databasetype="Access" />
      <!-- Any database through Oledb -->
      <add name="Access" factorytype="System.Data.Odbc" isdefault="true" databasetype="Access" />
      <!-- Any database through ODBC -->
    </Factories>
  </AdoFactories>
  <AdoIdentityColumns>
  </AdoIdentityColumns>
</configuration>

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.

WinForms to Web

WebMAP

WebMAP is a Mobilize.net product capable of migrating WinForms apps to .NET core and Angular. For more information about this product click here.

1. Prerequisites

  • Contact Mobilize.net to request a WebMAP license required in the migration process.
  • Download and install node.js.
  • 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 <YourWinFormsSolutionFile.sln> -o <output directory> -l <License Path> --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

About

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.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published