Given a build file (.csproj or msbuild.xml or whatever), I’d like to run a msbuild command that lists all the available, defined targets.
Does that function exist?
I know I could do an Xpath search or something, on the build file, but that wouldn’t find targets that are defined in included files.
Using MSBuild 2.0/3.5 : Custom Task
You could write a custom msbuild task like this :
That you’ll use like that:
Using MSBuild 4.0 : Inline task
With MSBuild 4 you could use the new shiny thing : the inline task. Inline task allows you to define the behavior directly in msbuild file.