Object reference not set to an instance of an object.

Topics: User Forum
Jun 6, 2007 at 7:17 AM
Edited Jun 6, 2007 at 7:17 AM
I'm getting the following error (subset) when I try to build a help file with CommentsOnly set. The build works fine when CommentsOnly is set to false and the assembly is included. What settings would I need to look out for or is my XML doc not well formed?

BuildAssembler (v2.2.63000.2)
Copyright ¸ 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'.
Info: CopyFromIndexComponent: Indexed 149244 elements in 105 files.
Info: CopyFromIndexComponent: Instantiating component.
Info: ForEachComponent: Instantiating component.
Info: ForEachComponent: Loading subcomponents.
Info: CopyFromIndexComponent: Instantiating component.
Info: ForEachComponent: Loaded 1 subcomponents.
Info: ForEachComponent: Instantiating component.
Info: ForEachComponent: Loading subcomponents.
Info: CopyFromIndexComponent: Instantiating component.
Info: ForEachComponent: Loaded 1 subcomponents.
Info: IfThenComponent: Instantiating component.
Info: SyntaxComponent: Instantiating component.
Info: SyntaxComponent: Loaded 3 syntax generators.
Info: CopyFromIndexComponent: Instantiating component.
Info: CopyFromIndexComponent: Searching for files that match 'C:\Documents and Settings\meldridg\My Documents\Visual Studio 2005\Projects\InstallUpgrade\InstallUpgrade\Help\Working\CJ.xml'.
Info: CopyFromIndexComponent: Searching for files that match 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\*.xml'.
Info: CopyFromIndexComponent: Indexed 75471 elements in 66 files.
Info: ForEachComponent: Instantiating component.
Info: ForEachComponent: Loading subcomponents.
Info: IfThenComponent: Instantiating component.
Info: CopyFromIndexComponent: Instantiating component.
Info: CopyFromIndexComponent: Instantiating component.
Info: ForEachComponent: Loaded 2 subcomponents.
Info: CopyFromIndexComponent: Instantiating component.
Info: ShowMissingComponent: Instantiating component.
Info: ShowMissingComponent:
Sandcastle Help File Builder Components, version 1.4.0.1
Show Missing Documentation Component. Copyright ¸ 2006-2007, Eric Woodruff, All Rights Reserved
http://www.codeplex.com/SHFB
Info: VersionInfoComponent: Instantiating component.
Info: VersionInfoComponent:
Sandcastle Help File Builder Components, version 1.4.0.1
Version Information Component. Copyright ¸ 2006-2007, Eric Woodruff, All Rights Reserved
http://www.codeplex.com/SHFB
Error: BuildAssembler: An error occured while initializing the build component 'SandcastleBuilder.Components.VersionInfoComponent' in the component assembly 'C:\Program Files\EWSoftware\Sandcastle Help File Builder\SandcastleBuilder.Components.dll'. The error message and stack trace follows: System.NullReferenceException: Object reference not set to an instance of an object.
at SandcastleBuilder.Components.VersionInfoComponent..ctor(BuildAssembler assembler, XPathNavigator configuration)



The following data is included in the XML comment file:

<?xml version="1.0"?>
<doc>
<assembly>
<name>
CJ.Test
</name>
</assembly>
<members>
<member name="P:CJ.Test.Class2.Class2WithHTML.IsHTML">
<summary>
Check whether it's HTML
</summary>
<value>Not used</value>
<returns>Always returns True</returns>
<remarks>this is just a remarkable property</remarks>
</member><member name="T:CJ.Test.Class2.Class2WithHTML">
<summary>
Class with BIG HTML
</summary>
<remarks>
Some remarks
</remarks>
</member><member name="M:CJ.Test.Upgrade.Module1.Main">
<summary>
Display version number (hardcoded)
</summary>
<remarks><code>Dim a As String</code></remarks>
</member><member name="T:CJ.Test.Upgrade.test">
<summary>
Test class
</summary>
<remarks></remarks>
</member><member name="P:My.Resources.Resources.ResourceManager">
<summary>
Returns the cached ResourceManager instance used by this class.
</summary>
</member><member name="P:My.Resources.Resources.Culture">
<summary>
Overrides the current thread's CurrentUICulture property for all
resource lookups using this strongly typed resource class.
</summary>
</member><member name="T:My.Resources.Resources">
<summary>
A strongly-typed resource class, for looking up localized strings, etc.
</summary>
</member><member name="M:CJ.Test.Class.Class1.ClassTest">
<summary>
Function test
</summary>
<returns></returns>
<remarks></remarks>
</member><member name="P:CJ.Test.Class.Class1.PropertyTest">
<summary>
Property Test - dude!
</summary>
<value>Boolean to do nothing</value>
<returns>Always returns true</returns>
<remarks>This does nothing. Here's some code<code>Dim x As Integer</code>
<table border="1"><tr><td>Something in a table.</td></tr><tr><td>Second row</td></tr></table>
</remarks>
</member><member name="T:CJ.Test.Class.Class1">
<summary>
Test Class #2
</summary>
<remarks>Some remarks</remarks>
</member>
</members>
</doc>
Coordinator
Jun 6, 2007 at 3:03 PM
You can't do a purely "Comments Only" build. There has to be at least one assembly for Sandcastle to generate reflection information for. The bug you ran into has been fixed and the next release will run to completion but you will end up with an empty help file as there is no reflection information for Sandcastle to merge the comments against.

Eric
Jun 6, 2007 at 11:29 PM
Thanks so much for the quick response.