News

Missing Silverlight and Waiting for Blazor? CSHTML5 for C# Web Development Goes Open Source

Microsoft's experimental Blazor project to allow .NET coding for Web projects via experimental WebAssembly may be getting all the attention, but new open source tooling does something similar, acting like a bridge between the death of Silverlight and the production readiness of WebAssembly.

It's called CSHTML5 (or C#/XAML for HTML5), and it's developed by French company Userware, which has worked on the technology for some five years. Previously available as a Visual Studio extension available in the IDE's marketplace, it's also available for download.

Now on GitHub, the project is described as "the first production-ready solution to make Web apps in C# and XAML. It is also the only tool that enables to port existing Silverlight and WPF applications to the Web, by compiling C# and XAML files to HTML and JavaScript."

Microsoft Silverlight, a darling product sorely missed by many developers, is a now-deprecated application framework used for rich Internet applications via the plug-in approach, similar to Adobe Flash.

"We support the transition between the end of Silverlight, and the arrival of WebAssembly, so that C# and XAML devs will not have to use HTML5 or JavaScript while waiting for WebAssembly, Userware's Killian Leclercq told Visual Studio Magazine last year.

 CSHTML5 (C#/XAML for HTML5)
[Click on image for larger view.] CSHTML5 (C#/XAML for HTML5) (source: Userware).

In announcing an update last May, the company said it was keeping an eye on the promising Blazor project. "We have also been working on different proof-of-concepts lately, experimenting with the possible integration of Blazor/WebAssembly and Bridge.NET technologies into CSHTML5," Userware said. Bridge.NET is an open source C#-to-JavaScript compiler and frameworks that also allows for C# apps to be run in Web browsers. Bridge.NET has since been incorporated into the upcoming v2.0 release, providing generated JavaScript code that's said to be very close to the original C#, while also being almost as readable as hand-written code.

With yesterday's announcement that CSHTML5 has been updated and donated to the open source community, that Blazor integration was again mentioned.

The company plans to release a WebAssembly-compatible version of CSHTML5 interoperable with Blazor late this year or early in 2020. "In the future, you won't even need to compile to JavaScript because your C#/XAML app will run natively in the binary form," said CEO Giovanni Albani.

In addition to the open source move, Userware announced a new Community Edition that provides previously for-pay features to hobbyists, open source projects and academics, along with commercial licenses available under a dual-license model.

Also announced was the new version. CSHTML5 1.2, with more than 40 new features and numerous bug fixes.

Userware also provides a Migration Edition specifically for developers wanting to migrate their existing Silverlight or Windows Presentation Foundation (WPF) projects to the platform. More details, including licensing and pricing for the paid options, are available here.

According to the project's roadmap, initial support for third-party JavaScript libraries such as Telerik Kendo UI and Syncfusion Essential JS is planned, along with an improved "Live Demos" showcase application and a Material Design styles kit, all scheduled for next month.

About the Author

David Ramel is an editor and writer for Converge360.

comments powered by Disqus

Featured

  • Creating Reactive Applications in .NET

    In modern applications, data is being retrieved in asynchronous, real-time streams, as traditional pull requests where the clients asks for data from the server are becoming a thing of the past.

  • AI for GitHub Collaboration? Maybe Not So Much

    No doubt GitHub Copilot has been a boon for developers, but AI might not be the best tool for collaboration, according to developers weighing in on a recent social media post from the GitHub team.

  • Visual Studio 2022 Getting VS Code 'Command Palette' Equivalent

    As any Visual Studio Code user knows, the editor's command palette is a powerful tool for getting things done quickly, without having to navigate through menus and dialogs. Now, we learn how an equivalent is coming for Microsoft's flagship Visual Studio IDE, invoked by the same familiar Ctrl+Shift+P keyboard shortcut.

  • .NET 9 Preview 3: 'I've Been Waiting 9 Years for This API!'

    Microsoft's third preview of .NET 9 sees a lot of minor tweaks and fixes with no earth-shaking new functionality, but little things can be important to individual developers.

  • Data Anomaly Detection Using a Neural Autoencoder with C#

    Dr. James McCaffrey of Microsoft Research tackles the process of examining a set of source data to find data items that are different in some way from the majority of the source items.

Subscribe on YouTube