Generate XML Documentation via MSBuild CMD

  • Thread starter Thread starter bthubbard
  • Start date Start date
B

bthubbard

This may not be the best group in which to post this. If there is a
better location please direct me there.

I have been experimenting with Sandcastle to generate CHM help file
documentation for some of our projects. I can configure a project(s)
to generate the required XML Documentation file by editing the project
properties via VS or I believe, if we were using one, a XML
configuration file for MSBuild. We usually build our solutions via a
script with a call to MSBuild. I'm wondering if there is a way to
write a command line argument for MSBuild that will instruct it to
generate the XML Documentation file with the same name and target as
editing the project in VS would generate? For example I can add the
property ">MSBuild ... /p:DocumentationFile=fileName.xml.." which will
generate "fileName.xml". I would rather it generate
"MyNamespace.MyAssembly.xml" in the bin\debug directory for example.

Thanks.
 
bthubbard,

Well, you have a few options here. You could replace DocumentationFile
with the project name (it should be available to you as a variable which you
can generate the name from, something like
"/p:DocumentationFile=($Project).xml"), or you can generate a custom task to
do what you want.
 
Don't know if this helps, but you can add a command to Sandcastle Builder as
a VS post-build event. Something like:

"C:\Program Files\EWSoftware\Sandcastle Help File
Builder\SandcastleBuilderConsole.exe" $(SolutionDir)\$(SolutionName).shfb

(Assuming the path to SandcastleBuilderConsole.exe is in the default place)

I'm endebted to Ian Stevenson and VSJ for this tip.


Peter
 
Back
Top