[Editor] Prevent `TOOLS` .Net DefineConstants being overriden by the user
Related #78513 Closes #98124
As mentioned here, the TOOLS compiler symbol is crucial for C# editor functionality; the absence of TOOLS can lead to data loss and editor malfunctions (all C# script exports become null and Ineditable) without a proper error message.
This PR ensures that the TOOLS are always included in the editor, so even if the user overrides the DefineConstants (by accident or intentionally), the rest of the dotnet editor stays functional.
Thanks Raulsntos for suggesting the better solution.
Do the reviewers forget this PR? Or it should be postponed to 4.5, and the maintainers forgot to edit its milestone.
Do the reviewers forget this PR? Or it should be postponed to
4.5, and the maintainers forgot to edit its milestone.
I don't know if they forgot or were just too busy, but it's a good opportunity to put it back on the radar, CC @godotengine/dotnet.
It should indeed be moved to the 4.5 milestone as we're in full release freeze for 4.4 now with the release candidate, we just haven't had time to re-triage all PRs and issues in the 4.4 milestone.
Thanks for the info; since the TOOLS is a must-have, I think Sdk.targets is what I'm looking for; I wasn't aware that's a viable option due to a lack of understanding of the MSBuild.
~~I will modify the title and implementation of this PR to the suggested approach.~~
Speaking about the attention, what would be a comfortable interval to notify the dotnet team in the dev chat? I don't want to introduce inconveniences by spamming the same information too frequently.
I have finished implementing the suggested approach and renamed the PR title accordingly.
Thanks!