views:

141

answers:

1

Hi,

I am trying to build the documentation for my application using Sandcastle Help File Builder. I added the Msdn cache component to the .shfbproj file as follows:

<ComponentConfigurations>
  <ComponentConfig id="Cached MSDN URL References" enabled="True" xmlns="">
    <component id="Cached MSDN URL References" type="SandcastleBuilder.Components.CachedResolveReferenceLinksComponent" assembly="{@SHFBFolder}SandcastleBuilder.Components.dll" locale="{@Locale}" linkTarget="{@SdkLinkTarget}">
      <cache filename="$(MsdnCachePath)" />
      <targets base="{@SandcastlePath}Data\Reflection" recurse="true" files="*.xml" type="{@SDKLinks}" />
      <targets files="reflection.xml" type="{@ProjectLinks}" />
    </component>
  </ComponentConfig>
</ComponentConfigurations>

The value of the $(MsdnCachePath) property is:

<MsdnCachePath>$(MSBuildProjectDirectory)\Cache\MsdnUrl.cache</MsdnCachePath>

The problem is that this cache file is not being created in this location after the help file has been generated. Any ideas why this would not be happening?

+1  A: 

This is because the ComponentConfigurations section does not not contain MSBuild code executed by MSBuild. ComponentConfigurations is a property containing XML data that will be passed to the component in question and there parsed by the component framework. This is indicated by the use of "SHFB" properties like

{@SandcastlePath}

which is not an MSBuild property. Thus, regular $(..) properties does not work within this xml.

Peter Lillevold