# Using Dependencies
KSPBuildTools can help manage other mods that you depend on
## Referencing Dependency DLLs
Mod DLLs should be referenced as with any other DLLs, like so. See [the Microsoft docs on Reference items](https://learn.microsoft.com/en-us/visualstudio/msbuild/common-msbuild-project-items?view=vs-2022#reference) for more info. Make sure that `False`{l=xml} is set or the DLL will be copied to your output directory.
the {confval}`KSPRoot` property can be used to reference the KSP install wherever it is.
```xml
False
$(KSPRoot)/GameData/000_Harmony/0Harmony.dll
False
```
## Installing Dependencies Automatically
KSPBuildTools can install CKAN mods automatically when built. This is useful for CI workflows such as those using the {gh-actions:action}`compile` action, or to make it easier for others to compile your mod themselves. Either add the `` metadata to your `` items, or if the dependency mod doesn't have a dll you need to reference you can use the `` item.
```xml
False
ModuleManager
```
You can also mark explicit versions to install.
```xml
False
ModuleManager
4.2.3
```
## Generating KSP Dependency Attributes
KSP mods should mark their dependency DLLs using the `KSPAssemblyDependency` attribute.
`[assembly: KSPAssemblyDependency("0Harmony", 0, 0, 0)]`{l=csharp}
If the {confval}`GenerateKSPAssemblyDependencyAttributes` property is set to `true`, KSPBuildTools will generate these attributes automatically. It uses any `Reference` item that has a `` or `` metadata value.
The assembly name is set to the `` metadata value, and falls back to the `` metadata value.
The version is taken from the `` metadata value, however leaving it at the default of 0.0.0 is usually acceptable
```xml
False
TweakScaleRescaled
Scale
3.2.0
true
true
```