Conceptual topic does not compile in VS2008: SnippetComponent not found in BuildComponents.dll

Topics: Bugs, Conceptual Topics, Help 1.x/2.x, Sandcastle
Mar 25, 2010 at 8:04 PM

Hi,

I've installed sandcastle 2008, DocProject latest and Sandcastle styles (latest). I've then created a new DocProject in VS2008 SP1 with Help 1.x, and added a sample .NET assembly. When I build, everything works.

The problem comes when I add a conceptual topic (Troubleshooting for instance). I simply add it and the next compile fails with:

Error: The type 'Microsoft.Ddue.Tools.SnippetComponent' was not found in the component assembly 'C:\Program Files\Sandcastle\\ProductionTools\BuildComponents.dll'.

Step 9 System.NullReferenceException: Build Assembler {conceptual.help1x.config}:
Object reference not set to an instance of an object.

When I remove the topic, it compiles ok!

Thanks,

Martin

 

Here's the full log:

 

------ Build started: Project: ITE.DocProject, Configuration: Debug Any CPU ------
C:\WINDOWS\Microsoft.NET\Framework\v3.5\Csc.exe /noconfig /nowarn:1701,1702 /errorreport:prompt /warn:4 /define:DEBUG;TRACE /reference:C:\WINDOWS\assembly\GAC_MSIL\DaveSexton.DocProject\1.11.0.0__af1a4bab65cc4ece\DaveSexton.DocProject.dll /reference:"c:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Core.dll" /reference:"c:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Data.DataSetExtensions.dll" /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.dll /reference:"c:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Xml.Linq.dll" /debug+ /debug:full /optimize- /out:obj\Debug\ITE.DocProject.dll /target:library BuildProcess.cs Properties\AssemblyInfo.cs

Compile complete -- 0 errors, 0 warnings
ITE.DocProject -> C:\Documents and Settings\tappm\My Documents\Dev\Runway\ITE\Documentation\ITE.DocProject\ITE.DocProject\bin\Debug\ITE.DocProject.dll

Starting help build for ITE.DocProject...
Preparing target directory...
Merging XML documentation for ITE.Build.Interface.dll...
Building documentation for ITE.DocProject...

Step 1 of 15: Change Directory

Changing current directory from "C:\Documents and Settings\tappm\My Documents\Dev\Runway\ITE\Documentation\ITE.DocProject\ITE.DocProject\Help\" to "C:\Documents and Settings\tappm\My Documents\Dev\Runway\ITE\Documentation\ITE.DocProject\ITE.DocProject\buildhelp"

Step 1 Time Elapsed: 00:00:00

Step 2 of 15: Execute MRefBuilder

C:\Program Files\Sandcastle\ProductionTools\MRefBuilder /config:"C:\Documents and Settings\tappm\My Documents\Dev\Runway\ITE\Documentation\ITE.DocProject\ITE.DocProject\Help\Presentation\Style\Configuration\MRefBuilder.config" /out:reflection.org /internal- /dep:"C:\WINDOWS\assembly\GAC_MSIL\Microsoft.Build.Utilities.v3.5\3.5.0.0__b03f5f7f11d50a3a\Microsoft.Build.Utilities.v3.5.dll","C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll","C:\WINDOWS\assembly\GAC_MSIL\Microsoft.Build.Framework\3.5.0.0__b03f5f7f11d50a3a\Microsoft.Build.Framework.dll","C:\WINDOWS\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll","C:\WINDOWS\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll","C:\WINDOWS\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll","C:\WINDOWS\assembly\GAC_MSIL\System.Data.SqlXml\2.0.0.0__b77a5c561934e089\System.Data.SqlXml.dll","C:\WINDOWS\assembly\GAC_MSIL\System.Security\2.0.0.0__b03f5f7f11d50a3a\System.Security.dll","C:\WINDOWS\assembly\GAC_MSIL\CAE.Common\1.0.0.0__951e978bdcdf6d06\CAE.Common.dll","C:\WINDOWS\assembly\GAC_MSIL\WindowsBase\3.0.0.0__31bf3856ad364e35\WindowsBase.dll","C:\WINDOWS\assembly\GAC_MSIL\System.Core\3.5.0.0__b77a5c561934e089\System.Core.dll","C:\WINDOWS\assembly\GAC_32\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll","C:\WINDOWS\assembly\GAC_32\System.Transactions\2.0.0.0__b77a5c561934e089\System.Transactions.dll","C:\WINDOWS\assembly\GAC_MSIL\System.DirectoryServices\2.0.0.0__b03f5f7f11d50a3a\System.DirectoryServices.dll","C:\WINDOWS\assembly\GAC_MSIL\System.Runtime.Remoting\2.0.0.0__b77a5c561934e089\System.Runtime.Remoting.dll","C:\WINDOWS\assembly\GAC_32\System.Web\2.0.0.0__b03f5f7f11d50a3a\System.Web.dll","C:\WINDOWS\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll","C:\WINDOWS\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll","C:\WINDOWS\assembly\GAC_MSIL\Microsoft.VisualC\8.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualC.dll","C:\WINDOWS\assembly\GAC_MSIL\System.Web.Services\2.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dll","C:\WINDOWS\assembly\GAC_MSIL\System.Design\2.0.0.0__b03f5f7f11d50a3a\System.Design.dll","C:\WINDOWS\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll","C:\WINDOWS\assembly\GAC_MSIL\Accessibility\2.0.0.0__b03f5f7f11d50a3a\Accessibility.dll","C:\WINDOWS\assembly\GAC_MSIL\System.Runtime.Serialization.Formatters.Soap\2.0.0.0__b03f5f7f11d50a3a\System.Runtime.Serialization.Formatters.Soap.dll","C:\WINDOWS\assembly\GAC_MSIL\System.Deployment\2.0.0.0__b03f5f7f11d50a3a\System.Deployment.dll","C:\WINDOWS\assembly\GAC_MSIL\System.Drawing.Design\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.Design.dll","C:\WINDOWS\assembly\GAC_32\System.Data.OracleClient\2.0.0.0__b77a5c561934e089\System.Data.OracleClient.dll","C:\WINDOWS\assembly\GAC_MSIL\System.Web.RegularExpressions\2.0.0.0__b03f5f7f11d50a3a\System.Web.RegularExpressions.dll","C:\WINDOWS\assembly\GAC_MSIL\System.DirectoryServices.Protocols\2.0.0.0__b03f5f7f11d50a3a\System.DirectoryServices.Protocols.dll","C:\WINDOWS\assembly\GAC_MSIL\System.ServiceProcess\2.0.0.0__b03f5f7f11d50a3a\System.ServiceProcess.dll","C:\WINDOWS\assembly\GAC_MSIL\System.Configuration.Install\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.Install.dll","C:\WINDOWS\assembly\GAC_MSIL\System.Xml.Linq\3.5.0.0__b77a5c561934e089\System.Xml.Linq.dll" "C:\Documents and Settings\tappm\My Documents\Dev\Runway\ITE\bin\ITE.Build.Interface.dll"

MrefBuilder (v2.4.10520.1)
Copyright c Microsoft 2006
Info: Loaded 1 assemblies for reflection and 32 dependency assemblies.
Info: Wrote information on 1 namespaces, 17 types, and 116 members

Step 2 Time Elapsed: 00:00:00.6718750

Step 3 of 15: Execute XslTransform

C:\Program Files\Sandcastle\ProductionTools\XslTransform /xsl:"C:\Program Files\Sandcastle\ProductionTransforms\ApplyVSDocModel.xsl" "reflection.org" /arg:project="Project" /xsl:"C:\Program Files\Sandcastle\ProductionTransforms\AddGuidFilenames.xsl" /out:"reflection.xml" /arg:IncludeAllMembersTopic=true /arg:IncludeInheritedOverloadTopics=true

XslTransform (v2.4.10520.1)
Copyright c Microsoft 2005-2006
Info: Applying XSL transformation 'C:\Program Files\Sandcastle\ProductionTransforms\ApplyVSDocModel.xsl'.
Info: Applying XSL transformation 'C:\Program Files\Sandcastle\ProductionTransforms\AddGuidFilenames.xsl'.

Step 3 Time Elapsed: 00:00:01.1718750

Step 4 of 15: Copy File

Copy "C:\Documents and Settings\tappm\My Documents\Dev\Runway\ITE\Documentation\ITE.DocProject\ITE.DocProject\buildhelp\reflection.xml" to "C:\Documents and Settings\tappm\My Documents\Dev\Runway\ITE\Documentation\ITE.DocProject\ITE.DocProject\buildhelp\assembler\reflection.xml" and overwrite.

Step 4 Time Elapsed: 00:00:00.0156250

Step 5 of 15: Execute XslTransform

C:\Program Files\Sandcastle\ProductionTools\XslTransform /xsl:"C:\Program Files\Sandcastle\ProductionTransforms\ReflectionToManifest.xsl" "C:\Documents and Settings\tappm\My Documents\Dev\Runway\ITE\Documentation\ITE.DocProject\ITE.DocProject\buildhelp\assembler\reflection.xml" /out:"manifest.xml"

XslTransform (v2.4.10520.1)
Copyright c Microsoft 2005-2006
Info: Applying XSL transformation 'C:\Program Files\Sandcastle\ProductionTransforms\ReflectionToManifest.xsl'.

Step 5 Time Elapsed: 00:00:00.4062500

Step 6 of 15: Execute XslTransform

C:\Program Files\Sandcastle\ProductionTools\XslTransform /xsl:"C:\Program Files\Sandcastle\ProductionTransforms\CreateVSToc.xsl" "C:\Documents and Settings\tappm\My Documents\Dev\Runway\ITE\Documentation\ITE.DocProject\ITE.DocProject\buildhelp\assembler\reflection.xml" /out:"toc.xml"

XslTransform (v2.4.10520.1)
Copyright c Microsoft 2005-2006
Info: Applying XSL transformation 'C:\Program Files\Sandcastle\ProductionTransforms\CreateVSToc.xsl'.

Step 6 Time Elapsed: 00:00:00.4843750

Step 7 of 15: Merge TOC

Creating merged TOC file: C:\Documents and Settings\tappm\My Documents\Dev\Runway\ITE\Documentation\ITE.DocProject\ITE.DocProject\buildhelp\merged_toc.xml
Done.

Included 1 conceptual topic(s).

Step 7 Time Elapsed: 00:00:00.0156250

Step 8 of 15: Create Conceptual Build Files

Creating conceptual build manifest file: C:\Documents and Settings\tappm\My Documents\Dev\Runway\ITE\Documentation\ITE.DocProject\ITE.DocProject\buildhelp\conceptual_manifest.xml
Done.

Created 1 companion XML file(s).

Step 8 Time Elapsed: 00:00:00.0156250

Step 9 of 15: Build Assembler {conceptual.help1x.config}

Preparing...
Executing...
Error: The type 'Microsoft.Ddue.Tools.SnippetComponent' was not found in the component assembly 'C:\Program Files\Sandcastle\\ProductionTools\BuildComponents.dll'.

Topics processed: 0

Step 9 System.NullReferenceException: Build Assembler {conceptual.help1x.config}:
Object reference not set to an instance of an object.
 
Successful Steps: 8 of 15
Failed Steps: 1

ITE.DocProject help build failed.

========== Build: 0 succeeded or up-to-date, 1 failed, 0 skipped ==========

Total Time Elapsed: 00:00:26.6718750

Coordinator
Mar 26, 2010 at 7:35 AM
Edited Mar 26, 2010 at 7:38 AM

Hi Martin,

I haven't tested DocProject with the latest Sandcastle Styles patch yet, but from what I can tell it looks like the conceptual.config file was modified in the latest release and it now contains some bogus default data.

If you look in your project's Help\Presentation\Style\Configuration folder, you'll find the conceptual configuration files (one for Help 1.x and one for Help 2.x).  In those config files, you may find a new component registration:

<!-- Resolve code snippets -->
<component type="Microsoft.Ddue.Tools.SnippetComponent" assembly="%DXROOT%\ProductionTools\BuildComponents.dll">
  <examples>
    <example directory="d:\SnippetComponentTest\parsnip" />
  </examples>

  ...

</component>

Clearly the default configuration for SnippetComponent is inappropriate, and DocProject doesn't support it yet either so the directory value isn't automatically updated when you create new projects.

Furthermore, it seems that SnippetComponent doesn't even exist in the latest Sandcastle release anyway, so this configuration won't work with native Sandcastle builds either.

You could try deleting the entire <component type="...SnippetComponent"> element from the config files.  Either that or try using the original release of Sandcastle Styles, which I've actually tested DocProject against.

- Dave