Oct 9, 2013 at 10:16 PM
Edited Oct 9, 2013 at 11:05 PM
I have the following situation:
- Project A, which is portable, and which defines type T
- Project B, which is not portable, and which defines extension method for T
Now, because A and B target different frameworks, I have to create separate .shfbproj files for them. And then use one of them as 'main' project with Version Builder plugin in order to produce a single help file.
I chose B to be 'main' project which has Version Builder plugin active and configured. There was a problem however - the extension methods defined for T in Project B, were not visible in resulting help file!
I traced the problem to the fact that VersionBuilder.exe in Sandcastle merges the reflection files without checking for additional extension models. One could argue that the data schema for reflection XML file was already faulty since it included duplicated
information about extension methods (<element api="M:..." source="extension">...</element> within the type with the extension method), but fixing that is a huge task.
Instead, I fiddled around with the source code of VersionBuilder.exe so that it now produces merged .xml files which has correct extension method information even when the type and method are defined in different projects.
Additionally, the Version Builder -plugin in SHFB doesn't restore original values of some properties of the configured projects (Project A, in my case), which is quite annoying when the .shfbproj file is under version control. It happens because .Build() method
of the build process will save the project file, and the Version Builder plugin never restores the old values.
I have made modifications to the Version Builder plugin code so that after successful or unsuccessful build, it will restore old values of the project file and save it.
Apparently I can't attach files here, so I've uploaded a zip file containing two modified .cs files files (with correct folder structure) to here:
. I hope the fix will be incorporated to codeplex soon. :)
Edit: It seems that the fix to the Version Builder plugin caused the "Project file was modified outside..." dialog. I don't know how to disable it. Even still, that is better than constant changes in the file (assuming file is under version control