VWG Migration First Steps
The following steps describe a basic migration of a Visual WebGUI application to a Web Application based on Wisej.NET.
With Wisej.NET, it's so much easier to migrate your existing Visual WebGUI application.
To do so, we have prepared this checklist to guide you through the process.
Make sure to install Wisej.NET's VSIX package from Wisej.NET Build page
Take note of all embedded resources, references and build customizations within the Project
Make sure that you have a backup ready of your application before proceeding with the migration process to prevent loss of critical data or source code.
From this point, you can choose one of two options to migrate your solution, either upgrading to the New Project SDK Format or staying with the current Project Format.
SDK Project Format
Starting with Wisej.NET 3, we started supporting .NET 6. This enabled Wisej.NET to be cross-platform, and added many more features like Dependency Injection, running in a Docker Container, and much more.
You can check out the New SDK Project Format Migration from our guide to migrating WinForms to Wisej.NET.
MSBuild Project Format
Changing the project type from Visual WebGUI to Wisej.NET can be done in two ways
Creating a new Wisej.NET project and copying over all the files from the original Visual WebGUI application.
Change the settings of the existing project
If you decide to go with Option 1, everything is done automatically. i.e all the configuration files and assemblies will be added automatically
Changing the settings of an existing project
Open your .csproj file and proceed with the following modification:
Remove the {563295b5-8906-4a76-be2d-ff8e711c1204} project type GUID from the ProjectGuid node
Change the target .NET Framework version to .NET Framework 4.8
Add Wisej.NET's NuGet package from the NuGet Package Manager
Remove all references to Visual WebGUI assemblies
Add the configuration files to the project. You will need the following files A. Default.html B. Default.json C. Web.config
Replace all occurrences of Gizmox.WebGUI.Forms with Wisej.Web
Remove the remaining usings of Gizmox.WebGUI.*
Build the application and resolve the compiler errors: in most of the cases you will get compiler errors due to some missing properties and/or methods that are obsolete in Wisej. You can simply comment out these. There are also enumerations that have been changed to be more meaningful for a web application. Below is a table with the replacements for some of these
FormStartPosition.WindowsDefaultLocation
FormStartPosition.DefaultLocation
FormBorderStyle.FixedDialog
FormBorderStyle.Fixed
BorderStyle.FixedSingle
BorderStyle.Solid
BorderStyle.Fixed3D
BorderStyle.Solid
Shortcut.Del
Shortcut.Delete
Shortcut.ShiftDel
Shortcut.ShiftDelete
Shortcut.CtrlIns
Shortcut.CtrlInsert
Shortcut.ShiftIns
Shortcut.ShiftInsert
Shortcut.AltBksp
Shortcut.AltBackspace
The configuration files are generated by default when creating a new Wisej.NET project. You can simply copy them over from a new project, but make sure to edit Default.json file with the correct namespace so that it points to the corresponding Program.Main method.
For more information regarding Wisej.NET configuration, please head over to the respective documentation page.
When using NuGet packages, it's highly recommended that you use the newer PackageReference syntax for your package management as opposed to the older Packages.config file.
Our documentation covers how to correctly configure Visual Studio to use this new standard.
Visual WebGUI Context Replacements
Gizmox.WebGUI.Common.Global.Context
Application.Session
VWGContext.Current.MainForm
Application.Session.MainForm
VWGContext.Current.Cookies
Application.Cookies
Last updated