ndronen

Hi:

Using the June 2007 Sandcastle CTP, I'm getting a DirectoryNotFoundException in BuildComponents.dll. It's apparently looking for C:\Program Files\Sandcastle\Data\cpref_reflection. The value of %DXROOT% is C:\Program Files\Sandcastle.

This post

http://www.codeplex.com/SHFB/WorkItem/View.aspx WorkItemId=12709

suggests reinstalling, but I've done that already. Any suggestions

Nick

MrefBuilder (v2.2.64000.4)
Copyright c Microsoft 2006
Info: Loaded 1 assemblies for reflection and 1 dependency assemblies.
Info: Wrote information on 17 namespaces, 2378 types, and 22952 members
XslTransform (v2.2.64000.4)
Copyright c Microsoft 2005-2006
Info: Applying XSL transformation 'C:/Program Files/Sandcastle/ProductionTransforms/ApplyPrototypeDocModel.xsl'.
Info: Applying XSL transformation 'C:/Program Files/Sandcastle/ProductionTransforms/AddFriendlyFilenames.xsl'.
XslTransform (v2.2.64000.4)
Copyright c Microsoft 2005-2006
Info: Applying XSL transformation 'C:/Program Files/Sandcastle/ProductionTransforms/ReflectionToManifest.xsl'.
BuildAssembler (v2.2.64000.4)
Copyright c Microsoft 2006
Info: CopyFromFileComponent: Instantiating component.
Info: CopyFromFileComponent: Loading data file 'C:\Program Files\Sandcastle\Presentation\Prototype\transforms\skeleton.xml'.
Info: CopyFromIndexComponent: Instantiating component.
Info: CopyFromIndexComponent: Searching for files that match 'reflection.xml'.
Info: CopyFromIndexComponent: Searching for files that match 'C:\Program Files\Sandcastle\Data\cpref_reflection\*.xml'.
Error: BuildAssembler: An error occured while initializing the build component 'Microsoft.Ddue.Tools.CopyFromIndexComponent' in the component assembly 'C:\Program Files\Sandcastle\ProductionTools\BuildComponents.dll'. The error message and stack trace follows: System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Program Files\Sandcastle\Data\cpref_reflection'.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.Directory.InternalGetFileDirectoryNames(String path, String userPathOriginal, String searchPattern, Boolean includeFiles, Boolean includeDirs, SearchOption searchOption)
at System.IO.Directory.GetFiles(String path, String searchPattern, SearchOption searchOption)
at System.IO.Directory.GetFiles(String path, String searchPattern)
at Microsoft.Ddue.Tools.IndexedDocumentCache.AddDocuments(String wildcardPath)
at Microsoft.Ddue.Tools.IndexedDocumentCache.AddDocuments(String baseDirectory, String wildcardPath, Boolean recurse)
at Microsoft.Ddue.Tools.CopyFromIndexComponent..ctor(BuildAssembler assembler, XPathNavigator configuration)



Re: Developer Documentation and Help System June 2007 CTP: DirectoryNotFoundException .. C:\Program Files\Sandcastle\Data\Cpref_reflection

Dave Sexton

Hi,

The directory that Sandcastle is looking for, %DXROOT%\Data\cpref_reflection doesn't exist in the June 2007 CTP.

However, the directory that's normally configured in the June 2007 CTP sandcastle.config files is actually %DXROOT%\Data\Reflection so it seems that either you're not running against the June 2007 CTP or you're using a modified sandcastle.config file.

Open the sandcastle.config file for the presentation that you're using (e.g., Prototype, vs2005 or Hana) and find the first "Copy in reflection data" component that looks like this:

sandcastle.config
<!-- Copy in reflection data -->
<component type="Microsoft.Ddue.Tools.CopyFromIndexComponent"
assembly="%DXROOT%\ProductionTools\BuildComponents.dll">
<index name="reflection" value="/reflection/apis/api" key="@id" cache="10">
<data base="%DXROOT%\Data\Reflection" recurse="true" files="*.xml" />
<data files=".\reflection.xml" />
</index>
<copy name="reflection" source="*" target="/document/reference" />
</component>

As you can see, it should use "Reflection", not "cpref_reflection" in the first <data> element.

- Dave






Re: Developer Documentation and Help System June 2007 CTP: DirectoryNotFoundException .. C:\Program Files\Sandcastle\Data\Cpref_reflection

EWoodruff

The configuration file is generated from a template. It's possible that if you had a prior version of the help file builder installed and installed the latest release over it, perhaps it didn't replace the templates. Try uninstalling the help file builder and then seeing if the C:\Program Files\EWSoftware\Sandcastle Help File Builder Folder still exists. If it does, delete it manually and then reinstall the help file builder. That will ensure that the templates are current and will work with the June CTP.

Eric





Re: Developer Documentation and Help System June 2007 CTP: DirectoryNotFoundException .. C:\Program Files\Sandcastle\Data\Cpref_reflection

ndronen

This is strange. We're using Prototype. Here's the config file.

Prototype\configuration\sandcastle.config

<!-- Copy in reflection data -->
<component type="Microsoft.Ddue.Tools.CopyFromIndexComponent" assembly="%DXROOT%\ProductionTools\BuildComponents.dll">
<index name="reflection" value="/reflection/apis/api" key="@id" cache="10">
<data base="%DXROOT%\Data\Reflection" recurse="true" files="*.xml" />
<data files=".\reflection.xml" />
</index>
<copy name="reflection" source="*" target="/document/reference" />
</component>


I checked the other sandcastle.config files and they also have %DXROOT%\Data\Reflection. Hrm.

Regards,

Nick




Re: Developer Documentation and Help System June 2007 CTP: DirectoryNotFoundException .. C:\Program Files\Sandcastle\Data\Cpref_reflection

Dave Sexton

Hi Nick,

If you're using SHFB then have you tried Eric's suggestion

If you're not, then it sounds to me like you might be unknowingly using an older version of Sandcastle. Do you have the VS 2005 SDK installed The SDK would have installed the Sandcastle December CTP in the SDK directory, and it uses cpref_reflection. It also updates the %DXROOT% variable so if you installed it after the Sandcastle June 2007 CTP, then there's your answer.

- Dave




Re: Developer Documentation and Help System June 2007 CTP: DirectoryNotFoundException .. C:\Program Files\Sandcastle\Data\Cpref_reflection

EWoodruff

The help file builder doesn't use the configuration files found in the Sandcastle installation folder. It generates a configuration file at build time using a template found in the .\Templates folder under its installation folder. As long as they point to the right place ({@SandcastlePath}Data\Reflection) you've got the right ones. The {@SandcastlePath} part gets replaced at build time with the appropriate base path to Sandcastle.

Eric





Re: Developer Documentation and Help System June 2007 CTP: DirectoryNotFoundException .. C:\Program Files\Sandcastle\Data\Cpref_reflection

ndronen

Hi, Dave:

We're not using SHFB. I linked to the HFB post simply because the error was the same.

You're more or less right about us inadvertently using an older version of Sandcastle. There's a sandcastle.config in source control that's the build script was passing as an argument to one of the Sandcastle executables, and that sandcastle.config was from an older version of Sandcastle. I changed the Data element to use "Reflection" instead of the old directory name and all is well now. (In other words, pilot error. :-)) Thanks for your help.

Regards,

Nick