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 at Converge 360.

comments powered by Disqus

Featured

  • Compare New GitHub Copilot Free Plan for Visual Studio/VS Code to Paid Plans

    The free plan restricts the number of completions, chat requests and access to AI models, being suitable for occasional users and small projects.

  • Diving Deep into .NET MAUI

    Ever since someone figured out that fiddling bits results in source code, developers have sought one codebase for all types of apps on all platforms, with Microsoft's latest attempt to further that effort being .NET MAUI.

  • Copilot AI Boosts Abound in New VS Code v1.96

    Microsoft improved on its new "Copilot Edit" functionality in the latest release of Visual Studio Code, v1.96, its open-source based code editor that has become the most popular in the world according to many surveys.

  • AdaBoost Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the AdaBoost.R2 algorithm for regression problems (where the goal is to predict a single numeric value). The implementation follows the original source research paper closely, so you can use it as a guide for customization for specific scenarios.

  • Versioning and Documenting ASP.NET Core Services

    Building an API with ASP.NET Core is only half the job. If your API is going to live more than one release cycle, you're going to need to version it. If you have other people building clients for it, you're going to need to document it.

Subscribe on YouTube