{"id":13342074,"url":"https://github.com/MobilizeNet/SKSWinForms_VBNET","last_synced_at":"2025-03-12T00:30:52.159Z","repository":{"id":102154542,"uuid":"266854299","full_name":"MobilizeNet/SKSWinForms_VBNET","owner":"MobilizeNet","description":"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. ","archived":false,"fork":false,"pushed_at":"2020-05-26T20:47:52.000Z","size":5215,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-10-24T12:09:14.094Z","etag":null,"topics":["vb6-to-vbnet","vbmigration","vbnet","winforms"],"latest_commit_sha":null,"homepage":"https://www.mobilize.net","language":"Visual Basic .NET","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MobilizeNet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-05-25T18:39:43.000Z","updated_at":"2020-05-26T20:47:54.000Z","dependencies_parsed_at":"2023-07-11T16:00:59.451Z","dependency_job_id":null,"html_url":"https://github.com/MobilizeNet/SKSWinForms_VBNET","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MobilizeNet%2FSKSWinForms_VBNET","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MobilizeNet%2FSKSWinForms_VBNET/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MobilizeNet%2FSKSWinForms_VBNET/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MobilizeNet%2FSKSWinForms_VBNET/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MobilizeNet","download_url":"https://codeload.github.com/MobilizeNet/SKSWinForms_VBNET/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243136265,"owners_count":20241987,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["vb6-to-vbnet","vbmigration","vbnet","winforms"],"created_at":"2024-07-29T19:28:03.783Z","updated_at":"2025-03-12T00:30:52.147Z","avatar_url":"https://github.com/MobilizeNet.png","language":"Visual Basic .NET","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Salmon King Seafood migration tutorial\n\n\u003e 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`\n\n\u003e NOTE: this demo uses SQLite. You might need to install the [SQLite ODBC Driver](http://www.ch-werner.de/sqliteodbc/)\n\n![SKS](/assets/SKS.PNG)\n\n## VB6 to WinForms VB.NET\n\n### **VBUC** - Visual Basic Upgrade Companion\n\n![](/assets/VBUC-logo.webp)\n\nVBUC 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).\n\nTo migrate SKS follow the next steps\n\n#### 1. Create a new VBUC project\n\nStart the VBUC desktop app and click the new project icon.\n\n![](/assets//NewProject.PNG)\n\nNext, 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.\n\n![](/assets//NewProjectSKS.png)\n\n#### 2. Resolve References\nSometimes 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`.\n\n![](/assets//ResolveReferences.PNG)\n\nIf 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.\n\n#### 3. Upgrade Options\n\nChoose and confirm the upgrade options for your project. For SKS demo use default options. \n\n![](/assets//UpgradeOptions.PNG)\n\n#### 4. Upgrade Process\n\nBefore 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.\n\n![](/assets//UpgradeOutput.PNG)\n\nNext, start the migration by clicking `Upgrade Projects` and wait for the process to end.\n\n![](/assets//AfterMigration.PNG)\n\nAfter the process ends, open your migrated solution and compile your app.\n\n#### 5. Resolve migration conflicts\n\nFinally, 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.\n\n``` xml\n\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n\u003cconfiguration\u003e\n  \u003cconfigSections\u003e\n    \u003csection name=\"AdoFactories\" type=\"UpgradeHelpers.DB.AdoFactoriesConfigurationSection, UpgradeHelpers.DB.Essentials\" allowExeDefinition=\"MachineToApplication\" allowLocation=\"true\" /\u003e\n    \u003csection name=\"AdoIdentityColumns\" type=\"UpgradeHelpers.DB.AdoIdentityColumnsConfigurationSection, UpgradeHelpers.DB.Essentials\" allowExeDefinition=\"MachineToApplication\" allowLocation=\"true\" /\u003e\n  \u003c/configSections\u003e\n  \u003cconnectionStrings\u003e\n  \u003c/connectionStrings\u003e\n  \u003cAdoFactories\u003e\n    \u003c!--\n    \n    The following section declares some of the most common factories. It can be modified in order to accomplish your needs.\n\tThe factory declaration with the \"isdefault\" attribute set to true will be used by the upgraded application as the current provider factory.\n    \n    The database type attribute can take one of the following values\n      * SQLServer: when the application interacts wiht Ms SQL Server\n      * Oracle: when the application interacts wiht Oracle\n      * Access: when the application interacts wiht Ms Access\n      * Undefined: when none of the previous is being used\n    \n    --\u003e\n    \u003cFactories\u003e\n      \u003cadd name=\"SQLServer\" factorytype=\"System.Data.SqlClient\" isdefault=\"false\" databasetype=\"SQLServer\" /\u003e\n      \u003c!-- MS SQL Server --\u003e\n      \u003cadd name=\"Oracle\" factorytype=\"System.Data.OracleClient\" isdefault=\"false\" databasetype=\"Oracle\" /\u003e\n      \u003c!-- Oracle --\u003e\n      \u003cadd name=\"Oledb\" factorytype=\"System.Data.OleDb\" isdefault=\"false\" databasetype=\"Access\" /\u003e\n      \u003c!-- Any database through Oledb --\u003e\n      \u003cadd name=\"Access\" factorytype=\"System.Data.Odbc\" isdefault=\"true\" databasetype=\"Access\" /\u003e\n      \u003c!-- Any database through ODBC --\u003e\n    \u003c/Factories\u003e\n  \u003c/AdoFactories\u003e\n  \u003cAdoIdentityColumns\u003e\n  \u003c/AdoIdentityColumns\u003e\n\u003c/configuration\u003e\n```\n\nThis will set the default database driver that the SKS WinForms application will use in run time.\n\n#### 6. Running the migrated app\n\nRun the new WinForms version of SKS.\n\n![](/assets/SKS.png)\n\n## WinForms to Web\n\n### WebMAP\n\n![](/assets/WebMAP.png)\n\nWebMAP 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).\n\n#### 1. Prerequisites\n \n* Contact [Mobilize.net](https://www.mobilize.net/) to request a WebMAP license required in the migration process.\n* Download and install [node.js](https://nodejs.org/en/download/). \n* Run the command  `npm install yarn` to install yarn.\n* Install Angular by running the command `npm install -g @angular/cli`.\n\nThese steps are required to migrate and install dependencies in your migrated web app.\n\n#### 2. Migration process\n\nRun WebMAP convertion tool using the following command.\n\n```\n./Mobilize.WFNetMAP.ConversionTool.exe -i \u003cYourWinFormsSolutionFile.sln\u003e -o \u003coutput directory\u003e -l \u003cLicense Path\u003e --UseProductionNugets\n```\n\n#### 3. Installing dependencies\n\nFirst, add the new dependencies registry by running the following command.\n\n```\nnpm config set registry https://www.myget.org/F/mobilizewebmap/auth/559d63b6-5f30-45eb-8acb-d5f7cb2858bc/npm/\n```\n\nAfter the registry was added, install Angular dependencies, go to the `sks-angular` folder located inside the migrated app directory and run the following command.\n\n```\nyarn\n```\nThis 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.\n\n```\nng build --prod\n```\n\n#### 4. Running the app\n\nBefore 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.\n\n![SKS Web](/assets/SKSWeb.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMobilizeNet%2FSKSWinForms_VBNET","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FMobilizeNet%2FSKSWinForms_VBNET","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMobilizeNet%2FSKSWinForms_VBNET/lists"}