Null Reference Exception - MRefBuilder

Topics: Developer Forum, User Forum
Apr 11, 2007 at 8:49 PM
I have just installed the March CTP and the latest GUI on a vista ultimate machine and i now receive the following exception. I have the same setup on a WinXP SP2 machine and i don't have any issues. Have you seen this before?


Sandcastle Help File Builder GUI, version
Creating output and working folders...
Clearing working folder...
Finding tools...
Found Sandcastle in 'C:\Program Files\Sandcastle\'
Found HTML 1.x help compiler in 'C:\Program Files\HTML Help Workshop\'
Validating documentation assembly information...
Creating Sandcastle configuration file...
Last step completed in 00:00:00.0039
Generating shared content files (en-US)...
Last step completed in 00:00:00.0117
Generating reflection information...
MrefBuilder (v2.2.63000.2)
Copyright ¸ Microsoft 2006
Info: Loaded 2 assemblies for reflection and 0 dependency assemblies.

Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.Ddue.Tools.Reflection.OrcasNamer.WriteType(TypeNode type, TextWriter writer)
at Microsoft.Ddue.Tools.Reflection.OrcasNamer.WriteParameters(ParameterList parameters, TextWriter writer)
at Microsoft.Ddue.Tools.Reflection.OrcasNamer.WriteConstructor(InstanceInitializer constructor, TextWriter writer)
at Microsoft.Ddue.Tools.Reflection.OrcasNamer.GetMemberName(Member member)
at Microsoft.Ddue.Tools.ManagedReflectionWriter.WriteTypeElements(TypeNode type)
at Microsoft.Ddue.Tools.ManagedReflectionWriter.WriteType(TypeNode type)
at Microsoft.Ddue.Tools.ManagedReflectionWriter.VisitType(TypeNode type)
at Microsoft.Ddue.Tools.Reflection.ApiVisitor.VisitTypes(TypeNodeList types)
at Microsoft.Ddue.Tools.Reflection.ApiVisitor.VisitNamespace(Namespace space)
at Microsoft.Ddue.Tools.ManagedReflectionWriter.VisitNamespace(Namespace space)
at Microsoft.Ddue.Tools.Reflection.ApiVisitor.VisitNamespaces(NamespaceList spaces)
at Microsoft.Ddue.Tools.ManagedReflectionWriter.VisitNamespaces(NamespaceList spaces)
at Microsoft.Ddue.Tools.Reflection.ApiVisitor.VisitApis()
at Microsoft.Ddue.Tools.MRefBuilder.Main(String[] args)
Last step completed in 00:00:03.6052

BUILD FAILED: Unexpected error in last build step. See output above for details.

Apr 12, 2007 at 2:12 AM
I think I've seen this issue posted before in the MSDN Documentation forum. You might bring it up again there to see if it's been fixed for the next CTP. If not and you are willing, you can supply them a test case to debug it.

Apr 12, 2007 at 8:16 AM
Hello Eric,

Thanks for the reply. I have posted a message on the msdn documentation forum: so i shall have to wait and see then. Just wondered if you or anyone else had seen it and knew the cause.

Apr 12, 2007 at 9:10 AM
I have found out what causes the exception. I had the framework forced to .net 1.1.4322 but my assemblies were built against the .net 2.0 framework. Recompiling the assemblies to .net 1.1 fixed the problem. The other option would have been to change the documentation .net version but i didn't want to do that.