Get your sandcastle up and running within 15 minutes

Sandcastle is a great open source tool for generation document from your .net code. There is only one problem with this tool, the lack of a proper installation guide. This blog post will give a complete instruction for installing Sandcastle and make it work for .NET 4
Start by downloading the following tools
3) (the latest patch file)

Start by install 1) and 2), these are easily installed. Now comes the hard part.

1.     Check the user environment variables. If you see a copy of the DXROOT environment variable there, delete it.
2.     If there is a user copy of the PATH environment variable, remove any path to the SDK version of Sandcastle that it contains. If that is all it contains, it can be deleted.
3.     Check the system environment variables to ensure that a DXROOT environment variable does exist and that it points to the correct location of the Microsoft Sandcastle tools (not the help file builder). Usually this will be C:Program FilesSandcastle unless you installed it in an alternate location.

The environment variable is located under (right click) My Computer -> Properities -> Advanced -> Environment Variables (for Windows XP).
Next step is to copy the file from 3) and copy them into the following folder C:Program FilesSandcastle. Overwrite existing files and maps in that folder.

If you use visual studio 2010 add the following row in the file called MrefBuilder.exe.config that is located under the C:Program FilesSandcastleProductiontools.
Add following xml tag between <startup> tag and as the first line.
<supportedRuntime version=”v4.0.30319″/> <!– 4.0 RTM –>

The mrefbuilder.exe.config shall looks like this

<?xml version=”1.0″?>
<supportedRuntime version=”v4.0.30319″/> <!– 4.0 RTM –>
<supportedRuntime version=”v4.0.30128″/> <!– 4.0 RC installed by VS2010 RC –>
<supportedRuntime version=”v4.0.21006″/> <!– 4.0 Beta 2 installed by VS2010 Beta 2 –>
<supportedRuntime version=”v4.0.20506″/> <!– 4.0 Beta 1 installed by VS2010 Beta 1 –>
<supportedRuntime version=”v2.0.50727″/> <!– 2.0 RTM –>

Now there is support for .net 4

That is all folks….

Leave a Reply