how to specify a folder as a documentation source on the command line

Topics: User Forum
Oct 25, 2010 at 2:54 PM

 

All --

Please help.

I need to know how to specify a folder as a documentation source on the command line.

What is the quick and easy way to do that?

Please advise.

The case is that we have all our Documentation Sources (DLL files and XML files) kept in one location, "C:\DocTargets\".\

We continually have new projects added and old projects removed.

Our current process is to have the following script run every 3 hours to rebuild the docs, which works fine-- EXCEPT for the fact that it runs on the Documentation Sources that have been added into the Schfb Project file manually-- it does not run on all the contents of the given folder.

The problem is that we DO NOT want to have to open the Schfb Project file manually and add new Documentation Sources by hand.

How can we do this on the command line?

(A)

We currently have this...

%SystemRoot%\Microsoft.NET\Framework\v3.5\MSBuild.exe /p:FooterText="(This help file was built on %date% at %time%.)" C:\Code\Team\Tapi\Tapi02.shfbproj

(B)

We want to change to something like this...

%SystemRoot%\Microsoft.NET\Framework\v3.5\MSBuild.exe /p:FooterText="(This help file was built on %date% at %time%.)" p:/DocumentationSource="C:\DocTargets\*.*" C:\Code\Team\Tapi\Tapi02.shfbproj

...but we do not know the correct syntax.

Can you help?

Please advise.

Thank you.

-- Mark Kamoski

 

 

 

Coordinator
Oct 25, 2010 at 6:20 PM
Edited Oct 25, 2010 at 6:20 PM

You can pass in the value of the DocumentationSources property on the command line like this:

    /p:"<DocumentationSources><DocumentationSource sourceFile='C:\DocTargets\*.*' /></DocumentationSources>"

Another option that may be easier to maintain especially if you need to add reference elements or other property overrides too is to use a target override file.  That's just a project file containing nothing but the project property elements that you want to override.  In your case, it would contain the DocumentationSources element and the reference elements if needed and the FooterText element too if you like.  You'd use the /p:CustomBeforeSHFBTargets="OverridesFilename.proj" command line option to specify the name of the override file.  See the Building Projects Outside the GUI topic for more information.

Eric

 

Oct 25, 2010 at 8:11 PM

 

Eric --

I really appreciate that you pointed me in the right direction.

Your sample code (air code???) did not work right off the bat; but, that is no problem.

I found that this syntax works just fine...

%SystemRoot%\Microsoft.NET\Framework\v3.5\MSBuild.exe /p:DocumentationSources="<DocumentationSource sourceFile='C:\Code\DocTargets\*.*' />" /p:FooterText="(This help file was built on %date% at %time%.)" C:\Code\Team\Tapi\Tapi02.shfbproj

...and now my doc-gen is completely hands-free and in auto-mode, thanks to you and everyone contributing to this stellar project.

Thank you.

-- Mark Kamoski