From ac2e4e677da201a133bb64d84e445c119000de59 Mon Sep 17 00:00:00 2001 From: Phantomical Date: Mon, 11 May 2026 18:53:51 -0700 Subject: [PATCH 1/6] Migrate to KSPBuildTools --- .../KSPCommunityFixes.version | 8 +- KSPCommunityFixes/KSPCommunityFixes.csproj | 518 ++++-------------- KSPCommunityFixes/Properties/AssemblyInfo.cs | 34 -- KSPCommunityFixes/packages.config | 4 - .../MultipleModuleInPartAPI.csproj | 84 ++- .../Properties/AssemblyInfo.cs | 34 +- 6 files changed, 151 insertions(+), 531 deletions(-) delete mode 100644 KSPCommunityFixes/packages.config diff --git a/GameData/KSPCommunityFixes/KSPCommunityFixes.version b/GameData/KSPCommunityFixes/KSPCommunityFixes.version index b4016abd..ed129687 100644 --- a/GameData/KSPCommunityFixes/KSPCommunityFixes.version +++ b/GameData/KSPCommunityFixes/KSPCommunityFixes.version @@ -2,8 +2,8 @@ "NAME": "KSPCommunityFixes", "URL": "https://raw.githubusercontent.com/KSPModdingLibs/KSPCommunityFixes/master/GameData/KSPCommunityFixes/KSPCommunityFixes.version", "DOWNLOAD": "https://github.com/KSPModdingLibs/KSPCommunityFixes/releases", - "VERSION": {"MAJOR": 1, "MINOR": 40, "PATCH": 1, "BUILD": 0}, - "KSP_VERSION": {"MAJOR": 1, "MINOR": 12, "PATCH": 5}, - "KSP_VERSION_MIN": {"MAJOR": 1, "MINOR": 8, "PATCH": 0}, - "KSP_VERSION_MAX": {"MAJOR": 1, "MINOR": 12, "PATCH": 5} + "VERSION": "1.40.1.0", + "KSP_VERSION": "1.12.5", + "KSP_VERSION_MIN": "1.8.0", + "KSP_VERSION_MAX": "1.12.5" } diff --git a/KSPCommunityFixes/KSPCommunityFixes.csproj b/KSPCommunityFixes/KSPCommunityFixes.csproj index 29098f6b..83a19e51 100644 --- a/KSPCommunityFixes/KSPCommunityFixes.csproj +++ b/KSPCommunityFixes/KSPCommunityFixes.csproj @@ -1,99 +1,103 @@ - - - - + + - Debug - AnyCPU - {4E405C02-5AEB-4975-B26C-07582BB3FB15} - Library + + 1.40.1 + $(Version).0 + $(Version.Split('.')[0]).$(Version.Split('.')[1]).0.0 + + net472 + 8.0 + x64 + true + true + 512 Properties KSPCommunityFixes KSPCommunityFixes - v4.7.2 - 8.0 - 512 - true - x64 + {4E405C02-5AEB-4975-B26C-07582BB3FB15} + false true - - + - - true - portable - false - bin\Debug\ + + TRACE;DEBUG;ENABLE_PROFILER - prompt - 4 - true - - portable - true - bin\Release\ + TRACE - prompt - 4 - true - - - - + + - KSP_x64.exe - KSP.app - KSP.x86_64 - KSP_x64_Data\Managed - KSP.app\Contents\Resources\Data\Managed - KSP_Data\Managed - $(ReferencePath)\$(ManagedRelativePath) - Program - $(ReferencePath)\$(KSPExecutable) - $(ReferencePath) + $(MSBuildThisFileDirectory)..\GameData\KSPCommunityFixes + Plugins + false + true + true + true + false + + + + $(MSBuildThisFileDirectory)..\ + KSPCommunityFixes + KSPCommunityFixes.version + false - + - - System (KSP/Mono) - False - - - System.Core (KSP/Mono) - False - - - System.Xml (KSP/Mono) - False - - - UnityEngine - False - - - Assembly-CSharp - False - - - Assembly-CSharp-firstpass - False - - - KSPAssets + + + + + + + $(KSPBT_ModRoot)\$(AVCFilename) + https://raw.githubusercontent.com/KSPModdingLibs/KSPCommunityFixes/master/GameData/KSPCommunityFixes/KSPCommunityFixes.version + https://github.com/KSPModdingLibs/KSPCommunityFixes/releases + 1.12.5 + 1.8.0 + 1.12.5 + + + + + + {32b601f4-b648-4c69-aa98-620fe7ba070c} + MultipleModuleInPartAPI + MultipleModulePartAPI + 1.0.0 + + + + $(MSBuildThisFileDirectory)lib\0Harmony.dll False + HarmonyKSP + 1.0.0 + true - - Harmony + + + + $(KSPBT_ManagedPath)\KSPAssets.dll False - - ModuleManager + + + + + <_ModuleManagerFiles Include="$(KSPBT_GameRoot)\GameData\ModuleManager.*.dll" /> + False + ModuleManager + 1.0.0 + true - + + @@ -127,349 +131,57 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {32b601f4-b648-4c69-aa98-620fe7ba070c} - MultipleModuleInPartAPI - - - - - - - - - $(SolutionDir) - KSPCommunityFixes - true - false - KSPCommunityFixes.version - - - - - - - - - - + + + + - + - + - + <_GameDataFiles Include="$(RepoRootPath)GameData\**\*.*" /> + <_BinariesToCopy Include="$(TargetDir)*.*" /> - - - $(ReferencePath)\GameData\$(GameDataFolderName)\Plugins - $(ReferencePath)\GameData\$(GameDataFolderName) - - - - - + + + - - $(RepoRootPath)\GameData\$(GameDataFolderName)\Plugins - $(RepoRootPath)\GameData\$(GameDataFolderName) - - + <_BinariesToCopy Include="$(TargetDir)*.*" /> - + + - $(RepoRootPath)\Releases - $(PublishFolder)\Temp - $(PublishTempFolderPath)\GameData\$(GameDataFolderName) - $(PublishPluginRootPath)\Plugins - $(PublishPluginRootPath) + <_PublishFolder>$(RepoRootPath)Releases + <_PublishTempFolderPath>$(_PublishFolder)\Temp + <_PublishPluginRootPath>$(_PublishTempFolderPath)\GameData\$(GameDataFolderName) + <_PublishBinariesPath>$(_PublishPluginRootPath)\$(KSPBT_ModPluginFolder) - + - + <_GameDataFiles Include="$(RepoRootPath)GameData\**\*.*" /> + <_BinariesToCopy Include="$(TargetDir)*.*" /> - - - - - - - - - - - - - + + + + + - - - - - - - - - - - - - = 0) - { - current += itemName.Length; - while (current < content.Length && char.IsNumber(content[current])) - { - Major += content[current]; - current++; - } - } - else - { - Major = "0"; - } - - itemName = "\"MINOR\":"; - current = content.IndexOf(itemName, StringComparison.OrdinalIgnoreCase); - if (current >= 0) - { - current += itemName.Length; - while (current < content.Length && char.IsNumber(content[current])) - { - Minor += content[current]; - current++; - } - } - else - { - Minor = "0"; - } - itemName = "\"PATCH\":"; - current = content.IndexOf(itemName, StringComparison.OrdinalIgnoreCase); - if (current >= 0) - { - current += itemName.Length; - while (current < content.Length && char.IsNumber(content[current])) - { - Patch += content[current]; - current++; - } - } - else - { - Patch = "0"; - } - - itemName = "\"BUILD\":"; - current = content.IndexOf(itemName, StringComparison.OrdinalIgnoreCase); - if (current >= 0) - { - current += itemName.Length; - while (current < content.Length && char.IsNumber(content[current])) - { - Build += content[current]; - current++; - } - } - else - { - Build = "0"; - } - - FullVersion = Major + "." + Minor + "." + Patch + "." + Build; -]]> - - - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - \ No newline at end of file + diff --git a/KSPCommunityFixes/Properties/AssemblyInfo.cs b/KSPCommunityFixes/Properties/AssemblyInfo.cs index ddc45b1a..a39c7f02 100644 --- a/KSPCommunityFixes/Properties/AssemblyInfo.cs +++ b/KSPCommunityFixes/Properties/AssemblyInfo.cs @@ -1,38 +1,4 @@ -using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("KSPCommunityFixes")] -[assembly: AssemblyDescription("MIT license")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("KSPCommunityFixes")] -[assembly: AssemblyCopyright("")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("4e405c02-5aeb-4975-b26c-07582bb3fb15")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -[assembly: AssemblyVersion("1.40.0.0")] -[assembly: AssemblyFileVersion("1.40.1.0")] - -[assembly: KSPAssembly("KSPCommunityFixes", 1, 40, 1)] -[assembly: KSPAssemblyDependency("MultipleModulePartAPI", 1, 0, 0)] -[assembly: KSPAssemblyDependency("ModuleManager", 1, 0)] -[assembly: KSPAssemblyDependency("HarmonyKSP", 1, 0)] diff --git a/KSPCommunityFixes/packages.config b/KSPCommunityFixes/packages.config deleted file mode 100644 index 1b8d4960..00000000 --- a/KSPCommunityFixes/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/MultipleModuleInPartAPI/MultipleModuleInPartAPI.csproj b/MultipleModuleInPartAPI/MultipleModuleInPartAPI.csproj index 08970b54..1c4eb513 100644 --- a/MultipleModuleInPartAPI/MultipleModuleInPartAPI.csproj +++ b/MultipleModuleInPartAPI/MultipleModuleInPartAPI.csproj @@ -1,62 +1,40 @@ - - - - + + - KSP_x64_Data\Managed - KSP.app\Contents\Resources\Data\Managed - KSP_Data\Managed - $(ReferencePath)\$(ManagedRelativePath) - - - Debug - AnyCPU - {32B601F4-B648-4C69-AA98-620FE7BA070C} - Library + net472 + x64 + true + 512 Properties MultipleModuleInPartAPI 0_MultipleModuleInPartAPI - v4.7.2 - 512 - true + {32B601F4-B648-4C69-AA98-620FE7BA070C} + false true - - - - - true - portable - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 + + 1.0.0 + 1.0.0.0 + 1.0.0.0 - - portable - true - bin\Release\ - TRACE - prompt - 4 + + + + + + + + false + false + + false + false + false + - - System (KSP/Mono) - False - - - System.Core (KSP/Mono) - False - - - Assembly-CSharp - False - - - - - + - - \ No newline at end of file + + diff --git a/MultipleModuleInPartAPI/Properties/AssemblyInfo.cs b/MultipleModuleInPartAPI/Properties/AssemblyInfo.cs index c0cf57e9..15569670 100644 --- a/MultipleModuleInPartAPI/Properties/AssemblyInfo.cs +++ b/MultipleModuleInPartAPI/Properties/AssemblyInfo.cs @@ -1,38 +1,6 @@ -using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("IMultipleModuleInPart")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("IMultipleModuleInPart")] -[assembly: AssemblyCopyright("Copyright © 2021")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("32b601f4-b648-4c69-aa98-620fe7ba070c")] -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] - -[assembly: KSPAssembly("MultipleModulePartAPI", 1, 0, 0)] \ No newline at end of file +[assembly: KSPAssembly("MultipleModulePartAPI", 1, 0, 0)] From 7bc896d533f18adc3356e33415ed45348f425658 Mon Sep 17 00:00:00 2001 From: Phantomical Date: Mon, 11 May 2026 19:06:41 -0700 Subject: [PATCH 2/6] Cleanup no-op properties All of these are set to the sdk defaults, there is no need to keep them. --- KSPCommunityFixes/KSPCommunityFixes.csproj | 7 ------- .../MultipleModuleInPartAPI.csproj | 16 +++++----------- 2 files changed, 5 insertions(+), 18 deletions(-) diff --git a/KSPCommunityFixes/KSPCommunityFixes.csproj b/KSPCommunityFixes/KSPCommunityFixes.csproj index 83a19e51..8239c879 100644 --- a/KSPCommunityFixes/KSPCommunityFixes.csproj +++ b/KSPCommunityFixes/KSPCommunityFixes.csproj @@ -10,15 +10,8 @@ 8.0 x64 true - true - 512 - Properties - KSPCommunityFixes - KSPCommunityFixes - {4E405C02-5AEB-4975-B26C-07582BB3FB15} false true - diff --git a/MultipleModuleInPartAPI/MultipleModuleInPartAPI.csproj b/MultipleModuleInPartAPI/MultipleModuleInPartAPI.csproj index 1c4eb513..40d9175e 100644 --- a/MultipleModuleInPartAPI/MultipleModuleInPartAPI.csproj +++ b/MultipleModuleInPartAPI/MultipleModuleInPartAPI.csproj @@ -1,20 +1,14 @@ + 1.0.0 + $(Version).0 + $(Version.Split('.')[0]).$(Version.Split('.')[1]).0.0 + net472 - x64 - true - 512 - Properties - MultipleModuleInPartAPI + 0_MultipleModuleInPartAPI - {32B601F4-B648-4C69-AA98-620FE7BA070C} false - true - - 1.0.0 - 1.0.0.0 - 1.0.0.0 From a78d6c001dd8699b952ef70785536f4569f3c19f Mon Sep 17 00:00:00 2001 From: Phantomical Date: Mon, 11 May 2026 19:11:59 -0700 Subject: [PATCH 3/6] Update LangVersion to C# 12 --- KSPCommunityFixes/KSPCommunityFixes.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/KSPCommunityFixes/KSPCommunityFixes.csproj b/KSPCommunityFixes/KSPCommunityFixes.csproj index 8239c879..04930c09 100644 --- a/KSPCommunityFixes/KSPCommunityFixes.csproj +++ b/KSPCommunityFixes/KSPCommunityFixes.csproj @@ -7,7 +7,7 @@ $(Version.Split('.')[0]).$(Version.Split('.')[1]).0.0 net472 - 8.0 + 12 x64 true false From 235bd941a6dbeabf4bb40c522c6891e1382d5eb2 Mon Sep 17 00:00:00 2001 From: Phantomical Date: Mon, 11 May 2026 19:15:26 -0700 Subject: [PATCH 4/6] Clean up MultipleModuleInPartAPI.csproj --- MultipleModuleInPartAPI/MultipleModuleInPartAPI.csproj | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/MultipleModuleInPartAPI/MultipleModuleInPartAPI.csproj b/MultipleModuleInPartAPI/MultipleModuleInPartAPI.csproj index 40d9175e..5187bc15 100644 --- a/MultipleModuleInPartAPI/MultipleModuleInPartAPI.csproj +++ b/MultipleModuleInPartAPI/MultipleModuleInPartAPI.csproj @@ -1,12 +1,10 @@ - 1.0.0 $(Version).0 $(Version.Split('.')[0]).$(Version.Split('.')[1]).0.0 net472 - 0_MultipleModuleInPartAPI false @@ -17,11 +15,9 @@ - false false - + false false false @@ -30,5 +26,4 @@ - From 89015d6787e0010a17ab04bd5ff221a6a678bc71 Mon Sep 17 00:00:00 2001 From: Phantomical Date: Mon, 11 May 2026 19:18:05 -0700 Subject: [PATCH 5/6] Update README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5f01cc67..fec66947 100644 --- a/README.md +++ b/README.md @@ -234,7 +234,7 @@ Then close / re-open the solution. Building in the `Debug` configuration will update the `GameData` folder in your KSP install, building in the `Release` configuration will additionally create a zipped release in the `Releases` repository root folder. -For incrementing the version, edit the `KSPCommunityFixes.version` KSP-AVC file, changes will be propagated to `AssemblyInfo.cs` when building in the `Release` configuration. +To increment the version change the `` property in `KSPCommunityFixes.csproj` then build. Changes will be automatically updated everywhere else. The `Start` action of the IDE will trigger a build, update the `GameData` files in the KSP install and launch KSP. If doing so in the `Debug` configuration and if your KSP install is modified to be debuggable, you will be able to debug the code from within your IDE (if your IDE provides Unity debugging support). From 79f3bf67266cf6b73fed20156e3ddb6f6cd205d4 Mon Sep 17 00:00:00 2001 From: Phantomical Date: Mon, 11 May 2026 19:21:51 -0700 Subject: [PATCH 6/6] Use 3-component version in the version file --- GameData/KSPCommunityFixes/KSPCommunityFixes.version | 2 +- KSPCommunityFixes/KSPCommunityFixes.csproj | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/GameData/KSPCommunityFixes/KSPCommunityFixes.version b/GameData/KSPCommunityFixes/KSPCommunityFixes.version index ed129687..cf0cb646 100644 --- a/GameData/KSPCommunityFixes/KSPCommunityFixes.version +++ b/GameData/KSPCommunityFixes/KSPCommunityFixes.version @@ -2,7 +2,7 @@ "NAME": "KSPCommunityFixes", "URL": "https://raw.githubusercontent.com/KSPModdingLibs/KSPCommunityFixes/master/GameData/KSPCommunityFixes/KSPCommunityFixes.version", "DOWNLOAD": "https://github.com/KSPModdingLibs/KSPCommunityFixes/releases", - "VERSION": "1.40.1.0", + "VERSION": "1.40.1", "KSP_VERSION": "1.12.5", "KSP_VERSION_MIN": "1.8.0", "KSP_VERSION_MAX": "1.12.5" diff --git a/KSPCommunityFixes/KSPCommunityFixes.csproj b/KSPCommunityFixes/KSPCommunityFixes.csproj index 04930c09..26316f40 100644 --- a/KSPCommunityFixes/KSPCommunityFixes.csproj +++ b/KSPCommunityFixes/KSPCommunityFixes.csproj @@ -47,6 +47,7 @@ $(KSPBT_ModRoot)\$(AVCFilename) + $(Version) https://raw.githubusercontent.com/KSPModdingLibs/KSPCommunityFixes/master/GameData/KSPCommunityFixes/KSPCommunityFixes.version https://github.com/KSPModdingLibs/KSPCommunityFixes/releases 1.12.5