Windows Live Alerts
Welcome to MSDN Blogs Sign in | Join | Help

Sandcastle Source Code published in Codeplex

 

I am very pleased to announce the availability of the Sandcastle project with source code at http://www.codeplex.com/Sandcastle. The source code can be downloaded from the Releases tab at http://www.codeplex.com/Sandcastle/Release/ProjectReleases.aspx?ReleaseId=13873 and also from the Source code tab at http://www.codeplex.com/Sandcastle/SourceControl/ListDownloadableCommits.aspx.

Last month I blogged about the removal of Sandcastle project from Codeplex at http://blogs.msdn.com/sandcastle/archive/2008/06/06/sandcastle-project-removed-from-codeplex.aspx. and asked for your feedback. It is very clear from the emails I recieved from all of you and from various blogs that  publishing the source code is the right thing to do for the Sandcastle customers. I thank you for this thread http://www.codeplex.com/Sandcastle/Thread/View.aspx?ThreadId=29085 and for all the great community efforts and support around Sandcastle and it's adoption rates. 

I also would like to thank Sam Ramji, Scott Stein and Sara Ford from Microsoft for being strong advocates of the open source community.
 

Thank you again for all for your patience.  Please feel free to contact me (aram@microsoft.com) directly regarding any questions. Cheers.

Anand..

 

Posted by aram | 10 Comments
Filed under:

Filtering APIs using Sandcastle

 

API filters in Sandcastle is a very useful feature and allows namespaces, types, and members to be removed or shown in the reflection XML file, and ultimately in the compiled docs. They can be set up so that only certain topics are dropped, or so that a parent type has all children hidden with only specific ones shown. The API filter configuration can be found in ProductionTools\MRefBuilder.config file and is contained within an apiFilter element.

If no apiFilter element exists the default is to expose everything. This is the same as having an empty apiFilter element that is exposed such as

<apiFilter expose="true"></apiFilter>

 

 

Setting expose to false will hide everything, which is useful if you wish to expose only certain namespaces, types, or methods.

 

<apiFilter expose="false"></apiFilter>

 

 

Filter Inheritance

Filters inherit from their parent filter, with the exception of nested types which look to their parent type(s) before the namespace filter.

 

In the example below, only ThirdNamespace will be exposed. All other namespaces will be left out. Also, all types in ThirdNamespace and methods within those types will be shown. Types and methods in other namespaces will be left out.

 

<apiFilter expose="false">

    <namespace name="ThirdNamespace" expose="true"></namespace>    

</apiFilter>

 

This filter shows everything except for ThirdNamespace and it types and members.

 

<apiFilter expose="true">

    <namespace name="ThirdNamespace" expose="false"></namespace>   

</apiFilter>

 

 

If a filter is exposed within a non-exposed filter it will still be shown. The example below results in only the single method being exposed along with its declaring types. No other children of the declaring types are exposed. Without the filter for MyMethod, or with the filter set to false, everything will be hidden.

 

<apiFilter expose="false">

  <namespace name="MyNamespace" expose="false">

        <type name="MyClass" expose="false">

              <member name="MyMethod" expose="true" />                    

        </type>

  </namespace>           

</apiFilter>

 

A filter to show all types within MyClass, but leave out MyMethod and MyMethod2 would look like this

<apiFilter expose="false">

  <namespace name="MyNamespace" expose="false">

        <type name="MyClass" expose="true">

              <member name="MyMethod" expose="false" />                   

              <member name="MyMethod2" expose="false" />   

        </type>

  </namespace>           

</apiFilter>

 

Nested Types

Nested types inherit from their parent type. If a type is nested within other nested types it will go through the parent types until it finds a filter.

In the examples below are filters for a class with contains a class called MyNestedNestedClass which is nested within MyNestedClass. MyNestedClass is nested with a class called MyClass.

MyNamespace
     - MyClass
        - MyNestedClass
            -MyNestedNestedClass

This filter will hide everything except for MyNestedClass and its types. Since we set MyNestedNestedClass to be hidden it will not show up. MyClass is also hidden since MyNamespace is not exposed.

<apiFilter expose="false">

  <namespace name="MyNamespace" expose="false">

      <type name="MyNestedClass" expose="true"></type>

      <type name="MyNestedNestedClass" expose="false"></type>

  </namespace>           

</apiFilter>

Here MyNestedNestedClass will also be shown since its declaring type (MyNestedClass) is shown.

<apiFilter expose="false">

  <namespace name="MyNamespace" expose="false">

        <type name="MyNestedClass" expose="true"></type>

  </namespace>           

</apiFilter>

 

Exposing members within nested types works the same as with regular types. Using this filter only MyNestedMethod will be shown, leaving MyNestedNestedClass hidden, and all other members within MyNestedClass.

<apiFilter expose="false">

  <namespace name="MyNamespace" expose="false">

        <type name="MyNestedClass" expose="false">

              <member name="MyNestedMethod" expose="true" />           

        </type>

  </namespace>           

</apiFilter>

 

 

General Examples

The following example filters out three namespaces, and 11 types within the System namespace.

<apiFilter expose="true">

      <namespace name="System" expose="true">

        <type name="BrowsableAttribute" expose="false" />

        <type name="DefaultMemberAttribute" expose="false" />

        <type name="IntPtr" expose="false" />

        <type name="MulticastDelegate" expose="false" />

        <type name="NonScriptableAttribute" expose="false" />

        <type name="ParamArrayAttribute" expose="false" />

        <type name="RuntimeFieldHandle" expose="false" />

        <type name="RuntimeTypeHandle" expose="false" />

        <type name="UIntPtr" expose="false" />

        <type name="Void" expose="false" />

      </namespace>

      <namespace name="System.ComponentModel" expose="false" />

      <namespace name="System.Runtime.CompilerServices" expose="false" />

      <namespace name="System.Runtime.InteropServices" expose="false" />

</apiFilter>

 

Hope this helps. Cheers.

 

Anand..

 

Posted by aram | 4 Comments
Filed under:

Sandcastle Version 2.4.10520 at MS Download Center

 

I got several emails, after my previous post at http://blogs.msdn.com/sandcastle/archive/2008/06/06/sandcastle-project-removed-from-codeplex.aspx, asking for an alternative download location of Sandcastle V 2.4.10520 until we close in on our decision about the future release location of Sandcastle. Thank you for all your feedback on our options and for providing mirror sites for downloading Sandcastle.

I have posted the recent release of Sandcastle temporarily at http://www.microsoft.com/downloads/details.aspx?FamilyID=E82EA71D-DA89-42EE-A715-696E3A4873B2&displaylang=en so that the community can download the binaries until we close in on our options presented at http://blogs.msdn.com/sandcastle/archive/2008/06/06/sandcastle-project-removed-from-codeplex.aspx.

Again I am grateful for all the great community efforts, support around Sandcastle and the adoption rates.
I ask your patience while I make every effort to address the options presented. I will get back and blog about our decision.

Thanks for your understanding.  Cheers.

Anand..

Posted by aram | 2 Comments
Filed under:

Sandcastle project removed from Codeplex

 

We have removed Sandcastle project from Codeplex after carefully evaluating the feedback from this thread http://www.codeplex.com/Sandcastle/Thread/View.aspx?ThreadId=29085 (currently unavailable).

There are few options such as the following:

  1. Publish the source code for Sandcastle and revive this project in Codeplex
  2. Migrate sandcastle to MSDN Code gallery at http://code.msdn.microsoft.com

I am going to evaluate these and other options carefully but rest assured the Sandcastle downloads will be available soon for the customers.

I am greatful for all the great community efforts, support around Sandcastle and the adoption rates.
I ask your patience while I make every effort to address the options presented. I will get back and blog about our decision.

Thanks for your understanding.  Please feel free to contact me (aram@microsoft.com) directly regarding any questions. Cheers.

Anand..

 

Related Articles:

Posted by aram | 15 Comments

Announcing NameSpace# - Diagnostics and Viewer for HxS

 

I blogged here http://blogs.msdn.com/sandcastle/archive/2008/01/22/introducing-namespace-diagnostics-and-viewer-for-hxs.aspx about Namespace#, the Diagnostics and Viewer for HxS written by  Paul O'Rear, ex-Microsoft Help MVP, is my colleague at Microsoft.  You can read about Paul’s work at http://www.helpfulsolutions.com/.

Today we release NameSpace# at http://code.msdn.microsoft.com/NamespaceSharp.  

Please note that the current release works only in Windows 2003 Server. An updated version for other Windows OS will be posted soon.

Microsoft Namespace# 2.0

Microsoft Namespace# 2.0 is a general purpose tool for exploring and experimenting with the Microsoft Help 2.x help system used in such products as Microsoft Visual Studio, Microsoft Developer Network (MSDN) Library, Microsoft Office, and a number of software development kits (SDKs).

Background
Microsoft Visual Studio uses a proprietary Help system known as Microsoft Help 2.x; codenamed "Havana". The Microsoft Visual Studio SDK ships a number of components for extending Visual Studio, including its help system. [For more information regarding Visual Studio Extensibility and the Microsoft Help 2.x help system please install the Visual Studio SDK.]

Among the components installed with the Visual Studio SDK are a help compiler and a few miscellaneous tools for diagnostic and help content registration purposes. One of these tools is Namespace.exe. Similar to how the concept of namespaces are used in source code for producing application software, the Microsoft Help 2.x subsystem uses the idea of a namespace to define an abstract collection or aggregation of help content.

Namespace.exe enables you to perform some rudimentary diagnostics and tasks that are involved with MS Help 2.x help collections and their registration. Namespace.exe was originally developed by the Help 2.x compiler and runtime team at Microsoft. It is useful for a variety of diagnostic information including the following:

    • Global Namespace (Collection) registration details
    • Global Title (HxS) registration details
    • Global Filter registration details
    • Global Plugin registration details

It will also allow you to register new Namespaces, HxS files, filters, and plugins as well as to unregister or delete the same. You can also register files to use an .HxQ/.HxR with this tool. The main uses for the original Namespace tool are for obtaining information about a registered Help collection as well as for hacking existing collections or registering new ones for experimentation purposes. There have also been a number of other little one off internal Microsoft help tools that enabled you to inspect a few other features of the help system.

Microsoft Namespace# 2.0 endeavors to wrap all of the features of the original Namespace and other internal Microsoft help related tools into one tool, and also adds features similar to the DExplore help viewer that currently ships with Visual Studio. But it also goes much further, allowing you to explore the internals of individual help files, view scripts and .css files that are used, view collection definition files and much more. It is sort of intended to be a one stop shop for exploring nearly every detail related to Help 2.x help systems.

Two primary areas to look at are the Namespace and Help View tabs in the UI - these toggle between a diagnostic view of the help system to a more help viewer type mode. The Help view mode is based on the collection/namespace you currently have selected in the Namespace mode. There are many features buried in this tool. * TIP * - right click on the tree nodes in the Namespace view to see a number of tasks that you can perform.

Requirements
Microsoft Namespace# 2.0 assumes that you have some product installed that has already installed the Microsoft Help 2.x help system (i.e. Visual Studio, etc). For a few fringe features (HxQ/HxR generation) it would also require the Visual Studio SDK to be installed, though this is not required for its most common uses.

Two primary areas to look at are the Namespace and Help View tabs in the UI - these toggle between a diagnostic view of the help system to a more help viewer type mode. The Help view mode is based on the collection you currently have selected in the Namespace mode. There are many features buried in this tool - primary tip is to right click on the tree nodes in the Namespace view to see a number of tasks that you can perform. See screen shot below.

Namespace#

Hope you will like this tool and it's features. Cheers.

 

Anand..

Posted by aram | 3 Comments

Sandcastle Community Projects - Sandcastle Styles

 

I talked about various community projects supporting Sandcastle in this blog http://blogs.msdn.com/sandcastle/archive/2007/06/21/sandcastle-customer-projects.aspx. I am very pleased to announce the release of Sandcastle Styles to this community project list. Dave Sexton of DocProject for Sandcastle wrote me the following:

Hi Anand,

I don’t know if anyone else notified you about this yet, but Sandcastle Styles is now live. 

Thanks Dave for notifying me. As I understand the goal of this project is to improve Sandcastle releases by providing a rolled-up solution to various presentation style issues in a manner that is highly visible to the Sandcastle community and also involves community feedback.

What's Available in this release?

Sandcastle May 2008 Patch - This is a patch for the Sandcastle presentation style files that fixes most of the known bugs. It also includes enhancements to existing features.

Documenting Web Projects 1.0.0.0 - This contains information on producing XML comments for web application and website projects. For website projects, custom code providers are included that make it much easier to obtain the XML comments files needed to create a help file using Sandcastle

Sandcastle MAML Guide 1.0.0.0 - This is intended to be a reference that you can use to find out all that you need to know about Microsoft Assistance Markup Language (MAML) as used with Sandcastle to produce help files containing conceptual content.

Future Plans

Work is under way to produce a set of example code and MAML files that you can use to see the effects of the various XML comments and MAML elements and learn how they can be used. In the future, custom presentation styles and language packs may also be made available.

 

This is a great community team effort by Dave, Eric and Paul and I thank you guys for brining this effort together. Cheers.

 

Anand..

 

Posted by aram | 0 Comments
Filed under: ,

Announcing Sandcastle Version 2.4.10520

 

I am excited to announce the availability of  Sandcastle Version 2.4.10520. The latest version is now available for download at http://www.codeplex.com/Sandcastle. My sincere thanks to the Sandcastle user community for providing us with valuable feedback.

What's new in this version:

1.      Sandcastle tools that will used for shipping Orcas SP1 RTM content. 

4.      Bug Fixes

Getting Started:

1.   Using the command line option for the batch file under Examples/Sandcastle folder to build VS2005 or  hana or prototype style CHM or HxS file

1.    Build_sandcatle.bat vs2005 test

2.    Build_sandcatle.bat prototype test

3.    Build_sandcatle.bat hana test

 

If you need to generate hxs, please uncomment the following line in build_sandcastle.bat. Make sure "Microsoft Help 2.0 SDK" is installed on your machine.

::hxcomp.exe -p output\test.hxc

2.   Using msbuild to generate build for VS2005 or  hana or prototype, CHM or HxS file

1.    Msbuild build.proj /property:PresentationStyle=vs2005

2.    Msbuild build.proj /property:PresentationStyle=hana

3.    Msbuild build.proj /property:PresentationStyle=prototype

 

To build hxs, add /target:Hxs, eg: Msbuild build.proj /property:PresentationStyle=vs2005 /target:Hxs

 

3.   Using GUI to generate build for VS2005 or  hana or prototype, CHM or HxS file

A sample GUI is provided under \Example\generic folder. I will provide a separate blog about generating a build using the sample GUI.

Issues fixed in this version (Reported by Customers):

1.       Sandcastle - scbuild is unable to handle dependencies in other directories

2.       Sandcastle must properly escape VB keywords with square brackets

3.       Sandcastle: <see> within <c> not shown

4.       Sandcastle: A NullReferenceException threw by MRefBuilder.exe

5.       Sandcastle: Add the FixScriptSharp transform to scbuild

6.       Sandcastle: An Error of Transform (vs2005)

7.       Sandcastle: Bug when doing a build that includes privates (/internal+) results in the non-nested class being ripped and the nested class being left

8.       Sandcastle: BuildAssembler.exe raise an error when a root project node is included in the reflection.xml

9.       Sandcastle: Change 2005 to 2008 in copyright info (prototype style)

10.   Sandcastle: ChmBuilder /config switch

11.   Sandcastle: chmbuilder drops a css file when handling <title />

12.   Sandcastle: ChmBuilder.exe should create the Output Directory if it is not exist

13.   Sandcastle: Conceptual Help: A better media art links

14.   Sandcastle: Generic parameter is missed in Toc and Header Title of Generic Type

15.   Sandcastle: inline seealso tag not working

16.   Sandcastle: Js error raised when printing chm topics (prototype and vsorcas styles)

17.   Sandcastle: make changes to build scripts to include environment variable ProgramFiles(x86) on 64 bits machine

18.   Sandcastle: make changes to build scripts to include environment variable ProgramFiles(x86) on 64 bits machine