Electron.NET | Build cross platform desktop apps with ASP.NET Core | Frontend Framework library
kandi X-RAY | Electron.NET Summary
kandi X-RAY | Electron.NET Summary
Build cross platform desktop apps with .NET 5 and ASP.NET NET Core (Razor Pages, MVC), Blazor. Electron.NET is a wrapper around a "normal" Electron application with an embedded ASP.NET Core application. Via our Electron.NET IPC bridge we can invoke Electron APIs from .NET. The CLI extensions hosts our toolset to build and start Electron.NET applications.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of Electron.NET
Electron.NET Key Features
Electron.NET Examples and Code Snippets
Community Discussions
Trending Discussions on Electron.NET
QUESTION
I am running Visual Studio 2019. I have an angular app that works completely fine when Electron is not running. For example, If I choose IIS Express
from the debug list, all works well (ApiControllers run correctly and return data):
However, if I run with Electron.Net App, the site loads and shows the page, but my ApiControllers are not contactable. The following error appears:
Here is my Startup.cs
...ANSWER
Answered 2021-Sep-30 at 12:59Be careful with the default application set up in Visual Studio for Angular apps. There is a "getBaseUrl" constant in the Angular/Typescript code module. If you use it in injection of your services, it will always route you through the full URL which may or may not be correct after packaging up your application. Instead, you can blank it out or simply not use it.
QUESTION
I'm currently designing an Angular SPA web client, backed with .NET5 REST. It's all in the same Visual Studio project, and it builds / runs fine.
I'm now investigating the possibility of distributing this as a windows desktop application. I was able to get Electron.NET to work, but it seems like a round-about solution (Node?!). I also didn't particularly like that the resources were visible/changeable in the distributed app.
This led me to investigate using WebView2 within WPF (Microsoft seems to be making a similar transition with MSTeams.) I've found some examples, but they only use:
- solely remote content ("www.bing.com")
- local content, but only img / html / etc
- postmessage, etc to communicate using custom objects.
None of these is what I want. Well, that's not entirely true. I need #2 to load the Angular SPA, but when the WebView2-hosted Angular invokes HttpClient, I'd like to intercept that request in the host application and Route it to my REST Controllers. This would allow me to keep nearly all of my code intact, and presumably ship a smaller, more obfuscated exe.
Is this possible? obvious? Is my desire fundamentally flawed? (wouldn't be the first time)
...ANSWER
Answered 2021-Aug-12 at 16:39Chromium.AspNetCore.Bridge offers a solution to the problem. It uses owin to host the server-side code in memory, and provides a RequestInterceptor to cleanly relay all requests to the "server" code.
The link above has working examples, but briefly:
App.xaml.cs:
QUESTION
I'm trying to create a release build for my Electron.Net application via electronize build /target win
.
But during the process, my companies antivirus software blocks the process because of an "Unauthorized file encryption". It seems to happen when the build result is copied/moved to /bin/Desktop/
.
Now I can't figure out what exactly I have to whitelist so the antivirus software keeps silent during the build.
According to the antivirus, the blocked script lies in
c:/users/{user}/roaming/npm-cache/_npx/{some-random-cache-number}/node_module/electron-builder/node-modules/app-builder-bin/win/x64/
We've already created a whitelist for the whole folder
c:/users/{user}/roaming/npm-cache/_npx/
Any tips are greatly appreciated since I'm not experienced in regards to antivirus software configuration and tracking down issues like this. Thanks!
...ANSWER
Answered 2020-Aug-09 at 10:55The problem was with electron-builder. It's being falsely detected. https://github.com/electron-userland/electron-builder/issues/4901
Please update all to the newest version of Electron.NET.
QUESTION
Using Electron and ElectronNet I have an azure devops pipeline setup that will build the application on linux, windows and osx using the *-latest
images to build. On linux its configured to output both an rpm
and deb
package however periodically the rpm package will fail to build with this output. When this happens it usually happens for a period of time and then stops happening without any intervention. I've even rerun the failed job the next day and the build is fully successful in both the rpm and deb builds. The deb build has never failed.
Really looking for any ideas on how to get it to be successful all the time or whats going wrong. My search-fu hasn't really turned up anything useful.
...ANSWER
Answered 2020-Oct-14 at 18:34This happened because GitVersion version is also used and electron-builder passes the FullSemVer
variable to the fpm command using the --iteration
argument. When the branch being built had a semantically appropriate tag, (example: 1.2.3) the FullSemVer looked like 1.2.3.0
. However if the branch didn't have such a tag it looked like 1.2.3-beta.1+1
and the rpm build failed because of illegal characters.
To fix this I hardcoded the iteration argument into the electron.manifest.json
QUESTION
I launched a normal Asp.Net Core website by Electron.Net, But none of Js codes work. for example OwlCarousel and bootstrap dropdowns
...ANSWER
Answered 2020-Sep-19 at 10:42The answer was too simple! I just disabled NodeIntegration and now everything works correctly.
by using this code (you can see this in its documents)
QUESTION
In my asp.net core 3 electron.net app, when I leave the default electron.manifest.json, it builds and runs well but fails to use icons.
Icons are set as content with copy always attribute.
However when I try to change the product Id and related information, it crashes.
...ANSWER
Answered 2020-May-03 at 12:42I think it's the name of executable.. does your project name have a space? Change it to a hyphen again... and then also in the electron.manifest.json file...
QUESTION
In my Asp.NET Core 3 Electron.NET web application, I'm using Electron-Log npm package to carry out the logging.
I'm able to log in the script section like this:
...ANSWER
Answered 2020-Mar-30 at 09:35Electron-Log is used to record the log information of the client
.
For the code behind
in .net core, you can refer to this.
QUESTION
On windows, when I run the electron.net app see a desktop-style window. However, on a Mac, I see that the same app is being shown in a browser.
...ANSWER
Answered 2020-Mar-24 at 13:12On the Mac, I updated the electron-builder package using npm and it works.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install Electron.NET
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page