Electron.NET Core 0.3.1 fail to compile base Blazor Web project #1041

Open
opened 2026-01-29 16:56:23 +00:00 by claunia · 0 comments
Owner

Originally created by @Denny09310 on GitHub (Dec 17, 2025).

Description

After upgrading Electron.NET Core from 0.3.0 to 0.3.1, the build fails with an exception related to missing metadata for generated static assets.

Environment

  • Electron.NET Core: 0.3.1
  • .NET SDK: 10
  • Node.js: 24.12.0
  • Target Runtime: win-x64

Error Message

No metadata 'SourceId' was present for item 'Components\Layout\ReconnectModal.razor.js' and no default value was provided.

I have observed the same issue in another project, where the error referenced different generated assets, such as:

  • *.razor.js
  • app.css

Expected Behavior

The project should build successfully after upgrading Electron.NET Core from 0.3.0 to 0.3.1.

Actual Behavior

The build fails with a SourceId metadata exception related to generated static web assets.

Steps to Reproduce

  1. Create a new Blazor Web project.
  2. Add Electron.NET.
  3. Build the project.

Additional Notes

I've also saw that when re-opening the project the file affected by this exception can change, for example now it's "Components\Layout\MainLayout.razor.rz.scp.css", no idea how it calculates this static assets

electron-sample.zip

Originally created by @Denny09310 on GitHub (Dec 17, 2025). ### Description After upgrading **Electron.NET Core** from **0.3.0** to **0.3.1**, the build fails with an exception related to missing metadata for generated static assets. ### Environment * **Electron.NET Core**: 0.3.1 * **.NET SDK**: 10 * **Node.js**: 24.12.0 * **Target Runtime**: win-x64 ### Error Message ``` No metadata 'SourceId' was present for item 'Components\Layout\ReconnectModal.razor.js' and no default value was provided. ``` I have observed the same issue in another project, where the error referenced different generated assets, such as: * `*.razor.js` * `app.css` ### Expected Behavior The project should build successfully after upgrading Electron.NET Core from 0.3.0 to 0.3.1. ### Actual Behavior The build fails with a `SourceId` metadata exception related to generated static web assets. ### Steps to Reproduce 1. Create a new **Blazor Web** project. 2. Add **Electron.NET**. 3. Build the project. ### Additional Notes I've also saw that when re-opening the project the file affected by this exception can change, for example now it's "Components\Layout\MainLayout.razor.rz.scp.css", no idea how it calculates this static assets [electron-sample.zip](https://github.com/user-attachments/files/24217021/electron-sample.zip)
claunia added the bug label 2026-01-29 16:56:23 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Electron.NET#1041