Electron.NET icon indicating copy to clipboard operation
Electron.NET copied to clipboard

Blazor Server Side work on electronize start but not after electronize build /target win

Open NicolasEhrhard opened this issue 4 years ago • 2 comments

Hello, i use electron.Net for my blazor project. When i use it with electronize start, it's working perfectly, but when i try to publish it to windows ( electronize build /target win ) i've got an javascript error.

Capturer

this is my manifest.json: { "executable": "DakaraApp", "splashscreen": { "imageFile": "/wwwroot/images/Dakara.png" }, "name": "Dakara", "author": "Alsaris", "singleInstance": false, "environment": "Production", "build": { "appId": "com.AdminDashboard.Server.app", "productName": "DakaraApp", "copyright": "Copyright © 2020", "buildVersion": "0.0.1", "win": { "icon": "/wwwroot/images/Dakara.png" }, "mac": { "icon": "/wwwroot/images/Dakara.png" }, "linux": { "icon": "/wwwroot/images/Dakara.png" }, "compression": "maximum", "directories": { "output": "../../../bin/Desktop" }, "extraResources": [ { "from": "./bin", "to": "bin", "filter": [ "/*" ] } ], "files": [ { "from": "./ElectronHostHook/node_modules", "to": "ElectronHostHook/node_modules", "filter": [ "/" ] }, "**/" ] } }

Can someone help me ?

NicolasEhrhard avatar Sep 11 '21 07:09 NicolasEhrhard

Check the output folder of the build: Desktop\win-unpacked\resources\bin Check the .exe file that you have there, and make sure you have the same name in the electron.manifest.json under "executable":"..."

peter-bozovic avatar May 10 '22 20:05 peter-bozovic

For people who are searching for solution... Please make sure the "executable": "YourNamespaeName", (from electron.manifest.json) match the <AssemblyName>YourNamespaeName</AssemblyName> from your .csproj file...

Also make sure that you dont use whitespaces and characters as -,/.... there because electron removes it and than app does not know what exe file to run because the name executable is different from defined in manifest...

Your executable can be find under obj/host/bin it ends with .exe

damikun avatar Aug 26 '22 08:08 damikun

🎉🚀 New Electron.NET version 23.6.1 released 🚀🎉

With native Electron 23 and .NET 6 support. Your problem should be fixed here. If you continue to have the problem, please let us know. Please note the correct updating of your API & CLI. Info in the README. Have fun!

GregorBiswanger avatar Mar 28 '23 15:03 GregorBiswanger