This project has moved and is read-only. For the latest updates, please go here.

Unknown reference link target on a extension method

Topics: User Forum
Mar 18, 2011 at 8:47 PM


I'm using the latest version of SHFB (1.9.3) but when I try to make the help file for a given C# project, I get the message below and the method isn't generated in the help:

Info: BuildAssembler: Building topic M:Core.ObjectExtensions.GetPropertyByName(System.Object,System.String)

Warn: ResolveReferenceLinksComponent2: Unknown reference link target 'Overload:Core.ObjectExtensions.GetPropertyByName'.

The code for the method is:

        /// <summary>

        /// Returns a property of a given objet by its name.

        /// </summary>

        /// <param name="obj">Object.</param>

        /// <param name="name">Property's name.</param>

        /// <returns>PropertyInfo reference of the property.</returns>

        public static PropertyInfo GetPropertyByName(this object obj, string name)


            return (from p in obj.GetType().GetProperties() where p.Name.ToUpper().Trim() == name.ToUpper().Trim() select p).FirstOrDefault<PropertyInfo>();


I know that there are a lot of posts discussing the error but I guess there's something about the type parameter "this object", because I have others extension methods with object parameters that work; the only difference is that they aren't at the target position parameter of the extension method.

Could anyone help me?

Thanks in advance,


Mar 19, 2011 at 3:20 AM

There's an open work item in the Sandcastle project (  I haven't had a chance to look into it to see if it's an issue that can be fixed in the transformations or whether it's MRefBuilder that has issues with the extension methods for type Object.  As noted, extension methods for other types appear to be fine.  This problem also causes an empty Extension Methods section to appear on the member list page of most classes.