在帮助查看器2.x中安装两个版本的文档 [英] Installing two versions of documentation in Help Viewer 2.x

查看:114
本文介绍了在帮助查看器2.x中安装两个版本的文档的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

对于我们产品的两个版本,我需要在MS Help Viewer 2.2中安装两个并发版本的文档.基本上,我们的产品有版本8和9,它们现在几乎相同,但是会有所不同.相关文档是 以树形结构细分为一组框架和工具箱类,如下所示:

Doc V8
-命名空间A
---- A1类
---- A2类
...
-命名空间B
---- Class B1
---- B2类

Doc V9
-命名空间A
---- A1类
---- A2类
...
-命名空间B
---- Class B1
---- B2类

V8和V9的.mshc文件是使用Sandcastle分别生成的.我设置了不同的TopicVersion和TOCParentTopicVersion值.基本上,两个文件都包含相同的类和相同的主题,但版本不同.

文件安装没有问题.问题是主题重复:每个主题在每棵树中出现两次,一个主题针对V8,一个主题针对V9,是否该主题是命名空间,类,方法等.

Doc V8
-命名空间A(v8)
---- A1类(v8)
---- Class A1(v9)
...
-命名空间A(v9)
...

Doc V9
-命名空间A(v8)
---- A1类(v8)
---- Class A1(v9)
...
-命名空间A(v9)

我尝试使用清单文件,例如使用2个不同的清单文件,或一个包含2个软件包的清单文件. Microsoft使用电子标签,但我无法确定在这种情况下它们是否合适,以及如何正确生成和使用它们. 帮助主题文件之一的元数据岛如下.相应的V8和V9文件具有正确的TopicVersion和TOCParentTopicVersion值,但是它们具有相同的guid值.在Sandcastle中,我使用哈希成员名称主题文件命名 方法.

    < meta http-equiv =与X-UA兼容"; content ="IE = EmulateIE9"; />
    < meta http-equiv ="Content-Type" content =" text/html; charset = UTF-8"; />
    < title> RepPP.Framework.SPA命名空间</title>
    <元名称=语言"; content ="zh-cn" />
    <元名称="System.Keywords"; content ="RepPP.Framework.SPA名称空间"; />
    <元名称="Microsoft.Help.F1"内容="RepPP.Framework.SPA"; />
    <元名称="Microsoft.Help.Id" content ="N:RepPP.Framework.SPA" />
    <元名称="Microsoft.Help.ContentType" content =参考" />
    <元名称="BrandingAware"; content ="true" />
    <元名称=容器";内容="RepPP.Framework.SPA"; />
    <元名称=文件"; content ="3876558D" />
    <元名称="guid"; content ="3876558D" />
    <元名称="Microsoft.Help.SelfBranded"; content ="true" />
    <元名称="Microsoft.Help.TopicVersion" content ="9" />
    <元名称=标题";内容="RepPP.Framework.SPA"; />
    <元名称="Microsoft.Help.Keywords" content ="RepPP.Framework.SPA名称空间"; />
    <元名称="Microsoft.Help.F1"内容="RepPP.Framework.SPA"; />
    <元名称="Microsoft.Help.Category"; content ="DevLang:CSharp"; />
    <元名称="Microsoft.Help.Category"; content ="DevLang:VB"; />
    <元名称="Microsoft.Help.Category"; content ="DevLang:C ++" />
    <元名称="Microsoft.Help.Locale" content ="zh-cn" />
    <元名称="Microsoft.Help.TopicLocale" content ="zh-cn" />
    <元名称="Microsoft.Help.TocParent"; content ="G:RepPP.Framework" />
    <元名称="Microsoft.Help.TOCParentTopicVersion"; content ="9" />
    <元名称="Microsoft.Help.TocOrder"含量="0". />

谁能帮我这个?我环顾四周,但很难找到信息.我正在VS 2015,Windows 10上使用Help Viewer 2.2对其进行测试.

谢谢Claudette
 

Hello,

I need to install two concurrent versions of documentation in MS Help Viewer 2.2, for the two versions of our product. Basically, our product comes in versions 8 and 9, which are now almost identical but will evolve diffently. The associated documentation is subdivided into a set of frameworks and toolkits classes, in a tree structure like the following:

Doc V8
--Namespace A
----Class A1
----Class A2
...
--Namespace B
----Class B1
----Class B2

Doc V9
--Namespace A
----Class A1
----Class A2
...
--Namespace B
----Class B1
----Class B2

The .mshc files for V8 and V9 are generated separately with Sandcastle. I've set different TopicVersion and TOCParentTopicVersion values. Basically, both files contain the same classes and the same topics, differing with the version.

The files install with no problem. The problem is the duplication of the topics: each topic appears twice, one for V8 one for V9, in each tree, whether the topic is a Namespace, class, method, etc..

Doc V8
--Namespace A (v8)
----Class A1 (v8)
----Class A1 (v9)
...
--Namespace A (v9)
...

Doc V9
--Namespace A (v8)
----Class A1 (v8)
----Class A1 (v9)
...
--Namespace A (v9)

I tried playing with the manifest file, using for instance 2 different manifest files, or one manifest file including the 2 packages. Microsoft uses e-tags, but I could not find out if they are appropriate in this case, nor how to generate and use them properly. The metadata island of one of the help topic file is as follows. The corresponding V8 and V9 files have correct TopicVersion and TOCParentTopicVersion values, however they have the same guid values. In Sandcastle, I use hashed member name topic file naming method.

    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE9" />
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>RepPP.Framework.SPA Namespace</title>
    <meta name="Language" content="en-us" />
    <meta name="System.Keywords" content="RepPP.Framework.SPA namespace" />
    <meta name="Microsoft.Help.F1" content="RepPP.Framework.SPA" />
    <meta name="Microsoft.Help.Id" content="N:RepPP.Framework.SPA" />
    <meta name="Microsoft.Help.ContentType" content="Reference" />
    <meta name="BrandingAware" content="true" />
    <meta name="container" content="RepPP.Framework.SPA" />
    <meta name="file" content="3876558D" />
    <meta name="guid" content="3876558D" />
    <meta name="Microsoft.Help.SelfBranded" content="true" />
    <meta name="Microsoft.Help.TopicVersion" content="9" />
    <meta name="Title" content="RepPP.Framework.SPA" />
    <meta name="Microsoft.Help.Keywords" content="RepPP.Framework.SPA namespace" />
    <meta name="Microsoft.Help.F1" content="RepPP.Framework.SPA" />
    <meta name="Microsoft.Help.Category" content="DevLang:CSharp" />
    <meta name="Microsoft.Help.Category" content="DevLang:VB" />
    <meta name="Microsoft.Help.Category" content="DevLang:C++" />
    <meta name="Microsoft.Help.Locale" content="en-us" />
    <meta name="Microsoft.Help.TopicLocale" content="en-us" />
    <meta name="Microsoft.Help.TocParent" content="G:RepPP.Framework" />
    <meta name="Microsoft.Help.TOCParentTopicVersion" content="9" />
    <meta name="Microsoft.Help.TocOrder" content="0" />

Can anyone help me with this? I'v looked around but info is hard to find. I'm testing it with Help Viewer 2.2 on VS 2015, Windows 10.

Thanks, Claudette
 

推荐答案

由于在两个项目中使用相同的命名方法,因此您很有可能遇到问题,因为API成员将生成相同的ID在这两个项目中.当帮助查看器合并内容时,这可能不会引起问题,但是会与 目录和主题之间的链接.您可能可以通过在每个项目中使用不同的命名方法来解决此问题(例如,一个项目的GUID,另一个项目的哈希成员名称).每个帮助项目还必须具有唯一的标题/名称. 如果您采用这种方法,我认为您必须至少使用一个概念性主题,并将其作为API内容的父级.这样可以避免在TOC的根级别重复名称空间条目.

More likely than not you're having problems due to using the same naming method in both projects since the API members will generate the same IDs in both projects.  This may not cause problems when the help viewer merges the content but will with the TOC and linking between topics.  You can probably work around this by using different naming methods in each project (GUID for one and Hashed Member Names for the other for example).  Each help project would also have to have a unique title/name.  If you go with this approach, I think you will have to use at least one conceptual topic and make it the parent of the API content.  That will avoid duplicate namespace entries at the root level in the TOC.

如果不必将两个文档集分开,一个更可行的解决方案是使用Version Builder插件将两个项目中的内容合并到单个文件中,每个API主题中都有一个Version Information部分.显示哪个 适用的版本.如果这样做,则将任何概念性内容放入包含该插件的主项目中.另一个项目将仅用于提供插件的API信息.

A more workable solution if you don't have to keep the two documentation sets separate is to use the Version Builder plug-in to merge the content from both projects into a single file with a Version Information section in each API topic that shows to which version it applies.  If you do this, you'd put any conceptual content in the primary project that contains the plug-in.  The other project would simply be used to supply the API information for the plug-in.

埃里克


这篇关于在帮助查看器2.x中安装两个版本的文档的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆