I get the above error when I try to use DocumenThis. It is in a file that I already have documentation. I experimented and it works in other projects in the solution. I then found that it worked on some of the files in the project. I then took a look at the vbproj file for the project and found that there was a correlation.
The module is a dll and has a form in it. So one of the entries in the vbproj is:
<Compile Include="LogonInfo.Designer.vb">
<DependentUpon>LogonInfo.vb</DependentUpon>
</Compile>
<Compile Include="LogonInfo.vb">
<SubType>Form</SubType>
</Compile>
All files previous to this have the form:
<Compile Include="Locations.cls" />
Every file after the LogonInfo.vb file will trigger the error. Apparently there is something wrong with the parsing of the files you do when to figure out what files are in the project.
I checked out the <Compile Include lines in Forms type of projects, and the work. It appears to only be a problem when the project is a
<MyType>Windows</MyType>
instead of
<MyType>WindowsForms</MyType>