ElectronNET.Core 0.1.0-pre.160

This is a prerelease version of ElectronNET.Core.
There is a newer version of this package available.
See the version list below for details.
dotnet add package ElectronNET.Core --version 0.1.0-pre.160
                    
NuGet\Install-Package ElectronNET.Core -Version 0.1.0-pre.160
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ElectronNET.Core" Version="0.1.0-pre.160" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ElectronNET.Core" Version="0.1.0-pre.160" />
                    
Directory.Packages.props
<PackageReference Include="ElectronNET.Core" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ElectronNET.Core --version 0.1.0-pre.160
                    
#r "nuget: ElectronNET.Core, 0.1.0-pre.160"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package ElectronNET.Core@0.1.0-pre.160
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=ElectronNET.Core&version=0.1.0-pre.160&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=ElectronNET.Core&version=0.1.0-pre.160&prerelease
                    
Install as a Cake Tool

Electron.NET Logo

donate Gitter Build status

Electron.NET Core is here!

A Complete Transformation

ElectronNET.Core represents a fundamental modernization of Electron.NET, addressing years of accumulated pain points while preserving full API compatibility. This isn't just an update — it's a complete rethinking of how .NET developers build and debug cross-platform desktop applications with Electron.

Read more: What's New in ElectronNET.Core

Build cross platform desktop applications with .NET 6/8/10 - from console apps to ASP.NET Core (Razor Pages, MVC) to Blazor.

Wait - how does that work exactly?

Well... there are lots of different approaches how to get a X-plat desktop app running. Electron.NET provides a range of ways to build .NET based solutions using Electron at the side of presentation.

While the classic Electron.NET setup, using an ASP.NET host ran by the Electron side is still the primary way, there's more flexibility now: both, dotnet and Electron are now able to launch the other for better lifetime management, and when you don't need a local web server - like when running content from files or remote servers, you can drop the ASP.NET stack altogether and got with a lightweight console app instead.

📦 NuGet

  • ElectronNET.Core: NuGet
  • ElectronNET.Core.API: NuGet
  • ElectronNET.Core.AspNet: NuGet

🛠 Requirements to Run

You should have installed:

👩‍🏫 Usage with ASP.NET

  • Create a new ASP.NET Core project
  • Install the following two NuGet packages:
dotnet add package ElectronNET.Core

dotnet add package ElectronNET.Core.AspNet

Classic ASP.NET Core

Enable Electron.NET on Startup

To do so, use the UseElectron extension method on a WebApplicationBuilder, an IWebHostBuilder or any descendants.

New in Electron.NET Core is that you provide a callback method as an argument to UseElectron(), which ensures that you get to know the right moment to set up your application UI.

Program.cs
using ElectronNET.API;
using ElectronNET.API.Entities;

    public static void Main(string[] args)
    {
        WebHost.CreateDefaultBuilder(args)
            .UseElectron(args, ElectronAppReady)
            .UseStartup<Startup>()
            .Build()
            .Run();
    }

    public static async Task ElectronAppReady()
    {
        var browserWindow = await Electron.WindowManager.CreateWindowAsync(
            new BrowserWindowOptions { Show = false });

        browserWindow.OnReadyToShow += () => browserWindow.Show();
    }

Minimal API Example

For a minimal API you can use:

using ElectronNET;
using ElectronNET.API;
using ElectronNET.API.Entities;

var builder = WebApplication.CreateBuilder(args);

builder.Services.AddRazorPages();
builder.Services.AddElectron(); // <- might be useful to set up DI

builder.UseElectron(args, async () =>
{
    var browserWindow = await Electron.WindowManager.CreateWindowAsync(
        new BrowserWindowOptions { Show = false, AutoHideMenuBar = true });

    browserWindow.OnReadyToShow += () => browserWindow.Show();
});

var app = builder.Build();

// Configure the HTTP request pipeline.
if (!app.Environment.IsDevelopment())
{
    app.UseExceptionHandler("/Error");
}

app.UseStaticFiles();
app.UseRouting();
app.UseAuthorization();
app.MapRazorPages();
app.Run();

🚀 Starting and Debugging the Application

Just press F5 in Visual Studio or use dotnet for debugging.

📔 Usage of the Electron API

A complete documentation is available on the Wiki.

In this YouTube video, we show you how you can create a new project, use the Electron.NET API, debug a application and build an executable desktop app for Windows: Electron.NET - Getting Started

The video hasn't been updated for the changes in ElectronNET.Core, so it is partially outdated.

👨‍💻 Authors

  • Gregor Biswanger - (Microsoft MVP, Intel Black Belt and Intel Software Innovator) is a freelance lecturer, consultant, trainer, author and speaker. He is a consultant for large and medium-sized companies, organizations and agencies for software architecture, web- and cross-platform development. You can find Gregor often on the road attending or speaking at international conferences. - Cross-Platform-Blog - Twitter @BFreakout
  • Dr. Florian Rappl - Software Developer - from Munich, Germany. Microsoft MVP & Web Geek. - The Art of Micro Frontends - Homepage - Twitter @florianrappl
  • softworkz - Full Range Developer - likes to start where others gave up. MS MVP alumni and Munich citizen as well.
  • Robert Muehsig - Software Developer - from Dresden, Germany, now living & working in Switzerland. Microsoft MVP & Web Geek. - codeinside Blog - Twitter @robert0muehsig

See also the list of contributors who participated in this project.

🙋‍♀️🙋‍♂ Contributing

Feel free to submit a pull request if you find any bugs (to see a list of active issues, visit the Issues section. Please make sure all commits are properly documented.

🙏 Donate

We do this open source work in our free time. If you'd like us to invest more time on it, please donate. Donation can be used to increase some issue priority. Thank you!

donate

Alternatively, consider using a GitHub sponsorship for the core maintainers:

Any support appreciated! 🍻

🎉 License

MIT-licensed. See LICENSE for details.

Enjoy!

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.3.0-pre.353 0 12/12/2025
0.3.0-pre.351 0 12/11/2025
0.3.0-pre.345 29 12/11/2025
0.3.0-pre.344 28 12/11/2025
0.3.0-pre.340 36 12/10/2025
0.3.0-pre.336 42 12/9/2025
0.3.0-pre.331 49 12/7/2025
0.3.0-pre.314 70 12/6/2025
0.3.0-pre.310 127 12/5/2025
0.3.0-pre.300 93 11/29/2025
0.3.0-pre.298 133 11/24/2025
0.3.0-pre.296 137 11/22/2025
0.3.0-pre.295 139 11/22/2025
0.3.0-pre.281 346 11/20/2025
0.3.0-pre.263 344 11/19/2025
0.3.0-pre.1 0 12/12/2025
0.2.0 576 11/16/2025
0.2.0-pre.262 368 11/19/2025
0.2.0-pre.255 279 11/17/2025
0.2.0-pre.254 277 11/17/2025
0.2.0-pre.249 253 11/17/2025
0.2.0-pre.240 175 11/16/2025
0.2.0-pre.239 174 11/16/2025
0.2.0-pre.235 89 11/16/2025
0.2.0-pre.228 116 11/15/2025
0.2.0-pre.219 105 11/15/2025
0.2.0-pre.200 171 11/14/2025
0.1.0 272 11/14/2025
0.1.0-pre.198 194 11/14/2025
0.1.0-pre.197 196 11/14/2025
0.1.0-pre.196 228 11/13/2025
0.1.0-pre.186 252 11/12/2025
0.1.0-pre.184 231 11/10/2025
0.1.0-pre.183 218 11/10/2025
0.1.0-pre.180 188 11/10/2025
0.1.0-pre.173 156 11/9/2025
0.1.0-pre.171 151 11/9/2025
0.1.0-pre.163 92 11/8/2025
0.1.0-pre.160 90 11/8/2025
0.1.0-pre.158 80 11/7/2025
0.1.0-pre.157 124 11/7/2025
0.1.0-pre.156 115 11/7/2025
0.1.0-pre.155 111 11/7/2025
0.1.0-pre.149 136 11/6/2025
0.1.0-pre.142 135 11/5/2025
0.1.0-pre.139 136 11/4/2025
0.1.0-pre.138 138 11/4/2025
0.1.0-pre.136 176 11/2/2025
0.1.0-pre.135 82 11/2/2025
0.1.0-pre.134 79 11/2/2025
0.1.0-pre.133 75 11/1/2025
0.0.18 253 10/31/2025
0.0.18-pre.132 90 10/31/2025
0.0.18-pre.123 93 10/31/2025