Why does Sandcastle Help File Builder not store the Msdn cache in the specified folder?

StackOverflow https://stackoverflow.com/questions/676546

  •  21-08-2019
  •  | 
  •  

Question

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?

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top