Is there any way to ask msbuild what build targets provided msbuild file support? If there is no way to do it in command prompt? May be it could be done programmatically?
I suggest you use PowerShell:
Select-Xml `
-XPath //b:Target `
-Path path-to-build-file `
-Namespace @{ b = 'http://schemas.microsoft.com/developer/msbuild/2003' } |
Select-Object -ExpandProperty Node |
Format-Table -Property Name, DependsOnTargets -AutoSize
The XPath query will find all Target elements and display the target name and dependencies in table format. Here is a sample that selects the 10 first targets from Microsoft.Web.Publishing.targets:
PS C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Web> Select-Xml `
-XPath //b:Target `
-Path Microsoft.Web.Publishing.targets `
-Namespace @{ b = 'http://schemas.microsoft.com/developer/msbuild/2003' } |
Select-Object -ExpandProperty Node |
Sort-Object -Property Name |
Select-Object -First 10 |
Format-Table -Property Name, DependsOnTargets -AutoSize
Name DependsOnTargets
---- ----------------
_CheckPublishToolsUpToDate
_CheckRemoteFx45
_CleanWPPIfNeedTo
_DetectDbDacFxProvider
_WPPCopyWebApplication $(_WPPCopyWebApplicationDependsOn)
AddContentPathToSourceManifest $(AddContentPathToSourceManifestDepe...
AddDeclareParametersItems $(AddDeclareParametersItemsDependsOn)
AddDeclareParametersItemsForContentPath $(AddDeclareParametersItemsForConten...
AddDeclareParametersItemsForIis6 $(AddDeclareParametersItemsForIis6De...
AddDeclareParametersItemsForIis7 $(AddDeclareParametersItemsForIis7De...