Mar 27, 2012 at 9:08 PM
Edited Mar 27, 2012 at 9:12 PM
Thank you Eric for your quick reply.
I went through the references docs and tried to implement a build component skeleton and include it in the build process. The implementation is very simple at this point:
public class MyComponent : BuildComponent
public MyComponent(BuildAssembler assembler, XPathNavigator configuration) : base(assembler, configuration)
#region Overrides of BuildComponent
public override void Apply(XmlDocument document, string key)
Then I added the following build component configuration file (running Win7 x64):
C:\ProgramData\EWSoftware\Sandcastle Help File Builder\Components and Plug-Ins\MyComponent.components)
<?xml version="1.0" encoding="utf-8"?>
<component id="Custom Website Reference Links"
<description>This build component can use custom links.</description>
<configureMethod name="-" />
<insert placement="before" type="Microsoft.Ddue.Tools.ResolveReferenceLinksComponent2" />
<insertConceptual placement="before" type="Microsoft.Ddue.Tools.ResolveReferenceLinksComponent2" />
Please note that this is meant as a preliminary test, hence the absolute path to my assembly.
Now, I know that the configuration file is picked up by the SHFB UI because my component appears in the list of build components to include in the build process. However, when enabled, SHFB is unable to merge my component configuration with sandcastle.config:
Merging custom build component configurations
Could not find configuration 'Microsoft.Ddue.Tools.ResolveReferenceLinksComponent2' (instance 1) to add configuration for 'Custom Website Reference Links' so it will be omitted.
Last step completed in 00:00:00.0930
When I open up sandcastle.config in the Working directory, I do see build components with type="Microsoft.Ddue.Tools.ResolveReferenceLinksComponent2". The fact that SHFB is unable to merge is weird to me since I pretty much based the build component configuration
off the standard "Cached MSDN URL References" component config found in SandcastleBuilder.components file, the only difference being insert="before" instead of insert="replace" and some additional default configuration which is not applicable in my case. When
I disable my component or remove my component and add "Cached MSDN URL References", it gets merged fine and runs. It is only my custom component configuration that is not successfully merged,
- Using insert="replace" instead of insert="before" just to see if it makes any difference. The result is the same.
- Instead of adding component configuration file into the special folder, I tried adding the configuration directly inside SandcastleBuilder.components. The component configuration gets picked up by SHFB, but still cannot be merged, the error message being
- Using insert="start" instead of insert="before". With this configuration, the build component does get added to sandcastle.config, is successfully instantiated and applied (even though it does nothing at this point). But I believe inserting it at the start
is not an option for me and I really do need to insert it just before ResolveReferenceLinksComponent2.
Could you please help me on this? I am not at all sure where I am going wrong.
Thanks in advance,