MRefBuilder apiFilters configuration doesn't work as expected
Hi!
We use custom tags to exclude specific types from the final documentation. We have a script that extracts this information from the xmldoc file and generates a MRefBuilder.config file with an entry for every excluded type, for example:
<configuration>
<dduetools>
<platform version="2.0" path="%SystemRoot%\Microsoft.NET\Framework\v2.0.50727\" />
<apiFilters>
<filter namespace="Db4objects.Db4o" type="Compat" expose="false" />
<filter namespace="Db4objects.Db4o" type="CorruptionException" expose="false" />
<filter namespace="Db4objects.Db4o" type="Db4oVersion" expose="false" />
...
</apiFilters>
</dduetools>
</configuration>
Unfortunately this does not prevent MRefBuilder from including the filtered types in its output.
I've uploaded the assembly + xmldoc file + generated MRefBuilder.confighere.
What's wrong with the generated configuration file?
Thanks in advance!
Rodrigo
Hi Rodrigo,
Let me take a look at your uploaded files. Eric talks about this at http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=971845&SiteID=1 and also has submitted the following bugs with MRefBuilder's namespace ripping feature:
1. The catch-all <filter expose="false"> doesn't work because if a filter has no namespace attribute, it is completely ignored. In all cases, it should be considered applicable and should be used. If not, you can't include some types from a namespace and exclude the rest (i.e. attribute filtering).
2. On a similar note, a filter such as <filter namespace="System" expose="false" /> is also completely ignored because it lacks a type or member attribute. As above, this prevents you from including some types from a namespace and excluding the rest.
3. If you try to rip just one type from a namespace (i.e. <filter namespace="MyNamespace" type="MyType" expose="false" />), the entire namespace disappears. In this case, it appears to be seeing the namespace attribute and applying it without regard to the type attribute.
We will take a look at your example and the above and will provide a fix in the next CTP scheduled for the end of this month.
Anand..