Skip to content

fix: Resolve full solution builds failing on first runs.#5187

Merged
Chicken-Bones merged 3 commits into
1.4.5from
fix/solution_cycles
Jun 18, 2026
Merged

fix: Resolve full solution builds failing on first runs.#5187
Chicken-Bones merged 3 commits into
1.4.5from
fix/solution_cycles

Conversation

@Mirsario

@Mirsario Mirsario commented Jun 6, 2026

Copy link
Copy Markdown
Member

This slightly hacky patch fixes the following type of compilation error that can be encountered by simply wiping the destination folder and running dotnet build tModLoader.sln:
image
image

Changes

  • The repo's /tModLoader.targets file is updated to evaluate tMLMod.targets directly from src/.../release_targets, removing the dependency cycle between evaluations and builds. Paths still point to the destination, but that should be fine as they are not fully acted upon before builds. In this process, tMLMod.targets's paths are modified to only be set if they are missing.
  • The solution is modified to explicitly build EM after TML. Adding references at a later stage via the means of targets did not work out.

Alternative approaches

  • Since /tModLoader.targets already adds project references for TML, ReLogic and FNA, that trend might be able to be continued with it changed to copy all of TML's original references to the child projects that use it. But that would be even more hacky.

@Mirsario Mirsario requested a review from Chicken-Bones June 6, 2026 13:49

@Chicken-Bones Chicken-Bones left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most of the changes seem good. I'd just like to do some more diagnostics to make sure we get it right this time

Comment thread tModLoader.targets Outdated
Comment thread tModLoader.targets
Comment thread tModLoader.targets Outdated
Comment thread patches/tModLoader/Terraria/release_extras/tMLMod.targets Outdated
Comment thread tModLoader.targets
Comment thread tModLoader.sln
@Chicken-Bones Chicken-Bones merged commit 439e959 into 1.4.5 Jun 18, 2026
@Chicken-Bones Chicken-Bones deleted the fix/solution_cycles branch June 18, 2026 00:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants