WebWindowNetCore 10.0.0-beta-4
See the version list below for details.
dotnet add package WebWindowNetCore --version 10.0.0-beta-4
NuGet\Install-Package WebWindowNetCore -Version 10.0.0-beta-4
<PackageReference Include="WebWindowNetCore" Version="10.0.0-beta-4" />
<PackageVersion Include="WebWindowNetCore" Version="10.0.0-beta-4" />
<PackageReference Include="WebWindowNetCore" />
paket add WebWindowNetCore --version 10.0.0-beta-4
#r "nuget: WebWindowNetCore, 10.0.0-beta-4"
#:package WebWindowNetCore@10.0.0-beta-4
#addin nuget:?package=WebWindowNetCore&version=10.0.0-beta-4&prerelease
#tool nuget:?package=WebWindowNetCore&version=10.0.0-beta-4&prerelease
WebWindowNetCore
A Webview Application for Windows and Linux similar to Electron. It uses a functional builder pattern to set up the application. It has an integrted Asp.NET (Kestrel) server which can be used to host the app and to communicate between the C# application and the web app:
- you can call via javascript fetch from the web app (json input and output)
- The C# app can send SSE events to the web app
Prerequisites for Linux
sudo apt install libgtk-4-dev
`
WebWindowNetCore is the base Nuget packege, you need one more Nuget packages for every to supporting Operating system:
| Windows | Linux |
|---|---|
| WebWindowNetCore.Window | WebWindowNetCore.Linux |
## Functional builder setup in the C# application
There is a builder pattern to setup the application (```WebView.Create```):
WebView
.Create()
.InitialBounds(600, 800)
.Title("WebView Test")
.ResourceIcon("icon")
.SaveBounds()
.Url($"file://{Directory.GetCurrentDirectory()}/webroot/index.html")
#if DEBUG
.DebuggingEnabled()
#endif
.Build()
.Run();
### Setup integrated kestrel server
The integrated Asp.NET kestrel server also uses a builder pattern (```ConfigureHttp```)
WebView
.Create()
.InitialBounds(600, 800)
.Title("WebView Test")
.ResourceIcon("icon")
.SaveBounds()
.ConfigureHttp(http ⇒ http
.ResourceWebroot("webroot", "/web")
.UseJsonPost<Cmd1Param, Cmd1Result>("request/cmd1", JsonRequest1)
.UseJsonPost<Cmd2Param, Cmd2Result>("request/cmd2", JsonRequest2)
.UseSse("sse/test", sseEventSource)
.Build())
#if DEBUG
.DebuggingEnabled()
#endif
.Build()
.Run("de.uriegel.Commander");
The default (local) port is 20000. It can be adapted.
### Serving web app files from resource
It is possible to serve the web app via the integrated kestrel server, when the web app files are included as C# resources. You have to specify the resource root, under which the resource files are saved.
Please refer to the sample App
### How to setup .NET project:
<PropertyGroup>
<IsWindows Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))' == 'true'">true</IsWindows>
<IsOSX Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::OSX)))' == 'true'">true</IsOSX>
<IsLinux Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true'">true</IsLinux>
</PropertyGroup>
<PropertyGroup Condition="'$(IsWindows)'=='true'"> <OutputType>WinExe</OutputType> <TargetFramework>net6.0-windows</TargetFramework> <RuntimeIdentifier>win-x64</RuntimeIdentifier> </PropertyGroup>
<PropertyGroup Condition="'$(IsLinux)'=='true'"> <OutputType>Exe</OutputType> <TargetFramework>net6.0</TargetFramework> <RuntimeIdentifier>linux-x64</RuntimeIdentifier> </PropertyGroup>
<ItemGroup Condition="'$(IsWindows)'=='true'"> <PackageReference Include="WebWindowNetCore.Windows" Version="..*" /> </ItemGroup>
<ItemGroup Condition="'$(IsLinux)'=='true'"> <PackageReference Include="WebWindowNetCore.Linux" Version="..*" /> </ItemGroup>
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net8.0-windows7.0 is compatible. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- AspNetExtensions (>= 7.3.1)
- WebWindowNetCore.Linux (>= 7.0.0-beta-2)
-
net8.0-windows7.0
- AspNetExtensions (>= 7.3.1)
- WebWindowNetCore.Windows (>= 6.0.0-beta-2)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on WebWindowNetCore:
| Package | Downloads |
|---|---|
|
WebWindowNetCore.Electron
Dependencies for Electron for package WebWindowNetCore. Please look there for further information. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 11.0.19-beta-19 | 207 | 2/26/2025 |
| 11.0.18-beta-18 | 172 | 2/25/2025 |
| 11.0.17-beta-17 | 168 | 2/24/2025 |
| 11.0.16-beta-16 | 144 | 2/24/2025 |
| 11.0.15-beta-15 | 171 | 2/23/2025 |
| 11.0.14-beta-14 | 163 | 2/17/2025 |
| 11.0.13-beta-13 | 161 | 2/15/2025 |
| 11.0.12-beta-12 | 195 | 2/14/2025 |
| 11.0.11-beta-11 | 180 | 2/13/2025 |
| 11.0.10-beta-10 | 157 | 2/12/2025 |
| 11.0.9-beta-9 | 178 | 2/11/2025 |
| 11.0.8-beta-8 | 194 | 2/10/2025 |
| 11.0.7-beta-7 | 161 | 2/8/2025 |
| 11.0.6-beta-6 | 135 | 2/8/2025 |
| 11.0.5-beta-5 | 150 | 2/8/2025 |
| 11.0.4-beta-4 | 160 | 2/8/2025 |
| 11.0.3-beta-3 | 157 | 2/7/2025 |
| 11.0.2-beta-2 | 186 | 2/7/2025 |
| 10.0.16 | 464 | 9/3/2024 |
| 10.0.0-beta-4 | 183 | 8/7/2024 |