This project has moved and is read-only. For the latest updates, please go here.

Code Contract Support

Topics: User Forum
Oct 26, 2009 at 9:36 PM

Hi All,

My apologies if this has already been discussed, I did try searching the forum and didn't find anything relevant.

I understand the latest version of Sandcastle has support for generating (additional/partial) documentation based on Microsoft Code Contracts. Does anyone know if support for this is required/available in SHFB, or if it is planned ?



Oct 27, 2009 at 4:24 PM

As I understand it, the Code Contracts download includes a patch for Sandcastle in the C:\Program Files\Microsoft\Contracts\Sandcastle folder.  I haven't looked into it yet so I have to assume it's a patch to the stock Sandcastle installation rather than the Sandcastle Styles patched version.  As such, you may need to manually merge in the code contracts changes rather than just overwriting the Sandcastle files if you need or want to keep the Sandcastle Styles patches too.  It's on the To Do list to merge them into the Sandcastle Styles patch.  Sandcastle is separate from SHFB so once applied, using it with SHFB should be no different since it's a new section in the API topics.



Oct 27, 2009 at 9:17 PM

Excellent, thanks for that info Eric.

As soon as I get time I'll try it out and see what the result looks like.

Is it likely there will be an option (visible in SHFB) in a future version to enable/disable including the code-contract based documentation in the output ?


Oct 28, 2009 at 3:56 AM

That depends on how the Sandcastle patch implements it.  If there's an XSL option that can be set to include or exclude it, I can add a property to support it in SHFB.