All Projects → ElectronNET → Electron.net

ElectronNET / Electron.net

Licence: mit
Build cross platform desktop apps with ASP.NET Core (Razor Pages, MVC, Blazor).

Programming Languages

C#
18002 projects
HTML
75241 projects
typescript
32286 projects
javascript
184084 projects - #8 most used programming language
CSS
56736 projects
shell
77523 projects
Batchfile
5799 projects

Projects that are alternatives of or similar to Electron.net

Piranha.core
Piranha CMS is the friendly editor-focused CMS for .NET Core that can be used both as an integrated CMS or as a headless API.
Stars: ✭ 1,242 (-79.55%)
Mutual labels:  asp-net-core, asp-net-core-mvc, dotnet-standard, dotnet-core
Sio.core
✔ [ SIOC ] Swastika I/O Core is an all in one platform (e.g CMS, eCommerce, Forum, Q&A, CRM...) ASP.NET Core / Dotnet Core System based on SIOH Framework.
Stars: ✭ 121 (-98.01%)
Mutual labels:  asp-net-core, asp-net-core-mvc, dotnet-standard, dotnet-core
Awesome Microservices Netcore
💎 A collection of awesome training series, articles, videos, books, courses, sample projects, and tools for Microservices in .NET Core
Stars: ✭ 865 (-85.76%)
Mutual labels:  asp-net-core, aspnet, dotnet-core
Nopcommerce
The most popular open-source eCommerce shopping cart solution based on ASP.NET Core
Stars: ✭ 6,827 (+12.4%)
Mutual labels:  asp-net-core, dotnet-core, aspnet
Electron.net Musicplayer Sample
Stars: ✭ 55 (-99.09%)
Mutual labels:  asp-net-core, aspnet, dotnet-core
Puck Core
Open source, cross platform .NET Core CMS. Fast, scalable, code-first, unobtrusive and extensible with powerful querying and Lucene integration.
Stars: ✭ 115 (-98.11%)
Mutual labels:  asp-net-core, asp-net-core-mvc, dotnet-core
Electron.net Api Demos
Explore the Electron.NET APIs
Stars: ✭ 231 (-96.2%)
Mutual labels:  asp-net-core, aspnet, dotnet-core
X.pagedlist
Library for easily paging through any IEnumerable/IQueryable in ASP.NET/ASP.NET Core
Stars: ✭ 625 (-89.71%)
Mutual labels:  asp-net-core, asp-net-core-mvc
Netfabric.hyperlinq
High performance LINQ implementation with minimal heap allocations. Supports enumerables, async enumerables, arrays and Span<T>.
Stars: ✭ 479 (-92.11%)
Mutual labels:  dotnet-standard, dotnet-core
Awesome Blazor
Resources for Blazor, a .NET web framework using C#/Razor and HTML that runs in the browser with WebAssembly.
Stars: ✭ 6,063 (-0.18%)
Mutual labels:  asp-net-core, dotnet-core
Starwars
GraphQL 'Star Wars' example using GraphQL for .NET, ASP.NET Core, Entity Framework Core
Stars: ✭ 559 (-90.8%)
Mutual labels:  asp-net-core, dotnet-core
Aspnet.mvc.typedrouting
A collection of extension methods providing strongly typed routing and link generation for ASP.NET Core MVC projects.
Stars: ✭ 460 (-92.43%)
Mutual labels:  asp-net-core, asp-net-core-mvc
Dotnet Win32 Service
Helper classes to set up and run as windows services directly on .net core. A ServiceBase alternative.
Stars: ✭ 425 (-93%)
Mutual labels:  dotnet-standard, dotnet-core
Mathparser.org Mxparser
Math Parser Java Android C# .NET/MONO (.NET Framework, .NET Core, .NET Standard, .NET PCL, Xamarin.Android, Xamarin.iOS) CLS Library - a super easy, rich and flexible mathematical expression parser (expression evaluator, expression provided as plain text / strings) for JAVA and C#. Main features: rich built-in library of operators, constants, math functions, user defined: arguments, functions, recursive functions and general recursion (direct / indirect). Additionally parser provides grammar and internal syntax checking.
Stars: ✭ 624 (-89.73%)
Mutual labels:  dotnet-standard, dotnet-core
Alexa Skills Dotnet
An Amazon Alexa Skills SDK for .NET
Stars: ✭ 412 (-93.22%)
Mutual labels:  dotnet-standard, dotnet-core
Cofoundry
Cofoundry is an extensible and flexible .NET Core CMS & application framework focusing on code first development
Stars: ✭ 621 (-89.78%)
Mutual labels:  asp-net-core, dotnet-core
Professionalcsharp7
Code samples for the book Professional C# 7 and .NET Core 2.0 (with updates for 2.1), Wrox Press
Stars: ✭ 403 (-93.37%)
Mutual labels:  asp-net-core, asp-net-core-mvc
Netcorebbs
ASP.NET Core Light forum NETCoreBBS
Stars: ✭ 483 (-92.05%)
Mutual labels:  asp-net-core, dotnet-core
Featuretoggle
Simple, reliable feature toggles in .NET
Stars: ✭ 641 (-89.45%)
Mutual labels:  dotnet-standard, dotnet-core
Dotnet Webassembly
Create, read, modify, write and execute WebAssembly (WASM) files from .NET-based applications.
Stars: ✭ 535 (-91.19%)
Mutual labels:  dotnet-standard, dotnet-core

Electron.NET Logo

donate

AppVeyor (Win/Linux): Build status

  • Checkout AppVeyor Artifacts: Contains the WebApp sample built for Windows & Linux!

Travis-CI (Win/macOS/Linux): Build Status

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.

Wait - you host a .NET Core app inside Electron? Why?

Well... there are lots of different approaches how to get a X-plat desktop app running. We thought it would be nice for .NET devs to use the ASP.NET Core environment and just embed it inside a pretty robust X-plat enviroment called Electron. Porting Electron to .NET is not a goal of this project, at least we don't have any clue how to do it. We just combine ASP.NET Core & Electron.

📦 NuGet:

  • API NuGet
  • CLI NuGet

🛠 Requirements to run:

The current Electron.NET CLI builds Windows/macOS/Linux binaries. Our API uses .NET 5, so our minimum base OS is the same as .NET 5.

Also you should have installed:

💬 Community

Gitter

🙏 Donate

We do this open source work in our free time. If you'd like us to invest more time on it, please donate. Donation can be used to increase some issue priority. Thank you!

donate

👩‍🏫 Usage

To activate and communicate with the "native" (sort of native...) Electron API include the ElectronNET.API NuGet package in your ASP.NET Core app.

PM> Install-Package ElectronNET.API

Program.cs

You start Electron.NET up with an UseElectron WebHostBuilder-Extension.

public static IHostBuilder CreateHostBuilder(string[] args) =>
    Host.CreateDefaultBuilder(args)
        .ConfigureWebHostDefaults(webBuilder =>
        {
            webBuilder.UseElectron(args);
            webBuilder.UseStartup<Startup>();
        });

Startup.cs

Open the Electron Window in the Startup.cs file:

public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
    ...

    // Open the Electron-Window here
    Task.Run(async () => await Electron.WindowManager.CreateWindowAsync());
}

🚀 Start the Application

To start the application make sure you have installed the "ElectronNET.CLI" packages as global tool:

dotnet tool install ElectronNET.CLI -g

At the first time, you need an Electron.NET project initialization. Type the following command in your ASP.NET Core folder:

electronize init
  • Now a electronnet.manifest.json should appear in your ASP.NET Core project
  • Now run the following:
electronize start

Note

Only the first electronize start is slow. The next will go on faster.

🔭 Develop Electron.NET apps using a file watcher

The file watcher is included with version 8.31.1 of Electron.NET. For example, a file change can trigger compilation, test execution, or deployment. The Electron.NET window will automatically refresh and new code changes will be visible more quickly. The following Electron.NET CLI command is required:

electronize start /watch

Note

Only the first electronize start is slow. The next will go on faster.

🐞 Debug

Start your Electron.NET application with the Electron.NET CLI command. In Visual Studio attach to your running application instance. Go in the Debug Menu and click on Attach to Process.... Sort by your projectname on the right and select it on the list.

📔 Usage of the Electron-API

A complete documentation will follow. Until then take a look in the source code of the sample application:
Electron.NET API Demos

In this YouTube video, we show you how you can create a new project, use the Electron.NET API, debug a application and build an executable desktop app for Windows: Electron.NET - Getting Started

Build

Here you need the Electron.NET CLI as well. Type the following command in your ASP.NET Core folder:

electronize build /target win

There are additional platforms available:

electronize build /target win
electronize build /target osx
electronize build /target linux

Those three "default" targets will produce x64 packages for those platforms.

For certain NuGet packages or certain scenarios you may want to build a pure x86 application. To support those things you can define the desired .NET Core runtime, the electron platform and electron architecture like this:

electronize build /target custom "win7-x86;win32" /electron-arch ia32 

The end result should be an electron app under your /bin/desktop folder.

Note

macOS builds can't be created on Windows machines because they require symlinks that aren't supported on Windows (per this Electron issue). macOS builds can be produced on either Linux or macOS machines.

👨‍💻 Authors

  • Gregor Biswanger - (Microsoft MVP, Intel Black Belt and Intel Software Innovator) is a freelance lecturer, consultant, trainer, author and speaker. He is a consultant for large and medium-sized companies, organizations and agencies for software architecture, web- and cross-platform development. You can find Gregor often on the road attending or speaking at international conferences. - Cross-Platform-Blog - Twitter @BFreakout
  • Robert Muehsig - Software Developer - from Dresden, Germany, now living & working in Switzerland. Microsoft MVP & Web Geek. - codeinside Blog - Twitter @robert0muehsig

See also the list of contributors who participated in this project.

🙋‍♀️🙋‍♂ Contributing

Feel free to submit a pull request if you find any bugs (to see a list of active issues, visit the Issues section. Please make sure all commits are properly documented.

🧪 Working with this Repo

This video provides an introduction to development for Electron.NET: Electron.NET - Contributing Getting Started

This repository consists of the main parts (API & CLI) and it's own "playground" ASP.NET Core application. Both main parts produce local NuGet packages, that are versioned with 99.0.0. The first thing you will need is to run one of the buildAll scripts (.cmd for Windows, the other for macOS/Linux).

If you look for pure demo projects checkout the other repositories.

The problem working with this repository is, that NuGet has a pretty aggressive cache, see here for further information.

🙏 Donate

We do this open source work in our free time. If you'd like us to invest more time on it, please donate. Donation can be used to increase some issue priority. Thank you!

donate

🎉 License

MIT-licensed

Enjoy!

📝 Important notes

ElectronNET.API & ElectronNET.CLI Version 9.31.2

Make sure you also have the new Electron.NET API & CLI 9.31.2 version.

dotnet tool update ElectronNET.CLI -g

This now uses electron-builder and the necessary configuration to build is made in the electron.manifest.json file (on the build part). In addition, own Electron.NET configurations are stored (on the root). Please make sure that your electron.manifest.json file has the following new structure:

{
  "executable": "{{executable}}",
  "splashscreen": {
    "imageFile": ""
  },
  "name": "{{executable}}",
  "author": "",
  "singleInstance": false,
  "build": {
    "appId": "com.{{executable}}.app",
    "productName": "{{executable}}",
    "copyright": "Copyright © 2020",
    "buildVersion": "1.0.0",
    "compression": "maximum",
    "directories": {
      "output": "../../../bin/Desktop"
    },
    "extraResources": [
      {
        "from": "./bin",
        "to": "bin",
        "filter": ["**/*"]
      }
    ],
    "files": [
      {
        "from": "./ElectronHostHook/node_modules",
        "to": "ElectronHostHook/node_modules",
        "filter": ["**/*"]
      },
      "**/*"
    ]
  }
}

ElectronNET.CLI Version 0.0.9

In the Version 0.0.9 the CLI was not a global tool and needed to be registred like this in the .csproj:

<ItemGroup>
     <DotNetCliToolReference Include="ElectronNET.CLI" Version="0.0.9" />
</ItemGroup>

After you edited the .csproj-file, you need to restore your NuGet packages within your Project. Run the following command in your ASP.NET Core folder:

dotnet restore

If you still use this version you will need to invoke it like this:

electronize ...

Node Integration

Electron.NET requires Node Integration to be enabled for IPC to function. If you are not using the IPC functionality you can disable Node Integration like so:

WebPreferences wp = new WebPreferences();
wp.NodeIntegration = false;
BrowserWindowOptions browserWindowOptions = new BrowserWindowOptions
{
    WebPreferences = wp
}

Dependency Injection

ElectronNET.Api can be added to your DI container within the Startup class. All of the modules available in Electron will be added as Singletons.

using ElectronNET.API;

public void ConfigureServices(IServiceCollection services)
{
    services.AddElectron()
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].