Skip to content

Commit 4a1a897

Browse files
committed
Rename properties to avoid namespace collisions, add more toggles
1 parent 56e4c18 commit 4a1a897

8 files changed

Lines changed: 161 additions & 128 deletions

File tree

.github/actions/compile/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,5 +76,5 @@ runs:
7676
working-directory: ${{ inputs.working-directory }}
7777
run: |
7878
dotnet msbuild -p:Configuration=${{ inputs.build-configuration }} \
79-
-p:ManagedRelativePath=KSP_x64_Data/Managed ${{ inputs.solution-file-path }} \
79+
-p:KSPManagedRelativePath=KSP_x64_Data/Managed ${{ inputs.solution-file-path }} \
8080
${{ runner.debug && '-v:detailed' }}

KSPBuildTools.csproj

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<NoWarn>1701;1702;CS0649;CS1591;NU5128</NoWarn>
2525
<AssemblyCopyright>2024 KSPModdingLibs Contributors</AssemblyCopyright>
2626
<AssemblyName>KSPBuildTools</AssemblyName>
27-
<RepoRootPath>$(ProjectDir)</RepoRootPath>
27+
<KSPModRoot>$(ProjectDir)</KSPModRoot>
2828
<PackageId>KSPBuildTools</PackageId>
2929
<PackageReadmeFile>README.md</PackageReadmeFile>
3030
<Title>KSP Build Tools</Title>
@@ -50,4 +50,8 @@
5050
<Compile Remove="$(MSBuildThisFileDirectory)docs/**" />
5151
<None Remove="$(MSBuildThisFileDirectory)docs/**" />
5252
</ItemGroup>
53+
54+
<ItemGroup>
55+
<Content Include="tests\plugin-mod\plugin-mod.csproj" />
56+
</ItemGroup>
5357
</Project>

KSPCommon.props

Lines changed: 77 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -4,47 +4,84 @@
44
<KSPCommonPropsImported>true</KSPCommonPropsImported>
55
</PropertyGroup>
66

7-
<!-- disable default .net framework imports; use the ones from KSP instead. There are a few differences that are sometimes important. -->
7+
<!-- default settings for KSPBT targets and references -->
88
<PropertyGroup>
9-
<DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
10-
</PropertyGroup>
11-
12-
<!--reference unity and KSP assemblies unless explicitly disabled-->
13-
<PropertyGroup>
14-
<ReferenceUnityAssemblies Condition=" '$(ReferenceUnityAssemblies)' == '' ">true</ReferenceUnityAssemblies>
15-
<ReferenceKSPAssemblies Condition=" '$(ReferenceKSPAssemblies)' == '' ">true</ReferenceKSPAssemblies>
16-
</PropertyGroup>
17-
18-
<!-- default CKAN compatibility versions -->
19-
<PropertyGroup>
20-
<CKANCompatibleVersions Condition="('$(CKANCompatibleVersions)' == '')">1.12 1.11 1.10 1.9 1.8</CKANCompatibleVersions>
9+
<!-- reference unity and KSP assemblies unless explicitly disabled -->
10+
<ReferenceKSPSystemAssemblies Condition=" '$(ReferenceKSPSystemAssemblies)' == '' ">
11+
true
12+
</ReferenceKSPSystemAssemblies>
13+
<ReferenceKSPUnityAssemblies Condition=" '$(ReferenceKSPUnityAssemblies)' == '' ">
14+
true
15+
</ReferenceKSPUnityAssemblies>
16+
<ReferenceKSPGameAssemblies Condition=" '$(ReferenceKSPGameAssemblies)' == '' ">
17+
true
18+
</ReferenceKSPGameAssemblies>
19+
20+
21+
<!-- Copy DLLs to mod folder -->
22+
<CopyDLLsToPluginFolder Condition=" '$(CopyDLLsToPluginFolder)' == '' ">
23+
true
24+
</CopyDLLsToPluginFolder>
25+
26+
27+
<GenerateKSPAssemblyAttribute Condition=" '$(GenerateKSPAssemblyAttribute)' == '' ">
28+
true
29+
</GenerateKSPAssemblyAttribute>
30+
31+
<GenerateKSPAssemblyDependencyAttributes Condition=" '$(GenerateKSPAssemblyDependencyAttributes)' == '' ">
32+
true
33+
</GenerateKSPAssemblyDependencyAttributes>
34+
35+
<GenerateKSPVersionFile Condition=" '$(GenerateKSPVersionFile)' == '' ">
36+
true
37+
</GenerateKSPVersionFile>
38+
39+
<!-- default CKAN compatibility versions -->
40+
<CKANCompatibleVersions Condition=" '$(CKANCompatibleVersions)' == '' ">
41+
1.12 1.11 1.10 1.9 1.8
42+
</CKANCompatibleVersions>
2143
</PropertyGroup>
2244

2345
<!--Parse KSP platform-specific paths -->
2446
<!-- These can be overwritten by user and props files -->
25-
<PropertyGroup Condition=" '$(ManagedRelativePath)' == '' ">
26-
<ManagedRelativePath Condition="$([MSBuild]::IsOsPlatform('Windows'))">KSP_x64_Data\Managed</ManagedRelativePath>
27-
<ManagedRelativePath Condition="$([MSBuild]::IsOsPlatform('OSX'))">KSP.app\Contents\Resources\Data\Managed</ManagedRelativePath>
28-
<ManagedRelativePath Condition="$([MSBuild]::IsOsPlatform('Linux'))">KSP_Data\Managed</ManagedRelativePath>
47+
<PropertyGroup Condition=" '$(KSPManagedRelativePath)' == '' ">
48+
<KSPManagedRelativePath Condition=" $([MSBuild]::IsOsPlatform('Windows')) ">
49+
KSP_x64_Data/Managed
50+
</KSPManagedRelativePath>
51+
<KSPManagedRelativePath Condition=" $([MSBuild]::IsOsPlatform('OSX')) ">
52+
KSP.app/Contents/Resources/Data/Managed
53+
</KSPManagedRelativePath>
54+
<KSPManagedRelativePath Condition=" $([MSBuild]::IsOsPlatform('Linux')) ">
55+
KSP_Data/Managed
56+
</KSPManagedRelativePath>
2957
</PropertyGroup>
58+
3059
<PropertyGroup>
31-
<KSPExecutable Condition="$([MSBuild]::IsOsPlatform('Windows'))">KSP_x64.exe</KSPExecutable>
32-
<KSPExecutable Condition="$([MSBuild]::IsOsPlatform('OSX'))">KSP.app/Contents/MacOS/KSP</KSPExecutable>
33-
<KSPExecutable Condition="$([MSBuild]::IsOsPlatform('Linux'))">KSP.x86_64</KSPExecutable>
34-
<SteamKSPRoot Condition="($([MSBuild]::IsOsPlatform('Windows')))">C:\Program Files (x86)\Steam\steamapps\common\Kerbal Space Program</SteamKSPRoot>
35-
<SteamKSPRoot Condition="($([MSBuild]::IsOsPlatform('OSX')))">$(HOME)/Library/Application Support/Steam/steamapps/common/Kerbal Space Program</SteamKSPRoot>
60+
<KSPExecutable Condition=" $([MSBuild]::IsOsPlatform('Windows')) ">KSP_x64.exe</KSPExecutable>
61+
<KSPExecutable Condition=" $([MSBuild]::IsOsPlatform('OSX')) ">KSP.app/Contents/MacOS/KSP</KSPExecutable>
62+
<KSPExecutable Condition=" $([MSBuild]::IsOsPlatform('Linux')) ">KSP.x86_64</KSPExecutable>
63+
<SteamKSPRoot Condition=" $([MSBuild]::IsOsPlatform('Windows')) ">
64+
C:\Program Files (x86)\Steam\steamapps\common\Kerbal Space Program
65+
</SteamKSPRoot>
66+
<SteamKSPRoot Condition=" $([MSBuild]::IsOsPlatform('OSX')) ">
67+
$(HOME)/Library/Application Support/Steam/steamapps/common/Kerbal Space Program
68+
</SteamKSPRoot>
3669
</PropertyGroup>
3770

3871
<!-- Calculate mod paths -->
3972
<!-- These can be overwritten by user, csproj, and props files -->
4073
<PropertyGroup>
41-
<!-- The root directory of the mod repository -->
42-
<RepoRootPath Condition=" '$(RepoRootPath)' == '' ">$(SolutionDir.TrimEnd([System.IO.Path]::DirectorySeparatorChar))</RepoRootPath>
43-
<BinariesOutputRelativePath Condition=" '$(BinariesOutputRelativePath)' == '' ">GameData/$(SolutionName)</BinariesOutputRelativePath>
74+
<!-- The root directory of the mod, the folder that gets placed in GameData -->
75+
<KSPModRoot Condition=" '$(KSPModRoot)' == '' ">
76+
$(ProjectDir)/../GameData/$(ProjectName)/
77+
</KSPModRoot>
78+
<KSPModPluginFolder Condition=" '$(KSPModPluginFolder)' == '' ">
79+
$(KSPModGameData)/Plugins/
80+
</KSPModPluginFolder>
4481
</PropertyGroup>
4582

4683
<!-- Import the csproj.user file. -->
47-
<!-- This can overwrite ManagedRelativePath and KSPExecutable,
84+
<!-- This can overwrite KSPManagedRelativePath and KSPExecutable,
4885
set KSPRoot and ReferencePath, and any other user-specific settings -->
4986
<Import Project="$(MSBuildProjectFullPath).user" Condition="Exists('$(MSBuildProjectFullPath).user')"/>
5087

@@ -55,16 +92,16 @@
5592
<!-- Import solution-wide props if it exists -->
5693
<Import Condition=" Exists('$(SolutionDir)$(SolutionName).props') " Project="$(SolutionDir)$(SolutionName).props"/>
5794

95+
<!-- Relative path that must exist for a path to be a valid KSP Install-->
5896
<PropertyGroup>
59-
<!-- Relative path that must exist for a path to be a valid KSP Install-->
60-
<KSPRootIdentifier>$(ManagedRelativePath)/Assembly-CSharp.dll</KSPRootIdentifier>
97+
<KSPRootIdentifier>$(KSPManagedRelativePath)/Assembly-CSharp.dll</KSPRootIdentifier>
6198
<KSPRootSource Condition="'$(KSPRoot)' != ''">property</KSPRootSource>
6299
</PropertyGroup>
63100

101+
<!-- Default KSPRoot to the "KSP_ROOT" environment variable if it exists -->
102+
<!-- Doing this skips any checks for a valid KSP install so be careful! -->
64103
<PropertyGroup Condition=" '$(KSPRoot)' == '' And '$(KSP_ROOT)' != '' ">
65-
<!-- Default KSPRoot to the "KSP_ROOT" environment variable if it exists -->
66-
<!-- Doing this skips any checks for a valid KSP install so be careful! -->
67-
<KSPRoot >$(KSP_ROOT)</KSPRoot>
104+
<KSPRoot>$(KSP_ROOT)</KSPRoot>
68105
<KSPRootSource>environment variable</KSPRootSource>
69106
</PropertyGroup>
70107
<ItemGroup>
@@ -73,86 +110,38 @@
73110
<KSPRootCandidate Include="$(SteamKSPRoot)" source="steam"/>
74111
</ItemGroup>
75112

113+
<!-- Look for KSP install in Solution dir -->
76114
<PropertyGroup Condition=" '$(KSPRoot)' == '' And Exists('$(SolutionDir)KSP/$(KSPRootIdentifier)') ">
77-
<!-- Look for KSP install in Solution dir -->
78-
<KSPRoot >$(SolutionDir)KSP</KSPRoot>
115+
<KSPRoot>$(SolutionDir)KSP</KSPRoot>
79116
<KSPRootSource>solution directory</KSPRootSource>
80117
</PropertyGroup>
81118

119+
<!-- Look for KSP install in ReferencePath -->
82120
<PropertyGroup Condition=" '$(KSPRoot)' == '' And Exists('$(ReferencePath)/$(KSPRootIdentifier)') ">
83-
<!-- Look for KSP install in ReferencePath -->
84121
<KSPRoot>$(ReferencePath)</KSPRoot>
85122
<KSPRootSource>reference path</KSPRootSource>
86123
</PropertyGroup>
87124

125+
<!-- Look for KSP steam install-->
88126
<PropertyGroup Condition=" '$(KSPRoot)' == '' And Exists('$(SteamKSPRoot)/$(KSPRootIdentifier)') ">
89-
<!-- Look for KSP steam install-->
90127
<KSPRoot>$(SteamKSPRoot)</KSPRoot>
91128
<KSPRootSource>steam</KSPRootSource>
92129
</PropertyGroup>
93130

94-
<PropertyGroup>
95-
<!-- Calculate ManagedPath -->
96-
<ManagedPath>$(KSPRoot)/$(ManagedRelativePath)</ManagedPath>
131+
<!-- Calculate ManagedPath -->
132+
<PropertyGroup Condition=" '$(ManagedPath)' == ''">
133+
<ManagedPath>$(KSPRoot)/$(KSPManagedRelativePath)</ManagedPath>
97134
</PropertyGroup>
98135

99136
<!-- set the start action so that you can launch directly from VS -->
100137
<PropertyGroup>
101138
<StartAction>Program</StartAction>
102-
<StartProgram>$(KSPRoot)\$(KSPExecutable)</StartProgram>
139+
<StartProgram>$(KSPRoot)/$(KSPExecutable)</StartProgram>
103140
<StartWorkingDirectory>$(KSPRoot)</StartWorkingDirectory>
104141
<DebugType>portable</DebugType>
105142
</PropertyGroup>
106143

107-
<!-- Prevent the compiler from acquiring or referencing any external reference assemblies -->
108-
<PropertyGroup>
109-
<!-- Do not download the .NET Framework Target Pack NuGet package automatically -->
110-
<DisableTransitiveFrameworkReferenceDownloads>true</DisableTransitiveFrameworkReferenceDownloads>
111-
<!-- Instruct the compiler to not automatically reference mscorlib -->
112-
<NoStandardLib>true</NoStandardLib>
113-
<!-- Prevent the GetReferenceAssemblyPaths task in Microsoft.Common.CurrentVersion.targets
114-
from attempting to locate an external copy of the reference assemblies. -->
115-
<AutomaticallyUseReferenceAssemblyPackages>false</AutomaticallyUseReferenceAssemblyPackages>
116-
<FrameworkPathOverride>$(ManagedPath)</FrameworkPathOverride>
117-
</PropertyGroup>
118-
119-
<!--Import references-->
120-
<ItemGroup>
121-
<Reference Include="$(ManagedPath)\System.dll">
122-
<Name>System (KSP/Mono)</Name>
123-
<Private>False</Private>
124-
</Reference>
125-
<Reference Include="$(ManagedPath)\System.Core.dll">
126-
<Name>System (KSP/Mono)</Name>
127-
<Private>False</Private>
128-
</Reference>
129-
<Reference Include="$(ManagedPath)\mscorlib.dll">
130-
<Name>System.Core (KSP/Mono)</Name>
131-
<Private>False</Private>
132-
</Reference>
133-
<Reference Include="$(ManagedPath)\System.Xml.dll">
134-
<Name>System.Xml (KSP/Mono)</Name>
135-
<Private>False</Private>
136-
</Reference>
137-
</ItemGroup>
138-
<ItemGroup Condition=" '$(ReferenceUnityAssemblies)' == 'true' ">
139-
<Reference Include="$(ManagedPath)\UnityEngine*.dll">
140-
<Name>UnityEngine</Name>
141-
<Private>False</Private>
142-
</Reference>
143-
</ItemGroup>
144-
<ItemGroup Condition=" '$(ReferenceKSPAssemblies)' == 'true' ">
145-
<Reference Include="$(ManagedPath)\Assembly-CSharp.dll">
146-
<Name>Assembly-CSharp</Name>
147-
<Private>False</Private>
148-
</Reference>
149-
<Reference Include="$(ManagedPath)\Assembly-CSharp-firstpass.dll">
150-
<Name>Assembly-CSharp-firstpass</Name>
151-
<Private>False</Private>
152-
</Reference>
153-
</ItemGroup>
154-
155144
<ItemGroup>
156-
<Compile Include = "$(MSBuildThisFileDirectory)/include/*.cs" Condition="exists('$(MSBuildThisFileDirectory)/include')"/>
145+
<Compile Include="$(MSBuildThisFileDirectory)/include/*.cs" Condition="exists('$(MSBuildThisFileDirectory)/include')"/>
157146
</ItemGroup>
158147
</Project>

KSPCommon.targets

Lines changed: 62 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,57 @@
88
<PackageReference Include="JsonPoke" Version="1.2.0" Condition="'@(KSPVersionFile)' != ''"/>
99
</ItemGroup>
1010

11-
<!--Custom Targets-->
11+
<!-- Prevent the compiler from acquiring or referencing any external reference assemblies -->
12+
<PropertyGroup Condition=" '$(ReferenceKSPSystemAssemblies)' != 'true' ">>
13+
<!-- Do not download the .NET Framework Target Pack NuGet package automatically -->
14+
<DisableTransitiveFrameworkReferenceDownloads>true</DisableTransitiveFrameworkReferenceDownloads>
15+
<!-- Instruct the compiler to not automatically reference mscorlib -->
16+
<NoStandardLib>true</NoStandardLib>
17+
<!-- Prevent the GetReferenceAssemblyPaths task in Microsoft.Common.CurrentVersion.targets
18+
from attempting to locate an external copy of the reference assemblies. -->
19+
<AutomaticallyUseReferenceAssemblyPackages>false</AutomaticallyUseReferenceAssemblyPackages>
20+
<FrameworkPathOverride>$(ManagedPath)</FrameworkPathOverride>
21+
<DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
22+
</PropertyGroup>
23+
24+
<!-- Import references -->
25+
<ItemGroup Condition=" '$(ReferenceKSPSystemAssemblies)' == 'true' ">
26+
<Reference Include="$(ManagedPath)/System.dll">
27+
<Name>System (KSP/Mono)</Name>
28+
<Private>False</Private>
29+
</Reference>
30+
<Reference Include="$(ManagedPath)/System.Core.dll">
31+
<Name>System (KSP/Mono)</Name>
32+
<Private>False</Private>
33+
</Reference>
34+
<Reference Include="$(ManagedPath)/mscorlib.dll">
35+
<Name>System.Core (KSP/Mono)</Name>
36+
<Private>False</Private>
37+
</Reference>
38+
<Reference Include="$(ManagedPath)/System.Xml.dll">
39+
<Name>System.Xml (KSP/Mono)</Name>
40+
<Private>False</Private>
41+
</Reference>
42+
</ItemGroup>
43+
<ItemGroup Condition=" '$(ReferenceKSPUnityAssemblies)' == 'true' ">
44+
<Reference Include="$(ManagedPath)/UnityEngine*.dll">
45+
<Name>UnityEngine</Name>
46+
<Private>False</Private>
47+
</Reference>
48+
</ItemGroup>
49+
<ItemGroup Condition=" '$(ReferenceKSPGameAssemblies)' == 'true' ">
50+
<Reference Include="$(ManagedPath)/Assembly-CSharp.dll">
51+
<Name>Assembly-CSharp</Name>
52+
<Private>False</Private>
53+
</Reference>
54+
<Reference Include="$(ManagedPath)/Assembly-CSharp-firstpass.dll">
55+
<Name>Assembly-CSharp-firstpass</Name>
56+
<Private>False</Private>
57+
</Reference>
58+
</ItemGroup>
1259

60+
61+
<!--Custom Targets-->
1362
<Target Name="CheckForKSPRoot" BeforeTargets="ResolveReferences">
1463
<Error Text="KSPBuildTools was unable to find a KSP installation. Please set the ReferencePath or KSPRoot property
1564
in your csproj.user file to a valid KSP installation directory (the one with GameData in it)
@@ -22,16 +71,17 @@
2271
<_KSPRootMessage Include="Chosen KSPRoot: $(KSPRoot) in $(KSPRootSource)" Condition="'$(KSPRoot)' != ''"/>
2372
</ItemGroup>
2473
<Message Text="@(_KSPRootMessage, '%0a')" Importance="normal"/>
25-
2674
</Target>
2775

28-
<!-- Copy output files to mod folder -->
29-
<Target Name="CopyBinariesToRepo" AfterTargets="CopyFilesToOutputDirectory">
76+
<!-- Copy DLLs to mod GameData folder-->
77+
<Target Name="CopyDLLsToPluginFolder" AfterTargets="CopyFilesToOutputDirectory"
78+
Condition="'$(CopyDLLsToPluginFolder)' == 'true'">
3079
<ItemGroup>
31-
<BinariesToCopy Include="$(TargetDir)/**"/>
80+
<BinariesToCopy Include="$(TargetDir)/**/*.dll"/>
81+
<BinariesToCopy Include="$(TargetDir)/**/*.pdb" Condition="'$(Condition)' == 'Debug'"/>
3282
</ItemGroup>
33-
<MakeDir Directories="$(RepoRootPath)/$(BinariesOutputRelativePath)"/>
34-
<Copy SourceFiles="@(BinariesToCopy)" DestinationFolder="$(RepoRootPath)/$(BinariesOutputRelativePath)/%(RecursiveDir)"/>
83+
<MakeDir Directories="$(KSPModPluginFolder)"/>
84+
<Copy SourceFiles="@(BinariesToCopy)" DestinationFolder="$(KSPModPluginFolder)/%(RecursiveDir)"/>
3585
</Target>
3686

3787
<!-- Use CKAN to install mods for any references tagged with a CKAN Identifier -->
@@ -82,9 +132,7 @@
82132
<Message Text="@(RequiredExternalTool)" Importance="high"/>
83133
</Target>
84134

85-
<!--
86-
Generate the KSPAssembly attribute based on the FileVersion property
87-
-->
135+
<!-- Generate the KSPAssembly attribute based on the FileVersion property -->
88136
<Target Name="GenerateKSPAssemblyAttribute" BeforeTargets="CoreGenerateAssemblyInfo"
89137
Condition="'$(GenerateKSPAssemblyAttribute)' == 'true'">
90138
<ItemGroup>
@@ -110,7 +158,7 @@
110158
Otherwise 0.0 is used (no minimum version)
111159
-->
112160
<Target Name="GenerateKSPAssemblyDependencyAttributes" BeforeTargets="CoreGenerateAssemblyInfo"
113-
Condition="'$(GenerateKSPAssemblyDependencyAttributes)' == 'true'">
161+
Condition=" '$(GenerateKSPAssemblyDependencyAttributes)' == 'true' ">
114162
<ItemGroup>
115163
<Reference Update="%(Reference.identity)" Condition="'%(Reference.CKANIdentifier)%(Reference.KSPAssemblyName)' != ''">
116164
<KSPAssemblyName Condition="'%(Reference.KSPAssemblyName)' == ''">$([System.String]::Copy('%(Reference.identity)').Split(',')[0])</KSPAssemblyName>
@@ -156,7 +204,9 @@
156204
</ItemDefinitionGroup>
157205

158206
<!-- Target to generate the KSP version json file for AVC/CKAN etc-->
159-
<Target Name="GenerateKSPVersionFile" AfterTargets="Build" Inputs="@(KSPVersionFile);$(FileVersion)" Outputs="%(KSPVersionFile.destination)">
207+
<Target Name="GenerateKSPVersionFile" AfterTargets="Build"
208+
Inputs="@(KSPVersionFile);$(FileVersion)" Outputs="%(KSPVersionFile.destination)"
209+
Condition= " '$(GenerateKSPVersionFile)' == 'true' ">
160210
<ItemGroup>
161211
<KSPVersionFile Update="@(KSPVersionFile)">
162212
<Name Condition="'%(KSPVersionFile.Name)' == ''">$(ProjectName)</Name>

docs/msbuild/generating-version-files.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ To use, add the following to your csproj, filling in the URLs and paths for your
88
<!-- Version Files -->
99
<ItemGroup>
1010
<KSPVersionFile Include=".">
11-
<Destination>$(RepoRootPath)GameData/MyMod/mymod.version</Destination>
11+
<Destination>$(KSPModRoot)/mymod.version</Destination>
1212
<URL>https://github.com/username/repo/releases/latest/download/mymod.version</URL>
1313
<Download>https://github.com/username.repo/releases/latest</Download>
1414
</KSPVersionFile>
@@ -44,7 +44,7 @@ The `include` value can also be set to a json file including any other values yo
4444
<!-- Version Files -->
4545
<ItemGroup>
4646
<KSPVersionFile Include="my-mod.version">
47-
<Destination>$(RepoRootPath)GameData/MyMod/mymod.version</Destination>
47+
<Destination>$(KSPModRoot)/mymod.version</Destination>
4848
</KSPVersionFile>
4949
</ItemGroup>
5050
```

0 commit comments

Comments
 (0)