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

  • See Prompts Microsoft Engineers Use for Bleeding-Edge Multimodal RAG AI Research

    Vision-centric queries show how front-line experts are prompting LLMs these days.

  • AI Explains Expressions in Update to Java on VS Code

    "The Spring Tools now show code lenses above these expressions that allow you to quickly let GitHub Copilot explain those statements for you."

  • Microsoft Eases Integration with Semantic Kernel AI SDK

    The basic idea is to provide unified API abstractions, especially for idiomatic C# code, to help platform developers and others work with any provider with standard implementations for caching, telemetry, tool calling and other common tasks.

  • Final .NET 9 Preview Ships with Go-Live License

    Visual Studio developers can now download the SDK for .NET 9 Release Candidate 2 with a go-live license, meaning devs get Microsoft support for production applications even before the framework reaches general availability next month.

Subscribe on YouTube