← Back to context

Comment by pjmlp

9 hours ago

They are badly copied Ant build files.

Ant came first, then when Microsoft redid the VS project format, they created MSBuild.

As incredible as it may sound, Ant is still easier to deal with than MSBuild.

Ant did not include IF THEN ELSE, unless you added the contrib package.

If you understood the paradigm, you could write branches in Ant files simply using properties and guards on properties ("unless"). Using IF in Ant was basically admission of not having understood Ant.

This said, I used Ant for a very limited amount of time.

The legacy version of MSBuild was really bad, but the modern MSBuild project files for .NET are actually quite concise and clean by default?

  • Only if you are happy with defaults and don't require any build logic.

    Also you forgot MSBuild is used for everything, not only .NET.

    • For new .NET SDK style projects you hardly ever need to customize the defaults and I know it's used for more stuff than .NET, but I just wanted to give an example where it actually doesn't suck. Also, you may not need to do everything in MSBuild, for some more complex stuff, you can use something like Cake (https://cakebuild.net/) in .NET for example and skip the programming in XML.

      1 reply →