ixnay2infinity

Monday, July 31, 2006

Sandcastle BAT script configuration utility

UPDATE: Now supports wild cards (i.e. multiple assemblies/xml-comments files).

I've whipped together a little windows app to configure and create the BAT script that I posted yesterday which calls the various steps to get Sandcastle-generated MSDN-style documentation:

http://www.ixnay2infinity.com/misc/SandcastleCreateBat.zip

NB: The app includes the BAT script - you do not need to download it separately.

1) Unzip all files, and open SandCastleCreateBat.exe.
2) Specify file paths
3) Click Create BAT to output BAT script + sandcastle.config to the same directory as as the CHM path.

Screenshot:


For detailed information visit: http://www.codeproject.com/useritems/SandcastleCreateBat.asp


Feedback would be appreciated.

4 Comments:

  • Here's the batch updated to take those paths as arguments, and a fix on MRefBuilder to include the System.configuration dependency:

    if not exist output mkdir output
    cd output
    MRefBuilder %1 /out:reflection.org

    /dep:"c:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Configuration.dll"
    copy %2 comments.xml
    XslTransform "C:\Program Files\Sandcastle\ProductionTransforms\AddOverloads.xsl" reflection.org |

    XslTransform "C:\Program Files\Sandcastle\ProductionTransforms\AddGuidFilenames.xsl" /out:reflection.xml
    XslTransform "C:\Program Files\Sandcastle\ProductionTransforms\ReflectionToManifest.xsl" reflection.xml

    /out:manifest.xml
    if not exist html mkdir html
    if not exist art mkdir art
    if not exist scripts mkdir scripts
    if not exist styles mkdir styles
    copy "C:\Program Files\Sandcastle\Presentation\art\*" art
    copy "C:\Program Files\Sandcastle\Presentation\scripts\*" scripts
    copy "C:\Program Files\Sandcastle\Presentation\styles\*" styles
    BuildAssembler /config:../sandcastle.config manifest.xml
    XslTransform "C:\Program Files\Sandcastle\ProductionTransforms\ReflectionToChmContents.xsl"

    reflection.xml /arg:html="html" /out:"Test.hhc"
    copy "C:\Program Files\Sandcastle\Presentation\Chm\test.hhp" "help_proj.hhp"
    "C:\Program Files\HTML Help Workshop\hhc.exe" "%CD%\help_proj.hhp"
    @copy "Test.chm" %3
    @cd ..
    @rd /s /q output
    @pause

    By Blogger Daniel Root, at 2:29 pm  

  • Cool thanks.

    By Blogger ixnay2infinity, at 12:40 am  

  • I can't get MRefBuilder to process my assembly.
    The result is:

    Info: Loaded 1 assemblies for reflection and 1 dependency assemblies.
    Info: Wrote information on 0 namespaces, 0 types, and 0 members

    irrespective of whether I add the /dep: argument or not.

    And btw the XslTransform (v2.0.2428.25985) works only when I run the command including the /xsl: arg, otherwise it won't recognize the xsl files and I get the "Specify at least one XSL file" message.

    By Blogger Stanislav, at 2:44 am  

  • This comment has been removed by a blog administrator.

    By Blogger noo, at 2:53 pm  

Post a Comment

<< Home