Unified BuildProcessComponent

Topics: Extensibility
Aug 31, 2007 at 12:26 PM
Hi Dave,

we want use unified BuildProcessComponent implementation across more DocSite-s.
It seems that this is not possible, because 3rd party (our) assemblies are not (can't be) loaded in AppDomain, where build runs.

Is there reason for loading BuildProcessComponent only from DocSite output assembly, that I don't see?

Regards

Grbo
Coordinator
Aug 31, 2007 at 1:35 PM
Hi Grbo,

The purpose of a Build Process Component is to provide a really easy way for developers to extend DocProject and Sandcastle on a per-project basis, by simply writing code in the DocProject or DocSite itself.

If you need more control over the process or if you want to encapsulate logic that can be used across projects, I suggest creating a build engine provider. After reading this tutorial, if you still think a BPC is preferred then please let me know and I'll consider allowing the registered BPC type name to include an assembly name as well (which means that DocProject would require the BPC to either be installed in the GAC or copied to the current DocProject or DocSite bin folder).

An alternative might be to just forward calls to your shared BPC from each project. For instance, in the constructor of each project's BPC simply create an instance of your shared BPC and then override each method and call the method on your shared BPC. I haven't tried this myself though.

Thanks for the feedback,
Dave
Sep 3, 2007 at 6:55 AM
Hi Dave,

you are probably right in our case, for us will be better to use BuildEngine.
Anyway, it would be nice to have possibility set BuildProcess from 3rd party assembly. Or just setting bin path for AppDomain where build runs.

Regards

Grbo
Coordinator
Sep 3, 2007 at 7:16 AM
Edited Sep 3, 2007 at 7:22 AM
This discussion has been copied to a work item: Unified BuildProcessComponent

Edit: Thanks for the feedback Grbo. Let's see what other community members think of this feature request.
Coordinator
Sep 20, 2007 at 11:10 PM
Hi,

FYI, this feature has been implemented for the next DocProject release: 1.8.0 Release Candidate.

The Process component type name option now supports the following values:

  • Full name (namespace and type name) of a type that is defined in your DocProject's or DocSite's assembly. This has always been supported.
  • Assembly-qualified type name. The assembly must be located in the GAC or your DocProject's or DocSite's output folder (e.g., bin\Debug or bin\Release).
  • Full name of a type and a path to the assembly in which it's defined.
    • The path can be absolute or relative to the DocProject's or DocSite's root directory.
    • The type name must be specified first followed by a vertical bar, | and then the path. Space before the vertical bar is significant and will be part of the type name; space after the vertical bar is trimmed.
Does that sound acceptable for what you had previously wanted (although I understand that a custom build engine may be a better choice for you anyway)?

Thanks for the feedback,
Dave
Sep 24, 2007 at 7:12 AM
Hi Dave,

It seems perfect to me, I will test it in near future.

Regards

Grbo