Creating a Chm build using Sandcastle

18 篇文章 0 订阅
5 篇文章 0 订阅
Here are the steps to create a Chm build using Sandcastle. Please see the atatchment for the steps in text format.
 
Prerequisites:
1.    .Net Framework 2.0
 
 
How do Reference Build From /// Comments using Sandcastle V2.0:
Sandcastle can read authored triple-slash comments embedded in source files.
 
  1. Sandcastle by default is installed at c:/Program files/Sandcastle. Open a command prompt and type the following:
 
cd /Program Files/Sandcastle/Examples/Sandcastle
 
In this directory, you will find only a single C# file called test.cs under Examples/sandcastle directory.
 
  1. Begin by compiling the C# file and extracting the /// comments.
csc /t:library /doc:comments.xml test.cs
 
  1. This creates not only test.dll, but also comments.xml file that contains the extracted /// comments
 
  1. Next, run MRefBuilder:
MRefBuilder test.dll /out:reflection.org
 
  1. Transform the output
XslTransform /xsl:../../ProductionTransforms/AddOverloads.xsl reflection.org /xsl:../../ProductionTransforms/AddGuidFilenames.xsl /out:reflection.xml
 
  1. Generate a topic manifest
XslTransform /xsl:../../ProductionTransforms/ReflectionToManifest.xsl reflection.xml /out:manifest. xml
 
  1. Create an output directory structure
For building using VS2005 transforms please use the following:
call ../../Presentation/vs2005/copyOutput.bat
For building using prototype transforms please use the following:
call ../../Presentation/Prototype/copyOutput.bat
 
 
  1. Run BuildAssembler using the sandcastle component stack (Note: We are providing VS 2005 transforms under Presentation/VS2005 folder and the transforms shipped with the previous versions under Presentation/Prototype folder. For building VS2005 format please use sandcastle.config file from C:/Program Files/Sandcastle/Presentation/vs2005/Configuration folder as it uses shared content from C:/Program Files/Sandcastle/Presentation/vs2005/Content and transforms from C:/Program Files/Sandcastle/Presentation/vs2005/Transforms)

           这里要把sandcastle.config拷贝到当前目录

BuildAssembler /config:sandcastle.config manifest.xml
 
to generate topic files in HTM.
 
  1. Generate HTML help project
XslTransform /xsl:../../ProductionTransforms/ReflectionToChmProject.xsl reflection.xml /out:Output/test.hhp
 
  1. Generate table of contents for HTML help project
XslTransform /xsl:../../ProductionTransforms/ReflectionToChmContents.xsl reflection.xml /arg:html=Output/html /out:Output/test.hhc
 
  1. Generate Index information
XslTransform /xsl:../../ProductionTransforms/ReflectionToChmIndex.xsl reflection.xml /out:Output/test.hhk
 
  1. Run hhc (HTML Help 1.x Compiler) to generate Chm, hhc compiles the Sandcastle target files into a CHM file.

         这里要在hhc的目录下执行,建议执行在Html Help Workshop的图形化界面中完成

cd /Program Files/Sandcastle/Examples/Sandcastle/Output
and generate test.chm by typing
hhc test.hhp
 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值