Creating MSDN urls for external types

Mar 2, 2008 at 3:28 PM
While generating the help file for my assembly I keep getting errors on referencing the Microsoft.SharePoint.dll and other SharePoint assemblies. In the log file I see the following warning multiple times:
ResolveReferenceLinksComponent2: Unknown reference link target 'T:Microsoft.SharePoint.SPWeb'.
There are multiple types that cannot be resolved. I have figured out that it's not being caused by the MsdnResolved which gets the proper MSDN URL when passed T:Microsoft.SharePoint.SPWeb type as parameter of the GetMsdnUrl method.

To solve this I have created a reflection file using MRefBuilder and put it next to the standard reflection files shipped with Sandcastle. The error I'm getting now is that the created Microsoft.SharePoint.xml file is not correct: (Error: ResolveReferenceLinksComponent2: The reference targets file 'C:\Program Files\Sandcastle\Data\Reflection\Microsoft.SharePoint.xml' is not valid. The error message is: The target file 'file:///C:/Program Files/Sandcastle/Data/Reflection/Microsoft.SharePoint.xml' is not valid.)

Any help on which settings I need in order to create the proper MSDN url's to SharePoint (or any other assemblies documented @ MSDN) would be appreciated.

Thank you in advance

Waldek Mastykarz
Mar 2, 2008 at 5:17 PM
Hi Waldek,

Did you run the appropriate doc model XSL transformation on the reflection file that you generated?

A reflection file created by MRefBuilder should be valid though, so if it's not then you have probably identified a bug. You may want to open an issue in the Issue Tracker and attach the reflection file so that others may try to help.

- Dave
Editor
Mar 2, 2008 at 8:12 PM
MRefBuilder reflection files cannot by themselves be used with the ResolveReferenceLinks2 component. You do need to run them through the add filename and doc model transforms first.

Eric
Mar 3, 2008 at 5:42 AM
Dave, Eric,

Thank you both for your quick responses. Could you please specify which transforms I need to run exactly? Because I have chosen for the VS layout, I assume that I must do a transform using the ApplyVSDocModel.xsl, right?
As for the filename: I see two xsl files in the ProductionTransforms directory: AddFriendlyFilenames.xsl and AddGuidFilenames.xsl. Do I need to run transforms using both of them or only one (which one)? Does the order in which I run the transforms matter?

Thank you in advance for your help. I really appreciate it,

Waldek
Mar 3, 2008 at 6:49 AM
Edited Mar 3, 2008 at 6:51 AM
Hi Waldek,


I assume that I must do a transform using the ApplyVSDocModel.xsl

Yes, if you're using VS 2005 or Hana.


I see two xsl files in the ProductionTransforms directory: AddFriendlyFilenames.xsl and AddGuidFilenames.xsl. Do I need to run transforms using both of them or only one (which one)?

I don't think that you need to use either of these transforms, but if in fact it is necessary then you only need to use one of them. Since it shouldn't matter, just use AddGuidFilenames.xsl.


Does the order in which I run the transforms matter?

The command that is executed typically looks like this for VS 2005 (check the various Sandcastle examples):

XslTransform.exe /xsl:"%DXROOT%\ProductionTransforms\ApplyVSDocModel.xsl" /xsl:"%DXROOT%\ProductionTransforms\AddGuidFilenames.xsl"
"reflection.org" /out:"reflection.xml" /arg:IncludeAllMembersTopic=true /arg:IncludeInheritedOverloadTopics=true
(Watch for wrapping)

- Dave

(EDIT: fixed a typo)
Mar 3, 2008 at 3:24 PM
Great! It works! Transforming the Microsoft.SharePoint.xml (reflection xml) as well as the first run took a while (including eating all the resources of my machine) but the second run was done really quickly.
Thank you both guys for help, clear comments and really quick reactions. Once again, I really appreciate it! Keep up great job.

Waldek