Project dependencies
A project can have various types of dependencies.
ProjectDependency
This is a dependency on another project, the source code of which is included in the list of projects in the build system.
Example:
{
"ProjectDependency": {
"path": "../main.process/tlb/project.json",
"include": "build",
"explicit_restore": false,
"is_visible": false
}
}
Available keys:
path
(mandatory) - the path to the JSON file with the settings of the dependent project;explicit_restore
- build results of the dependent project will be copied to the output directories of the current project:- Default is
false
; - If the flag is set to
true
, it will be passed to transitive dependencies, ensuring all transitive dependencies are restored even if theirexplicit_restore
isfalse
.
- Default is
include
- the value that will be passed toPackageDependency
when forming the package (it will be used in publishing process);is_visible
- the dependency will be added to the generated package, while publishing.
PackageDependency
This is a dependency on a package in an external binary file repository, such as nuget.org. Before compiling the current project, such a dependency will be restored, placing the binary files in the required directory.
Example:
{
"PackageDependency": {
"condition": "$(Platform) == 'x86'",
"id": "Some.Package.Id",
"version": "1.0.2",
"out_dir: "./",
"is_visible": false
}
}
Available keys:
id
(mandatory) - the unique name of the package;version
(mandatory) - the version of the package to be downloaded (a mask can be specified);condition
- the condition for unpacking the dependency. Since MSBuild is used, the format of the condition should be appropriate.out_dir
- the directory for unpacking the dependency. If not specified, the dependency will be unpacked into the output directories of the current project. This key is mandatory for Res project types.is_visible
- the dependency will be added to the generated package, while publishing.
NativeDependencies
This is a list of dependencies specified in the project file itself (dproj / csproj / idl / etc.). The resulting list of dependencies will be converted into ProjectDependency
.
Example:
{
"NativeDependencies": {
"include": "build",
"explicit_restore": false,
"is_visible": false
}
}
Available keys are the same as in ProjectDependency.