Unhandled Exception: System.NullReferenceException in SHFB

Topics: Developer Forum, Project Management Forum, User Forum
Jun 29, 2010 at 1:06 PM


I am trying to create the help file for a project which uses a third party dll as reference using shfb. This project build fine with third party dll in visual studio. But when I try to create chm i gets and error like below


  MrefBuilder (v2.4.10520.1)

  Copyright c Microsoft 2006

  Info: Loaded 20 assemblies for reflection and 13 dependency assemblies.


  Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object.

     at Microsoft.Ddue.Tools.Reflection.NamespaceFilter.IsExposedNamespace(Namespace space)

     at Microsoft.Ddue.Tools.Reflection.NamespaceFilter.IsExposedType(TypeNode type)

     at Microsoft.Ddue.Tools.Reflection.RootFilter.HasExposedMembers(TypeNode type)

     at Microsoft.Ddue.Tools.Reflection.ApiFilter.HasExposedMembers(TypeNode type)

     at Microsoft.Ddue.Tools.Reflection.ApiFilter.NamespaceContainsExposedMembers(Namespace space)

     at Microsoft.Ddue.Tools.Reflection.ApiFilter.IsExposedNamespace(Namespace space)

     at Microsoft.Ddue.Tools.Reflection.ApiVisitor.VisitApis()

     at Microsoft.Ddue.Tools.MRefBuilder.Main(String[] args) 

I have added the third party dll also in the reference folder of the shfb project. If not do so I get “unresolved assembly reference error” for this third party dll while building the .shfb project. I removed the third party dll and all the relevant code from my visual studio project and tried to create a chm with the new dll without giving the 3<sup>rd</sup> party dll as reference in the .shfb project. It creates the help file without any error. I am not getting an idea what the issue this 3<sup>rd</sup> party dll creates in the .shfb project.


Jun 29, 2010 at 3:16 PM

This came up a little while ago.  See this thread: http://shfb.codeplex.com/Thread/View.aspx?ThreadId=216152

If it's a .NET 4.0 assembly you might have to wait until I can get the new version of SHFB out that supports the latest release of Sandcastle to see if that resolves the issue.  I should have it out sometime this week.



Jun 30, 2010 at 9:20 AM

Hi Eric,

Thanks for your reply. It is not a 4.0 assembly. Its a 3.5 assembly