mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-02-04 05:34:51 +00:00
Application does start with net5.0 with low level or unmanaged c# libraries #701
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @aboccag on GitHub (Sep 18, 2021).
Originally assigned to: @GregorBiswanger on GitHub.
Hi there!
Steps to Reproduce:
I would like to run a simple app where I want to instantiate a Basler camera (emulation for now). To do that, I just have to import the library and do a simple Camera camera = new Camera();
My netcore app has been created with the microsoft new project with react and redux, then I add electron.net api and I started the electronize init / start command
Here is the service I registered with the classic microsoft DI :
Here are the different behaviors I have with different situations:
Situation 1 - simple console app with net 5.0 : -> working because I can access the object and Emulation (0815-0000) and open the camera
situation 2 - run this application with visual studio debug/run : -> working because I can access the object and Emulation (0815-0000) and open the camera
Situation 3 - When I run the application with electronize start command
it stops here and nothing happen, no errors, no messages, waiting indefinitely
Situation 4 - When I remove the first Camera camera = new Camera() before the Electron.IpcMain.On in order try to create the camera after the application is completely started
When the event is triggered by the frontend with
I got just an error Got disconnected! Reason: transport close
I tried to add a breakpoint before the new camera in the IPC (situation 4) with the attatch process feature.
I got this exception but I don't now if it is correlated
System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
situation 5 :
I did also clone the https://github.com/ElectronNET/electron.net-musicplayer-sample sample which is netcore3.1 and Electron.net api 5.30.1 and everything is working (IPC event create camera and create camera at the class instanciation)
I also noticed that this sample with the same api 5.30.1 with netcore5 instead of netcore3.1 also does not work (same behavior as the situation 3 and 4)
We really do want to use netcore5 as well as the latest versions of your library that is very promising!
I really hope someone could help us ! 👍
@GregorBiswanger commented on GitHub (Mar 28, 2023):
🎉🚀 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!