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
If you get any compile errors that look like the following line
204
-
when you do a full rebuild, it might mean there is one of these
205
-
DLLs missing from the Resources:
206
-
207
-
* "The type or namespace name [name here] could not be found (are you missing a using directive or an assembly reference?)"
208
-
If you get one of these errors and don't know which DLL to use to fix it,
209
-
here is how you find out:
210
-
* Go to this page: https://docs.unity3d.com/ScriptReference/
211
-
* Find the "Search Scripting" box in the top of the page.
212
-
* Type the [name here] from the error message in that search box and hit enter
213
-
* Click on the resulting link to go to that class's documentation page.
214
-
* The Unity documentation for that class will start with some faint grey text at the top of the page that says, "Implemented in:", which tells you which DLL you need to reference to get code using that class to compile properly.
215
-
216
-
3. If you do not have a copy of KSP locally, you may
217
-
download dummy assemblies at https://github.com/KSP-KOS/KSP_LIB
218
-
219
-
3. Make sure you are targeting this version of .Net: ".Net 4.0 Framework".
220
-
It is *sometimes* possible to make DLLs work for newer versions of .Net,
221
-
but only on some user's computers. To ensure that you remain compatible
222
-
with all the target platforms (which are using an older version of Mono),
223
-
you must limit yourself to .net 4.0 only. If you use a newer feature that
224
-
did not exist yet in .Net 4.0, it may result in a DLL that works fine on
225
-
your computer, but not all the KSP target platforms.
226
-
227
-
4. Tell "NuGet" to pull the packages defined in the kOS solution. (In Visual
228
-
Studio, this is accomplished by right clicking the kOS Solution and picking
229
-
"Restore NuGet Packages". In other dev environments it may be a different
230
-
place on the menus.)
231
-
232
-
5. If you want building the solution to update the dlls in your KSP
233
-
directory, create a symbolic link called `KSPdirlink` from the root
234
-
of this repository to your KSP installation directory.
235
-
236
-
**Note**: the list of assemblies above is not necessarily exactly what you will need. The `UnityEngine.ImageConversionModule` assembly for example only exists on the macOS port of KSP.
237
-
238
-
You can build the list of assemblies yourself by building the kOS solution and looking for the "forwarded to assembly" errors. These errors should look something like this:
239
-
240
-
> …/KOS/src/kOS/Binding/FlightStats.cs(143,143): Error CS1069: The type name 'Rigidbody' could not be found in the namespace 'UnityEngine'. This type has been forwarded to assembly 'UnityEngine.PhysicsModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' Consider adding a reference to that assembly. (CS1069) (kOS),
241
-
242
-
In this case the assembly you are looking for is `UnityEngine.PhysicsModule` which should be provided in the `UnityEngine.PhysicsModule.dll` DLL file.
111
+
KOS makes use of [KSPBuildTools](https://github.com/kspmoddingLibs/kspbuildTools/).
112
+
Please refer to that documentation for details. If you restore the nuget package
113
+
references and set your KSP install root, everything should build without any
114
+
modifications to the project or sln files.
115
+
116
+
Since KOS contains several csproj files, you should set the path to your KSP install
117
+
in a solution-wide `KOS.props.user` file adjacent to `KOS.sln`. An example file
0 commit comments