This guide offers a detailed process for building the AREG SDK using Microsoft Visual Studio and MSBuild. It provides quick build steps and customization options, ensuring the SDK is optimized for multithreading, Inter-Process Communication (IPC), and Object Remote Procedure Call (Object RPC).
To build the AREG SDK with MSBuild in Microsoft Visual Studio, ensure the following tools are installed on your system:
- Microsoft Visual Studio (with CMake and Clang).
- Java (required for code generation tools).
- Git for repository management.
Note
Make sure MSBuild
is installed and included in your system's PATH.
- Download and install Visual Studio with CMake and Clang.
- Install Java and Git.
This setup prepares your environment to build AREG SDK projects on Windows.
Clone the AREG SDK repository to obtain the latest source code:
git clone https://github.com/aregtech/areg-sdk.git
cd areg-sdk
Open areg-sdk.sln
in Microsoft Visual Studio to build with default settings, or use Terminal or PowerShell in the <areg-sdk>
directory:
MSBuild ./areg-sdk.sln
This command initiates the default configuration for AREG SDK projects.
MSBuild
allows you to configure and optimize the build for different development needs. Below are key configurable properties:
Option | Possible Values | Default | Description |
---|---|---|---|
Configuration | Debug , Release |
Debug |
Sets the build configuration (Debug or Release). |
Platform | Win32 , x64 |
Win32 |
Sets the target architecture: Win32 (32-bit) or x64 (64-bit). |
AregExtended | 0 , 1 |
1 |
Enables extended features in the aregextend library. |
AregLogs | 0 , 1 |
1 |
Enables logging in the SDK for debugging. |
Important
Settings can also be modified in the msvc_setup.props
file in the AREG SDK, containing essential compilation and output configurations. Refer to msvc_setup.props for further details.
Note
The AREG SDK uses the Google Test Adapter NuGet package to compile AREG Framework unit tests. Package directories are specified in the nuget.config file.
Here are examples of MSBuild
commands for different configurations:
Example 1: 64-bit Debug build with extended features and no logging:
MSBuild /m /property:Configuration=Debug /property:Platform=x64 /property:AregExtended=1 /property:AregLogs=0 ./areg-sdk.sln
Example 2: 32-bit Release build with standard features and logging enabled:
MSBuild /m /property:Configuration=Release /property:Platform=Win32 /property:AregExtended=0 /property:AregLogs=1 ./areg-sdk.sln
For additional examples, see the MSBuild Workflow in the AREG SDK repository.
- For additional setup information, refer to Visual Studio CMake Projects or VS Code CMake Quickstart.
- Additionally, read Integrating AREG Framework with Microsoft Visual Studio document.
- For more information on building the AREG SDK, troubleshooting tips, or advanced setup options, see the AREG SDK documentation on GitHub.