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

Generic parameters, MAML and <codeEntityReference>

Topics: User Forum
Jul 16, 2008 at 3:38 PM


It seems i have some problem using the <codeEntityReference> tag with a class with generic parameters.

I have a class:

  public class eMenKaBaseFormHelper<TFormStateEnum, TNavigatorNodeEnum, TNavigatorNodeButtonsEnum> 
where TFormStateEnum :struct
where TNavigatorNodeEnum :struct
where TNavigatorNodeButtonsEnum : struct



In the aml-file:

see <codeEntityReference>T:Gizmox.WebGUI.Forms.Catalog.Controls.Base.eMenKaBaseFormHelper&lt;TFormStateEnum,TNavigatorNodeEnum,TNavigatorNodeButtonsEnum&gt;</codeEntityReference>


see <codeEntityReference>T:Gizmox.WebGUI.Forms.Catalog.Controls.Base.eMenKaBaseFormHelper{TFormStateEnum,TNavigatorNodeEnum,TNavigatorNodeButtonsEnum}</codeEntityReference>

For these 2 lines a get an error:

Warn: Unknown reference link target 'T:Gizmox.WebGUI.Forms.Catalog.Controls.Base.eMenKaBaseFormHelper<TFormStateEnum,TNavigatorNodeEnum,TNavigatorNodeButtonsEnum>'.

Any ideas?

Thanks in advance


Jul 16, 2008 at 3:59 PM

SHFB doesn't use .aml files so I think you've got the wrong project.  However, the solution is to use the same syntax for the codeEntityReference as you find in the XML comments file.  Generally, that will be something like T:Gizmox.WebGUI.Forms.Catalog.Controls.Base.eMenKaBaseFormHelper`3.  If you are using SHFB, you can use the Code Entity Search pane to find the class/member and then drag and drop it into the topic to create the link and it will use the correct syntax.



Jul 16, 2008 at 4:51 PM

Thanks for this lightning speed reaction.

Of course you are right, wrong forum!


Thanks again.


PS. Tried your solution, same result. I will try SHFB now. Thx.
Jul 16, 2008 at 5:43 PM
Hi Johan,

I think you were looking for the DocProject forum.

In DocProject you can easily include a code entity reference link by locating the target API in Topic Explorer, right-mouse clicking and selecting Copy as Conceptual Link.  Then paste it into the .aml file.

- Dave
Jul 16, 2008 at 6:30 PM
Hello Dave,

YES, it works. Using your method i discovered there is a difference between ' and `. I even had to search my keyboard for a long time to find where this key was.
Wow, still learning every day.

Many thanks man.