Edit: It turns out this method is deprecated; just install Sandcastle Styles .
Sandcastle does not support it, but Code Contracts comes with the necessary files.
First, make sure that you create documentation for your assembly, and then in the "Code Contract" settings for your project, set the "Contract Link Assembly" to "Build" and check the box "Emit Contracts to XML Document File".
Then open C:\Program Files (x86)\Microsoft\Contracts\Sandcastle\Sandcastle.zip (or just C:\Program Files\... on a 32-bit installation - and the same for the instructions below).
What you need to extract depends on whether Sandcastle is installed with MSI or from the source (they are actually different versions):
- if from MSI, extract everything under
msi\vs2005\ to C:\Program Files (x86)\Sandcastle\Presentation\vs2005\ and overwrite any conflicts. - if from the source, extract everything under
source\vs2005\ to C:\Program Files (x86)\Sandcastle\Presentation\vs2005\ and overwrite any conflicts.
Finally, you need to create a new Sandcastle project. You can import your themes and settings from the old one in the wizard.
Then you should be able to run Sandcastle and have contracts in the documentation.
source share