Getting started
How to get started
If you're familiar with the structure of our build system, navigate to the Structure page or use this as a quick reference. If you're new to our build system, you can get started by reading this first, then diving deep to the build system structure.
To get started with a very minimal C# application with just building and cleaning support, follow these steps (in Visual Studio Code):
Follow the steps to create a minimal C# application here. Let's assume that the root C# application name is
NewApp.Open the terminal by going to Terminal > New Terminal (or press the CTRL + SHIFT + ` keys)
Execute the
git clone https://github.com/Aptivi/toolscommandIf you've initialized the Git repository for your project, you'll have to clone it as a submodule inside the root directory of your project using the
git submodule add https://github.com/Aptivi/toolscommand and to push the commit.
Create the
vnddirectoryUnderneath the
vnddirectory, create three files:vendor.sh: This will store functions that define actionsvendor-build.cmd: This will store commands to initiate the buildvendor-clean.cmd: This will store commands to initiate the cleanup process, such as wiping older build files
Replace the contents of
vendor.shwith:#!/bin/bash build() { dotnet build "$ROOTDIR/NewApp.sln" -p:Configuration=Release } clean() { rm -rf "$ROOTDIR/NewApp/bin" rm -rf "$ROOTDIR/NewApp/obj" }Replace the contents of
vendor-build.cmdwith:set ROOTDIR=%~dp0\.. dotnet build "%ROOTDIR%\NewApp.sln" -p:Configuration=ReleaseReplace the contents of
vendor-clean.cmdwith:set ROOTDIR=%~dp0\.. rd /s /q "%ROOTDIR%\NewApp\bin" rd /s /q "%ROOTDIR%\NewApp\obj"Open the terminal emulator on your target platform, change the working directory to the project directory, and execute the build and the clean operations using the following commands:
If you're running Linux:
$ ./tools/build.sh $ ./tools/clean.shIf you're running Windows:
.\tools\build.cmd .\tools\clean.cmd
If there are no errors, you've created your minimal build system that builds the binary and cleans up old build files!
In order to explore more, take a look at the build system structure to learn more!
Last updated