Installation
This page helps you confirm that your machine can build and run Zeus samples.
Requirements
| Tool | Purpose | How to check |
|---|---|---|
| .NET 8 SDK | Build Zeus and your app | dotnet --version should show 8.x.x |
| Git | Clone the source | git --version |
| Visual Studio 2022 / Rider | More convenient for WinForms or WPF | Can create net8.0-windows projects |
You do not need a real serial device, meter, or USB-to-serial adapter to run the console samples.
Option 1: Create a Project With One Command
This is the recommended first step. Templates wire the target framework, package references, virtual channel or zeus.json.
dotnet new install Zeus.Templates
dotnet new zeus-console -n ZeusCheck
cd ZeusCheck
dotnet run
Expected output is similar to:
Channel meter state: Open
Echo received: PING
Zeus environment check completed.
Other templates:
dotnet new zeus-winforms -n MyPanel
dotnet new zeus-wpf -n MyPanel.Wpf
dotnet new zeus-modbus -n MyOven
When debugging templates from this repository, pack first, then install the nupkg. Do not install the raw templates folder.
dotnet pack src/Zeus.Templates/Zeus.Templates.csproj -c Release -o artifacts/template-smoke
dotnet new install artifacts/template-smoke/Zeus.Templates.0.20.1.nupkg
Option 2: Run the Source Samples
Use this when you are debugging Zeus itself.
git clone https://github.com/Mokode-dev/Zeus.git
cd Zeus/code
dotnet test Zeus.sln
dotnet run --project samples/Zeus.Samples.Console.Headless
Expected output is similar to:
Channel meter state: Open
Echo received: PING
Host stopped.
The exact sample text may be localized, but seeing PING means the host, channel, and receive event path are working.
Option 3: Install NuGet Packages
Console or service app:
dotnet add package Zeus.Communications
WinForms:
dotnet add package Zeus.Communications
dotnet add package Zeus.Presentation.WinForms
WPF:
dotnet add package Zeus.Communications
dotnet add package Zeus.Presentation.Wpf
Install protocol packages by device type. If JSON declares a device type, install that protocol package too.
dotnet add package Zeus.Protocols.Modbus
dotnet add package Zeus.Protocols.Mc
dotnet add package Zeus.Protocols.S7
dotnet add package Zeus.Protocols.Fins
dotnet add package Zeus.Protocols.HostLink
dotnet add package Zeus.Protocols.Mewtocol
dotnet add package Zeus.Protocols.EtherNetIp
dotnet add package Zeus.Protocols.Dlt645
dotnet add package Zeus.Protocols.Iec104
dotnet add package Zeus.Protocols.Mqtt
dotnet add package Zeus.Protocols.Snmp
See NuGet Packages for package selection by scenario.
Option 4: Source Project References
When developing inside the repository or debugging Zeus itself, use project references:
<ItemGroup>
<ProjectReference Include="..\..\src\Zeus.Communications\Zeus.Communications.csproj" />
<ProjectReference Include="..\..\src\Zeus.Configuration\Zeus.Configuration.csproj" />
<ProjectReference Include="..\..\src\Zeus.Presentation.WinForms\Zeus.Presentation.WinForms.csproj" />
<ProjectReference Include="..\..\src\Zeus.Protocols.Modbus\Zeus.Protocols.Modbus.csproj" />
</ItemGroup>
Do not mix NuGet and source references for the same Zeus assembly in one app.
More Samples
Run from the code directory:
dotnet run --project samples/Zeus.Samples.WinForms.QuickStart
dotnet run --project samples/Zeus.Samples.Wpf.QuickStart
dotnet run --project samples/Zeus.Samples.Console.Config
dotnet run --project samples/Zeus.Samples.Console.Modbus
dotnet run --project samples/Zeus.Samples.Console.Mc
dotnet run --project samples/Zeus.Samples.Console.S7
dotnet run --project samples/Zeus.Samples.Console.Fins
dotnet run --project samples/Zeus.Samples.Console.HostLink
dotnet run --project samples/Zeus.Samples.Console.Mewtocol
dotnet run --project samples/Zeus.Samples.Console.EtherNetIp
dotnet run --project samples/Zeus.Samples.Console.Dlt645
dotnet run --project samples/Zeus.Samples.Console.Iec104
dotnet run --project samples/Zeus.Samples.Console.Mqtt
dotnet run --project samples/Zeus.Samples.Console.TcpServer
WinForms and WPF samples open a point-table window backed by zeus.json. Protocol samples use local virtual PLCs, meters, stations, brokers, or loopback connections, so no real hardware is required.
Common Issues
| Symptom | Likely cause | Fix |
|---|---|---|
dotnet is not found | .NET SDK is not installed or PATH was not refreshed | Install .NET 8 SDK and reopen the terminal |
Version is 7.x.x or lower | Old SDK is first on PATH | Install .NET 8 SDK |
| Zeus package cannot be found | nuget.org unavailable or package name is wrong | Check nuget.org and package spelling |
| WinForms / WPF restore fails | Project does not target Windows desktop | Use net8.0-windows |
| Sample builds but serial port fails | Real port is missing or busy | Start with virtual samples, then read Serial Port |
Next: Console Sample.