MSBuild: Generate XML documentation for main project but not dependency projects -


i have .sln file several projects in it. keep simple, let's call them...

  • projecta
  • projectb
  • projectc

...where main project references b , c. goal update build script generate xml "intellisense" documentation file projecta, without giving build warnings missing documentation b , c.

current build script

i have msbuild script includes following in build step:

<propertygroup>     <customoutputpath>c:\build\output\</customoutputpath> </propertygroup> <itemgroup>     <projects include="projecta\projecta.csproj">         <properties>outputpath=$(customoutputpath)</properties>     </projects> </itemgroup> <msbuild projects="@(projects)" /> 

(there multiple projects listed in itemgroup, again, let's keep simple.)

when run build script, it's smart enough compile b, c, , me, though i've specified a. output appears in "customoutputpath" location.

the closest i've gotten...

if add 'documentationfile' property project entry...

<itemgroup>     <projects include="projecta\projecta.csproj">         <properties>outputpath=$(customoutputpath);documentationfile=projecta.xml</properties>     </projects> </itemgroup> 

...then 'projecta.xml' appears in "customoutputpath". however, files named 'projecta.xml' in project folder 3 projects:

  • projecta/projecta.xml
  • projectb/projecta.xml
  • projectc/projecta.xml

these files contain "intellisense" documentation respective projects, though they're named "projecta.xml".

this creates undesired , misleadingly-named files in project folders, , (more importantly) generates build warnings missing documentation comments in b , c. don't want add documentation comments projects, i'd prefer find way have msbuild generate documentation projecta.

can provide insight, or alternative solution?

based on i've found - documentationfile global-level property (and used in creation of docfileitem - global level items list). understanding won't able alter in easy way in single logical script.

what can define special target in separate file imported every proj file (directly editing proj files or using properties $custombeforemicrosoftcommontargets) overwrite documentationfile project-dependent value. result - probably can generate different documentation file names different projects.

another solution - clean-up unnecessary doc files right after projs built.


Comments

Popular posts from this blog

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -

java - JavaFX 2 slider labelFormatter not being used -