Just like you can have to customize your projects' build, you can also use Directory.Solution.props and Directory.Solution.targets to customize your solutions (command-line) builds. Just like the original (older?) mecanisms, , however.
In order to inspect how and where they are included in the build, it's useful to set use the of setting the envvar MSBUILDEMITSOLUTION=1 and run a build. You can inspect the .metaproj MSBuild project generated from the solution, where you will see the imported projects.
Notice how the targets aren't imported but rather embedded in specific places (top of property group for .props-declared properties, bottom of property group for .targets-declared properties, and before Build target for targets). If you have properties, they are actually even evaluated before being embedded in the file, i.e.: