The better build system for tModLoader, the mod loader for Terraria.
$ dotnet add package TerraUtil.BuildSystemThe better build system for tModLoader, the mod loader for Terraria.
Based on this pull request by Chik3r, with modifications made by me.
build.txt properties moved to the .csproj.tModLoader.targets is automatically imported..tmod file is also located in the bin folder.buildIgnore to a .buildignore file that uses the same syntax as .gitignore.<Reference>, <ProjectReference>, <PackageReference>, and <ModReference> - are done inside the .csproj and are automatically added to the mod file.
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.ModSources and still function properly. This works by symlinking the mod into ModSources.
dotnet build must be run with admin privileges when first creating the symlink, since it requires admin access. Subsequent builds do not require this..csproj with <InternalName>.
ModSources because the name of the folder in ModSources is normally used to determine the internal name.See TerraUtil.TestMod for an example of how to use this package.
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:
Core folderTasks/BaseTask.csTasks/PackageModFile.cs