- Type: .NET 10 WinForms Desktop Application
- Language: C#
- Target: Windows x64
- Main Project:
OpenpilotToolkit/OpenpilotToolkit.csproj - Build Output:
OpenpilotToolkit/bin/{Configuration}/net10.0-windows10.0.19041/win-x64/OpenpilotToolkit.exe
- .NET 10 SDK
- Cap'n Proto compiler (
capnproto,libcapnp-dev) - capnpc-csharp (dotnet tool)
bash .agent/setup.sh && bash .agent/quick-build.sh# 1. Setup environment (one-time)
bash .agent/setup.sh
# 2. Restore NuGet packages
bash .agent/restore.sh
# 3. Build (Release or Debug)
bash .agent/build.sh
bash .agent/build.sh Debug
# 4. Quick build (restore + build)
bash .agent/quick-build.sh
bash .agent/quick-build.sh DebugOpenpilotToolkit/
├── .agent/ # Build automation scripts
│ ├── setup.sh # Install .NET, Cap'n Proto, capnpc-csharp
│ ├── restore.sh # Restore NuGet packages
│ ├── build.sh # Build project
│ └── quick-build.sh # Restore + build
├── OpenpilotToolkit/ # Main application (WinForms)
├── OpenpilotSdk/ # SDK with Cap'n Proto schemas (*.capnp files)
├── MaterialSkin/ # Material Design UI components
├── SSH.NET/ # SSH library (git submodule)
├── SshNet.Keygen/ # SSH key generation
├── OpenpilotToolkitAndroid/ # Android version (skip for desktop builds)
└── agents.md # This file
--runtime win-x64 # Target Windows x64
/p:EnableWindowsTargeting=true # Enable Windows APIs on Linux
--verbosity quiet # Suppress verbose outputSSH.NET → SshNet.Keygen → OpenpilotSdk → MaterialSkin → OpenpilotToolkit
(Scripts handle this automatically)
Cause: Cap'n Proto not installed
Fix:
sudo apt-get install capnproto libcapnp-devCause: Cap'n Proto PWD sensitivity
Fix: Scripts handle automatically with unset PWD
Cause: WinForms designer serialization warnings (.NET 10)
Impact: None - safe to ignore
Cause: .NET Framework package compatibility warnings
Impact: None - packages work fine with .NET 10
Cause: Git submodule not initialized
Fix:
git submodule update --init --recursiveCause: PATH not updated
Fix:
export DOTNET_ROOT=$HOME/.dotnet
export PATH="$DOTNET_ROOT:$HOME/.dotnet/tools:$PATH"When modifying code, determine rebuild requirements:
| Changed Files | Action Required |
|---|---|
*.cs (C# code) |
bash .agent/build.sh |
*.capnp (schemas) |
bash .agent/quick-build.sh |
*.csproj (project files) |
bash .agent/quick-build.sh |
| Dependencies added/removed | bash .agent/quick-build.sh |
After build:
# Verify executable exists
ls -lh OpenpilotToolkit/bin/Release/net10.0-windows10.0.19041/win-x64/OpenpilotToolkit.exe
# Check file size (should be ~several MB)
du -h OpenpilotToolkit/bin/Release/net10.0-windows10.0.19041/win-x64/OpenpilotToolkit.exe# GitHub Actions example
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Setup
run: bash .agent/setup.sh
- name: Build
run: bash .agent/quick-build.sh- Schema files:
OpenpilotSdk/OpenPilot/Cereal/*.capnp - C# code generated during build via capnpc-csharp
- Requires both
capnpcompiler andcapnpc-csharpplugin
- Fresh Linux VM (Ubuntu/Debian)
- Cross-compiles for Windows x64
- Git submodules must be initialized before build
bin/{Configuration}/net10.0-windows10.0.19041/win-x64/
├── OpenpilotToolkit.exe # Main executable
├── OpenpilotToolkit.dll # Application DLL
├── OpenpilotSdk.dll # SDK with generated Cap'n Proto types
├── Renci.SshNet.dll # SSH library
├── MaterialSkin.dll # UI components
└── *.dll # Other dependencies
| Task | Command |
|---|---|
| First-time setup | bash .agent/setup.sh && bash .agent/quick-build.sh |
| Rebuild after changes | bash .agent/build.sh |
| Full rebuild | bash .agent/quick-build.sh |
| Debug build | bash .agent/build.sh Debug |
| Check environment | dotnet --version && capnp --version |
- Installs .NET 10 SDK to
~/.dotnet - Installs Cap'n Proto via apt (
capnproto,libcapnp-dev) - Installs capnpc-csharp as global dotnet tool
- Idempotent (safe to run multiple times)
- Restores NuGet packages for OpenpilotToolkit.csproj
- Automatically restores all project dependencies
- Must run after setup.sh
- Builds OpenpilotToolkit in specified configuration (default: Release)
- Requires prior restore (use
--no-restoreflag) - Cross-compiles for Windows x64
- Combines restore.sh + build.sh
- Recommended for most builds
- Accepts configuration argument (Release/Debug)
- All paths are relative to repository root
- Scripts must be run from repository root or use absolute paths
- Git submodules required: Run
git submodule update --init --recursivebefore setup - Build is cross-platform: Builds Windows app on Linux
- Output is not runnable on Linux: Requires Windows or Wine to execute
- PWD issues handled automatically: Scripts unset PWD before building
- Warnings are expected: WFO1000 and NU1701 warnings are normal and safe