Skip to content
CAI
Software that uses CAICheck a score

ElectronNET/Electron.NET

46.5

Weak · 23 September 2026

17.8k

lines of production code

C#

with TypeScript

5

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is a .NET library and tooling suite that enables the creation of cross-platform desktop applications by hosting ASP.NET Core, Blazor, or Console apps within the Electron framework. It provides a comprehensive API for interacting with native operating system features, including window management, system dialogs, clipboard access, and inter-process communication. The infrastructure supports modern .NET versions (8 and 10) with deep MSBuild integration for streamlined building, packaging, and debugging directly from Visual Studio.

How it got here

2017–2023 — Electron.NET Core modernization and TypeScript migration

17 changes.

The project underwent a major architectural restructuring, migrating the host layer to TypeScript and integrating deep MSBuild support for improved IDE compatibility. This period focused on modernizing the build system with NUKE, enhancing cross-platform reliability through strict compatibility checks, and introducing comprehensive Blazor and .NET 10 support via a new sample application.

2025–2026 — Electron.NET v10.0 and API overhaul

15 changes.

This period focused on upgrading Electron.NET to support .NET 10.0 and Electron 39.2, featuring a comprehensive rewrite of the API surface with a unified asynchronous invocation model and a secure Socket.IO-based bridge. The build system was restructured with new MSBuild targets and migration checks, while new runtime orchestration layers and ASP.NET Core integration samples were introduced to modernize the development experience.

Features

ASP.NET Core integration with secure socket communication

The new ElectronNET.AspNet package provides extension methods for both WebApplicationBuilder and IWebHostBuilder, allowing developers to wire up Electron.NET using the modern minimal hosting model or the traditional WebHost model. It introduces a secure communication layer where the ASP.NET Core server validates incoming connections from the Electron process using a generated token; this token is initially passed via a query parameter and then stored in an HttpOnly, SameSite=Strict cookie to prevent exposure in URLs and protect against XSS and CSRF attacks. The integration also supports registering an asynchronous application-ready callback that can access command-line arguments or the service provider, enabling safe initialization of Electron windows after the ASP.NET Core server is fully started.

src/ElectronNET.AspNet · high confidence

Add Electron Host Hook for Excel file generation

The ElectronHostHook module now includes a HookService that listens for a 'create-excel-file' event. When triggered, it uses the ExcelCreator component to generate a sample Excel file containing predefined data (Id, Name, Birthday) and saves it to the specified path, allowing the host application to request Excel generation from the Electron process.

src/ElectronNET.WebApp/ElectronHostHook · high confidence

Add ElectronHostHook sample application

A new sample project demonstrating bidirectional communication between C\# and the Electron Host process has been added. The sample includes an ASP.NET Core application that calls a JavaScript HostHook (defined in TypeScript) to send and receive messages, along with the necessary configuration files for electron-builder and project setup.

src/ElectronNET.Samples.ElectronHostHook · high confidence

Add ElectronNET.ConsoleApp sample with .NET 10.0 support

A new console application sample has been added to demonstrate the Electron.NET API. The project targets .NET 10.0 and includes pre-configured publish profiles for Linux (x64) and Windows (x64), along with electron-builder configuration for packaging. The sample application initializes the Electron runtime, creates a browser window, and provides launch settings for both unpackaged and packaged execution modes.

src/ElectronNET.ConsoleApp · high confidence

Added Electron.NET API demo views

The application now includes a comprehensive set of demo views under src/ElectronNET.WebApp/Views that showcase Electron.NET API capabilities. These views provide interactive examples and documentation for system information retrieval, clipboard operations (text and images), handling window crashes and hangs, desktop capturing (screenshots), native system dialogs, inter-process communication (IPC), and executing custom TypeScript code via HostHook. The Home/Index.cshtml view serves as the main navigation hub for these demos.

src/ElectronNET.WebApp/Views · high confidence

Added Electron.NET API demonstration controllers

The application now includes a comprehensive set of controllers that demonstrate Electron.NET API capabilities. These controllers expose IPC endpoints for system information retrieval, clipboard operations (text and images), process crash/hang handling, desktop capturing, file dialogs, power management events, host hooks, asynchronous messaging, window management (including frameless windows), application menus, notifications, PDF printing, shell integration, global shortcuts, system tray interaction, and automatic updates.

src/ElectronNET.WebApp/Controllers · high confidence

Added JSON converters for ModifierType, PageSize, ReleaseNotes, and TitleBarOverlay

New System.Text.Json converters have been added to the ElectronNET.API.Converter namespace to handle specific serialization and deserialization requirements for ModifierType (list of enums), PageSize (string or object), ReleaseNotes (polymorphic string, array of strings, or array of objects), and TitleBarOverlay (boolean or object). These converters ensure that complex or polymorphic data structures from Electron are correctly mapped to C\# types and vice versa, improving reliability for auto-updater notes and window title bar configurations.

src/ElectronNET.API/Converter · high confidence

Added static assets and client-side scripts for the ElectronNET WebApp demo

The ElectronNET WebApp now includes a suite of client-side resources to support its demo interface. This adds syntax highlighting via highlight.js (v9.12.0) and its GitHub theme, along with CSS styles for the navigation sidebar, demo toggle buttons, code blocks, and an 'About' section. JavaScript logic is introduced to handle external link interception (using Electron's shell API), code block rendering, and demo button interactions, with specific timeouts applied to ensure stable execution.

src/ElectronNET.WebApp/wwwroot · high confidence

Electron.NET Core: Complete MSBuild Integration and Architecture Modernization

Electron.NET has been completely restructured into 'ElectronNET.Core', replacing the legacy CLI tool with deep MSBuild integration for better Visual Studio support and build performance. This modernization allows building and debugging cross-platform desktop applications (ASP.NET Core, Blazor, and Console apps) directly from the IDE, including Linux builds on Windows via WSL. The update introduces a new package structure (ElectronNET.Core, .API, .AspNet, .Templates), supports .NET 8/10, and adds significant API enhancements such as Blazor support, WebContents page loading and CSS APIs, and configurable Electron root directories.

(repo-wide) · high confidence

Introduce ElectronNET.WebApp sample with new bootstrap and configuration

Added the ElectronNET.WebApp project, providing a complete ASP.NET Core sample application integrated with Electron. The entry point (Program.cs) now uses the \UseElectron\ builder extension and the \ElectronBootstrap\ callback to initialize the Electron environment, create a browser window, and clear the cache before showing the UI. The application includes standard ASP.NET Core startup logic (Startup.cs) for MVC services and routing, along with configuration files (appsettings.json) that define logging levels and a demo title setting.

src/ElectronNET.WebApp · high confidence

Introduce custom MSBuild tasks for Electron.NET build automation

The build system now includes a new \ElectronNET.Build\ project containing custom MSBuild tasks. These tasks enable developers to replace placeholders in template files with specific properties during the build process, remove specified environment variables, and dump item metadata for debugging purposes, providing finer control over the build pipeline.

src/ElectronNET.Build · high confidence

New Electron.NET AuthMiddleware sample application

Added a new sample application demonstrating the integration of Electron.NET with ASP.NET Core authentication middleware. The sample includes a Blazor Server UI with a sidebar navigation, a counter page, and a weather forecast page that demonstrates streaming rendering. It configures the Electron window to run in Blazor mode, sets up CORS for SignalR, and registers the ElectronAuthenticationMiddleware to handle authentication flows within the desktop environment.

src/ElectronNET.Samples.AuthMiddleware · high confidence

New Electron.NET Blazor template with interactive server rendering

A new 'Electron.NET Blazor App' template (short name: electron-blazor) is now available, providing a Blazor Server application hosted inside an Electron shell. The template uses InteractiveServer render mode for its pages and includes a sample Home page that demonstrates calling native Electron APIs (such as showing a system notification) via the Electron.NET API. It is configured with a default target framework of net10.0 (with net8.0 as an option), defaults to Electron version 38.2.2, and includes pre-configured publish profiles for linux-x64, osx-arm64, and win-x64, along with an electron-builder configuration for packaging.

src/ElectronNET.Templates · high confidence

New TypeScript-based host API implementations for App, AutoUpdater, BrowserView, and BrowserWindow

The host layer in src/ElectronNET.Host/api has been replaced with new TypeScript implementations for the App, AutoUpdater, BrowserView, and BrowserWindow modules. The App module now exposes a comprehensive set of socket-based handlers for lifecycle events (such as window-all-closed, before-quit, and will-quit) and application methods (including quit, exit, relaunch, focus, hide, show, and path/version/locale management). The AutoUpdater module integrates electron-updater to handle update checks, download progress, and release note normalization, exposing properties like autoDownload and allowPrerelease. The BrowserView module adds support for creating views with configurable web preferences (defaulting to nodeIntegration enabled and contextIsolation disabled), proxy settings, and bounds management. The BrowserWindow module provides extensive event registration for window states (ready-to-show, close, blur, focus, resize, move, full-screen transitions) and handles login authentication with proxy credentials.

src/ElectronNET.Host/api · high confidence

New runtime infrastructure for process execution and event handling

The Common module now includes new runtime support components: a ProcessRunner class for reliable out-of-process execution of console applications with standard I/O capture, a RunnerParams class to configure process start options, and extension methods for string manipulation (such as event name formatting) and TimeSpan creation. These additions provide the underlying mechanics for launching Electron and managing lifecycle services.

src/ElectronNET.API/Common · high confidence

New runtime orchestration layer for Electron.NET lifecycle management

This change introduces a new runtime subsystem in src/ElectronNET.API/Runtime that manages the Electron.NET application lifecycle. It adds a state machine (LifetimeServiceBase) and controllers (RuntimeControllerDotNetFirst, RuntimeControllerElectronFirst) to handle startup and shutdown sequences. The code includes helpers to detect launch order (DotNet vs. Electron first) and package mode (packaged vs. unpackaged), and services to manage the Electron process (ElectronProcessActive/Passive) and the Socket.IO bridge connection. This provides a more robust and structured way to handle the integration between the .NET host and the Electron process.

src/ElectronNET.API/Runtime · high confidence

Behavioural changes

2 commits (0 fixes) modifying assets

A change to existing behaviour in assets — 2 commits, 3 files.

assets · medium confidence · unverified

API entities updated to Electron 39.2 with platform attributes and serialization fixes

The entity models in src/ElectronNET.API/API/Entities have been refreshed to align with Electron API 39.2, introducing new classes such as AboutPanelOptions, AddRepresentationOptions, and BrowserViewConstructorOptions. Platform-specific constraints are now enforced using SupportedOSPlatform attributes on classes like AboutPanelOptions and AppDetailsOptions. Several behavioral fixes are included: BrowserWindowOptions.Fullscreenable now defaults to true (correcting a previous false default), and CookieDetails.Secure defaults to false unless SameSite is no\_restriction. The codebase has also migrated from Newtonsoft.Json to System.Text.Json, with custom converters and JSON property naming adjustments to ensure correct serialization.

src/ElectronNET.API/API/Entities · high confidence

Added publish profiles and Electron build configuration for .NET 10.0

The application now includes explicit publish profiles for Linux (x64) and Windows (x64) targeting .NET 10.0, configured for self-contained file system publishing. Additionally, an electron-builder configuration has been added to define packaging targets, such as tar.xz archives for Linux and portable executables for Windows, alongside updated launch settings for ASP.NET and Electron development workflows.

src/ElectronNET.WebApp/Properties · high confidence

Bridge communication now uses Socket.IO with automatic port selection and security

The internal bridge connecting the .NET API to the Electron process has been replaced with a Socket.IO-based connection. This change introduces automatic port selection for the bridge channel and enforces secure communication by requiring authorization headers. Additionally, the connection is configured to bypass system proxies to ensure reliable local IPC handshake, and event handling is now managed through a unified socket interface.

src/ElectronNET.API/Bridge · high confidence

Electron.NET build system restructured with new MSBuild targets and migration checks

The build infrastructure for Electron.NET projects has been completely reorganized into a new set of MSBuild files (props and targets) located in src/ElectronNET/build. This change introduces a new property page for Visual Studio project designers, allowing users to configure Electron settings via a dedicated UI tab. It also adds comprehensive migration checks (ELECTRON001, ELECTRON002, etc.) that warn users if they are using deprecated configuration files like package.json or electron-manifest.json, guiding them to migrate to the new MSBuild property-based configuration. The build process now handles Electron version selection, runtime identifier resolution, and package.json generation through these new targets, ensuring a more robust and modern build experience.

src/ElectronNET/build · high confidence

ElectronHostHook rewritten as a TypeScript project

The ElectronHostHook component has been migrated from a website-style setup to a proper TypeScript project. This introduces a new \Connector\ class that manages Socket.IO communication for event handling and error reporting, and a \HookService\ class that extends this connector to provide a dedicated \onHostReady\ lifecycle hook for executing custom JavaScript logic when the Electron host is ready. The build configuration now targets ES2019 with CommonJS modules and includes source maps for debugging.

src/ElectronNET.Host/ElectronHostHook · high confidence

ElectronNET API rewritten with unified invocation layer and expanded surface area

The API surface in src/ElectronNET.API/API has been significantly restructured and expanded. A new ApiBase class introduces a unified, asynchronous invocation model with built-in timeouts and event management, replacing previous ad-hoc implementations. This refactor standardizes how methods are called and events are handled across all modules. The diff shows the addition or major revision of numerous API wrappers including App, AutoUpdater, BrowserView, BrowserWindow, Clipboard, CommandLine, Cookies, Dialog, and Dock. Notable behavioral changes include the removal of the '-event' suffix from event names to normalize naming conventions, the migration from Newtonsoft.Json to System.Text.Json for serialization, and the introduction of specific fixes such as increased timeouts for printer queries and race condition mitigations in property getters. The BrowserWindow module now includes an OnBoundsChanged event, and the IpcMain API supports listeners returning Task\<object\>.

src/ElectronNET.API/API · high confidence

ElectronNET.Host migrated to a TypeScript project with configurable splash screen

The ElectronNET.Host has been restructured from a plain JavaScript setup into a proper TypeScript project, introducing standard tooling such as tsconfig.json, ESLint, and type definitions (globals.d.ts, types-shims.d.ts) to improve code quality and maintainability. This change also introduces a configurable splash screen feature, implemented via a new splashscreen directory containing an HTML template that dynamically loads an image, allowing the host to display a custom splash during startup.

src/ElectronNET.Host · high confidence

Introduction of runtime orchestration and socket communication infrastructure

The API layer now includes a new \ElectronNetRuntime\ class that manages the lifecycle and connection to the Electron process. This change introduces a socket-based communication model (replacing previous methods) with configurable ports (defaulting to 8000 for the socket and 8001 for the web app) and authentication tokens, enabling the .NET side to bridge commands and data to the Electron host via a dedicated socket connection.

src/ElectronNET.API · high confidence

Migrated build system to NUKE

The project's build and release automation has been replaced with a new NUKE-based build script (Build.cs). This change introduces structured targets for cleaning, restoring, compiling, and running integration tests, and updates the release process to automatically parse versioning from common.props and Changelog.md, append CI build numbers for prereleases, and publish packages to NuGet and GitHub Releases.

nuke · high confidence

Platform compatibility enforcement and Blazor preload script added

The build system now treats CA1416 (Validate platform compatibility) as an error, ensuring that cross-platform code is explicitly validated during compilation. Additionally, a new preload script (blazor-preload.js) is included in the Electron host to clear global process and module references, preparing the environment for Blazor applications.

src · high confidence

Test coverage

Added Electron integration test infrastructure; New integration test suite for Electron.NET APIs and build targets.

Dependencies

Electron.NET updates build tooling and host dependencies

The build system has migrated to NUKE (version 10.1.0) and the host process now targets .NET 10.0. The Electron host dependency has been upgraded to version 39.8.10, and the Node.js socket.io dependency is set to version 4.8.1.

(dependencies) · high confidence

Housekeeping

Added placeholder file to ElectronNET directory; Added placeholder for artifacts directory.

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings — which rule fired, in which file, on which line, and how to fix it — are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.

Score

  • CAI 47 → 46 (-0.4)
  • Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 53 → 51 (-2.1)
  • Architecture 68 → 68 (-0.1)
  • Maturity 59 → 63 (+3.8)
  • Readiness 40 → 39 (-1.1)
  • Security 59 → 62 (+2.6)
  • Accessibility 47 → 48 (+0.3)
  • Performance 62 → 62 (+0.0)

Resolved (32)

  • (anonymous) (cognitive 24) (src/ElectronNET.Host/main.js)
  • (anonymous) (cyclomatic 25) (src/ElectronNET.Host/main.js)
  • BarePragmaDisable (src/ElectronNET.API/Bridge/BridgeConnector.cs)
  • BarePragmaDisable (src/ElectronNET.API/Bridge/Events.cs)
  • BarePragmaDisable (src/ElectronNET.API/Bridge/SocketIOConnection.cs)
  • Bounded contexts not declared
  • Build status unknown
  • Change coupling: AutoUpdater.cs ↔ autoUpdater.ts (src/ElectronNET.API/API/AutoUpdater.cs)
  • Change coupling: clipboard.ts ↔ screen.ts (src/ElectronNET.Host/api/clipboard.ts)
  • Duplicated block (8 lines × 2) (src/ElectronNET.API/Runtime/StartupManager.cs)
  • High CVE: [GHSA redacted] (src/ElectronNET.Host/ElectronHostHook/package-lock.json)
  • High CVE: [GHSA redacted] (src/ElectronNET.WebApp/ElectronHostHook/package-lock.json)
  • High CVE: [GHSA redacted] (src/ElectronNET.WebApp/ElectronHostHook/package-lock.json)
  • High CVE: [GHSA redacted] (src/ElectronNET.Host/package-lock.json)
  • High CVE: [GHSA redacted] (src/ElectronNET.Host/ElectronHostHook/package-lock.json)
  • High CVE: [GHSA redacted] (src/ElectronNET.Host/package-lock.json)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • …and 12 more

New (129)

  • App.BeforeQuit.add (cognitive 21) (src/ElectronNET.API/API/App.cs)
  • Change coupling: ElectronProcessActive.cs ↔ StartupManager.cs (src/ElectronNET.API/Runtime/Services/ElectronProcess/ElectronProcessActive.cs)
  • Change coupling: WebContents.cs ↔ webContents.ts (src/ElectronNET.API/API/WebContents.cs)
  • Change coupling: WindowManager.cs ↔ browserWindows.ts (src/ElectronNET.API/API/WindowManager.cs)
  • Change coupling: WindowManager.cs ↔ main.js (src/ElectronNET.API/API/WindowManager.cs)
  • Documentation: no installation or build instructions (README.md)
  • Documentation: no usage examples (README.md)
  • Documentation: written for insiders (docs/Core/Advanced-Migration-Topics.md)
  • Duplicated block (12 lines × 2) (src/ElectronNET.API/API/ApiBase.cs)
  • Duplicated block (14 lines × 2) (src/ElectronNET.API/API/ApiBase.cs)
  • Duplicated block (20 lines × 2) (src/ElectronNET.API/API/App.cs)
  • Duplicated block (20 lines × 2) (src/ElectronNET.API/API/Entities/LoginItemSettingsOptions.cs)
  • Duplicated block (6 lines × 2) (src/ElectronNET.API/Bridge/Events.cs)
  • Duplicated block (7 lines × 2) (src/ElectronNET.API/Bridge/Events.cs)
  • Duplicated block (7 lines × 2) (src/ElectronNET.API/Runtime/StartupManager.cs)
  • Duplicated block (7–9 lines × 2) (src/ElectronNET.API/API/Entities/NativeImage.cs)
  • FileTooLong: api/browserWindows.ts (src/ElectronNET.Host/api/browserWindows.ts)
  • FunctionTooLong: autoUpdater.default (src/ElectronNET.Host/api/autoUpdater.ts)
  • High CVE: [GHSA redacted] (src/ElectronNET.Host/package-lock.json)
  • High CVE: [GHSA redacted] (src/ElectronNET.WebApp/ElectronHostHook/package-lock.json)
  • …and 109 more

Changes since last survey

  • 38 commits — 28 feature/other, 10 fixes

By area

  • (repo) — 9 commits
  • (root) — 8 commits
  • src/ElectronNET — 5 commits
  • src/ElectronNET.Host — 5 commits
  • src/ElectronNET.WebApp — 4 commits
  • src/ElectronNET.API — 3 commits
  • src/ElectronNET.Templates — 2 commits
  • docs/Core — 1 commit
  • docs/GettingStarted — 1 commit

Notable commits

  • fix: Fixed #1029
  • fix: Fixed #1103
  • fix: Fixed #1105
  • fix: Fixed 1040
  • fix: Fixes #1097
  • fix: Merge pull request #1098 from epsitec-sa/bug/#1097
  • fix: Merge pull request #1099 from epsitec-sa/bug/#1096
  • fix: chore(build): fix #1096 by depends on not resolve related target
  • fix: chore(build): fix error when props file is missing
  • fix: fix(packaging): Architecture must be defined in electron-builder compile args in order to allow cross-compile on same platform. Enforce default-arch to be the default arch in order to avoid arch in package directory name.
  • change: Added more missing APIs
  • change: Added template #414
  • change: Bump @humanfs/node in ElectronNET.WebApp/ElectronHostHook
  • change: Bump brace-expansion in ElectronNET.WebApp/ElectronHostHook
  • change: Bump electron from 30.5.1 to 39.8.10 in ElectronNET.Host
  • change: Bump js-yaml in ElectronNET.WebApp/ElectronHostHook
  • change: Change default framework version to net10.0
  • change: Completed APIs from #956
  • change: Finished #1106
  • change: Implemented #1003
  • …and 18 more

Architecture

  • Unchanged — 7 containers · 0 contexts · 0 edges

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

ElectronNET/Electron.NET was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 23 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 87cc6f98b6a9c5968d7846c0e775ea713bd0d7b2 — the exact code this score is about.
  • Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-955b9cee9818.