From 8c2382a05ce1f3264752ef3b24ce908ce2ff7966 Mon Sep 17 00:00:00 2001 From: Samuel Nussbaum Date: Fri, 3 Jul 2026 11:28:52 +0200 Subject: [PATCH 1/4] Split packaging to avoid duplication in .asar archive --- .../ElectronNET.IntegrationTests.csproj | 1 + .../build/ElectronNET.LateImport.targets | 81 ++++++++++++++++++- .../build/package.dev.template.json | 19 +++++ src/ElectronNET/build/package.template.json | 14 ---- 4 files changed, 98 insertions(+), 17 deletions(-) create mode 100644 src/ElectronNET/build/package.dev.template.json diff --git a/src/ElectronNET.IntegrationTests/ElectronNET.IntegrationTests.csproj b/src/ElectronNET.IntegrationTests/ElectronNET.IntegrationTests.csproj index ad9d60c3..4d2acf56 100644 --- a/src/ElectronNET.IntegrationTests/ElectronNET.IntegrationTests.csproj +++ b/src/ElectronNET.IntegrationTests/ElectronNET.IntegrationTests.csproj @@ -3,6 +3,7 @@ true + True diff --git a/src/ElectronNET/build/ElectronNET.LateImport.targets b/src/ElectronNET/build/ElectronNET.LateImport.targets index 0c7f5218..398861af 100644 --- a/src/ElectronNET/build/ElectronNET.LateImport.targets +++ b/src/ElectronNET/build/ElectronNET.LateImport.targets @@ -213,6 +213,32 @@ + + + + + + $(ElectronDirName)\ElectronHostHook\%(RecursiveDir)%(FileName)%(Extension) + PreserveNewest + + + + + + + + + + + + + @@ -449,6 +475,10 @@ $(_OriginalPublishDir) $(_NonIntermediatePublishDir) $(_OriginalPublishDir) + + $(ElectronPublishDir)app\ @@ -489,7 +519,7 @@ For more information, see: https://github.com/ElectronNET/Electron.NET/wiki/Migr - $(ElectronPublishDir)%(RecursiveDir)%(FileName)%(Extension) + $(ElectronAppDir)%(RecursiveDir)%(FileName)%(Extension) @@ -503,14 +533,55 @@ For more information, see: https://github.com/ElectronNET/Electron.NET/wiki/Migr $([System.IO.Path]::GetFullPath('$(PublishUrl.TrimEnd("\"))')) + + $([System.IO.Path]::GetFullPath('$(ElectronAppDir)')) + + false true - <_NpmCmd>npm install electron-builder@$(ElectronBuilderVersion) --save-dev - <_NpmCmd Condition="'$(IsLinuxWsl)' == 'true'">wsl bash -ic '$(_NpmCmd)' + + + + + <_NpmAppDepsCmd>npm install --omit=dev + <_NpmAppDepsCmd Condition="'$(IsLinuxWsl)' == 'true'">wsl bash -ic '$(_NpmAppDepsCmd)' + + + + + + + + + + + + + + + + + + + <_NpmCmd>npm install electron-builder@$(ElectronBuilderVersion) + <_NpmCmd Condition="'$(IsLinuxWsl)' == 'true'">wsl bash -ic '$(_NpmCmd)' + @@ -529,6 +600,10 @@ For more information, see: https://github.com/ElectronNET/Electron.NET/wiki/Migr $(ElectronPaParams) -c.buildVersion "$(Version)" $(ElectronPaParams) -c.copyright "$(Copyright)" $(ElectronPaParams) -c.extraResources "bin/**/*" + + $(ElectronPaParams) -c.directories.app "app" diff --git a/src/ElectronNET/build/package.dev.template.json b/src/ElectronNET/build/package.dev.template.json new file mode 100644 index 00000000..86376be5 --- /dev/null +++ b/src/ElectronNET/build/package.dev.template.json @@ -0,0 +1,19 @@ +{ + "name": "electron-builder-host", + "version": "$(Version)", + "private": true, + "build": { + "appId": "$(ElectronPackageId)", + "linux": { + "desktop": { + "entry": { "Name": "$(Title)" } + }, + "executableName": "$(ElectronPackageId)" + }, + "deb": { + "desktop": { + "entry": { "Name": "$(Title)" } + } + } + } +} diff --git a/src/ElectronNET/build/package.template.json b/src/ElectronNET/build/package.template.json index fa5bca12..2f9aa6a3 100644 --- a/src/ElectronNET/build/package.template.json +++ b/src/ElectronNET/build/package.template.json @@ -1,20 +1,6 @@ { "name": "$(ElectronPackageId)", "productName": "$(ElectronTitle)", - "build": { - "appId": "$(ElectronPackageId)", - "linux": { - "desktop": { - "entry": { "Name": "$(Title)" } - }, - "executableName": "$(ElectronPackageId)" - }, - "deb": { - "desktop": { - "entry": { "Name": "$(Title)" } - } - } - }, "description": "$(Description)", "version": "$(Version)", "main": "main.js", From 5bdf6230b9ece808286fc784ccd5a85bd5c37af5 Mon Sep 17 00:00:00 2001 From: Samuel Nussbaum Date: Fri, 3 Jul 2026 15:08:57 +0200 Subject: [PATCH 2/4] fix examples build and publish --- ...lectronNET.Samples.ElectronHostHook.csproj | 2 +- .../build/ElectronNET.LateImport.targets | 60 +++++++++++++++---- 2 files changed, 50 insertions(+), 12 deletions(-) diff --git a/src/ElectronNET.Samples.ElectronHostHook/ElectronNET.Samples.ElectronHostHook.csproj b/src/ElectronNET.Samples.ElectronHostHook/ElectronNET.Samples.ElectronHostHook.csproj index b7222217..8c472502 100644 --- a/src/ElectronNET.Samples.ElectronHostHook/ElectronNET.Samples.ElectronHostHook.csproj +++ b/src/ElectronNET.Samples.ElectronHostHook/ElectronNET.Samples.ElectronHostHook.csproj @@ -14,7 +14,7 @@ true ElectronHostHook/tsconfig.json true - true + false diff --git a/src/ElectronNET/build/ElectronNET.LateImport.targets b/src/ElectronNET/build/ElectronNET.LateImport.targets index 398861af..46ccd062 100644 --- a/src/ElectronNET/build/ElectronNET.LateImport.targets +++ b/src/ElectronNET/build/ElectronNET.LateImport.targets @@ -177,9 +177,12 @@ + + Exclude="$(ElectronSourceFilesPath)\**\build-helper.js;$(ElectronSourceFilesPath)\**\tsconfig.json" /> @@ -213,12 +216,15 @@ - - + + @@ -229,11 +235,11 @@ + Condition="'$(ElectronHasCustomHookCode)' == 'true' AND '$(TypeScriptCompileBlocked)' == 'true'"> - + @@ -257,13 +263,45 @@ + + + + + false + true + <_NpmCmd>npm install + <_NpmCmd Condition="'$(IsLinuxWsl)' == 'true'">wsl bash -ic '$(_NpmCmd)' + + + + + + + + + - $(ElectronDirName)\%(DestinationRelativePath) - $(ElectronDirName)\%(DestinationRelativePath) + $(ElectronDirName)\ElectronHostHook\%(Filename)%(Extension) + $(ElectronDirName)\ElectronHostHook\%(Filename)%(Extension) + $(ElectronDirName)\ElectronHostHook\%(Filename)%(Extension) PreserveNewest From e79b029e1633d4a952a798511851d4941e844156 Mon Sep 17 00:00:00 2001 From: Samuel Nussbaum Date: Fri, 3 Jul 2026 15:09:49 +0200 Subject: [PATCH 3/4] Fix scoped css naming issue --- src/ElectronNET.Samples.AuthMiddleware/Components/App.razor | 2 +- .../Components/Layout/NavMenu.razor | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ElectronNET.Samples.AuthMiddleware/Components/App.razor b/src/ElectronNET.Samples.AuthMiddleware/Components/App.razor index c5a59bab..ae4564bb 100644 --- a/src/ElectronNET.Samples.AuthMiddleware/Components/App.razor +++ b/src/ElectronNET.Samples.AuthMiddleware/Components/App.razor @@ -8,7 +8,7 @@ - + diff --git a/src/ElectronNET.Samples.AuthMiddleware/Components/Layout/NavMenu.razor b/src/ElectronNET.Samples.AuthMiddleware/Components/Layout/NavMenu.razor index 56908845..1fe8790d 100644 --- a/src/ElectronNET.Samples.AuthMiddleware/Components/Layout/NavMenu.razor +++ b/src/ElectronNET.Samples.AuthMiddleware/Components/Layout/NavMenu.razor @@ -1,6 +1,6 @@  From 86e5d74c03e85f346d6615f291a277e34ea8e35c Mon Sep 17 00:00:00 2001 From: Samuel Nussbaum Date: Fri, 3 Jul 2026 15:24:49 +0200 Subject: [PATCH 4/4] dump to latest version --- src/ElectronNET.ConsoleApp/ElectronNET.ConsoleApp.csproj | 2 +- .../ElectronNET.Samples.ElectronHostHook.csproj | 4 ++-- src/ElectronNET.WebApp/ElectronNET.WebApp.csproj | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/ElectronNET.ConsoleApp/ElectronNET.ConsoleApp.csproj b/src/ElectronNET.ConsoleApp/ElectronNET.ConsoleApp.csproj index 5fedab20..c61fd39c 100644 --- a/src/ElectronNET.ConsoleApp/ElectronNET.ConsoleApp.csproj +++ b/src/ElectronNET.ConsoleApp/ElectronNET.ConsoleApp.csproj @@ -70,7 +70,7 @@ - + diff --git a/src/ElectronNET.Samples.ElectronHostHook/ElectronNET.Samples.ElectronHostHook.csproj b/src/ElectronNET.Samples.ElectronHostHook/ElectronNET.Samples.ElectronHostHook.csproj index 8c472502..2edceacb 100644 --- a/src/ElectronNET.Samples.ElectronHostHook/ElectronNET.Samples.ElectronHostHook.csproj +++ b/src/ElectronNET.Samples.ElectronHostHook/ElectronNET.Samples.ElectronHostHook.csproj @@ -27,8 +27,8 @@ - - + + diff --git a/src/ElectronNET.WebApp/ElectronNET.WebApp.csproj b/src/ElectronNET.WebApp/ElectronNET.WebApp.csproj index 25a728fc..b4cd9e1b 100644 --- a/src/ElectronNET.WebApp/ElectronNET.WebApp.csproj +++ b/src/ElectronNET.WebApp/ElectronNET.WebApp.csproj @@ -76,8 +76,8 @@ - - + +