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
Copy file name to clipboardExpand all lines: docs/msbuild/getting-started.md
+8-34Lines changed: 8 additions & 34 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,13 +6,6 @@ There are several ways to use the KSPBuildTools package in your mod. [KSPBuildT
6
6
7
7
A detailed walkthrough for creating a new mod project using KSPBuildTools can be found [here](https://github.com/KSPModdingLibs/KSPModdingWiki/wiki/Creating-a-new-Plugin-Mod).
8
8
9
-
### Install with NuGet - Older Framework Style projects
10
-
11
-
1. Right-click on your project file in Visual Studio and select "Manage NuGet Packages."
12
-
2. Search for KSPBuildTools
13
-
3. Optionally, check "Include prerelease" to get access to the bleeding edge of KSPBuildTools
14
-
4. Click "Install"
15
-
16
9
### Install with NuGet - SDK Style projects
17
10
18
11
either run the following command:
@@ -33,6 +26,13 @@ or add the following to your csproj:
33
26
```
34
27
````
35
28
29
+
### Install with NuGet - Older Framework Style projects
30
+
31
+
1. Right-click on your project file in Visual Studio and select "Manage NuGet Packages."
32
+
2. Search for KSPBuildTools
33
+
3. Optionally, check "Include prerelease" to get access to the bleeding edge of KSPBuildTools
34
+
4. Click "Install"
35
+
36
36
### Including the Targets File Directly
37
37
38
38
If you aren't able to use the NuGet option, you can include the targets file directly using a git submodule.
@@ -61,37 +61,11 @@ Then include the targets file in your csproj. Make sure you use the correct path
61
61
62
62
Or you can copy the files you want into your own repository and use them however you like - though that will make it harder to get updates
63
63
64
-
###Remove existing assembly references
64
+
## Remove existing assembly references
65
65
66
66
If you're adding KSPBuildTools to an existing mod, or if you just started a blank project, you likely have some assembly dependencies already in your csproj file. You need to remove these. KSPBuildTools will automatically reference the KSP, Unity, and Mono assemblies that are part of your KSP install. There are a few small differences between those Mono libraries and the regular .net framework ones.
67
67
68
68
1. Right-click on your project and select "Unload"
69
69
2. Right-click again and select "edit"
70
70
3. Remove ALL `<Reference>` items
71
71
4. Right-click on your project and reload
72
-
73
-
## Locating your KSP Install
74
-
75
-
KSPBuildTools needs to know where you have KSP installed in order to reference the game dlls. These are all specific to your own computer, and should not be included in your git repo.
76
-
77
-
There are several options for this. KSPBuildTools will choose in the following order. Either [autodiscovery in the solution directory](#solution-directory) or [setting a reference path in a .user file](#environment-variable) are the recommended methods for most users.
78
-
79
-
### KSPBT_GameRoot MSBuild Property
80
-
81
-
If the {confval}`KSPBT_GameRoot` MSBuild property is already set, KSPBuildTools will use it as-is. This can be set in your .csproj.user file.
82
-
83
-
### Environment Variable
84
-
85
-
Set the {envvar}`KSP_ROOT` environment variable to the root of a KSP install. This is useful for CI workflows such as those using the {gha:action}`compile` action.
86
-
87
-
### Solution Directory
88
-
89
-
KSPBuildTools will look for a "KSP" directory in your solution directory and use it if it is a valid install. It identifies valid installs by looking for `assembly-csharp.dll` in the appropriate subdirectory for your operating system.
90
-
91
-
### Reference Path
92
-
93
-
KSPBuildTools will use the `ReferencePath` MSBuild property if it is a valid KSP install. This can be set in a user file located at `{csproj path}.user`. If you use Visual Studio, it can generate this file and property for you.
94
-
95
-
### From Steam
96
-
97
-
KSPBuildTools will use the default Steam install location if it is a valid install
0 commit comments