VEBuild is a modern, modular build system for C++20 written in C# (.NET 9.0+).
It replaces CMake logic with a fluent, type-safe C# API. It treats the file system as the source of truth, handles C++20 Modules natively, and integrates seamlessly with Visual Studio 2022 without constant project reloading.
- C# as a Build Script: Use the full power of .NET to describe your build logic. No more obscure CMake syntax.
- C++20 Modules First: Out-of-the-box support for
.ixx, dependency scanning, and BMI generation (.ifc). - Frictionless Workflow: Add a file to your folder -> Hit Build. No generation steps, no "Reload Project".
- Smart IDE Integration: Generates VS Solutions (
.sln) that link your C++ code with your C# build tool. Debug your build script and your game in the same session. - Incremental: Fast, hash-based change detection for compilation and linking.
To start a new C++ project (e.g., a Game Engine or Application), you don't need CMakeLists.txt. You create a C# Console App.
# Create a folder for your solution
mkdir MyGame && cd MyGame
# Create the C# build tool
dotnet new console -n MyGame.Build
# Install the MSVC Toolchain package
cd MyGame.Build
dotnet add package ve.build.msvcDescribe your C++ projects using the fluent API.
using ve.build.core;
using ve.build.cpp.cpp; // C++ extensions
using ve.build.link.link; // Linker extensions
using ve.build.msvc; // MSVC Toolchain
return await new HostBuilder()
// 1. Define a Shared Library (DLL)
.project("ve.core", p => p
.Type(ProjectType.DLL)
.Sources("src/core") // Scans for .cpp, .ixx, .h recursively
)
// 2. Define an Executable (Game)
.project("my.game", p => p
.Type(ProjectType.EXE)
.Sources("src/game")
// Link against the core library
// Automatically propagates includes, module interfaces (.ifc), and defines
.dependsOf("ve.core")
)
// 3. Use the MSVC Toolchain (cl.exe, link.exe)
.useMsvcToolchain()
.build()
.run(args);# Compiles and Links everything (default: DEBUG, windows-x64)
dotnet run -- buildTo work comfortably in IDE with IntelliSense and Debugging:
dotnet run -- generateProjectFilesThis creates MyGame.sln. Open it in Visual Studio 2022.
- F5 will build your C# tool, then build your C++ project, and finally launch the game.
- IntelliSense works correctly for
#includeandimport module.
VEBuild is distributed as a set of modular NuGet packages.
| Package | Description |
|---|---|
ve.build.msvc |
Start Here. The meta-package that includes the Compiler, Linker, and Generator for Windows. |
ve.build.core |
The core task engine and DAG builder. |
ve.build.cpp |
C++ language abstractions and configuration API. |
ve.build.link |
Linker abstractions (StaticLib, DLL, EXE). |
ve.build.vcxprojgenerator |
Generator for Visual Studio .vcxproj and .sln files. |
Every build operation (Compile source, Link exe, Copy dll) is a node in a Directed Acyclic Graph. VEBuild executes independent nodes in parallel across all available CPU cores.
The system uses cl.exe /scanDependencies to discover module import/export relationships dynamically. It ensures that module interfaces (.ifc) are compiled before the code that consumes them.
For NMake projects in Visual Studio, VEBuild automatically injects module source files from dependent projects as links. This forces VS IntelliSense to index them, enabling "Go To Definition" across project boundaries.
- v1.0.0 RC (Current): Windows (MSVC) support complete.
- v1.1.0: Clang support (Windows/Linux) & C++26 Reflection integration.
- v1.2.0: MacOS support.
- Future: WASM, Android, Consoles.
© 2025 VassalStudio. All rights reserved.