Quantcast
Channel: Sandcastle Help File Builder
Viewing all 2184 articles
Browse latest View live

Closed Unassigned: Script element gets changed [35109]

$
0
0
I've tried to include MathJax into my helpfiles. unfortunately it changes the line

<script type="text/javascript" src="http%3A%2F%2Fcdn.mathjax.org%2Fmathjax%2Flatest%2FMathJax.js%3Fconfig%3DTeX-AMS-MML_HTMLorMML"></script>

to:

<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"><!----></script>

This does not work, because MathJax tries to execute the "<!---->" as a javascript function using eval() and Internet Explorer kills the script. Writing a script within the script tags does not work too, because it too gets replaced by the <!----> element.
Comments: It's a workaround due to the way the .NET XML classes save the rendered output. They uses the XML method which converts empty elements with an opening and closing tag to self-closing which is invalid in many cases for HTML such as script, div, and span tags. The comment keeps it from doing that.

You can find all occurrences of the element in the branding transformations and change it to (single space between the opening and closing tags) which has the same effect but leaves the element content entirely empty as you want it.

In reality, the branding transformations should be checking for script content too and passing that through if not empty. I'm working on removing the branding transformations and folding their processing back into the presentation styles so it'll being going away and it won't matter soon.

Commented Issue: Script element gets changed [35109]

$
0
0
I've tried to include MathJax into my helpfiles. unfortunately it changes the line

<script type="text/javascript" src="http%3A%2F%2Fcdn.mathjax.org%2Fmathjax%2Flatest%2FMathJax.js%3Fconfig%3DTeX-AMS-MML_HTMLorMML"></script>

to:

<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"><!----></script>

This does not work, because MathJax tries to execute the "<!---->" as a javascript function using eval() and Internet Explorer kills the script. Writing a script within the script tags does not work too, because it too gets replaced by the <!----> element.
Comments: ** Comment from web user: EWoodruff **

The editor removed the elements. In the above, it should say:

```XML
Replace
<xsl:comment />
with
<xsl:text> </xsl:text> (single space between the opening and closing elements)
```

New Post: ResolveReferenceLinksComponent problem Unknown reference link target 'T:System.ServiceModel.Syndication.SyndicationItem'

$
0
0
EWoodruff wrote:
It'll be fixed in the next release.
Eric, when will the next release?

New Post: When are changes to the BuildAssembler.exe.config used?

$
0
0
Hi,

I have the problem that I can access the internet via proxy only. I found the regarding topic in the SHFB FAQ and modified my BuildAssembler.exe.config accordingly, but to no success.

But even if I created a broken config file, the tool ran fine. I run the SHFB Build from Visual Studio 2012.

So here's my question: What do I need to do so that the BuildAssembler takes the modified config file into account?

Best regards,
Markus

New Post: When are changes to the BuildAssembler.exe.config used?

$
0
0
Never mind - somehow it magically works by now...

Anyone with sufficient privileges can delete this thread...

New Post: ResolveReferenceLinksComponent problem Unknown reference link target 'T:System.ServiceModel.Syndication.SyndicationItem'

$
0
0
I'll probably issue a release in a week or two. If you need it sooner, the changes are in source control so you could download the source and rebuild it.

Eric

Created Unassigned: Script error when printing subtopics [35111]

$
0
0
When I try to use the __Print the selected heading and all subtopics__ from an HTML Help 1 (CHM) file, I get flooded with the following errors:

_The value of the property 'addToLanSpecTextIdSet' is null or undefined, not a Function object
The value of the property 'addSpecificTextLanguageTagSet' is null or undefined, not a Function object_

The error seems to come from the lines in a temp HTML file that look like these:

```
addToLanSpecTextIdSet("ID0EBHPAAAAA?vb=.|cpp=::|cs=.|fs=.|nu=.");
addSpecificTextLanguageTagSet('ID0EABCAAAAA');
```

I need to kill the __hh.exe__ process to make them stop popping up. Any idea what I need to do to allow printing subtopics? Thanks.

New Post: Custom Component does not apply.

$
0
0
Hi,

I'm migrating to the newest version of SHFB and don't get my custom components to run.

I even tried to include the basic VS BuidComponent Template
(with PlacementAction.Before, "XSL Transform Component"))
The Debugger runs into the Factory Constructor but not into the Create() method of the BuildComponentFactory class.

Thank you.

New Post: Custom Component does not apply.

$
0
0
My mistake. The Create Method is called, but not from the Sandcastle Help File Builder process, which I was attached to with VS.

New Post: Error when Compiling HTML Help

$
0
0
Using Ver. 2014.2.15.0 (Beta)
I'm receiving the following error:

Compiling HTML Help 1 file...
[C:\Windows\Microsoft.NET\Framework64\v4.0.30319\MSBuild.exe]
C:\Users\JP\Documents\Help File Builder\Working Dir\Build1xHelpFile.proj(41,5): error MSB6004: The specified task executable location "C:\Users\JP\Documents\Help File Builder\HHC.EXE" is invalid.
C:\Users\JP\Documents\Help File Builder\Working Dir\Build1xHelpFile.proj(52,5): error MSB3030: Could not copy the file "C:\Users\JP\Documents\Help File Builder\Working Dir\Output\HtmlHelp1\Documentation.chm" because it was not found.
Last step completed in 00:00:01.3147
Any ideas?

New Post: Error when Compiling HTML Help

$
0
0
It looks like you've specified the path to the Help 1 compiler to be that of the project. Clear the Help 1 compiler path project property and let it find it on it's own.

Eric

New Post: Error when Compiling HTML Help

$
0
0
Thanks Eric.

You're right. Worked fine.

Thanks

JP

Closed Unassigned: Build fails if filename has & (ampersand) in it. [35108]

$
0
0
I have an HTML conceptual topic file, with an & in the filename. This causes the _conceptualTOC.xml to be generated with

<topic id="Terms & Conditions" file="Terms & Conditions" />


and build fails because & should be &amp;

Combining conceptual and API intermediate TOC files...
Last step completed in 00:00:00.0460
-------------------------------

SHFB: Error BE0065: BUILD FAILED: An error occurred while parsing EntityName. Line 4, position 19.
at System.Xml.XmlTextReaderImpl.Throw(String res, Int32 lineNo, Int32 linePos)
at System.Xml.XmlTextReaderImpl.HandleEntityReference(Boolean isInAttributeValue, EntityExpandType expandType, Int32& charRefEndPos)
at System.Xml.XmlTextReaderImpl.ParseAttributeValueSlow(Int32 curPos, Char quoteChar, NodeData attr)
at System.Xml.XmlTextReaderImpl.ParseAttributes()
at System.Xml.XmlTextReaderImpl.ParseElement()
at System.Xml.XmlTextReaderImpl.ParseElementContent()
at System.Xml.XmlLoader.LoadNode(Boolean skipOverWhitespace)
at System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc)
at System.Xml.XmlDocument.Load(XmlReader reader)
at System.Xml.XmlDocument.Load(String filename)
at SandcastleBuilder.Utils.BuildEngine.BuildProcess.CombineIntermediateTocFiles()
at SandcastleBuilder.Utils.BuildEngine.BuildProcess.Build()
Comments: Updated to HTML encode the ID and filename values.

New Post: Build SHFB from source code - problems with reflection data.

$
0
0
Hi Eric (or anyone else who could help), I am trying to build the source code projects in order to fix my reported bug https://shfb.codeplex.com/workitem/35108

In theory it should be simply encoding before writing this
 sw.WriteLine("<topic id=\"{0}\" file=\"{0}\" sortOrder=\"{1}\">",
                    rootContainerId, rootOrder);
in SaveToIntermediateTocFile


Anyway, I downloaded the code, explored the projects, built them from VS, which meant using nuGet to download something (unsure what it did actually) and then couple of the solutions built OK in VS.,

Then I tried to do this bit from the readme

_Before using the source code version, you will need to build the tools and the reflection data files. To do
this, open a command prompt, change into the root folder and run the MasterBuild.bat script. This will build
the tools and place them in the SHFB\Deploy folder ready for use. Once that completes, change into the
SHFB\Deploy\Data folder and execute the BuildReflectionData.bat script. This will generate the reflection data
files for the .NET Framework into a temporary folder. Rename the folder it creates to "Reflection"._



But it gives lots of these errors when I do MasterBuild.bat
C:\...Sandcastle-105454\SHFB\Source\Setup\Deployme
ntFiles.wxs(1657): error LGHT0103: The system cannot find the file '..\..\Deplo
y\\Data\Reflection\System.Xml.Xsl.Runtime.xml'. [C:\...\Sandcastle-105454\SHFB\Source\Setup\Setup.wixproj]
which seems to indicate that the BuildReflectionData.bat script needs to be run first since it generates the 'reflection' folder, right? But that gives me
C:\...\Sandcastle-105454\SHFB\Deploy\Data>BuildReflectionData.bat 4.0 4.0
*
* Building .NET Framework reflection data files using tools in C:\...\Sandcastle-105454\SHFB\Deploy\Data\..\
*
Microsoft (R) Build Engine version 4.0.30319.18408
[Microsoft .NET Framework, version 4.0.30319.18444]
Copyright (C) Microsoft Corporation. All rights reserved.

Build started 08/04/2014 8:40:21 PM.
Project "C:\...\Sandcastle-105454\SHFB\Deploy\Data\
BuildReflectionData.proj" on node 1 (default targets).
Reflection:
  Directory ".\Tmp" doesn't exist. Skipping.
  Directory ".\4.0_4.0" doesn't exist. Skipping.
  Creating directory ".\Tmp".
  Creating directory ".\4.0_4.0".
  "C:\...\Sandcastle-105454\SHFB\Deploy\Data\..\\MR
  efBuilder.exe" @MRefBuilder.rsp /out:".\Tmp\Reflection.org"
  MRefBuilder (v2014.1.26.0)
  Copyright © 2006-2014, Microsoft Corporation, All Rights Reserved.
  Portions Copyright © 2006-2014, Eric Woodruff, All Rights Reserved.
  Specify at least one assembly to reflect.
  The command ""C:\...\Sandcastle-105454\SHFB\Deplo
  y\Data\..\\MRefBuilder.exe" @MRefBuilder.rsp /out:".\Tmp\Reflection.org"" exi
  ted with code 1.
C:\...\Sandcastle-105454\SHFB\Deploy\Data\BuildRefl
ectionData.proj(35,5): error MSB3030: Could not copy the file ".\Tmp\Reflection
.org" because it was not found.
Done Building Project "C:\...\Sandcastle-105454\SHF
B\Deploy\Data\BuildReflectionData.proj" (default targets) -- FAILED.


    Build FAILED.

"C:\...\Sandcastle-105454\SHFB\Deploy\Data\BuildRef
lectionData.proj" (default target) (1) ->
(Reflection target) ->
  C:\...\Sandcastle-105454\SHFB\Deploy\Data\BuildRe
flectionData.proj(35,5): error MSB3030: Could not copy the file ".\Tmp\Reflecti
on.org" because it was not found.

    0 Warning(s)
    1 Error(s)

Time Elapsed 00:00:00.28
*
* Build failed!
*

Note, I did use the cmd BuildReflectionData.bat 4.0 4.0, because I don't have .NET 4.5.1 and the command failed otherwise with
  EXEC : error : An error occurred while loading assemblies for reflection. The
 error message is: Could not find a part of the path 'C:\Program Files (x86)\Re
ference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1'. [C:\...\Sandcastle-   105454\SHFB\Deploy\Data\BuildReflectionData.proj]

So, should I get 4.5.1, or am I calling the buildreflectiondata incorrectly?

Thanks!

New Post: Build SHFB from source code - problems with reflection data.

$
0
0
You can install .NET 4.5.1 which is what it looks for by default or, if you've just got .NET 4.0, you can pass in the parameters to tell it what to build:
BuildReflectionData .NETFramework 4.0
Regarding the fix for your issue, you'll also want to update SandcastleBuilderUtils\ConceptualContent\TocEntry.cs by replacing the lines in the case statement starting at line 649 with this:
case HelpFileFormats.MSHelpViewer:
    if(String.IsNullOrEmpty(this.DestinationFile))
    {
        url = HttpUtility.HtmlEncode(this.Id);
        titleAttr = String.Format(CultureInfo.InvariantCulture, " title=\"{0}\"",
            HttpUtility.HtmlEncode(this.Title));
    }
    else
    {
        url = HttpUtility.HtmlEncode(Path.GetFileNameWithoutExtension(this.DestinationFile));
        titleAttr = String.Empty;
    }
Eric

New Post: Build SHFB from source code - problems with reflection data.

$
0
0
Thanks for the tip, that helped (although not quite).

Firstly for anyone else, I tried BuildReflectionData .NETFramework 4.0 but it didn't work, whereas BuildReflectionData .NETFramework 4.5 did (I have 4.5.0 but not 4.5.1).


There was another place to change for me;

SandcastleHtmlExtract.cs

WriteWebsiteTableOfContents

has (line 985)
   title = HttpUtility.HtmlEncode(title);
and it needs
                            title = HttpUtility.HtmlEncode(title);
                            htmlFile = HttpUtility.HtmlEncode(htmlFile);



Created Unassigned: Error Attempting to build, My MUsic denied [35118]

$
0
0
-------------------------------
[Sandcastle Help File Builder, version 2014.2.15.0 Beta]
Creating output and working folders...
Finding tools...
The Sandcastle tools are located in 'D:\Program Files (x86)\EWSoftware\Sandcastle Help File Builder\'
Searching for HTML Help 1 compiler...
Found HTML Help 1 compiler in 'C:\Program Files (x86)\HTML Help Workshop\'
Locating components...
Last step completed in 00:00:00.0110
-------------------------------

SHFB: Error BE0065: BUILD FAILED: Access to the path 'C:\Users\wayne_riddle.BHM\Documents\My Music' is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileSystemEnumerableIterator`1.CommonInit()
at System.IO.FileSystemEnumerableIterator`1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler`1 resultHandler, Boolean checkHost)
at System.IO.Directory.EnumerateFiles(String path, String searchPattern)
at Sandcastle.Core.ComponentUtilities.AddAssemblyCatalogs(AggregateCatalog catalog, String folder, HashSet`1 searchedFolders, Boolean includeSubfolders)
at Sandcastle.Core.ComponentUtilities.AddAssemblyCatalogs(AggregateCatalog catalog, String folder, HashSet`1 searchedFolders, Boolean includeSubfolders)
at Sandcastle.Core.ComponentUtilities.CreateComponentContainer(IEnumerable`1 folders)
at SandcastleBuilder.Utils.BuildEngine.BuildProcess.Build()

New Post: Support for .NET Micro Framework (NETMF)

$
0
0
Eric, did you get a chance to follow up on this? I'm in the same boat as osre, with the mysterious 'unexpected error detected in previous step' message, I see that osre managed to hack it by doing some sort of redirect, but I'm not sure exactly what to do there. Any thoughts? I added Microsoft.SPOT.* to the 'ignore' tab, now I'm getting this in my build log...
  MRefBuilder (v2.7.4.0)
  Copyright &#184; 2006-2013, Microsoft Corporation, All Rights Reserved.
  Portions Copyright &#184; 2006-2013, Eric Woodruff, All Rights Reserved.
  Info: Loaded 1 assemblies for reflection and 0 dependency assemblies.
  
  Unhandled Exception: System.TypeInitializationException: The type initializer for &#39;System.Compiler.SystemTypes&#39; threw an exception. ---&gt; System.InvalidCastException: Unable to cast object of type &#39;System.Compiler.Class&#39; to type &#39;System.Compiler.Struct&#39;.
     at System.Compiler.SystemTypes.Initialize(Boolean doNotLockFile, Boolean getDebugInfo)
     --- End of inner exception stack trace ---
     at System.Compiler.TypeNode.get_DefaultMembers()
     at Microsoft.Ddue.Tools.Reflection.ReflectionUtilities.IsDefaultMember(Member member)
     at Microsoft.Ddue.Tools.ManagedReflectionWriter.WriteMemberData(Member member)
     at Microsoft.Ddue.Tools.ManagedReflectionWriter.WriteMember(Member member, TypeNode type)
     at Microsoft.Ddue.Tools.ManagedReflectionWriter.VisitMember(Member member)
     at Microsoft.Ddue.Tools.Reflection.ApiVisitor.VisitMembers(MemberList members)
     at Microsoft.Ddue.Tools.Reflection.ApiVisitor.VisitTypes(TypeNodeList types)
     at Microsoft.Ddue.Tools.Reflection.ApiVisitor.VisitNamespaces(NamespaceList spaces)
     at Microsoft.Ddue.Tools.ManagedReflectionWriter.VisitNamespaces(NamespaceList spaces)
     at Microsoft.Ddue.Tools.Reflection.ApiVisitor.VisitApis()
     at Microsoft.Ddue.Tools.MRefBuilder.Main(String[] args)
C:\Users\Tim\Projects\TA.NetMF.StepperDriver\TA.AcceleratedStepperDriver.Documentation\Help\Working\GenerateRefInfo.proj(44,5): error MSB6006: &quot;MRefBuilder.exe&quot; exited with code -532462766.
    Last step completed in 00:00:03.3511
</buildStep>
<buildStep step="Failed">

Closed Unassigned: Error Attempting to build, My MUsic denied [35118]

$
0
0
-------------------------------
[Sandcastle Help File Builder, version 2014.2.15.0 Beta]
Creating output and working folders...
Finding tools...
The Sandcastle tools are located in 'D:\Program Files (x86)\EWSoftware\Sandcastle Help File Builder\'
Searching for HTML Help 1 compiler...
Found HTML Help 1 compiler in 'C:\Program Files (x86)\HTML Help Workshop\'
Locating components...
Last step completed in 00:00:00.0110
-------------------------------

SHFB: Error BE0065: BUILD FAILED: Access to the path 'C:\Users\wayne_riddle.BHM\Documents\My Music' is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileSystemEnumerableIterator`1.CommonInit()
at System.IO.FileSystemEnumerableIterator`1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler`1 resultHandler, Boolean checkHost)
at System.IO.Directory.EnumerateFiles(String path, String searchPattern)
at Sandcastle.Core.ComponentUtilities.AddAssemblyCatalogs(AggregateCatalog catalog, String folder, HashSet`1 searchedFolders, Boolean includeSubfolders)
at Sandcastle.Core.ComponentUtilities.AddAssemblyCatalogs(AggregateCatalog catalog, String folder, HashSet`1 searchedFolders, Boolean includeSubfolders)
at Sandcastle.Core.ComponentUtilities.CreateComponentContainer(IEnumerable`1 folders)
at SandcastleBuilder.Utils.BuildEngine.BuildProcess.Build()
Comments: Already fixed. Covered by work item #34983.

New Post: Support for .NET Micro Framework (NETMF)

$
0
0
I get this one too now.
It worked for a couple of days, but the (without any update to SHFB) it didn't work anymore with the same exception as you get.
I only made minor changes in my project, where no struct was involved.
Eric asked me for a simple sample to reproduce this, but my project is quite huge: https://github.com/osre77/Tinkr
So if yours is smaller you could send it to Eric.
Viewing all 2184 articles
Browse latest View live




Latest Images