This project has moved and is read-only. For the latest updates, please go here.

APIFilter Problem on Vista

Topics: Developer Forum
Jul 11, 2008 at 12:20 PM

Thanks for a great tool!

When using Sandcastle on Vista I'm not able to open the API Filter dialog. A error message is shown: "Unable to bild project to obtain API information..." I've tried running Sandcastle with administrator rights, but to no avail. Rebuilding the reflection data does not solve the problem either.

Jul 11, 2008 at 4:06 PM

Does a normal build succeed?  If not, fix any problems that it reports and you'll be able to open the API filter.  It could be that you're missing a dependency.



Jul 11, 2008 at 4:40 PM
The build completes succesfully. There are a number of warning (Warn: CopyFromIndexComponent: Entries for the key 'T:Microsoft.Build.BuildEngine.BuildItem' occur in both 'C:\Windows\Microsoft.NET\Framework\v2.0.50727\en\Microsoft.Build.Engine.xml' and 'C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\Microsoft.Build.Engine.xml'. The last entry will be used) but no errors. The help file looks great but I need to filter out some classes. On this computer I have both VS2005 and VS2008. Could that cause a problem? I have tested with a simple dll with just one class and one method, but it's still the same problem.


Jul 11, 2008 at 8:11 PM
The warnings are normal.  Can you send me a test project that duplicates the problem?  My e-mail address is in the About box and in the footer of the pages in the help file.

Jul 17, 2008 at 5:09 PM
I am having a similar issue with a Sandcastle project.  The build completes fine (there are 10 warnings, most  of similar to ...Warning HXC6007: File D:/[...]/Sandcastle/Help/Working/Output/html/49f91e53-cb19-906c-9edb-3f58eaa20ef1.htm, Line 1, Char 1386: The value of the Value attribute for an <MSHelp:Attr> element exceeds 255 characters).   In the ApiFilter panel, the progress of the build reaches the "complete" step, but I also get the "unable to build project to obtain API information" error.   We have several other Sandcastle projects that build the ApiFilter fine, and I cannot determine how this one differs from the others.

I'm using Windows XP Pro and Visual Studio 2005.


Jul 17, 2008 at 8:16 PM
The OP hasn't responded with an example.  Can you e-mail me an example that reproduces the problem?  My e-mail address is in the About box and in the footer of the pages in the help file.  Thanks.

Jul 17, 2008 at 10:30 PM
I suspect it will be difficult to create an example without some intuition as to what might be causing the issue.  We have several other Sandcastle projects that do not exhibit this problem, and I am not sure why this one has the issue when the others do not.  In fact, this one was working at one point as well.  Changes made since the the ApiFilter was last known to be accessible were to content rather than project configuration, but the content changes have been significant. 

If I have any luck either reproducing the problem, or in resolving it, I'll follow up.


Jul 18, 2008 at 4:28 PM

Additional/conceptual content don't come into play in the partial build, just the assemblies.  If possible you could e-mail the assemblies and the project and that would be enough.



Jul 22, 2008 at 6:57 PM
I think we have our problem figured out.  We have a namespace that is defined in more than one of the DLLs included for documentation, and ApiFilter does not seem to expect that.  It can create the initial filters, but cannot load them thereafter.  Commenting out the second reference to the namespace in the <apiFilter> section of the Sandcastle XML allows ApiFilter to finish its build.  
Jul 22, 2008 at 8:32 PM

I have a couple of projects in which assemblies have a common namespace defined in each but they work fine with the API filter.  Can you put together a small example or send me the project that is failing so that I can test it to see what is different?



Aug 4, 2008 at 7:47 AM
Edited Aug 4, 2008 at 7:49 AM

We are having the same problem too. Not on Vista, but on Windows XP and Windows Server 2003 machines. The "unable to build" dialog appears both in the Namespaces dialog and in the API filter dialog, and almost instantly. Nothing seems to be happening before the error occurs.

Additionaly (no idea if the problem could be related), we see documentation for a <Module> class being generated, in the root. I have no idea where this is coming from.

 I will send you the assemblies concerned.

EDIT: The documentation builds normally.

Aug 12, 2008 at 2:58 AM
At least in the last case, this was caused by setting HelpFileFormat to Website and not having the Help 1 and/or Help 2 compilers installed. Partial builds don't copy the help file format property and thus expect at least the Help 1 compiler to be found. Changes to the project format have fixed this for the next release.  Since nobody else supplied a test case, I've closed the related work item.

Feb 3, 2009 at 4:34 PM
Edited Feb 3, 2009 at 5:05 PM
Resurrecting this thread once again. I have emailed you a demo. This was compiled on Windows Server 2008. Additionally I cannot build. This is causing me a huge headache. Any way to get a fix?

Adding the following to the Template\GenerateRefInfo.bat fixes the probelm for me but obviously this is not a generic solution.

copy [PathToInterop]\Interop.AZROLESLib.dll .

Feb 3, 2009 at 7:54 PM
If it's failing because it can't find a dependency, add the indicated dependency to the project's Dependencies property (SHFB or the References project node (SHFB