Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ


Choose your language

InfoQ Homepage News OpenSilver 2.2 Migrates LightSwitch Applications

OpenSilver 2.2 Migrates LightSwitch Applications

This item in japanese

The latest version of OpenSilver 2.2, a remake of Microsoft's retired Silverlight web application framework, includes support for migrating applications created with Visual Studio LightSwitch that targeted Silverlight.

OpenSilver was launched in October 2021 by a French company, Userware. It is an open-source, MIT-licensed reimplementation of Silverlight. OpenSilver compiles .NET and XAML code into HTML5 and WebAssembly, reimplementing standard and selected third-party controls. It allows developers to reuse instead of rewriting their legacy Silverlight or XAML applications. The latest update to OpenSilver was version 2.1 in February 2024, with the support for F# language.

Visual Studio LightSwitch was a framework for the rapid creation of business data-centric applications with visual drag-and-drop designers and support for C# and XAML. It was programmed with data-access abstraction via Entities and used the Model-View-ViewModel (MVVM) paradigm for the UI. It would generate a Silverlight application as an output. With the demise of Silverlight, the only available alternative for developers would be to rewrite their existing LightSwitch applications.

OpenSilver 2.2 can now migrate LightSwitch applications without changing the code. The generated files for the LightSwitch project can be imported into an empty OpenSilver project. By referencing a NuGet package called "LightSwitch Compatibility Pack", the original application files will be compiled into static HTML and JS files. This NuGet package is licensed, and the developers can sign up for a trial.

To illustrate the migration, Userware migrated a sample LightSwitch application to the OpenSilver version that can be run in the browser without a Silverlight plugin. The source code for both applications is available on GitHub.

For the moment, the migration doesn’t allow the modification of screens created by LigthSwitch. The developers have to make the change in LightSwitch and import the application files again into the OpenSilver project. The interactive editor is on the OpenSilver roadmap.

The reactions from developers have been generally positive. On Reddit, a corporate user called Yukti_Solutions says that "massive selling points are the cost savings plus the fact that migrated apps still work and look the same".

The OpenSilver 2.2 press release states that the roadmap will include a WYSIWYG XAML designer with full drag-and-drop support, as current support is limited to rendering the XAML in the Forms Designer. Future support for .NET MAUI, XAML Hot Reload, macOS, VS Code and Rider are mentioned, too.

The OpenSilver source code is available on GitHub. The repository containing OpenSilver has 928 stars and has been forked 115 times. Beyond the Userware developer team, there are other active contributions to the project, with a total of 48 contributors. According to the OpenSilver website, companies that rely on this framework include Bayer, TATA, KPMG, and others.

About the Author

Rate this Article