You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Used by the `CKANInstall` target to set additional KSP versions to treat as compatible when installing
27
27
```
28
28
29
-
```{confval} KSPBT_GenerateAssemblyAttribute
30
-
---
31
-
default: `true`
32
-
---
33
-
If set to `true`, automatically generates the `KSPAssembly` for your assembly from the `Version` property.
34
-
```
35
-
36
-
```{confval} KSPBT_GenerateDependencyAttributes
37
-
---
38
-
default: `true`
39
-
---
40
-
If set to `true`, automatically generates `KSPAssemblyDependency` attributes for each dependency. Dependencies should have either the `CKANIdentifier` metadata or `KSPAssemblyName` metadata. Versions can be supplied with `CKANVersion` or `KSPAssemblyVersion`.
41
-
```
42
-
43
29
```{confval} KSPBT_ReferenceSystemAssemblies
44
30
---
45
31
default: `true`
@@ -56,21 +42,134 @@ If set to `true`, adds assembly references to all UnityEngine assemblies in the
56
42
57
43
```{confval} KSPBT_ReferenceGameAssemblies
58
44
---
59
-
default: `true`
45
+
default: `true`, except in the `Unity` configuration
60
46
---
61
47
If set to `true`, adds references to Assembly-CSharp and Assembly-CSharp-firstpass assemblies from the KSP install.
62
48
```
63
49
64
50
```{confval} KSPBT_ReferenceModAssemblies
65
51
---
66
-
default: `true`
52
+
default: `true`, except in the `Unity` configuration
67
53
---
68
54
If set to `true`, adds references to the assemblies included in `ModReference` list.
69
55
```
70
56
57
+
```{confval} KSPBT_GenerateAssemblyAttribute
58
+
---
59
+
default: `true`, except in the `Unity` configuration
60
+
---
61
+
If set to `true`, automatically generates the `KSPAssembly` for your assembly from the `Version` property.
62
+
```
63
+
64
+
```{confval} KSPBT_GenerateDependencyAttributes
65
+
---
66
+
default: `true`, except in the `Unity` configuration
67
+
---
68
+
If set to `true`, automatically generates `KSPAssemblyDependency` attributes for each dependency. Dependencies should have either the `CKANIdentifier` metadata or `KSPAssemblyName` metadata. Versions can be supplied with `CKANVersion` or `KSPAssemblyVersion`.
69
+
```
70
+
71
+
```{confval} KSPBT_CopyDLLsToPluginFolder
72
+
---
73
+
default: `true`, except in the `Unity` configuration
74
+
---
75
+
If set to `true`, automatically copies the compiled DLL to the {confval}`KSPBT_ModPluginFolder`.
76
+
```
77
+
78
+
```{confval} KSPBT_GenerateVersionFile
79
+
---
80
+
default: `true`, except in the `Unity` configuration
81
+
---
82
+
If set to `true`, automatically generates a version file using the information in any {confval}`KSPVersionFile` items. Without defining a {confval}`KSPVersionFile`, nothing will be generated. See [](generating-version-files.md/) for more details.
83
+
```
84
+
71
85
````{confval} KSPBT_GameRoot
72
86
```{warning}
73
87
You should **not** set or use this property in your csproj file.
74
88
```
75
89
This property should be set to the root directory of your KSP install. see [Locating your KSP Install](getting-started.md/#locating-your-ksp-install)
76
90
````
91
+
92
+
## Items
93
+
94
+
````{confval} ModReference
95
+
A reference to another mod that is a dependency. This mod will be automatically referenced in the build process and installed using CKAN if an identifier is given. See [](dependencies.md) for examples.
96
+
97
+
```{rubric} Metadata
98
+
```
99
+
100
+
```{describe} Identity
101
+
The name of the mod you are referencing, as set in that mod's `KSPAssemblyAttribute`
102
+
```
103
+
104
+
```{describe} DLLPath
105
+
The path of the mod's assembly to reference when building, relative to {confval}`KSPBT_GameRoot`.
106
+
```
107
+
108
+
```{describe} CKANIdentifier
109
+
The name of the mod in CKAN to install before building.
110
+
```
111
+
112
+
```{describe} CKANVersion
113
+
The specific version to install from CKAN, if any.
114
+
```
115
+
116
+
Any additional metadata is copied to the resulting [`Reference`](https://learn.microsoft.com/en-us/visualstudio/msbuild/common-msbuild-project-items?view=vs-2022#reference) item
117
+
````
118
+
119
+
````{confval} KSPVersionFile
120
+
Defines a version file to generate. See [](generating-version-files.md) for examples.
121
+
122
+
```{rubric} Metadata
123
+
```
124
+
125
+
```{describe} Identity
126
+
To create a new version file from scratch, set to `.`. Otherwise set to a path to a json version file to use as a base
127
+
```
128
+
```{describe} Destination
129
+
Path to where the generated json version file should be placed
130
+
```
131
+
132
+
```{confval} Name
133
+
---
134
+
default: `$(ProjectName)`
135
+
---
136
+
The mod name. Corresponds to the `NAME` value in json.
137
+
```
138
+
139
+
```{confval} Version
140
+
---
141
+
default: `$(FileVersion)`
142
+
---
143
+
The mod version. Corresponds with the `VERSION` value in json.
144
+
```
145
+
146
+
```{describe} URL
147
+
The URL of the remote version file. Corresponds with the `URL` value in json.
148
+
```
149
+
150
+
```{describe} Download
151
+
Where to link players to update your mod. Corresponds with the `DOWNLOAD` value in json.
152
+
```
153
+
154
+
```{confval} KSP_Version
155
+
---
156
+
default: `1.12`
157
+
---
158
+
The KSP version the mod is targeting. Corresponds with the `KSP_VERSION` value in json.
159
+
```
160
+
161
+
```{confval} KSP_Version_Min
162
+
---
163
+
default: `1.8`
164
+
---
165
+
The minimum supported KSP version. Corresponds with the `KSP_VERSION_MIN` value in json.
166
+
```
167
+
168
+
```{confval} KSP_Version_Max
169
+
---
170
+
default: `1.12`
171
+
---
172
+
The maximum supported KSP version. Corresponds with the `KSP_VERSION_MAX` value in json.
Copy file name to clipboardExpand all lines: docs/msbuild/dependencies.md
+18-27Lines changed: 18 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,33 +4,31 @@ KSPBuildTools can help manage other mods that you depend on
4
4
5
5
## Referencing Dependency DLLs
6
6
7
-
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 `<Private>False</Private>`{l=xml} is set or the DLL will be copied to your output directory.
7
+
Mod DLLs should be referenced with the {confval}`ModReference` item, like so.
8
8
9
-
the {confval}`KSPBT_GameRoot` property can be used to reference the KSP install wherever it is.
KSPBuildTools can install CKAN mods automatically when built. This is useful for CI workflows such as those using the {gha:action}`compile` action, or to make it easier for others to compile your mod themselves. Either add the `<CKANIdentifier>` metadata to your `<Reference>` items, or if the dependency mod doesn't have a dll you need to reference you can use the `<CKANDependency>` item.
23
+
KSPBuildTools can install CKAN mods automatically when built. This is useful for CI workflows such as those using the {gha:action}`compile` action, or to make it easier for others to compile your mod themselves. Either add the `<CKANIdentifier>` metadata to your `<ModReference>` items, or if the dependency mod doesn't have a dll you need to reference you can use the `<CKANDependency>` item.
If the {confval}`KSPBT_GenerateDependencyAttributes` property is set to `true`, KSPBuildTools will generate these attributes automatically. It uses any `Reference` item that has a `<CKANIdentifier>` or `<KSPAssemblyName>` metadata value.
60
+
If the {confval}`KSPBT_GenerateDependencyAttributes` property is set to `true` (the default), KSPBuildTools will generate these attributes automatically.
63
61
64
-
The assembly name is set to the `<KSPAssemblyName>` metadata value, and falls back to the `<CKANIdentifier>` metadata value.
62
+
The assembly name is taken from the value of the item.
65
63
66
64
The version is taken from the `<KSPAssemblyVersion>` metadata value, however leaving it at the default of 0.0.0 is usually acceptable
0 commit comments