F1 Visual Studio integration problem

May 16, 2012 at 8:51 PM

Hello,

I have build and installed help file for VS2010 (Help Viewer 1.1) using the latest versions of Sandcastle and SHFB. The documentation is fine but when I press F1 on some class I get "Topic not found / Can't find requested content on your computer" page.

The interesting part is that the problem occurs for vs2010 presentation style only. If I build the same project using "prototype" or "hana" styles F1 brings up appropriate topic.

Similar problem appears in SHFB discussions, but the issue seems more relevant for this project since the presentation styles are part of Sandcastle package.

thanks in advance for your help

 

 

Editor
May 17, 2012 at 4:11 PM

The Prototype and Hana styles are deprecated and aren't supported for MS Help Viewer output.  If they're working at all, it's not by design since they haven't been updated for it.  The VS2005 style appears to have the same issue.  It could be a problem with the metadata.  I know Help 2 topics need specific metadata or they may not show up in a search so MS Help Viewer files could be similar.  Adding the extra Help 2 metadata didn't appear to make a difference in the MS Help Viewer file and I haven't had a chance to look into it further yet.

Eric

 

May 31, 2012 at 1:26 PM

Hi,

I think I've identified the metadata that causes this issue.

When using the VS2005 style, the Microsoft.Help.Category attribute has the following value in each generated HTML file:

<meta name="Microsoft.Help.Category" content="DevLang:CSharp">

When using VS2010 it has the following value instead:

<meta name="Microsoft.Help.Category" content="DevLang:C#">

 

To verify I manually unzipped an .mshc file generated with the VS2010 style, changed the attribute value to "DevLang:CSharp", and then reinstalled the help collection. This did the trick - I was able to F1 from Visual Studio and have the correct page load up in the viewer.

I couldn't work out where this attribute was getting set... the only reference to it that I could find was an XSLT copy from /document/metadata/attribute[@name='Category'] in metadataHelp30.xsl. I'm not familiar with how SandCastle builds help files, but I was wondering where this attribute is set. Is it before the presentation style gets applied?  

For now I am planning on a work around by doing a post-processing step to make this change on all the generated files.

PS I am using SHFB.

May 31, 2012 at 11:29 PM

Hi,

thanks for your reply. I've solved the problem yesterday but didn't get to write the post yet :)

In short, I found two issues that together caused VS F1 integration to fail.

  • One of them is DevLang:CSharp value you mentioned.
  • The second issue is the lack of meta tags of type Microsoft.Help.F1 (i.e. <meta name="Microsoft.Help.F1" content="...">). When using vs2010 presentation style, each html file generated by Sandcastle contains only one tag of this type with content attribute's value set to a full member name (i.e. Namespace.TypeName.MemberName). For other styles each page contains some F1 tags with different name variations. 

I succeeded to fix those issues by changing two xslt files from Sandcastle package and now everything works fine. Unfortunately I don't remember the filenames, but I think I'll could post the fixed versions in the beginning of the next week.

thanks

 

Oct 9, 2012 at 7:36 PM

Hi.

I've installed SHFB 1.9.5.0 today but i get the same wrong behaviour.  Any ideas on how to solve this issue ?

 

Thanks

DIEGO.

Editor
Oct 10, 2012 at 4:03 PM

This issue has been resolved and an updated version of the tools will be published in a few days on the SHFB project site.  To further comment on this thread, please continue it over in the SHFB Discussion page at the following location as this project has been closed and may not be monitored as frequently: http://shfb.codeplex.com/discussions/354027

Eric

 

Oct 18, 2012 at 3:55 PM

Voila, with the last fix (OCT 13 2012) it works very well. I've tested my examples and everything works as expected.

 

Thank you and continue with this useful and excellent tool.

DIEGO