By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,649 Members | 1,765 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,649 IT Pros & Developers. It's quick & easy.

Generate XML Documentation via MSBuild CMD

P: n/a
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.

Jun 20 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"bthubbard" <Br*************@gmail.comwrote in message
news:11**********************@q69g2000hsb.googlegr oups.com...
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.

Jun 20 '07 #2

P: n/a
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

"bthubbard" <Br*************@gmail.comwrote in message
news:11**********************@q69g2000hsb.googlegr oups.com...
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.

Jun 20 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.