Build SHFB from source code - problems with reflection data.

Apr 9, 2014 at 4:48 AM
Edited Apr 9, 2014 at 4:52 AM
Hi Eric (or anyone else who could help), I am trying to build the source code projects in order to fix my reported bug

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
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).
  Directory ".\Tmp" doesn't exist. Skipping.
  Directory ".\4.0_4.0" doesn't exist. Skipping.
  Creating directory ".\Tmp".
  Creating directory ".\4.0_4.0".
  efBuilder.exe" @MRefBuilder.rsp /out:".\Tmp\"
  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\"" exi
  ted with code 1.
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.

lectionData.proj" (default target) (1) ->
(Reflection target) ->
flectionData.proj(35,5): error MSB3030: Could not copy the file ".\Tmp\Reflecti" 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?

Apr 9, 2014 at 5:00 AM
Ooops, wrong forum - sorry!
Marked as answer by shipwreckman on 4/8/2014 at 9:00 PM