This project has moved. For the latest updates, please go here.

.msha file format and "periods"

Topics: User Forum
Jan 16, 2015 at 12:34 AM
I saw a reference in another thread somewhere mentioning that <span> elements with 'class="name"' cannot contain values with periods in them. I've been debugging a problem all day that may be caused by this. Seems to be in VS2010 only. Is that true? Any advice other than always replacing any periods with underscores (or some such) in these cases. We had a convention of using a convention of <Company>.<Namespace> for the book name, as in the following -- but perhaps we'll have to change that:
<div class="package-list"> <div class="package"> <span class="name">Acme.Foo</span> <a class="current-link" href="Acme.Foo.mshc">Acme.Foo.mshc</a> </div> </div> Thanks very much in advance
Jan 16, 2015 at 1:55 AM
From the template file used by SHFB to generate the MSHA file:
<html xmlns="">
<body class="vendor-book">
    <div class="details">
        <span class="vendor">{@HtmlEncVendorName}</span>
        <span class="locale">{@Locale}</span>
        <span class="product">{@HtmlEncProductTitle}</span>
        <span class="name">{@HtmlEncHelpTitle}</span>
    <div class="package-list">
        <div class="package">
            <!-- NOTE: The "name" span value cannot contain any periods! -->
            <span class="name">{@HelpViewerSetupName}</span>
            <a class="current-link" href="{@HTMLEncHelpName}.mshc">{@HTMLEncHelpName}.mshc</a>
I did add a comment there explicitly stating that periods are not supported in that one location. I don't recall there being an issue with the help title in the section above.

Jan 16, 2015 at 3:10 PM
Thanks a lot Eric. So, by extension, then, the resulting .mshc and/or .cab file names must not contain periods, correct? I'm following a particular domain spec which says that we "should" name these files with the name of the DLL, which is typically something like <Company>.<Product>.dll (e.g. "Acme.Foo.dll"). Sounds like we'll need to get that spec changed I guess, unless I'm missing something.
Jan 19, 2015 at 4:57 PM
That could be the case. SHFB contains a check for periods, pound signs, and ampersands in the Help Name project property and will fail the build if generating MS Help Viewer output since none of them are allowed and will cause issues when trying to install the content. Help Viewer 1.0 requires a specific .msha filename so no other name would work. Help Viewer 2.x doesn't care about the .msha name but you'd have to renamed the file generated by SHFB to include a period to test the theory to be sure.