Skip to content

Commit 2b39307

Browse files
committed
Merge branch 'develop'
2 parents c2ba55e + 79d3d3f commit 2b39307

24 files changed

+231
-108
lines changed

Changelog.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,19 @@
1+
# 0.1.0
2+
3+
## ElectronNET.Core
4+
5+
- Updated `PrintToPDFOptions` to also allow specifying the `PageSize` with an object (#769)
6+
- Updated splashscreen image to have 0 margin (#622)
7+
- Fixed single instance behavior using the `ElectronSingleInstance` property (#901)
8+
- Added option to use `ElectronSplashScreen` with an HTML file (#799)
9+
- Added option to provide floating point value as aspect ratios with `SetAspectRatio` (#793)
10+
111
# 0.0.18
212

313
## ElectronNET.Core
414

515
### Highlights
16+
617
- **Complete MSBuild Integration**: Eliminated CLI tool dependency, moved all build processes to MSBuild with deep Visual Studio integration
718
- **Modernized Architecture**: Restructured process lifecycle with .NET launching first and running Electron as child process for better control and reliability
819
- **Cross-Platform Development**: Build and debug Linux applications directly from Windows Visual Studio via WSL integration
@@ -11,6 +22,7 @@
1122
- **Console App Support**: No longer requires ASP.NET - now works with simple console applications for file system or remote server HTML/JS
1223

1324
### Build System & Project Structure
25+
1426
- Eliminated electron.manifest.json configuration file, replaced with MSBuild project properties
1527
- Introduced new package structure: ElectronNET.Core (main package), ElectronNET.Core.Api (API definitions), ElectronNET.Core.AspNet (ASP.NET integration)
1628
- Added Runtime Identifier (RID) selection as part of project configuration
@@ -19,19 +31,22 @@
1931
- Added custom MSBuild tasks for Electron-specific build operations
2032

2133
### Development Experience
34+
2235
- Implemented unpackaged run-mode for development using regular .NET builds with unpackaged Electron configuration
2336
- Added support for building Linux packages on Windows via WSL integration
2437
- Enabled running and debugging Linux application outputs on Windows through WSL
2538
- Integrated TypeScript compilation with ASP.NET tooling for consistent builds
26-
- Added process orchestration supporting 8 different launch scenarios (packaged/unpackaged × console/ASP.NET × dotnet-first/electron-first)
39+
- Added process orchestration supporting 8 different launch scenarios (packaged/unpackaged × console/ASP.NET × dotnet-first/electron-first)
2740

2841
### Debugging & Runtime
42+
2943
- Dramatically improved debugging experience with ASP.NET-first launch mode
3044
- Added Hot Reload support for ASP.NET code during development
3145
- Implemented proper process termination handling for all exit scenarios
3246
- Minimized startup times through optimized build and launch procedures
3347

3448
### Technical Improvements
49+
3550
- Enhanced splash screen handling with automatic path resolution
3651
- Improved ElectronHostHook integration as proper npm package dependency
3752
- Updated to latest TypeScript version with ESLint configuration
@@ -40,18 +55,19 @@
4055
- Added build-time Electron version compatibility validation
4156

4257
### Package & Distribution
58+
4359
- Integrated MSBuild publishing mechanisms for creating Electron packages
4460
- Added folder publishing support with improved parameter handling
4561
- Implemented automated package.json generation from MSBuild properties
4662
- Added GitHub release automation with proper versioning
4763
- Reduced package sizes by eliminating unnecessary TypeScript dependencies
4864

4965
### Migration & Compatibility
66+
5067
- Maintained backward compatibility for existing ElectronHostHook implementations
5168
- Removed ASP.NET requirement: Now works with simple console applications for file system or remote server HTML/JS scenarios
5269
- Added support for both console and ASP.NET Core application types
5370
- Preserved all existing Electron API functionality while modernizing architecture
5471
- Added migration path for existing projects through updated package structure
5572

5673
This represents a comprehensive modernization of Electron.NET, addressing the major pain points around debugging, build complexity, and platform limitations while maintaining full API compatibility.
57-

README.md

Lines changed: 61 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -2,58 +2,57 @@
22

33
[![donate](https://img.shields.io/badge/Donate-Donorbox-green.svg)](https://donorbox.org/electron-net) [![Gitter](https://badges.gitter.im/ElectronNET/community.svg)](https://gitter.im/ElectronNET/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [![Build status](https://github.com/ElectronNET/Electron.NET/actions/workflows/ci.yml/badge.svg)](https://github.com/ElectronNET/Electron.NET/actions/workflows/ci.yml)
44

5-
# Electron.Net Core is here!
5+
# Electron.NET Core is here!
66

77
## A Complete Transformation
88

9-
ElectronNET.Core represents a fundamental modernization of Electron.NET, addressing years of accumulated pain points while preserving full API compatibility. This isn't just an updateit's a complete rethinking of how .NET developers build and debug cross-platform desktop applications with Electron.
9+
`ElectronNET.Core` represents a fundamental modernization of Electron.NET, addressing years of accumulated pain points while preserving full API compatibility. This isn't just an updateit's a complete rethinking of how .NET developers build and debug cross-platform desktop applications with Electron.
1010

11-
Read more: [**What's New in ElectronNET.Core**](wiki/What's-New)
12-
13-
14-
Build cross platform desktop applications with .NET 6/8 - from console apps to ASP.Net Core (Razor Pages, MVC) to Blazor
11+
Read more: [**What's New in `ElectronNET.Core`**](https://github.com/ElectronNET/Electron.NET/wiki/What's-New)
1512

13+
Build cross platform desktop applications with .NET 6/8/10 - from console apps to ASP.NET Core (Razor Pages, MVC) to Blazor.
1614

1715
## Wait - how does that work exactly?
1816

19-
Well... there are lots of different approaches how to get a X-plat desktop app running. Electron.NET provides a range of ways to build .NET based solutions using Electron at the side of presentation. While the classic Electron.Net setup, using an ASP.Net host ran by the Electron side is still the primary way, there's more flexibility now: both, dotnet and Electron are now able to launch the other for better lifetime management, and when you don't need a local web server - like when running content from files or remote servers, you can drop the ASP.Net stack altogether and got with a lightweight console app instead.
17+
Well... there are lots of different approaches how to get a X-plat desktop app running. Electron.NET provides a range of ways to build .NET based solutions using Electron at the side of presentation.
2018

21-
## 📦 NuGet
19+
While the classic Electron.NET setup, using an ASP.NET host ran by the Electron side is still the primary way, there's more flexibility now: both, dotnet and Electron are now able to launch the other for better lifetime management, and when you don't need a local web server - like when running content from files or remote servers, you can drop the ASP.NET stack altogether and got with a lightweight console app instead.
2220

23-
[![NuGet](https://img.shields.io/nuget/v/ElectronNET.Core.svg?style=flat-square) ElectronNET.Core ](https://www.nuget.org/packages/ElectronNET.Core.API/) | [![NuGet](https://img.shields.io/nuget/v/ElectronNET.Core.API.svg?style=flat-square) ElectronNET.Core.API ](https://www.nuget.org/packages/ElectronNET.Core.API/) | [![NuGet](https://img.shields.io/nuget/v/ElectronNET.Core.AspNet.svg?style=flat-square) ElectronNET.Core.AspNet ](https://www.nuget.org/packages/ElectronNET.Core.AspNet/)
21+
## 📦 NuGet
2422

23+
* ElectronNET.Core: [![NuGet](https://img.shields.io/nuget/v/ElectronNET.Core.svg?style=flat-square)](https://www.nuget.org/packages/ElectronNET.Core.API/)
24+
* ElectronNET.Core.API: [![NuGet](https://img.shields.io/nuget/v/ElectronNET.Core.API.svg?style=flat-square)](https://www.nuget.org/packages/ElectronNET.Core.API/)
25+
* ElectronNET.Core.AspNet: [![NuGet](https://img.shields.io/nuget/v/ElectronNET.Core.AspNet.svg?style=flat-square)](https://www.nuget.org/packages/ElectronNET.Core.AspNet/)
2526

2627
## 🛠 Requirements to Run
2728

28-
Our API uses .NET 6/8, so our
29-
30-
Also you should have installed:
31-
32-
* .NET 6/8 or later
33-
* OS
34-
minimum base OS is the same as [.NET 6](https://github.com/dotnet/core/blob/main/release-notes/6.0/supported-os.md) / [.NET 8](https://github.com/dotnet/core/blob/main/release-notes/8.0/supported-os.md).
35-
* NodeJS (at least [Version 22.x](https://nodejs.org))
29+
You should have installed:
3630

31+
* .NET 6/8 or later.
32+
* The minimum base OS is the same as [.NET 6](https://github.com/dotnet/core/blob/main/release-notes/6.0/supported-os.md) / [.NET 8](https://github.com/dotnet/core/blob/main/release-notes/8.0/supported-os.md).
33+
* Node.JS using at least [Version 22.x](https://nodejs.org).
3734

38-
## 👩‍🏫 Usage with ASP.Net
35+
## 👩‍🏫 Usage with ASP.NET
3936

40-
- Create a new ASP.Net Core project
41-
- Install the following two nuget packages:
37+
- Create a new ASP.NET Core project
38+
- Install the following two NuGet packages:
4239

4340
```ps1
4441
dotnet add package ElectronNET.Core
4542
4643
dotnet add package ElectronNET.Core.AspNet
4744
```
4845

49-
### Enable Electron.NET on Startup
46+
### Classic ASP.NET Core
47+
48+
#### Enable Electron.NET on Startup
5049

5150
To do so, use the `UseElectron` extension method on a `WebApplicationBuilder`, an `IWebHostBuilder` or any descendants.
5251

5352
> [!NOTE]
5453
> New in Electron.NET Core is that you provide a callback method as an argument to `UseElectron()`, which ensures that you get to know the right moment to set up your application UI.
5554
56-
### Program.cs
55+
#### Program.cs
5756

5857
```csharp
5958
using ElectronNET.API;
@@ -68,7 +67,7 @@ using ElectronNET.API.Entities;
6867
.Run();
6968
}
7069

71-
public static async Task ElectronAppReady()
70+
public static async Task ElectronAppReady()
7271
{
7372
var browserWindow = await Electron.WindowManager.CreateWindowAsync(
7473
new BrowserWindowOptions { Show = false });
@@ -77,11 +76,46 @@ using ElectronNET.API.Entities;
7776
}
7877
```
7978

79+
### Minimal API Example
8080

81-
## 🚀 Starting and Debugging the Application
81+
For a minimal API you can use:
82+
83+
```csharp
84+
using ElectronNET;
85+
using ElectronNET.API;
86+
using ElectronNET.API.Entities;
87+
88+
var builder = WebApplication.CreateBuilder(args);
8289

83-
Just press F5 in Visual Studio or use dotnet for debugging.
90+
builder.Services.AddRazorPages();
91+
builder.Services.AddElectron(); // <- might be useful to set up DI
8492
93+
builder.UseElectron(args, async () =>
94+
{
95+
var browserWindow = await Electron.WindowManager.CreateWindowAsync(
96+
new BrowserWindowOptions { Show = false, AutoHideMenuBar = true });
97+
98+
browserWindow.OnReadyToShow += () => browserWindow.Show();
99+
});
100+
101+
var app = builder.Build();
102+
103+
// Configure the HTTP request pipeline.
104+
if (!app.Environment.IsDevelopment())
105+
{
106+
app.UseExceptionHandler("/Error");
107+
}
108+
109+
app.UseStaticFiles();
110+
app.UseRouting();
111+
app.UseAuthorization();
112+
app.MapRazorPages();
113+
app.Run();
114+
```
115+
116+
## 🚀 Starting and Debugging the Application
117+
118+
Just press `F5` in Visual Studio or use dotnet for debugging.
85119

86120
## 📔 Usage of the Electron API
87121

@@ -92,13 +126,11 @@ In this YouTube video, we show you how you can create a new project, use the Ele
92126
> [!NOTE]
93127
> The video hasn't been updated for the changes in ElectronNET.Core, so it is partially outdated.
94128
95-
96-
97129
## 👨‍💻 Authors
98130

99131
* **[Gregor Biswanger](https://github.com/GregorBiswanger)** - (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](http://www.cross-platform-blog.com) - Twitter [@BFreakout](https://www.twitter.com/BFreakout)
100132
* **[Dr. Florian Rappl](https://github.com/FlorianRappl)** - Software Developer - from Munich, Germany. Microsoft MVP & Web Geek. - [The Art of Micro Frontends](https://microfrontends.art) - [Homepage](https://florian-rappl.de) - Twitter [@florianrappl](https://twitter.com/florianrappl)
101-
* [**softworkz**](https://github.com/softworkz) - full range developer - likes to start where others gave up - MS MVP alumni and Munich citizen as well
133+
* **[softworkz](https://github.com/softworkz)** - Full Range Developer - likes to start where others gave up. MS MVP alumni and Munich citizen as well.
102134
* **[Robert Muehsig](https://github.com/robertmuehsig)** - Software Developer - from Dresden, Germany, now living & working in Switzerland. Microsoft MVP & Web Geek. - [codeinside Blog](https://blog.codeinside.eu) - Twitter [@robert0muehsig](https://twitter.com/robert0muehsig)
103135

104136
See also the list of [contributors](https://github.com/ElectronNET/Electron.NET/graphs/contributors) who participated in this project.
@@ -108,7 +140,6 @@ See also the list of [contributors](https://github.com/ElectronNET/Electron.NET/
108140
Feel free to submit a pull request if you find any bugs (to see a list of active issues, visit the [Issues section](https://github.com/ElectronNET/Electron.NET/issues).
109141
Please make sure all commits are properly documented.
110142

111-
112143
## 🙏 Donate
113144

114145
We do this open source work in our free time. If you'd like us to invest more time on it, please [donate](https://donorbox.org/electron-net). Donation can be used to increase some issue priority. Thank you!
@@ -124,9 +155,7 @@ Any support appreciated! 🍻
124155

125156
## 🎉 License
126157

127-
MIT-licensed. See [LICENSE](./LICENSE) for details.
158+
MIT-licensed. See [LICENSE](https://github.com/ElectronNET/Electron.NET/blob/main/LICENSE) for details.
128159

129160
**Enjoy!**
130-
131-
132161

-85.6 KB
Binary file not shown.
-368 KB
Binary file not shown.
-108 KB
Binary file not shown.
-57.2 KB
Binary file not shown.
-27.1 KB
Binary file not shown.

nuke/Build.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ protected override void OnBuildInitialized()
103103
VersionPostFix = $"-pre";
104104
}
105105

106-
Log.Information("Building version: {Version}", Version);
106+
Log.Information("Building version {Version} with postfix {VersionPostFix}", Version, VersionPostFix);
107107
}
108108

109109
Target Clean => _ => _

0 commit comments

Comments
 (0)