![]() ![]() ![]()
QUICK DESKTOP APPLICATION DEVELOPMENT USING ELECTRON PDF CODETo see a list of tools/commands installed on your system, type the following: dotnet tool list -gĪfter installing the command-line tool, type these lines in the VS Code terminal window: electronize init NET Core global tool that implements a command named electronize. QUICK DESKTOP APPLICATION DEVELOPMENT USING ELECTRON PDF INSTALLIn VS Code, create a new terminal window and type: dotnet tool install ElectronNET.CLI -g In addition to the runtime package that you previously referenced in the project file, Electron.NET provides a command-line tool to perform build and deployment tasks. Since our application consists of a single window, we handle the OnClosed event to terminate the application if the user closes the window (instead of choosing Quit or Exit from the main menu). Locate the Configure method and add the following lines to the end of its body: if (HybridSupport.IsElectronActive)įinally, add the following method to the Startup class to create the main Electron window: private async void CreateWindow() The second is convenient during development, as it allows detailed error messages to be displayed.Įdit Startup.cs and insert the following using statements: using ElectronNET.API WebBuilder.UseEnvironment("Development") Locate the static method CreateHostBuilder and insert the following two lines before the call to UseStartup: webBuilder.UseElectron(args) Next, edit Program.cs and insert a using statement for the newly added package: using ElectronNET.API This action gives you immediate access to Intellisense for subsequent modifications to the code. Save the file, then restore packages when prompted to do so by VS Code. First, open the file Processes.csproj and insert a package reference for the Electron.NET API hosted on : This step involves adding a NuGet package to the project file, inserting some initialization code, and installing a command-line tool to perform builds. NET Core project into an Electron application. Close the page, return to VS Code and stop debugging. NET Core welcome page, hosted on localhost:5001. Press F5 to build and run the application, opening a browser on the default ASP. When prompted by Visual Studio Code, say Yes to load the required assets for the project. First, open a terminal window and run the following commands to create a new project called Processes. But once I discovered Electron.NET, I was able to eliminate the shell commands and call the library directly.įor this exercise, I'm using Visual Studio Code running on a Mac. I initially planned to make this a standard Electron application that communicated with the library via shell commands that called out to a. I relied on Electron.NET to develop the C1DataEngine Workbench, a cross-platform tool that supports the creation and visualization of data analysis workspaces managed by the ComponentOne DataEngine library for. NET Core command-line extension that builds and launches applications for Windows, macOS, and Linux platforms.Įlectron.NET requires prior installation of the following software: A NuGet package that adds Electron APIs to an ASP.NET developers to invoke native Electron APIs using C#. It is an open-source project that allows. What is Electron.NET?Įlectron.NET is a wrapper around a "normal" Electron application with an embedded ASP. NET developer accustomed to working in C#? That's where Electron.NET comes in. Chances are you have used at least one of these applications, which were all developed using Electron:Įlectron leverages familiar standards such as HTML, CSS, and JavaScript. Supported operating systems include Windows, macOS, and Linux. What is Electron?Įlectron is a framework that supports the development of desktop applications using web technologies such as the Chromium rendering engine and the Node.js runtime. Here is my presentation in blog form, with a source code link at the end of the article. Recently, I had the honor of presenting this topic at the NDC Oslo online event. Building deployment media for other platforms.Implementing native UI elements such as message boxes, system file dialogs, and custom application menus.Using Visual Studio Code to debug ASP.This article provides a walkthrough for developing and deploying an application with Electron.NET. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |