:electron: Build cross platform desktop apps with ASP.NET Core (Razor Pages, MVC, Blazor).
Convert a JSON to TypeScript interfaces.
GregorBiswanger/Brackets-ZoomView 4
ZoomView for Brackets
GregorBiswanger/AspRestApiWorkshop 2
Projektvorlage für meinen ASP.NET Core 3.1 REST-Api Workshop
GregorBiswanger/MyBroker-pwa-workshop 2
The MyBroker Template should be implemented as an Progressive Web App.
Exercise application for my Angular training.
GregorBiswanger/AspCoreMyBroker 1
Exercise application for my ASP.NET Core 3.1 training.
GregorBiswanger/AspNetAngularElectronSample 1
ASP.NET Core 5 + Angular 11 + Electron.NET 11.5.1
GregorBiswanger/AspNetCoreGraphQLWorkshop 1
Sample Project for my ASP.NET Core with GraphQL Workshop 🎯
issue commentElectronNET/Electron.NET
Electron host hangs if ASP.NET Core app crashes before connecting bridge
It's also worth noting if you close the electronize console at this point, Electron remains running and you have to go into Task Manager to kill it. Normally electron closes down when you close the electronize console.
comment created time in 4 hours
issue openedElectronNET/Electron.NET
Electron host hangs if ASP.NET Core app crashes before connecting bridge
- Version:
- 9.23.1 (latest version compatible with .NET Core 3.1)
.NET Core 3.1
- Target:
- Windows
If your ASP.NET Core app crashes before connecting to Electron.NET, the electron host will just sit around and wait. No error message is displayed, it's not possible to debug, etc.
The short term fix for this would be to have electron host monitor the asp.net core process to see if it exits. If the process exits, electron host should shut everything else down as well.
In addition electron host should pull from stdout and stderr of the asp.net core process and display it in the console so the developer can see any error messages. Currently, stdout is sent over the IO bridge... which is only initialized once ASP.NET Core is. While it's good practice to do this right away,, apps can technically do other stuff before then.
The long term fix I think is to make ASP.NET Core the root process and have it launch electron host, instead of the other way around, since this makes debugging the ASP.NET Core process easier and would allow VS to catch and display any exceptions that would cause a crash on launch.
created time in 4 hours
startedmarb2000/XamlIslands
started time in 5 hours
startedfelixgomez/gitlab-skyline
started time in 5 hours
startedjenius-apps/ambie
started time in 5 hours
startedbachvtuan/Github-Contribution-Graph
started time in 5 hours
issue openedElectronNET/Electron.NET
- Version:
- 9.31.2 (latest version compatible with .NET Core 3.1)
.NET Core 3.1
- Target: Windows
It looks like electron host's main.js only launches the ASP.NET Core application once the app.ready event fires. However in my Startup class constructor, Electron.App.IsReady returns false. I suspect this is simply because the IO bridge between electron host and ElectronNET classes isn't connected yet, but given electron is already ready, isReady shouldn't ever really be false.
Unless IsReady is meant to reflect the state of the IO bridge. But then it could easily mislead devs who think it is a reflection of app.ready. For example, trying to set the UserData path won't work since electron is already using the old path by the time the ASP.NET Core application launches.
created time in 5 hours
issue commentElectronNET/Electron.NET
Orphaned child processes when running electronize start
I forgot I filed this bug report.
This is generally only a problem when debugging since in production the user is going to be closing by the application window anyway.
However if the electron host is launching the asp.net core application, it could use the following event to detect if the asp.net core app closes, and to exit if it does:
https://nodejs.org/api/child_process.html#child_process_event_exit
It could potentially do something similar with the electronize process, not sure.
comment created time in 5 hours
issue openedElectronNET/Electron.NET
Can't change UserData path before Electron is ready
- Version: 9.31.2 (latest version compatible with .NET Core 3.1)
.NET Core 3.1
- Target: Windows
From looking through the main,js of the electron host, it looks like the bridge to ASP.NET Core is only constructed after Electron's ready event fires. Unfortunately this means it is not possible to set up some things in electron. Specifically you need to call app.setPath for the userdata folder before the ready event fires in order for everything to use it.
For example this means every Electron.NET app will mix its browser profiles in the same folder (%APPDATA%\Electron) which could be undesirable.
Possible solutions would be to add a field to electron.manifest.json to allow changing this folder. main.js could read it and call app.setPath for you.
However this is only a bandaid. The way Electron.NET runs applications now is pretty janky and prone to other problems like this.
I think the real solution is going to be having the ASP.NET Core process serve as the root process, and having it launch the electron process as a child. This also solves problems with debugging as VS will attach to the root process automatically (you can manually attach to the process today, but not only is that annoying, but if the process crashes before you can attach then that's not an acceptable solution to debug the crash).
created time in 5 hours
startedmicrosoft/language-server-protocol
started time in 19 hours
issue commentElectronNET/electron.net-api-demos
same issue with me. node version v14.16.0 .net core version 3.1 ElectronNET-API version 8.31.2 it looks like the IPC function not work?
comment created time in a day
issue openedElectronNET/Electron.NET
Electron.IpcMain.On doesn't allow for event parameter
<!-- Please search existing issues to avoid creating duplicates. -->
<!-- Which version of Electron.NET CLI and API are you using? --> <!-- Please always try to use latest version before report. -->
- Version: 11.5.1
<!-- Which version of .NET Core and Node.js are you using (if applicable)? -->
<!-- What target are you building for? -->
- Target: Windows
<!-- Enter your issue details below this comment. --> <!-- If you want, you can donate to increase issue priority (https://donorbox.org/electron-net) -->
Inside my main process, I am trying to receive a signal from my renderer process using IpcMain.On()
and return a value back to the renderer process. The issue I am having is that I cannot access the event parameter inside of the callback function. I am receiving a compile time error stating that event is an "Invalid Expression term".
I looked at the source code for On()
inside IpcMain.cs
and it doesn't seem to be calling the listener callback function with an event parameter.
The comments say that the listener will be called as such:
/// Listens to channel, when a new message arrives listener would be called with
/// listener(event, args...).
But looking at the implementation, it doesn't seem to be calling the listener with the event parameter as it says it does:
public void On(string channel, Action<object> listener)
{
BridgeConnector.Socket.Emit("registerIpcMainChannel", channel);
BridgeConnector.Socket.Off(channel);
BridgeConnector.Socket.On(channel, (args) =>
{
List<object> objectArray = FormatArguments(args);
if(objectArray.Count == 1)
{
listener(objectArray.First());
}
else
{
listener(objectArray);
}
});
}
In particular, Action<object> listener
forces the listener to only take a single argument, and listener(objectArray.First());
or listener(objectArray);
only pass the argument object list, which doesn't include an event.
Steps to Reproduce:
- Use the following code in the main process:
Electron.IpcMain.On("signal-name", (event, args) => {
// Do something(or not, either way it still gives the error)
});
created time in a day
startedshowmewebcam/showmewebcam
started time in 2 days
issue closedElectronNET/Electron.NET
Cannot build Electron.net on Raspberry Pi 4
<!-- Which version of Electron.NET CLI and API are you using? -->
- Electron.NET:
11.5.1.0
- Electron API:
11.5.1
<!-- Which version of .NET Core and Node.js are you using (if applicable)? -->
- Net 5
- Node 15.12.0
<!-- What target are you building for? -->
- Target: linux-arm
<!-- Enter your issue details below this comment. --> <!-- If you want, you can donate to increase issue priority (https://donorbox.org/electron-net) -->
Steps to Reproduce:
- Check out code on Raspberry Pi 4
- Run command:
electronize build /target linux-arm /PublishReadyToRun false
- Build error appeared:
⨯ chmod /usr/lib/node_modules/electron-builder/node_modules/app-builder-lib/templates/icons/electron-linux/256x256.png: operation not permitted
github.com/develar/app-builder/pkg/icons.doConvertIcon
/Volumes/data/Documents/app-builder/pkg/icons/icon-converter.go:208
github.com/develar/app-builder/pkg/icons.ConvertIcon
/Volumes/data/Documents/app-builder/pkg/icons/icon-converter.go:66
github.com/develar/app-builder/pkg/icons.ConfigureCommand.func1
/Volumes/data/Documents/app-builder/pkg/icons/icon-converter.go:33
github.com/alecthomas/kingpin.(*actionMixin).applyActions
/Volumes/data/go/pkg/mod/github.com/alecthomas/kingpin@v2.2.6+incompatible/actions.go:28
github.com/alecthomas/kingpin.(*Application).applyActions
/Volumes/data/go/pkg/mod/github.com/alecthomas/kingpin@v2.2.6+incompatible/app.go:557
github.com/alecthomas/kingpin.(*Application).execute
/Volumes/data/go/pkg/mod/github.com/alecthomas/kingpin@v2.2.6+incompatible/app.go:390
github.com/alecthomas/kingpin.(*Application).Parse
/Volumes/data/go/pkg/mod/github.com/alecthomas/kingpin@v2.2.6+incompatible/app.go:222
main.main
/Volumes/data/Documents/app-builder/main.go:90
runtime.main
/usr/local/Cellar/go/1.15.5/libexec/src/runtime/proc.go:204
runtime.goexit
/usr/local/Cellar/go/1.15.5/libexec/src/runtime/asm_arm.s:857
⨯ Cannot cleanup:
Error #1 --------------------------------------------------------------------------------
Error: /usr/lib/node_modules/electron-builder/node_modules/app-builder-bin/linux/arm/app-builder exited with code ERR_ELECTRON_BUILDER_CANNOT_EXECUTE
at ChildProcess.<anonymous> (/usr/lib/node_modules/electron-builder/node_modules/builder-util/src/util.ts:243:14)
at Object.onceWrapper (node:events:476:26)
at ChildProcess.emit (node:events:369:20)
at maybeClose (node:internal/child_process:1067:16)
at Socket.<anonymous> (node:internal/child_process:453:11)
at Socket.emit (node:events:369:20)
at Pipe.<anonymous> (node:net:665:12)
Error #2 --------------------------------------------------------------------------------
Error: /usr/lib/node_modules/electron-builder/node_modules/app-builder-bin/linux/arm/app-builder exited with code ERR_ELECTRON_BUILDER_CANNOT_EXECUTE
at ChildProcess.<anonymous> (/usr/lib/node_modules/electron-builder/node_modules/builder-util/src/util.ts:243:14)
at Object.onceWrapper (node:events:476:26)
at ChildProcess.emit (node:events:369:20)
at maybeClose (node:internal/child_process:1067:16)
at Socket.<anonymous> (node:internal/child_process:453:11)
at Socket.emit (node:events:369:20)
at Pipe.<anonymous> (node:net:665:12) stackTrace=
closed time in 2 days
redplaneissue commentElectronNET/Electron.NET
Cannot build Electron.net on Raspberry Pi 4
Seems to be it is about the access permission for folder /usr/lib/node_modules/electron-builder/node_modules/app-builder-lib/templates/icons
Suddenly, I have found this Github repository, in which they mentioned:
Note: Building on Linux may give some errors. Provided are some common errors and resolutions. After attempting each resolution, try the build again:
Error: ‘electron-builder update check failed’ Resolution: follow the instructions to ‘get access to the local update config store’ Error (if the exact path to directory /usr/lib/node_modules/electron-builder/node_modules/app-builder-lib/templates/icons differs in the error message, change it in the resolution command as well): ⨯ chmod /usr/lib/node_modules/electron-builder/node_modules/app-builder-lib/templates/icons/electron-linux/256x256.png: operation not permitted Resolution:
sudo find /usr/lib/node_modules/electron-builder/node_modules/app-builder-lib/templates/icons -type d -user root -exec sudo chown -R $USER: {} +
I tried their command sudo find /usr/lib/node_modules/electron-builder/node_modules/app-builder-lib/templates/icons -type d -user root -exec sudo chown -R $USER: {} +
and build the application. It worked :)
comment created time in 2 days
startedshowmewebcam/showmewebcam
started time in 3 days
issue openedElectronNET/Electron.NET
Cannot build Electron.net on Raspberry Pi 4
<!-- Which version of Electron.NET CLI and API are you using? -->
- Electron.NET:
11.5.1.0
- Electron API:
11.5.1
<!-- Which version of .NET Core and Node.js are you using (if applicable)? -->
- Net 5
- Node 15.12.0
<!-- What target are you building for? -->
- Target: linux-arm
<!-- Enter your issue details below this comment. --> <!-- If you want, you can donate to increase issue priority (https://donorbox.org/electron-net) -->
Steps to Reproduce:
- Check out code on Raspberry Pi 4
- Run command:
electronize build /target linux-arm /PublishReadyToRun false
- Build error appeared:
⨯ chmod /usr/lib/node_modules/electron-builder/node_modules/app-builder-lib/templates/icons/electron-linux/256x256.png: operation not permitted
github.com/develar/app-builder/pkg/icons.doConvertIcon
/Volumes/data/Documents/app-builder/pkg/icons/icon-converter.go:208
github.com/develar/app-builder/pkg/icons.ConvertIcon
/Volumes/data/Documents/app-builder/pkg/icons/icon-converter.go:66
github.com/develar/app-builder/pkg/icons.ConfigureCommand.func1
/Volumes/data/Documents/app-builder/pkg/icons/icon-converter.go:33
github.com/alecthomas/kingpin.(*actionMixin).applyActions
/Volumes/data/go/pkg/mod/github.com/alecthomas/kingpin@v2.2.6+incompatible/actions.go:28
github.com/alecthomas/kingpin.(*Application).applyActions
/Volumes/data/go/pkg/mod/github.com/alecthomas/kingpin@v2.2.6+incompatible/app.go:557
github.com/alecthomas/kingpin.(*Application).execute
/Volumes/data/go/pkg/mod/github.com/alecthomas/kingpin@v2.2.6+incompatible/app.go:390
github.com/alecthomas/kingpin.(*Application).Parse
/Volumes/data/go/pkg/mod/github.com/alecthomas/kingpin@v2.2.6+incompatible/app.go:222
main.main
/Volumes/data/Documents/app-builder/main.go:90
runtime.main
/usr/local/Cellar/go/1.15.5/libexec/src/runtime/proc.go:204
runtime.goexit
/usr/local/Cellar/go/1.15.5/libexec/src/runtime/asm_arm.s:857
⨯ Cannot cleanup:
Error #1 --------------------------------------------------------------------------------
Error: /usr/lib/node_modules/electron-builder/node_modules/app-builder-bin/linux/arm/app-builder exited with code ERR_ELECTRON_BUILDER_CANNOT_EXECUTE
at ChildProcess.<anonymous> (/usr/lib/node_modules/electron-builder/node_modules/builder-util/src/util.ts:243:14)
at Object.onceWrapper (node:events:476:26)
at ChildProcess.emit (node:events:369:20)
at maybeClose (node:internal/child_process:1067:16)
at Socket.<anonymous> (node:internal/child_process:453:11)
at Socket.emit (node:events:369:20)
at Pipe.<anonymous> (node:net:665:12)
Error #2 --------------------------------------------------------------------------------
Error: /usr/lib/node_modules/electron-builder/node_modules/app-builder-bin/linux/arm/app-builder exited with code ERR_ELECTRON_BUILDER_CANNOT_EXECUTE
at ChildProcess.<anonymous> (/usr/lib/node_modules/electron-builder/node_modules/builder-util/src/util.ts:243:14)
at Object.onceWrapper (node:events:476:26)
at ChildProcess.emit (node:events:369:20)
at maybeClose (node:internal/child_process:1067:16)
at Socket.<anonymous> (node:internal/child_process:453:11)
at Socket.emit (node:events:369:20)
at Pipe.<anonymous> (node:net:665:12) stackTrace=
created time in 3 days
startedGregorBiswanger/rxjs-fruits
started time in 4 days
fork egamma/vscode-yaml
YAML support for VS Code with built-in kubernetes syntax support
fork in 4 days
startedmarb2000/DesktopWindow
started time in 4 days
PR closed intel/acat
Last phrase had a typo reading "these innovations in the this community".
pr closed time in 4 days
startedGregorBiswanger/json2ts
started time in 7 days
fork isidorn/vscode-coverage-gutters
Display test coverage generated by lcov and xml - works with many languages
https://marketplace.visualstudio.com/items?itemName=ryanluker.vscode-coverage-gutters
fork in 7 days
fork isidorn/ScreenToGif
🎬 ScreenToGif allows you to record a selected area of your screen, edit and save it as a gif or video.
fork in 7 days
fork joaomoreno/azure-pipelines-extensions
Collection of all RM and deployment extensions
http://www.visualstudio.com/explore/release-management-vs
fork in 7 days
issue commentElectronNET/Electron.NET
Error compiling a Blazor 'client-side' project on .NET 5
Has anyone been able to get the "start" command to work? Is there some combination of flags that can be used as a workaround?
comment created time in 8 days
issue commentElectronNET/Electron.NET
The easiest way I found was to use ElectronNET.CLI from source and modify the package.json of ElectronNET.Host to add the dependencies I needed, I don't know if since my problem another solution was found
comment created time in 8 days
issue commentElectronNET/Electron.NET
The easiest way I found was to use ElectronNET.CLI from source and modify the package.json of ElectronNET.Host to add the dependencies I needed, I don't know if since my problem another solution was found
comment created time in 8 days