ElectronNET.Core.API 0.1.0-pre.136

This is a prerelease version of ElectronNET.Core.API.
There is a newer version of this package available.
See the version list below for details.
dotnet add package ElectronNET.Core.API --version 0.1.0-pre.136
                    
NuGet\Install-Package ElectronNET.Core.API -Version 0.1.0-pre.136
                    
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.API" Version="0.1.0-pre.136" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ElectronNET.Core.API" Version="0.1.0-pre.136" />
                    
Directory.Packages.props
<PackageReference Include="ElectronNET.Core.API" />
                    
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.API --version 0.1.0-pre.136
                    
#r "nuget: ElectronNET.Core.API, 0.1.0-pre.136"
                    
#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.API@0.1.0-pre.136
                    
#: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.API&version=0.1.0-pre.136&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=ElectronNET.Core.API&version=0.1.0-pre.136&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 (2)

Showing the top 2 NuGet packages that depend on ElectronNET.Core.API:

Package Downloads
ElectronNET.Core

Building cross platform electron based desktop apps with .NET Core and - optionally - ASP.NET Core. This package contains the ElectronNET project system.

ElectronNET.Core.AspNet

Building cross platform electron based desktop apps with .NET Core and - optionally - ASP.NET Core. This package contains the ASP.Net Core integration.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.3.0-pre.351 0 12/11/2025
0.3.0-pre.345 0 12/11/2025
0.3.0-pre.344 0 12/11/2025
0.3.0-pre.340 36 12/10/2025
0.3.0-pre.336 38 12/9/2025
0.3.0-pre.331 49 12/7/2025
0.3.0-pre.314 71 12/6/2025
0.3.0-pre.310 127 12/5/2025
0.3.0-pre.300 96 11/29/2025
0.3.0-pre.298 134 11/24/2025
0.3.0-pre.296 140 11/22/2025
0.3.0-pre.295 147 11/22/2025
0.3.0-pre.281 349 11/20/2025
0.3.0-pre.263 345 11/19/2025
0.2.0 619 11/16/2025
0.2.0-pre.262 369 11/19/2025
0.2.0-pre.255 280 11/17/2025
0.2.0-pre.254 286 11/17/2025
0.2.0-pre.249 252 11/17/2025
0.2.0-pre.240 183 11/16/2025
0.2.0-pre.239 175 11/16/2025
0.2.0-pre.235 84 11/16/2025
0.2.0-pre.228 114 11/15/2025
0.2.0-pre.219 108 11/15/2025
0.2.0-pre.200 178 11/14/2025
0.1.0 322 11/14/2025
0.1.0-pre.198 198 11/14/2025
0.1.0-pre.197 195 11/14/2025
0.1.0-pre.196 229 11/13/2025
0.1.0-pre.186 252 11/12/2025
0.1.0-pre.184 251 11/10/2025
0.1.0-pre.183 222 11/10/2025
0.1.0-pre.180 188 11/10/2025
0.1.0-pre.173 155 11/9/2025
0.1.0-pre.171 150 11/9/2025
0.1.0-pre.163 96 11/8/2025
0.1.0-pre.160 93 11/8/2025
0.1.0-pre.158 82 11/7/2025
0.1.0-pre.157 134 11/7/2025
0.1.0-pre.156 118 11/7/2025
0.1.0-pre.155 120 11/7/2025
0.1.0-pre.149 144 11/6/2025
0.1.0-pre.142 148 11/5/2025
0.1.0-pre.139 140 11/4/2025
0.1.0-pre.138 141 11/4/2025
0.1.0-pre.136 170 11/2/2025
0.1.0-pre.135 85 11/2/2025
0.1.0-pre.134 80 11/2/2025
0.1.0-pre.133 81 11/1/2025
0.0.18 304 10/31/2025
0.0.18-pre.123 94 10/31/2025