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

How to change platform for Sandcastle project to x86

Topics: Developer Forum
May 19, 2014 at 4:50 PM
I am trying to build a Sandcastle Visual Studio 2010 project and I keep getting SHFB: Error BE0042: You must specify at least one documentation source in the form of an assembly or a Visual Studio solution/project file.

I know why this is happening, looking at the configuration properties for the solution the Sandcastle project has Any CPU as the platform and the project I am trying to use as the documentation source has x86. I have tried many times to change the Sandcastle project to x86 but every time I open the configuration properties it has defaulted back to Any CPU. Is there any way to change the Sandcastle Visual Studio 2010 Project to x86 so it stays with that platform?
May 19, 2014 at 8:18 PM
That error means that you haven't added a documentation source to the SHFB project. Right click on the Documentation Source project node and select the Add option. Pick either an assembly and XML comments file or a project or solution. See the walkthrough on creating a project.

If it complains about not being able to find the assembly with the given build configuration, then you need to set the configuration and platform. If using the standalone GUI, you can use the combo boxes on the toolbar. If using Visual Studio, you can use the configuration manager to change the configuration and platform for the SHFB project and it will use those on the solution and project documentation sources. Another alternative to the configuration manager is to explicitly set the configuration and platform to use in the properties for each documentation source.

May 20, 2014 at 10:35 AM
Hi Eric,

It's the Visual Studio configuration manager that I'm having problems with. For compatibility reasons the documentation source needs to be x86 but when I change the platform for the Sandcastle project in Visual Studio is always defaults back to Any CPU, it never stays at x86. Using the standalone GUI the change of platform does stay and it builds correctly, I was just hoping that there was a way to do it in Visual Studio so I can keep both projects in the same solution.
May 20, 2014 at 4:22 PM
I'll check to see if I can duplicate the problem. In the meantime, set the configuration and platform explicitly on the documentation source's properties. That will force it to use the ones specified rather than the ones from the environment.

May 21, 2014 at 9:30 AM
Hi Eric,

Setting the configuration in the document source properties has fixed the issue. Thanks for your help.
Feb 5, 2015 at 7:49 PM
Edited Feb 5, 2015 at 8:20 PM
"Setting the configuration in the document source properties"

Where are the document source properties? This is not a category in the SHFB project settings (checked both in the standalone GUI and in Visual Studio.) There is a "Documentation Sources" folder in the Solution Explorer for that project, but I can't find a way to set any properties on it.
Feb 5, 2015 at 8:18 PM
Edited Feb 5, 2015 at 8:19 PM
In the SHFB project, expand the Documentation Source project node, pick the project or solution you want, and you'll see the setting in the properties window (the pane at the bottom of the Project Explorer window in the standalone GUI or the standard Properties (F4 or Alt+Enter) tool window in Visual Studio).