Skip to content

Installation

Prerequisites

All Platforms

  • .NET 10 SDK or later
  • A code editor (VS Code, Visual Studio, Rider)

Windows

  • WebView2 Runtime (included in Windows 11, auto-installed on Windows 10)

macOS

  • macOS 11 (Big Sur) or later
  • Xcode Command Line Tools: xcode-select --install

Linux

  • GTK 3 and WebKitGTK
  • Ubuntu/Debian: sudo apt install libgtk-3-0 libwebkit2gtk-4.1-0
  • Fedora: sudo dnf install gtk3 webkit2gtk4.1
  • Arch: sudo pacman -S gtk3 webkit2gtk-4.1

Installation

Add Hermes to your project:

bash
dotnet add package Hermes

For Blazor integration:

bash
dotnet add package Hermes.Blazor

Option 2: Project Template

Install the Hermes project templates:

bash
dotnet new install Hermes.Templates

Create a new project:

bash
# Basic Hermes app
dotnet new hermes -n MyApp

# Blazor Hermes app
dotnet new hermes-blazor -n MyBlazorApp

Project Setup

Basic Project (.csproj)

xml
<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <OutputType>WinExe</OutputType>
    <TargetFramework>net10.0</TargetFramework>
    <ImplicitUsings>enable</ImplicitUsings>
    <Nullable>enable</Nullable>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Hermes" Version="1.*" />
  </ItemGroup>
</Project>

Blazor Project (.csproj)

xml
<Project Sdk="Microsoft.NET.Sdk.Razor">
  <PropertyGroup>
    <OutputType>WinExe</OutputType>
    <TargetFramework>net10.0</TargetFramework>
    <ImplicitUsings>enable</ImplicitUsings>
    <Nullable>enable</Nullable>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Hermes.Blazor" Version="1.*" />
  </ItemGroup>
</Project>

Verify Installation

Create a simple test:

csharp
using Hermes;

var window = new HermesWindow()
    .SetTitle("Hermes Test")
    .SetSize(800, 600)
    .Center()
    .LoadHtml("<h1>Hello, Hermes!</h1>");

window.WaitForClose();

Run it:

bash
dotnet run

You should see a window with "Hello, Hermes!" displayed.

Next Steps

Released under the Elastic License 2.0