Electron.NET
Electron.NET copied to clipboard
Blazor Server Side work on electronize start but not after electronize build /target win
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.
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 ?
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":"..."
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
🎉🚀 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!