Question on how DocProject differentiates assemblies

Topics: Extensibility
Oct 10, 2007 at 5:44 PM
Edited Oct 11, 2007 at 3:54 PM
hi,

I am like of new to using DocProject and would like to clarify how DocProject identifies assemblies for which the help file needs to be generated as against the dependent assemblies. I am adding the assemblies through add reference and not sure whether the dependent assemblies need to be added through it. I am also trying out the SandcastleGUI where you have the ability to add assemblies for which help file needs to be generated and add the dependent assemblies separately. May be I am missing something and any help will be greatly appreciated.

I also noticed that its taking significantly more time when trying to generate chm file through DocProject than using Sandcastle stand-alone. I believe it might be due to trying to find the dependencies through reflection rather than adding dependencies directly.

Thanks
Coordinator
Oct 10, 2007 at 7:40 PM
Hi,

DocProject uses reflection to locate dependencies automatically, and in my testing it usually succeeds without having to specify dependencies manually. If you build and there are no errors, then you don't need to add any dependencies manually.

If you build and get an error from the MRefBuilder.exe step (usually step #2) then the build output window will show a message indicating which assemblies you need to add manually. To add them, open the properties for your DocProject or DocSite and add the missing dependencies using the Missing Dependencies dialog.

If you need to add additional sources that aren't project references, such as external assemblies or reflection.org files, you can use the External Sources dialog.

For help finding these options, see How To Configure DocProject.
You can see a screenshot of the properties in the DocProject External UI under the Build category.

- Dave
Oct 11, 2007 at 2:37 PM
Thanks. Just to clarify, when I add the DocProject template to my solution, any other projects build in the solution are shown as assemblies to be added and I have the option to select all or any of them. However, there are no option to point to the folder or location where the dependencies are located. I am assuming since the assemblies already have the dependencies in their reference, the DocProject uses it to build the help file using reflection as you mentioned.

I am trying to see whether the DocProject created can be added as part of our regular build process so that once all the assemblies are successfully build then I build the Docproject including the assemblies for Sandcastling. I believe there is a feature with MSBuild to do so, but I haven't tried it yet and was wondering that anyone has done so successfully


davedev wrote:
Hi,

DocProject uses reflection to locate dependencies automatically, and in my testing it usually succeeds without having to specify dependencies manually. If you build and there are no errors, then you don't need to add any dependencies manually.

If you build and get an error from the MRefBuilder.exe step (usually step #2) then the build output window will show a message indicating which assemblies you need to add manually. To add them, open the properties for your DocProject or DocSite and add the missing dependencies using the Missing Dependencies dialog.

If you need to add additional sources that aren't project references, such as external assemblies or reflection.org files, you can use the External Sources dialog.

For help finding these options, see How To Configure DocProject.
You can see a screenshot of the properties in the DocProject External UI under the Build category.

- Dave

Coordinator
Oct 11, 2007 at 3:07 PM
Hi,

NOTE: CodePlex seems to be having trouble with the stylesheets, so I'm not going to quote you since the format appears as normal text anyway...

The last step of the New Project Wizard allows you to add project references. You can add/remove sources at a later time by adding/removing project references in Solution Explorer or by using the External Sources dialog. (Note that the wizard step is merely a convenience and doesn't do anything special to the project references.)

You are correct that DocProject does not support a dependency folder since it will most likely resolve dependencies automatically using reflection. However, you can add individual dependencies that DocProject cannot resolve using the Missing Dependencies dialog. I don't recommend adding explicit dependencies unless you have a problem building.

DocProjects and DocSites are MSBuild projects and they work on the command-line using MSBuild and in Team Build without having to make any modifications. They even support solution Configuration and Platform settings. Unless there's something really peculiar about your build process, you should have no trouble at all integrating a DocProject or a DocSite as you would any other VS project.

So to which feature of MSBuild in particular are you referring? If you provide more information about your build process maybe I can make some suggestions :)

- Dave
Oct 11, 2007 at 7:08 PM
hi,

thanks for the response. We currently use a batch file which in turn runs a proj file containing the vbproj to be compiled in a certain order. My thought about integrating sandcastling into our build process is to create a new vbproj and append it to the end of the proj file and add conditions to build it if the other builds of the code are sucessful OR
create a separate proj file and use it to run the Docproject vbproj file.
Coordinator
Oct 11, 2007 at 8:26 PM
Hi,

Sounds pretty standard to me :)

You may be able to simplify the process by creating a single build.proj file instead of using a batch file. Simply pass build.proj to MSBuild.exe on the command-line:

msbuild.exe build.proj
Alternatively, you can create a master solution that includes all of your VS projects and your DocProject or DocSite and use that to build instead:

msbuild.exe master.sln
But if you have other build steps that you want to use (aside from just building managed projects) then you can have the build.proj file build the master.sln file using an <MSBuild /> task:

MSBuild Task
http://msdn2.microsoft.com/en-us/library/z7f65y0d.aspx

That way you can do anything that you want in build.proj and simply build the solution at the appropriate spot based on custom logic.

Just a few ideas ;)

- Dave