![debuggingelectorn in vs code for mac debuggingelectorn in vs code for mac](https://code.visualstudio.com/assets/updates/1_48/github-publish-public.png)
Save the file, then restore packages when prompted to do so by VS Code. First, open the file BlazorApp.csproj and insert a package reference for the Electron.NET API–hosted on : This involves adding a NuGet package to the project file, inserting some initialization code, and installing a command-line tool to perform builds.
![debuggingelectorn in vs code for mac debuggingelectorn in vs code for mac](https://miro.medium.com/fit/c/176/176/0*2xKiCzbybZSOJgju.jpg)
Let's turn our boilerplate Blazor project into a desktop Electron application. Close the page, return to VS Code, and stop debugging. Press F5 to build and run the application, then open a browser on localhost:5001 to view the default Blazor page. 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 BlazorApp. NET Core command-line extension that builds and launches applications for Windows, macOS, and Linux platforms.Įlectron.NET requires the prior installation of the following software:įollow the steps below and get started by building the canonical Blazor application from the command line.įor this exercise, I'm using Visual Studio Code running on a Mac.
![debuggingelectorn in vs code for mac debuggingelectorn in vs code for mac](https://code.visualstudio.com/assets/docs/editor/debugging/debugconsole.png)
NET developers to invoke native Electron APIs using C#. It leverages familiar standards such as HTML, CSS, and JavaScript.Įlectron.NET allows. Supported operating systems include Windows, macOS, and Linux. Building deployment media for other platformsĮ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.Implementing native UI elements such as message boxes.Using Visual Studio Code to debug Blazor pages.Modifying the default Blazor Server application to use Electron.NET.This blog post illustrates how you can apply the same techniques to create Blazor desktop applications. By providing a wrapper around a standard Electron application with an embedded ASP.NET Core website, Electron.NET allows C# developers to target multiple platforms without coding in JavaScript. I wrote about using the open-source tool Electron.NET to implement cross-platform desktop applications for Windows, macOS, and Linux platforms in a previous blog post.