-
Notifications
You must be signed in to change notification settings - Fork 10.2k
Building from source
Before opening our .sln files in Visual Studio or VS Code, executing the following on command-line:
build.cmd /t:Restore
This will download required tools.
For VS Code and Visual Studio to work correctly, you must place the following location in your PATH.
Windows: %USERPROFILE%\.dotnet\x64
Linux/macOS: $HOME/.dotnet
This must come before any other installation of dotnet
. In Windows, we recommend removing C:\Program Files\dotnet
from PATH in system variables and adding %USERPROFILE%\.dotnet\x64
to PATH in user variables.
Most repositories in https://github.com/aspnet/ have a build.cmd
or build.sh
script in the repository root. Executing this script will begin building the default lifecycle. The steps of the default lifecycle, in order, are:
- Prepare
- Restore
- Compile
- Package
- Test
- Verify
- Build**
** This is the default build target.
To run only a portion of the lifecycle, add arguments in the form /target:$name
or /t:$name
for short. For example:
./build.sh /t:Compile
Additional properties can be added as an argument in the form /property:$name=$value
, or /p:$name=$value
for short. For example:
build.cmd /p:Configuration=Release
Common properties include:
Property | Description |
---|---|
BuildNumber | (string). A specific build number, typically from a CI counter |
Configuration |
Debug or Release . Default = Debug . |
SkipTests |
true or false . When true, builds without running tests. |
NoBuild |
true or false . Runs tests without rebuilding. |