If a custom target is defined in either of the following implicitly imported files, it does not appear in MsBuildTaskExplorer
Directory.Build.targets
Directory.Build.props
If instead, I move the target definition to a separate .targets file and import that targets file in Directory.Build.targets, it is shown properly.