This project has moved and is read-only. For the latest updates, please go here.

Running from command line without a project

Feb 23, 2010 at 9:00 PM
Edited Feb 24, 2010 at 1:20 PM

I have 100+ dll and corresponding .xml files that I need to use to build a .chm file.

I used to use command line builder to build this with old version, and I never needed to create project file. but with new version, I am not sure how would it work? Do I need the .shfbproj to build a project using msbuild.exe?

I want to integrate this in my daily build and would like to know how to provide the Response file and what are the content of that file.

Please let me know...

Feb 24, 2010 at 2:49 AM

The project file format is MSBuild based now so a project file is needed as there is no console mode builder executable anymore.  However, Visual Studio solution and project files are now supported as documentation sources so you could add the solution(s) and/or project(s) to the SHFB project rather than the 100+ assemblies and comments files that they produce.  Individual SHFB project properties can still be overridden from the command line and a response file or a target override file can also be used for the more complex properties.  See the Building Projects Outside the GUI help topic for more information.



Feb 24, 2010 at 1:23 PM
Edited Feb 24, 2010 at 3:41 PM


If I understood your reply correctly, I have a msbuild project that builds all our code projects. it contains all projects that need to be built and we use MSBuild to fire that build.

My concern is, If I add that to SHFB project would it work? Do you think that it would fire actual code build as well becuase they are all .csproj or .vbproj files and we are using msbuild.exe to build it?

can you please clarify?

Feb 24, 2010 at 4:15 PM

Documentation always has to be built last so that it is current.  You would add the .sln and/or .csproj/.vbproj files to the SHFB project that you want to document.  You would then add the necessary entry to your MSBuild project to build the SHFB project last after all of the other projects have been built as SHFB won't build them, it just looks for the output.  It will examine the projects defined in its documentation sources and figure out the assemblies, XML comments, and references to use from them.  You can specify the Configuration and Platform variables to tell it which set to use (i.e. Debug|AnyCPU, Release|x86, etc.).



Feb 26, 2010 at 1:21 PM

Hi Eric,

Problem I have is since we are dealing with 100+ projects, we cannot use the same box as build box to create help. Previous attempts failed with out of memory issue and process taking too long.

So we have offloaded the process to another box. Previously we were using console application with response file and that didn't require us to have a project.

Content of the response file is following

# Start a new default project with different settings



Looking at this I think same should work in new version, but i am not sure. Can you please confirm that I still need to have a project file even though I want to supply the response file?

And if I don't have to, then can you please look at this and suggets whats wrong with it? Why it would be failing? the failures are related to options are not correct.

Many thanks

Feb 26, 2010 at 8:51 PM

You do need a project file now since MSBuild is used rather than a custom executable (SandcastleBuilderConsole.exe).  If you're using the above as a response file it won't work for a couple of reasons.  One is that -new and -Filename are not valid (I don't think '#' comment lines are recognized either in MSBuild response files).  You'd need a project file in their place.  The other basic property options would need to be adjusted to be in the format /p:PropName=Value.  The -assembly, -comments, and -Dependency options are not valid.  -assembly is equivalent to a Documentation Source in the project.  Just add one that specifies "AvailableAssemblies\*.dll" as the source.  Likewise, you'd add another documentation source for "AvailableAssemblies\*.xml".  -Dependency is equivalent to References in the new project format.  However, wildcards are not currently supported for references so the file references must be added individually.  You could probably do away with the response file and just set the corresponding project properties in the project file itself.

If you haven't done so already, please refer to the Building Projects Outside the GUI as it covers this stuff.