TerraUtil.BuildSystem
1.0.0
dotnet add package TerraUtil.BuildSystem --version 1.0.0
NuGet\Install-Package TerraUtil.BuildSystem -Version 1.0.0
<PackageReference Include="TerraUtil.BuildSystem" Version="1.0.0" />
<PackageVersion Include="TerraUtil.BuildSystem" Version="1.0.0" />
<PackageReference Include="TerraUtil.BuildSystem" />
paket add TerraUtil.BuildSystem --version 1.0.0
#r "nuget: TerraUtil.BuildSystem, 1.0.0"
#:package TerraUtil.BuildSystem@1.0.0
#addin nuget:?package=TerraUtil.BuildSystem&version=1.0.0
#tool nuget:?package=TerraUtil.BuildSystem&version=1.0.0
TerraUtil.BuildSystem
The better build system for tModLoader, the mod loader for Terraria.
Based on this pull request by Chik3r, with modifications made by me.
Features
build.txtproperties moved to the.csproj.tModLoader.targetsis automatically imported.- The output
.tmodfile is also located in thebinfolder. - Moved
buildIgnoreto a.buildignorefile that uses the same syntax as.gitignore. - All references -
<Reference>,<ProjectReference>,<PackageReference>, and<ModReference>- are done inside the.csprojand are automatically added to the mod file.- Note that dll references must be located inside the mod's folder (e.g. under
ModSources/ModName/and it's subfolders) in order to be packaged. This is due to restrictions with MSBuild and may be changed in the future.
- Note that dll references must be located inside the mod's folder (e.g. under
- The mod's code can be located outside of
ModSourcesand still function properly. This works by symlinking the mod into ModSources.- The IDE used to build the mod or
dotnet buildmust be run with admin privileges when first creating the symlink, since it requires admin access. Subsequent builds do not require this. - This may be changed to opt-in sometime in the future.
- The IDE used to build the mod or
- Allowed changing the internal name of a mod through the
.csprojwith<InternalName>.- This requires the mods code to be outside of
ModSourcesbecause the name of the folder inModSourcesis normally used to determine the internal name.
- This requires the mods code to be outside of
- The root namespace and assembly name of the mod are automatically set to the internal name.
- This may be changed in the future, let me know if you have any issues with this.
Example
See TerraUtil.TestMod for an example of how to use this package.
Licensing
This code is licensed under the MIT license.
Some modified code from tModLoader is used, which is licensed under the MIT license.
The used code is:
- Everything under the
Corefolder Tasks/BaseTask.csTasks/PackageModFile.cs
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- Ignore (>= 0.2.1)
- Microsoft.Build.Utilities.Core (>= 17.1.0)
- Newtonsoft.Json (>= 13.0.3)
- SixLabors.ImageSharp (>= 3.1.5)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Massive work done on finishing the rest of the build system.
Ready for a few more features, which will be coming sometime soon.