天天看點

Sandcastle的使用

Quote:Sandcastle, created by Microsoft, is a tool used for creating MSDN-style documentation from .NET assemblies and their associated XML comments files. The current version is the May 2008 release. It is command line based and has no GUI front-end, project management features, or an automated build process like those that you can find in NDoc. The Sandcastle Help File Builderwas created to fill in the gaps, provide the missing NDoc-like features that are used most often, and provide graphical and command line based tools to build a help file in an automated fashion.

  Sandcastle是一個由微軟制作的,依賴.NET程式集及其相關的XML檔案生成MSDN形式的文檔幫助的工具,現在最新的版本是2008月5月釋出的。通過這個工具可以友善地制作出幫助文檔,但她是基于指令行的,沒有GUI前端界面,項目管理功能,或你可以在NDoc中可以找到的自動生成功能,而Sandcastle Builder填補了Sandcastle的空白,提供了缺失的類似于NDoc提供的功能,并提供了基于圖形和指令行的工具來自動建立一個幫助檔案。

  這次項目的過程中就俺也使用了Sandcastle Builder,主要是用來生成項目中的API幫助文檔,小記一下:

  

  使用步驟:

  一、建立一個叫Hello的類庫,象征性的建立一個HelloWorld類,在類中寫個Test方法,并給上一些Summary标簽注釋, 随後進入項目屬性中的生成選項設定

Sandcastle的使用

  上面已經提到Sandcastle Builder要有XML檔案的配件支援,是以這裡要在項目輸出欄選中XML 文檔檔案,儲存即可。

  2、F6編譯項目,就可以看到在Debug目錄下找到DLL和XML檔案了,下面該Sandcastle Builder登場了。

  3、首先在Sandcastle Builder的Documentation Sources裡面添加DLL和XML檔案。

  4、随後就進行一些需要的設定好了,常見的都用黑體标出,當然,如果FrameworkVersion不符合的話還需要設定一下,這個是2008年釋出的,是以就别期望能夠支援到4.0了哈^_^

Sandcastle的使用

  5、因為要配合微軟的另一款HTML Help Workshop工具,是以這裡要設定它的路徑,最後指定輸出目錄和Sancastle的目錄就好了

Sandcastle的使用

  6、看一下Build之後的目錄檔案:

Sandcastle的使用

  打開看一下效果:

Sandcastle的使用
Sandcastle的使用

  效果不錯,很實用的東西^_^

from:

<a href="http://www.cnblogs.com/RockyMyx/archive/2010/04/30/Project-Route-Using-SandcastleBuilder.html">http://www.cnblogs.com/RockyMyx/archive/2010/04/30/Project-Route-Using-SandcastleBuilder.html</a>

繼續閱讀