DxRoot prob with msbuild

Mar 19, 2008 at 10:50 PM
I'm setting up an MSBuild proj file and all was running great. I moved it to another machine and it failed. Apparently the DxRoot variable was being picked up from my local system variables and not being set in the msbuild proj file as I thought. Actions taken:

- Moved it back to my machine and tested, ran fine.
- Deleted my local DxRoot system variable and added the following to my initial property group:
<DxRoot>C:\sd\Webstore\public\ext\sandcastle\v2.4\x86</DxRoot>
This is the same path that was in my local system variable when everything ran fine.
- The other Sandcastle dirs are specified as before I made no changes here:
<ProductionTools>$(DxRoot)\ProductionTools</ProductionTools>
<ProductionTransforms>$(DxRoot)\ProductionTransforms</ProductionTransforms>
<Presentation>$(DxRoot)\Presentation\$(PresentationStyle)</Presentation>
- With the change above the following exec croaks:
<Exec Command='"$(ProductionTools)\MRefBuilder.exe" "$(OutputAssembly)" /out:"$(OutputDir)\reflection_base.xml"' />
- With this error:
Build FAILED.
C:\sd\Webstore\private\src\MSBuild\wstdocbuild.proj(86,5): error MSB3073: The
command ""C:\sd\Webstore\public\ext\sandcastle\v2.4\x86\ProductionTools\MRefBuilder.exe"
"C:\sd\Webstore\private\src\MSBuild\..\..\..\private\src\managed\WstClient\objd\i386\wstclient.dll" /out:"Output\reflection_base.xml""
exited with code 1.

The whole thing is based on the generic build.proj that comes with Sandcastle. The original DxRoot property from the generic was:
<DxRoot Condition="'$(DxRoot)' == ''">C:\Program Files\Sandcastle</DxRoot>
I just took out the condition because I always want the DxRoot to be set (or reset) from my proj file. I didn't change any of the other refs to DxRoot from the generic build file.

What am I missing?

Thx,
Keith
Mar 20, 2008 at 12:06 AM
Hi Keith,

Other files may depend on DXROOT being an environment variable, such as build assembler configuration files and possibly XSL transformations. Make sure that you update all references if you don't want to use DXROOT as an environment variable.

I'm not sure why MRefBuilder is failing though. I don't think it depends upon DXROOT being an environment variable. What happens if you run the failing command by itself on the command-line? Does MRefBuilder provide any additional information about the error that's occurring?

- Dave
Editor
Mar 20, 2008 at 12:10 AM
A return code of 1 from MRefBuilder means it had a problem of some sort such as it couldn't find it's configuration file, the command line options weren't correct, it couldn't find the assemblies, etc. It usually writes something to the console to say exactly what it had a problem with. Assuming the build output is logged to a file or the console window, you should find the problem description in there. If not, you might try setting DXROOT to the given path and running MRefBuilder from a command prompt to see if you can get it to tell you what it doesn't like that way.

Eric
Mar 20, 2008 at 12:47 AM
OK, here's a little more info from the console output. I'm going now to try a command line execution. What seems weird about the paths below is the %DxRoot% in the paths bolded below. Why isn't that resolved?

Target ReflectionData:
"C:\sd\Webstore\public\ext\sandcastle\v2.4\x86\ProductionTools\MRefBuilder.exe" "C:\sd\Webstore\private\src\MSBuild\..\..\..\private\src\managed\WstClient\objd\i386\wstclient.dll" /out:"Output\reflection_base.xml"

MrefBuilder (v2.4.10111.0)
Copyright c Microsoft 2006

Error: A file access error occured while attempting to load the component assembly 'C:\sd\Webstore\public\ext\sandcastle\v2.4\x86\ProductionTools\%DXROOT%\ProductionTools\MRefBuilder.exe'. The error message is: Could not load file or assembly 'file:///C:\sd\Webstore\public\ext\sandcastle\v2.4\x86\ProductionTools\%DXROOT%\ProductionTools\MRefBuilder.exe' or one of its dependencies. The system cannot find the file specified.

C:\sd\Webstore\private\src\MSBuild\wstdocbuild.proj(86,5): error MSB3073: The command ""C:\sd\Webstore\public\ext\sandcastle\v2.4\x86\ProductionTools\MRefBuilder.exe"
"C:\sd\Webstore\private\src\MSBuild\..\..\..\private\src\managed\WstClient\objd\i386\wstclient.dll" /out:"Output\reflection_base.xml"" exited with code 1.

Done building target "ReflectionData" in project "wstdocbuild.proj" -- FAILED.
Mar 20, 2008 at 3:03 AM
OK - I haven't totally got a handle on this, but it looks like some of the Sandcastle components rely on DXRoot implicitly (meaning in such a way that a path can't be fed in externally). So, I've figured out a pathetically in-elegant workaround to set DXRoot, and it will have to do.

Anand, if you happen to review this, any comment?

Thanks to all as usual.
Keith
Editor
Mar 20, 2008 at 3:24 AM
Edited Mar 20, 2008 at 3:26 AM
If a /config option isn't specified, MRefBuilder will load the MRefBuilder.config found in the same location as the executable. The default configuration has a reference to the MRefBuilder.exe for the <resolver> element. It could be that for some reason the environment variable in its path isn't getting resolved correctly. You could probably fix it by making a copy, hard coding the path, and using /config to reference your customized copy of the config file.

You may have a similar problem with sandcastle.config as it references the build component assemblies the same way. Again, hard-coding the paths would probably work around the issue.

Eric
Mar 20, 2008 at 4:27 AM
Yeah - I thought about trying that - I'm trying to keep as much vanilla as possible, but I might go there soon.

Thanks Mr. E.

Keith
Apr 10, 2009 at 6:15 PM
Edited Apr 10, 2009 at 6:15 PM
hi all,

i'm getting this error

                Warn: SharedContentComponent: Missing shared content item. Tag:'
include'; Id:'topictitle'.
                Warn: SharedContentComponent: Missing shared content item. Tag:'
include'; Id:'topictitle'.
                Error: SharedContentComponent: Error replacing item.
                C:\dev\www\buildfiles\Commonbuild.xml(306,9): error MSB3073: The
 command ""C:\Program Files\Sandcastle\ProductionTools\BuildAssembler.exe" /conf
ig:"C:\Program Files\Sandcastle\Presentation\vs2005\configuration\sandcastle.con
fig" "C:\dev\www\common\manifest.xml"" exited with code 1.


please help.

Thanks,
Chris
Editor
Apr 11, 2009 at 3:30 AM
Are you using the latest release of Sandcastle (the May 2008 release)?  Have you applied the Sandcastle Styles patch (http://SandcastleStyles.CodePlex.com)?

Eric
Apr 16, 2009 at 12:17 AM
Thanks for quick reply Eric.
Yes I am.  but this is not the case if i use prototype.  however, for some reason this is not producing any htm or html file

<Target Name="Html"
            Inputs="$(OutputDir)\manifest.xml;$(OutputDir)\reflection.xml;$(Comments)"
            Outputs="$(DocumentationDir)\html\*.htm"
            DependsOnTargets="Manifest">
        <Exec Command='"$(ProductionTools)\BuildAssembler.exe" /config:"$(Presentation)\configuration\sandcastle.config" "$(OutputDir)\manifest.xml"' />
    </Target>
           
i'm getting this kind of error

                HHC5013: Error: URL reference in the TOC cannot be resolved: "ht
ml\49ceebc5-ad7e-a066-7f1a-d4d836f845d9.htm".

i even search my entire drive for 49ceebc5-ad7e-a066-7f1a-d4d836f845d9.htm and seems that it wasn't generated at all.

Please help.  Thanks
 


Editor
Apr 16, 2009 at 3:15 AM
The HHC5013 error is from the help compiler so it's failing at some point prior to that if there is no HTML output to process.  Did it create the manifest.xml file for BuildAssembler?  You might check it to be sure it contains something.  Are you getting any errors from BuildAssembler besides the one noted above that indicates that it fails prior to producing any output?  Is something else failing prior to BuildAssembler running?  You might try one of the community projects such as the Sandcastle Help File Builder (http://SHFB.CodePlex.com) or DocProject (http://DocProject.CodePlex.com) to see if you can produce a help file.  They will also produce a log which may help you track down any issues in the build.

Eric
Apr 16, 2009 at 5:19 AM
Ok i'll try those and yes, it did create manifest.xml and there is content in it.

On Wed, Apr 15, 2009 at 7:15 PM, EWoodruff <notifications@codeplex.com> wrote:

From: EWoodruff

The HHC5013 error is from the help compiler so it's failing at some point prior to that if there is no HTML output to process.  Did it create the manifest.xml file for BuildAssembler?  You might check it to be sure it contains something.  Are you getting any errors from BuildAssembler besides the one noted above that indicates that it fails prior to producing any output?  Is something else failing prior to BuildAssembler running?  You might try one of the community projects such as the Sandcastle Help File Builder (http://SHFB.CodePlex.com) or DocProject (http://DocProject.CodePlex.com) to see if you can produce a help file.  They will also produce a log which may help you track down any issues in the build.

Eric

Read the full discussion online.

To add a post to this discussion, reply to this email (Sandcastle@discussions.codeplex.com)

To start a new discussion for this project, email Sandcastle@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Apr 30, 2009 at 12:34 PM
Hi Eric,

I successfully got sandcastle to work with msbuild however, i want to publish the document generated as a website.  currently only index.chm is automatically built but not index.htm.  is there a way to transform toc.xml to index.htm?  I don't really know if i'm missing something.  if so, please give some sample code.  thanks. 

On Wed, Apr 15, 2009 at 7:15 PM, EWoodruff <notifications@codeplex.com> wrote:

From: EWoodruff

The HHC5013 error is from the help compiler so it's failing at some point prior to that if there is no HTML output to process.  Did it create the manifest.xml file for BuildAssembler?  You might check it to be sure it contains something.  Are you getting any errors from BuildAssembler besides the one noted above that indicates that it fails prior to producing any output?  Is something else failing prior to BuildAssembler running?  You might try one of the community projects such as the Sandcastle Help File Builder (http://SHFB.CodePlex.com) or DocProject (http://DocProject.CodePlex.com) to see if you can produce a help file.  They will also produce a log which may help you track down any issues in the build.

Eric

Read the full discussion online.

To add a post to this discussion, reply to this email (Sandcastle@discussions.codeplex.com)

To start a new discussion for this project, email Sandcastle@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Editor
Apr 30, 2009 at 8:45 PM
I'm not sure how well Sandcastle alone supports website output.  Both SHFB and DocProject produce website output independently of Sandcastle and provide their own supporting website files.  There's a PowerShell script in Sandcastle's ProductionTools folder that does something to produce website output.  See this blog post for details:  http://blogs.msdn.com/sandcastle/archive/2008/01/17/genereating-website-for-api-documentation-using-sandcastle.aspx

Eric