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

qualifyHint="true" being ignored on an attribute class

Topics: User Forum
Nov 23, 2011 at 2:41 AM


Firstly, I want to thank Eric and all contributors for making it actually possible to make good use of Sandcastle without weeks of hair-pulling.  :)

I have an SHFB project with multiple assemblies as inputs.  One of the assemblies is in C++/CLI and defines a class as:

namespace Fci
	namespace ResourceCompilerSupport
				AttributeTargets::Assembly | AttributeTargets::Module | AttributeTargets::Struct | AttributeTargets::Class |
				AttributeTargets::Enum | AttributeTargets::Constructor | AttributeTargets::Method | AttributeTargets::Property |
				AttributeTargets::Field | AttributeTargets::Event | AttributeTargets::Interface | AttributeTargets::Delegate,
				Inherited = false )]
		public ref class SourceFileNameAttribute sealed : Attribute
The Fci namespace is part of my documentation but the Fci.ResourceCompilerSupport namespace has been excluded via the ApiFilter project property and this class has no XML comment.

I have the following in one of my conceptual topics:

<alert class="note">
		The <codeEntityReference qualifyHint="false">T:Oakhurst.SourceFileBaseNameAttribute</codeEntityReference> attribute is
		deprecated and may eventually be replaced by
		<codeEntityReference qualifyHint="true">T:Fci.ResourceCompilerSupport.SourceFileNameAttribute</codeEntityReference>.

I am under the impression that due to the qualifyHint="true" this should print as Fci.ResourceCompilerSupport.SourceFileNameAttribute,but instead it is printing simply as SourceFileNameAttribute.  I realize that because this part of the API is excluded it will not be a hyperlink, but it should still show correctly.  For instance, System.Console correctly shows as such with the namespace when I use qualifyHint="true" even though it is not in my API either.

What might I be doing wrong here?

As a side note, is there any (fairly easy) way to cause this to be output in the normal C# syntax, which in the special case of attribute classes omits the "Attribute" suffix?

I realize that since this isn't even a link, it would be trivial to just hard-code the text as I want it, but I like to be correct, and eventually it might become a link and I don't want to have to search through manually to have to fix this sort of thing when there are changes.

Many thanks,


p.s., the SHFB version is

Nov 25, 2011 at 9:05 PM

You aren't doing anything wrong, it's just the way the resolve reference links component works.  For members that it can't find, it only writes out the name and omits the qualifying namespace and parameters.  One workaround would be to add the Additional Reference Links plug-in and add a project that only includes the omitted members in the ApiFilter.  That would give it enough information to write out a "None" type link in the format you want.  That may be more trouble than it's worth though.  There are no options to omit the "Attribute" part on the type name.



Dec 2, 2011 at 8:57 AM

Hi Eric,

Thank you for the info.

I hadn't realized the ApiFilter would prevent things from being seen for type resolution purposes.  (It's kind of a black box to me, lol.)

I found it was easier to just document the offending types.