DEV Community


WebWindow a lighter alternative to Electron

Updated on ・1 min read

If you want to develop console app with a WebUI in C#, give WebWindow a try


You can trim down the size of the app to nearly 30M (see my previous post).

Simply add WebWindow nuget package in your console app.

Here is an example where I embed a html file in a resource,
within a HelloWorldApp application

Beware, embeding scripts, does not meen they are not visible if you open the executable file with an editor...

using System.IO;
using System.Reflection;
using WebWindows;

namespace HelloWorldApp
    class Program
        static void Main(string[] args)
            string result;
            var assembly = Assembly.GetExecutingAssembly();
            var resourceName = "HelloWorldApp.wwwroot.index.html";
            var window = new WebWindow("My first WebWindow app");
            var stream = assembly.GetManifestResourceStream(resourceName);
            using (StreamReader reader = new StreamReader(stream))
                result = reader.ReadToEnd();

Enter fullscreen mode Exit fullscreen mode

Discussion (0)