Skip to content

Latest commit

 

History

History
56 lines (34 loc) · 1.83 KB

BUILDING.md

File metadata and controls

56 lines (34 loc) · 1.83 KB

Building xUnit.net

The primary build system for xUnit.net is done via command line, and officially supports Linux and Windows. Users running macOS can generally follow the Linux instructions (while installing the macOS equivalents of the dependencies).

Pre-Requisites

You will need the following software installed (regardless of OS):

Linux Pre-Requisites

Linux users will additionally need:

Windows Pre-Requisites

Windows users will additionally need:

  • .NET Framework 4.7.2 or later (part of the Windows OS)
  • PowerShell (or PowerShell Core)

Ensure that you have configured PowerShell to be able to run local unsigned scripts (either by running Set-ExecutionPolicy RemoteSigned from within PowerShell, or by launching PowerShell with the -ExecutionPolicy RemoteSigned command line switch).

Command-Line Build

  1. Linux users: Open a terminal to your favorite shell.

    Windows users: Open PowerShell (or PowerShell Core).

  2. From the root folder of the source repo, this command will build the code & run all tests:

    ./build

    To build a specific target (or multiple targets):

    ./build [target [target...]]

    The common targets (case-insensitive) include:

    • Restore: Perform package restore
    • Build: Build the source
    • Test: Run all unit tests
    • TestCore: Run all unit tests (.NET Core)
    • TestFx: Run all unit tests (.NET Framework)
    • Packages: Create NuGet packages

    You can get a list of options:

    ./build --help