Issue to modify project configuration file.

Jun 9, 2009 at 1:00 AM

Hi, Eric.

  It is great to see such an usefull tool to create documents.

I have got an issue for our team to build the document using command line instead of GUI.

In the section of project configuration file,  <ItemGroup> , we want to add <Content Include="Best Practice\*.html" />

Is that possible to do that? We tried, but throw an exception.

Can you show us how can we add all the html files within signle folder as <ItemGroup>

Danny

Best Regards

Coordinator
Jun 9, 2009 at 2:55 AM
Edited Jun 9, 2009 at 2:56 AM

Wildcards are not supported.  The files must be specified individually.  I don't plan on supporting wildcard items since it isn't supported in the MPF framework used for Visual Studio integration and it would introduce a lot of extra work in the standalone GUI and build engine too.

Eric

Jun 22, 2009 at 2:10 PM

I have a similar question.

I have previously written a plugin to SHFB that creates a lot of .topic files and one .sitemap file, which was added to the API documentation as additional content. I want to switch from topic files to aml files, so I modified the plugin so that it now creates .aml files and a .content file instead, which is added to the API documentation as conceptual content.

The problem is that a reference to each file is needed in the project file (.shfbproj). Since it is a plugin to SHFB I cannot edit the project file from within the plugin (since the project file is read before the plugin is executed).

One solution I have found is to not have this as a plugin, but as a separate application, but I would rather want to keep this as a SHFB plugin.

Is there a way to add conceptual content from within a plugin, if one does not know the file names, GUIDs or the amount of files before executing the plugin?

Thank you in advance!

Regards, Emil, Sweden

Coordinator
Jun 22, 2009 at 6:21 PM

Starting with SHFB 1.8.0.0, the project passed to the build engine is a clone of the actual project and you can modify it in any way including adding files to it via the MSBuildProject property.  These changes are only in effect for the duration of the build and won't affect the actual project.  In the case of content and MAML files, you need to add them as linked project items so that it doesn't have issues with the files not being in the physical project folder.  Take a look at the XML Schema Documenter plug-in (http://xsddoc.codeplex.com/) since it does something similar.

Eric